Ticket #43071: patch-distcc-Portfile-from-43071.diff

File patch-distcc-Portfile-from-43071.diff, 6.6 KB (added by cooljeanius (Eric Gallager), 10 years ago)

diff between my Portfile and the OP's

  • Portfile

    old new  
    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 114817 2013-12-16 07:46:32Z ryandesign@macports.org $
    3 
     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 114817 2013-12-16 07:46:32Z ryandesign@macports.org $
     3
    44PortSystem          1.0
    55
    6 name                distcc
    7 version             3.2rc1
    8 revision            1
    9 categories          devel net
    10 platforms           darwin
    11 maintainers         nomaintainer
    12 license             GPL-2+
    13 
    14 description         Distributed C compiler
    15 
    16 long_description    distcc is a program to distribute compilation of C or \
    17                     C++ code across several machines on a network without \
    18                     requiring that they share filesystems, have the same \
    19                     headers/libraries or have syncronized clocks. distcc \
    20                     should always generate the same results as a local \
    21                     compile but is often 2 to 3 times faster.
    22 
    23 homepage            http://distcc.org/
    24 master_sites        googlecode
    25 use_bzip2           yes
    26 
    27 checksums           rmd160  505447b910d90ea403a98fe0d0a3a0fa92cd7039 \
    28                     sha256  311671e844625d7fdb18dd3d096cd855751cfe8de13827682bcb7beff9133b30
    29 
    30 depends_build           port:pkgconfig
    31 
    32 depends_lib         port:popt
    33 
    34 patchfiles              patch-zeroconf-reg.c
    35 
    36 configure.args      ac_cv_path_PYTHON= \
    37                     --disable-Werror \
    38                                 --without-avahi
    39 
     6PortGroup           muniversal 1.0
     7
     8name                distcc
     9version             3.2rc1
     10revision            1
     11categories          devel net
     12platforms           darwin
     13maintainers         nomaintainer
     14license             GPL-2+
     15
     16description         Distributed C compiler
     17
     18long_description    distcc is a program to distribute compilation of C or \
     19                    C++ code across several machines on a network without \
     20                    requiring that they share filesystems, have the same \
     21                    headers/libraries or have syncronized clocks. distcc \
     22                    should always generate the same results as a local \
     23                    compile but is often 2 to 3 times faster.
     24
     25homepage            http://distcc.org/
     26master_sites        googlecode
     27use_bzip2           yes
     28
     29checksums           rmd160  505447b910d90ea403a98fe0d0a3a0fa92cd7039 \
     30                    sha256  311671e844625d7fdb18dd3d096cd855751cfe8de13827682bcb7beff9133b30
     31
     32depends_build       port:pkgconfig
     33
     34depends_lib         port:popt
     35
     36patchfiles-append   patch-zeroconf-reg.c.diff
     37
     38configure.args-append \
     39                    ac_cv_path_PYTHON="" \
     40                    --disable-Werror \
     41                    --without-avahi \
     42                    --without-gtk \
     43                    --without-gnome \
     44                    --without-included-popt
     45
     46configure.env-append \
     47                    ac_cv_path_PYTHON=""
     48#TODO: add python variants so that it can be possible to run all the tests
     49
     50test.run yes
     51test.target maintainer-check
     52
    4053post-destroot {
    41         xinstall -m 0755 ${worksrcpath}/pump ${destroot}${prefix}/bin/distcc-pump
    42         copy ${destroot}${prefix}/share/man/man1/pump.1.gz ${destroot}${prefix}/share/man/man1/distcc-pump.1.gz
    43         xinstall -m 0755 ${filespath}/distcc-pumpedshell ${destroot}${prefix}/bin
    44         if {![file exists ${prefix}/Library/LaunchDaemons/org.macports.distccd.plist]} {
    45                 xinstall -d -m 0755 ${destroot}${prefix}/Library/LaunchDaemons
    46                 xinstall -m 0644 ${filespath}/org.macports.distccd.plist ${destroot}${prefix}/Library/LaunchDaemons
    47         }
    48 }
    49 
    50 variant zeroconf description {use Avahi to advertise distcc via ZeroConf} {
    51         depends_lib-append      port:avahi
    52 
    53      configure.args-delete      --without-avahi
    54 }
    55 
    56 variant gtk description {Build GTK interface to distccmon} {
    57         depends_lib-append      port:gtk2 \
    58                                         port:libglade2
    59 
    60      configure.args-append      --with-gtk
    61 }
    62 
    63 variant gnome description {Build GNOME interface to distccmon} {
    64         depends_lib-append      port:gtk2 \
    65                                         port:libglade2 \
    66                                         port:libgnome \
    67                                         port:libgnomeui \
    68                                         port:pango
     54    if {[file exists ${worksrcpath}/pump]} {
     55        xinstall -m 0755 ${worksrcpath}/pump ${destroot}${prefix}/bin/distcc-pump
     56    }
     57    if {[file exists ${destroot}${prefix}/share/man/man1/pump.1.gz]} {
     58        copy ${destroot}${prefix}/share/man/man1/pump.1.gz ${destroot}${prefix}/share/man/man1/distcc-pump.1.gz
     59    }
     60    if {[file exists ${destroot}${prefix}/bin/distcc-pump] && [file exists ${filespath}/distcc-pumpedshell]} {
     61        xinstall -m 0755 ${filespath}/distcc-pumpedshell ${destroot}${prefix}/bin
     62    }
     63    if {![file exists ${prefix}/Library/LaunchDaemons/org.macports.distccd.plist]} {
     64        xinstall -d -m 0755 ${destroot}${prefix}/Library/LaunchDaemons
     65        xinstall -m 0644 ${filespath}/org.macports.distccd.plist ${destroot}${prefix}/Library/LaunchDaemons
     66    }
     67}
     68
     69variant zeroconf description {use Avahi to advertise distcc via ZeroConf} {
     70    depends_lib-append  port:avahi
     71
     72    configure.args-replace --without-avahi --with-avahi
     73}
     74
     75variant gtk description {Build GTK interface to distccmon} {
     76    depends_lib-append  port:gtk2 \
     77                        port:libglade2 \
     78                        path:lib/pkgconfig/glib-2.0.pc:glib2
     79    # it will also opportunistically link with a bunch of gtk libraries
     80    # that it does not actually use symbols from: atk, cairo, fontconfig,
     81    # freetype, gdk-pixbuf2, gettext, pango, xorg-libX11,
     82    # xorg-libXcomposite, xorg-libXcursor, xorg-libXdamage, xorg-libXext,
     83    # xorg-libXfixes, xorg-libXi, xorg-libXinerama, xorg-libXrandr, and
     84    # xrender
     85
     86    configure.args-replace --without-gtk --with-gtk
     87}
     88
     89variant gnome requires gtk description {Add GNOME support to the GTK interface to distccmon} {
     90    depends_lib-append  port:libgnome \
     91                        port:libgnomeui \
     92                        path:lib/pkgconfig/pango.pc:pango
     93    # it will also opportunistically link with a bunch of gnome libraries
     94    # that it does not actually use symbols from: besides the ones listed
     95    # under gtk, append also: gconf, gnome-vfs, libart_lgpl, libbonobo,
     96    # libbonoboui, libgnomecanvas, orbit2, xorg-libice, and xorg-libsm
    6997
    70      configure.args-append      --with-gtk
    71 }
     98    configure.args-replace --without-gnome --with-gnome
     99}