source: trunk/dports/devel/glib2-devel/Portfile @ 127768

Last change on this file since 127768 was 127768, checked in by ryandesign@…, 5 years ago

glib2, glib2-devel: don't dlclose in _g_module_close (#45309)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 127768 2014-11-03 19:37:25Z ryandesign@macports.org $
3
4PortSystem                  1.0
5PortGroup                   compiler_blacklist_versions 1.0
6PortGroup                   conflicts_build 1.0
7
8# Please keep the glib2 and glib2-devel ports as similar as possible.
9
10name                        glib2-devel
11conflicts                   glib2
12set my_name                 glib
13version                     2.43.0
14revision                    1
15set branch                  [join [lrange [split ${version} .] 0 1] .]
16categories                  devel
17maintainers                 ryandesign openmaintainer
18license                     LGPL-2+
19homepage                    http://www.gtk.org/
20platforms                   darwin
21dist_subdir                 glib2
22distname                    ${my_name}-${version}
23use_xz                      yes
24use_parallel_build          yes
25
26description                 Library with data structure functions and other constructs
27
28long_description            Glib is a library which includes support routines \
29                            for C, such as lists, trees, hashes, memory \
30                            allocation, and many other things.
31
32master_sites                gnome:sources/${my_name}/${branch}/
33
34checksums                   rmd160  eeb342b653053bd3b271c41ae87643b7f0b3300a \
35                            sha256  b01efba5a9301a4ae32f5d5623bcda31917839d4f1bfe879775b2df34c8cfdd7
36
37# ${prefix}/include/glib-2.0/glib/gi18n.h requires -I${prefix}/include to find libintl.h
38# See https://trac.macports.org/changeset/27148
39patchfiles                  patch-configure.diff \
40                            patch-glib-2.0.pc.in.diff \
41                            patch-glib-gmain.c.diff \
42                            patch-glib_gunicollate.c.diff \
43                            patch-gi18n.h.diff \
44                            patch-gio_xdgmime_xdgmime.c.diff \
45                            patch-gio_gdbusprivate.c.diff \
46                            patch-get-launchd-dbus-session-address.diff \
47                            patch-gmodule-gmodule-dl.c.diff \
48                            yosemite-symbol-lookup.patch
49
50depends_build               bin:xmllint:libxml2
51
52depends_lib                 port:gettext \
53                            port:libiconv \
54                            port:zlib \
55                            port:libffi \
56                            path:bin/perl:perl5
57
58# GLib-CRITICAL **: attempting to free a locked GVariant instance.  This should never happen.
59compiler.blacklist-append   {clang < 318}
60
61# https://bugzilla.gnome.org/show_bug.cgi?id=697017
62compiler.blacklist-append   gcc-3.3 gcc-4.0 apple-gcc-4.0
63
64# -lresolv is needed at least on Tiger PPC.
65configure.ldflags-append    -lresolv \
66                            -bind_at_load
67
68configure.cflags-append     -fstrict-aliasing
69
70configure.args              --enable-static --disable-libelf \
71                            --disable-compile-warnings
72
73configure.perl              ${prefix}/bin/perl
74configure.python            /usr/bin/python
75configure.env-append        PERL_PATH=${configure.perl} \
76                            PKG_CONFIG=false \
77                            ZLIB_CFLAGS="-I${prefix}/include" \
78                            ZLIB_LIBS="-L${prefix}/lib -lz"
79
80post-patch {
81    reinplace "s|data_dirs = \"/usr|data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/glib/gutils.c
82    reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c
83    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/xdgmime/xdgmime.c
84    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/gio/gdbusprivate.c
85    reinplace "s|#! */usr/bin/env python|#!${configure.python}|g" ${worksrcpath}/glib/gtester-report
86    reinplace "s|-Werror=missing-prototypes||" ${worksrcpath}/configure
87}
88
89pre-configure {
90    set libffi_version      [exec sed -n {s/Version: //p} ${prefix}/lib/pkgconfig/libffi.pc]
91    configure.env-append    LIBFFI_CFLAGS="-I${prefix}/lib/libffi-${libffi_version}/include" \
92                            LIBFFI_LIBS="-L${prefix}/lib -lffi"
93}
94
95post-configure {
96    system "ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed"
97}
98
99build.args                  V=1
100
101test.run                    yes
102test.target                 check
103
104post-destroot {
105    file delete ${destroot}${prefix}/lib/charset.alias
106
107    set docdir ${prefix}/share/doc/${name}
108    xinstall -d ${destroot}${docdir}
109    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog HACKING NEWS \
110        README ${destroot}${docdir}
111}
112
113platform darwin {
114    configure.args-append   --disable-dtrace
115}
116
117platform darwin 8 {
118    depends_lib-append      port:python27
119    configure.python        ${prefix}/bin/python2.7
120}
121
122livecheck.type              gnome-with-unstable
123livecheck.name              ${my_name}
Note: See TracBrowser for help on using the repository browser.