Ticket #37923: Portfile.diff

File Portfile.diff, 3.8 KB (added by cooljeanius (Eric Gallager), 12 years ago)

diff to apply to the Portfile for the MacPorts port

  • Portfile

    old new  
    44
    55name                MacPorts
    66version             2.1.3
     7revision            1
    78
    89categories          sysutils
    910platforms           darwin freebsd
     
    3738# clean environment, enable it here.
    3839configure.args      --enable-readline
    3940
    40 # We don't want to use anything supplied by ports when building MacPorts itself.
    41 configure.env       PATH=/usr/bin:/bin:/usr/sbin:/sbin
     41variant mp_deps      description "Use ports supplied by MacPorts to fulfill missing dependencies" {
     42depends_build-append port:bsdmake \
     43                     port:bzr \
     44                     port:gpatch \
     45                     port:mercurial \
     46                     port:xz \
     47                     port:swig-tcl \
     48                     port:gnustep-make \
     49                     port:gnustep-make-cocoa
     50                     #The other gnustep ports are left out because they're broken
     51configure.env-append BSDMAKE=${prefix}/bin/bsdmake \
     52                     BZR=${prefix}/bin/bzr \
     53                     GPATCH=${prefix}/bin/gpatch \
     54                     HG=${prefix}/bin/hg \
     55                     LZMA=${prefix}/bin/lzma \
     56                     SWIG=${prefix}/bin/swig \
     57                     XZ=${prefix}/bin/xz \
     58                     GNUSTEP_SYSTEM_ROOT=${prefix}/GNUstep \
     59                     PATH=${prefix}/bin:/usr/bin:/bin:/usr/sbin:/sbin
     60configure.args-append --prefix=${prefix}
     61}
     62
     63variant mp_shadow_deps requires mp_deps description "Use ports supplied by MacPorts as dependencies, even if they shadow standard OS X system tools" {
     64depends_build-append port:bzip2 \
     65                     port:cpio \
     66                     port:file \
     67                     port:git-core \
     68                     port:cctools \
     69                     port:gnutar \
     70                     port:gzip \
     71                     port:openssl \
     72                     port:rsync \
     73                     port:subversion \
     74                     port:unzip \
     75                     path:bin/xar:xar \
     76                     port:zip
     77    pre-configure {
     78        ui_msg "Warning: Using this variant could possibly be dangerous."
     79    }
     80configure.env-append BZIP2=${prefix}/bin/bzip2 \
     81                     FILE=${prefix}/bin/file \
     82                     GIT=${prefix}/bin/git \
     83                     GNUTAR=${prefix}/bin/gnutar \
     84                     GZIP=${prefix}/bin/gzip \
     85                     LIPO=${prefix}/bin/lipo \
     86                     OPENSSL=${prefix}/bin/openssl \
     87                     RSYNC=${prefix}/bin/rsync \
     88                     SVN=${prefix}/bin/svn \
     89                     UNZIP=${prefix}/bin/unzip \
     90                     XAR=${prefix}/bin/xar \
     91                     ZIP=${prefix}/bin/zip \
     92                     PATH=${prefix}/bin:${prefix}/sbin:/usr/bin:/bin:/usr/sbin:/sbin
     93}
     94
     95if {![variant_isset mp_deps]} {
     96    # We don't want to use anything supplied by ports when building MacPorts itself
     97    # (unless the user requests the variant specifying otherwise, that is)
     98    configure.env       PATH=/usr/bin:/bin:/usr/sbin:/sbin
     99
     100    # When not using the mp_deps variant, MacPorts' configure removes ${prefix}/bin
     101    # from $PATH, so in that case, it's better to not use ccache, to avoid problems.
     102    configure.ccache no
     103}
    42104
    43105# Some of MacPorts' default flags don't play well when we're building MacPorts
    44106# itself; nuke them.
     
    50112compiler.cpath
    51113compiler.library_path
    52114
    53 # MacPorts' configure removes ${prefix}/bin from $PATH,
    54 # so better do not use ccache, to avoid problems.
    55 configure.ccache no
    56 
    57115post-destroot {
    58116    # Only install .default versions of config files.
    59117    delete ${destroot}${prefix}/etc/macports/archive_sites.conf