source: trunk/dports/python/py-pygtk/Portfile

Last change on this file was 115033, checked in by devans@…, 4 years ago

py-pygtk: rebuild to remove references to libpng15.

File size: 3.3 KB
Line 
1# $Id: Portfile 115033 2013-12-23 01:09:33Z ryandesign@macports.org $
2
3PortSystem      1.0
4PortGroup       python 1.0
5PortGroup       active_variants 1.1
6
7set my_name     pygtk
8name            py-${my_name}
9version         2.24.0
10revision        3
11set branch      [join [lrange [split ${version} .] 0 1] .]
12
13python.versions 26 27
14
15categories-append \
16                x11
17
18license         LGPL-2.1+
19maintainers     nomaintainer
20platforms       darwin
21description     PyGTK is the Python binding to GTK+ 2.x
22
23long_description \
24                PyGTK contains modules that allow you to use gtk in Python programs. \
25                At present, it is a fairly complete set of bindings.
26
27homepage        http://www.pygtk.org/
28master_sites    gnome:sources/${my_name}/${branch}/
29distname        ${my_name}-${version}
30use_bzip2       yes
31
32checksums       rmd160  33f597def646261483cbbf5491aeb27bf0d22ea6 \
33                sha256  cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912
34
35build.cmd       make
36build.target    all
37
38destroot.cmd    make
39
40if {${name} ne ${subport}} {
41    depends_build-append \
42                    port:pkgconfig
43    depends_lib-append \
44                    port:atk \
45                    port:gtk2 \
46                    port:libglade2 \
47                    port:py${python.version}-cairo \
48                    port:py${python.version}-gobject \
49                    port:py${python.version}-numpy
50
51    patchfiles      patch-gtk-quartz.diff patch-new-automake.diff
52    use_autoreconf  yes
53    autoreconf.post_args        "-I m4"
54
55    use_configure   yes
56    configure.python ${python.bin}
57    configure.pre_args-delete   --prefix=${prefix}
58    configure.pre_args-append   --prefix=${python.prefix}
59    configure.cflags-append     -I${python.prefix}/include
60    configure.ldflags-append    -L${python.prefix}/lib
61    configure.pkg_config_path   ${python.prefix}/lib/pkgconfig
62               
63    platform darwin 9 {
64        post-patch {
65            reinplace "s| -export-symbols-regex.*||g" \
66                ${worksrcpath}/Makefile.in \
67                ${worksrcpath}/gtk/Makefile.in
68        }
69    }
70
71    destroot.destdir "DESTDIR=${destroot}"
72
73    post-destroot {
74        set docdir ${prefix}/share/doc/${subport}
75        xinstall -d ${destroot}${docdir}
76        xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
77            ${destroot}${docdir}
78        xinstall -d ${destroot}${prefix}/share/gtk-doc/html
79        ln -s ${python.prefix}/share/${my_name} ${destroot}${prefix}/share/${my_name}${python.branch}
80        # devhelp requires gtk-doc directory name  and .devhelp file name (less the .devhelp) to match
81        file rename ${destroot}${python.prefix}/share/gtk-doc/html/${my_name}/${my_name}.devhelp \
82                    ${destroot}${python.prefix}/share/gtk-doc/html/${my_name}/${my_name}${python.branch}.devhelp
83        file rename ${destroot}${python.prefix}/share/gtk-doc/html/${my_name} \
84                    ${destroot}${prefix}/share/gtk-doc/html/${my_name}${python.branch}
85    }
86
87    variant quartz conflicts x11 {
88        require_active_variants gtk2 quartz
89    }
90    variant x11 conflicts quartz {
91        require_active_variants gtk2 x11
92    }
93    if {![variant_isset x11] && ![variant_isset quartz]} {
94        default_variants +x11
95    }
96
97    livecheck.type  none
98} else {
99    livecheck.type  gnome
100    livecheck.name  ${my_name}
101}
Note: See TracBrowser for help on using the repository browser.