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

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

glib2, glib2-devel: blacklist clang < 600 when using gcocoanotificationbackend (#49515)

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