Ticket #37923: Portfile.2.diff

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

new diff to apply

  • 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
    12# $Id: Portfile 102342 2013-01-31 17:22:53Z ryandesign@macports.org $
    23
    34PortSystem          1.0
    45
    56name                MacPorts
    67version             2.1.3
     8revision            1
    79
    810categories          sysutils
    911platforms           darwin freebsd
     
    3234    prefix          /opt/local
    3335}
    3436
    35 # Readline is disabled by default to avoid support issues with people who
    36 # have a readline in /usr/local. Since this portfile is presumably used in a
    37 # clean environment, enable it here.
    38 configure.args      --enable-readline
     37variant mp_deps      description "Use ports supplied by MacPorts to fulfill missing dependencies" {
     38depends_build-append port:bsdmake \
     39                     port:bzr \
     40                     port:gpatch \
     41                     port:mercurial \
     42                     port:xz \
     43                     port:swig-tcl \
     44                     port:gnustep-make \
     45                     port:gnustep-make-cocoa
     46                     #The other gnustep ports are left out because they're broken
     47configure.env-append BSDMAKE=${prefix}/bin/bsdmake \
     48                     BZR=${prefix}/bin/bzr \
     49                     GPATCH=${prefix}/bin/gpatch \
     50                     HG=${prefix}/bin/hg \
     51                     LZMA=${prefix}/bin/lzma \
     52                     SWIG=${prefix}/bin/swig \
     53                     XZ=${prefix}/bin/xz \
     54                     GNUSTEP_SYSTEM_ROOT=${prefix}/GNUstep \
     55                     PATH=${prefix}/bin:/usr/bin:/bin:/usr/sbin:/sbin
     56configure.args-append --prefix=${prefix}
     57}
     58
     59variant mp_shadow_deps requires mp_deps description "Use ports supplied by MacPorts as dependencies, even if they shadow standard OS X system tools" {
     60depends_build-append port:bzip2 \
     61                     port:cpio \
     62                     port:file \
     63                     port:git-core \
     64                     port:cctools \
     65                     port:gnutar \
     66                     port:gzip \
     67                     port:openssl \
     68                     port:rsync \
     69                     port:subversion \
     70                     port:unzip \
     71                     path:bin/xar:xar \
     72                     port:zip \
     73                     port:curl \
     74                     port:sqlite3
     75                     #port:tcl-sqlite3
     76    pre-configure {
     77        ui_msg "Warning: Using this variant could possibly be dangerous."
     78    }
     79configure.env-append BZIP2=${prefix}/bin/bzip2 \
     80                     FILE=${prefix}/bin/file \
     81                     GIT=${prefix}/bin/git \
     82                     GNUTAR=${prefix}/bin/gnutar \
     83                     GZIP=${prefix}/bin/gzip \
     84                     LIPO=${prefix}/bin/lipo \
     85                     OPENSSL=${prefix}/bin/openssl \
     86                     RSYNC=${prefix}/bin/rsync \
     87                     SVN=${prefix}/bin/svn \
     88                     UNZIP=${prefix}/bin/unzip \
     89                     XAR=${prefix}/bin/xar \
     90                     ZIP=${prefix}/bin/zip \
     91                     PATH=${prefix}/bin:${prefix}/sbin:/usr/bin:/bin:/usr/sbin:/sbin
     92configure.args-append --with-curlprefix=${prefix} \
     93                      --with-tcl=${prefix}/lib \
     94                      --with-tclinclude=${prefix}/include \
     95                      --with-sqlite3prefix=${prefix} \
     96                      --with-frameworks-dir=${prefix}/Library/Frameworks
     97}
    3998
    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
     99if {![variant_isset mp_deps]} {
     100    # We don't want to use anything supplied by ports when building MacPorts itself
     101    # (unless the user requests the variant specifying otherwise, that is)
     102    configure.env    PATH=/usr/bin:/bin:/usr/sbin:/sbin
     103
     104    # Readline is disabled by default to avoid support issues with people who
     105    # have a readline in /usr/local. Since this portfile is presumably used in a
     106    # clean environment (if not using the mp_deps variant), enable it here.
     107    configure.args-append --enable-readline
     108}
    42109
    43110# Some of MacPorts' default flags don't play well when we're building MacPorts
    44111# itself; nuke them.
     
    50117compiler.cpath
    51118compiler.library_path
    52119
    53 # MacPorts' configure removes ${prefix}/bin from $PATH,
    54 # so better do not use ccache, to avoid problems.
     120# It's better to not use ccache, to avoid problems in general.
    55121configure.ccache no
    56122
    57123post-destroot {