| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | |
|---|
| 5 | name glib2 |
|---|
| 6 | set my_name glib |
|---|
| 7 | version 2.18.3 |
|---|
| 8 | set branch [join [lrange [split ${version} .] 0 1] .] |
|---|
| 9 | categories devel |
|---|
| 10 | maintainers ryandesign |
|---|
| 11 | homepage http://www.gtk.org/ |
|---|
| 12 | platforms darwin |
|---|
| 13 | distname ${my_name}-${version} |
|---|
| 14 | use_bzip2 yes |
|---|
| 15 | use_parallel_build yes |
|---|
| 16 | |
|---|
| 17 | description \ |
|---|
| 18 | Library with data structure functions and other constructs |
|---|
| 19 | |
|---|
| 20 | long_description \ |
|---|
| 21 | Glib is a library which includes support routines for \ |
|---|
| 22 | C, such as lists, trees, hashes, memory allocation, and \ |
|---|
| 23 | many other things. |
|---|
| 24 | |
|---|
| 25 | master_sites \ |
|---|
| 26 | gnome:sources/${my_name}/${branch}/ |
|---|
| 27 | # ftp://ftp.gtk.org/pub/${my_name}/${branch}/ |
|---|
| 28 | |
|---|
| 29 | checksums \ |
|---|
| 30 | md5 f13996a7bd57525d796a6593f26a7771 \ |
|---|
| 31 | sha1 293f639fb85ea47347eb34e122327c60ef7606e4 \ |
|---|
| 32 | rmd160 cf43fbba04250becaabdb7b7f55bcdec584f019e |
|---|
| 33 | |
|---|
| 34 | patchfiles \ |
|---|
| 35 | patch-glib-2.0.pc.in.diff \ |
|---|
| 36 | patch-gutils.c.diff \ |
|---|
| 37 | patch-gi18n.h.diff \ |
|---|
| 38 | patch-which.diff |
|---|
| 39 | |
|---|
| 40 | depends_build \ |
|---|
| 41 | port:pkgconfig |
|---|
| 42 | |
|---|
| 43 | depends_lib \ |
|---|
| 44 | port:gettext \ |
|---|
| 45 | port:libiconv |
|---|
| 46 | |
|---|
| 47 | configure.ldflags-append \ |
|---|
| 48 | -bind_at_load |
|---|
| 49 | |
|---|
| 50 | configure.cflags-append \ |
|---|
| 51 | -funroll-loops \ |
|---|
| 52 | -fstrict-aliasing |
|---|
| 53 | |
|---|
| 54 | configure.args \ |
|---|
| 55 | --enable-static \ |
|---|
| 56 | --mandir=${prefix}/share/man |
|---|
| 57 | |
|---|
| 58 | platform puredarwin { |
|---|
| 59 | depends_run bin:perl:perl5.8 |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | post-patch { |
|---|
| 63 | reinplace "s|data_dirs = \"/usr|data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/glib/gutils.c |
|---|
| 64 | reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | platform darwin { |
|---|
| 68 | patchfiles-append \ |
|---|
| 69 | patch-child-test.c.diff \ |
|---|
| 70 | patch-configure.diff |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | platform powerpc { |
|---|
| 74 | if {[variant_isset universal]} { |
|---|
| 75 | post-configure { |
|---|
| 76 | reinplace {s|^#define G_ATOMIC_POWERPC 1$|#undef G_ATOMIC_POWERPC|} ${worksrcpath}/config.h |
|---|
| 77 | } |
|---|
| 78 | } |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | test.run yes |
|---|
| 82 | test.target check |
|---|
| 83 | |
|---|
| 84 | post-destroot { |
|---|
| 85 | file delete ${destroot}${prefix}/lib/charset.alias |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | platform darwin 6 { |
|---|
| 89 | depends_lib-append lib:libdl:dlcompat |
|---|
| 90 | post-configure { |
|---|
| 91 | reinplace "s|#define HAVE_WCHAR_T 1|#undef HAVE_WCHAR_T|" \ |
|---|
| 92 | ${worksrcpath}/config.h |
|---|
| 93 | } |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | platform darwin 9 { |
|---|
| 97 | patchfiles-append patch-glib_gutils.h.diff |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | livecheck.check regex |
|---|
| 101 | livecheck.url http://ftp.gnome.org/pub/GNOME/sources/${my_name}/${branch}/?C=M&O=D |
|---|
| 102 | livecheck.regex ${my_name}-(\[0-9.\]+)\\.tar |
|---|