Ignore:
Timestamp:
Sep 29, 2014, 5:46:16 AM (5 years ago)
Author:
cal@…
Message:

botan: add python2.7 dependency and universal variant, closes #39635

Without the python2.7 dependency the port might fail to build if somebody
selected python3 as his "python". I know that's discouraged, but people do it
anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/security/botan/Portfile

    r124635 r125904  
    11# $Id$
    22
    3 PortSystem 1.0
     3PortSystem          1.0
     4PortGroup           muniversal 1.0
    45
    56name                botan
    67version             1.10.8
     8revision            1
    79categories          security devel
    810platforms           darwin
     
    2325use_bzip2           yes
    2426
     27depends_build       port:python27
    2528depends_lib         port:openssl port:zlib port:bzip2
    2629
    2730worksrcdir          Botan-${version}
    2831
    29 configure.cmd       ./configure.py
     32configure.cmd       ${prefix}/bin/python2.7 ./configure.py
    3033configure.args      --docdir=share/doc --with-openssl --with-zlib --with-bzip2
    3134
     
    4043platform darwin { configure.args-append --os=darwin }
    4144
    42 if {[info exists build_arch] && ${os.platform} eq "darwin"} {
    43     if {(${build_arch} eq "i386")} {
    44         configure.args-append --cpu=ia32
    45         build.args CXX="${configure.cxx} -m32"
    46     } elseif {(${build_arch} eq "x86_64")} {
    47         configure.args-append --cpu=amd64
    48         build.args CXX="${configure.cxx} -m64"
    49     } elseif {(${build_arch} eq "ppc")} {
    50         configure.args-append --cpu=ppc
    51         build.args CXX="${configure.cxx} -m32"
    52     } elseif {(${build_arch} eq "ppc64")} {
    53         configure.args-append --cpu=ppc64
    54         build.args CXX="${configure.cxx} -m64"
     45# botan way of setting cpu type in build phase
     46array set merger_configure_args {
     47    ppc     --cpu=ppc
     48    i386    --cpu=ia32
     49    ppc64   --cpu=ppc64
     50    x86_64  --cpu=amd64
     51}
     52
     53if {![variant_isset universal]} {
     54    if {[info exists build_arch] && ${os.platform} eq "darwin"} {
     55        switch ${build_arch} {
     56            ppc -
     57            i386 {
     58                build.args CXX="${configure.cxx} -m32"
     59            }
     60            ppc64 -
     61            x86_64 {
     62                build.args CXX="${configure.cxx} -m64"
     63            }
     64        }
     65        configure.args-append $merger_configure_args(${build_arch})
     66    } else {
     67        build.args CXX="${configure.cxx}"
    5568    }
    5669} else {
    57     build.args CXX="${configure.cxx}"
     70    # the arch flag is lost in the build phase, so put it back
     71    foreach arch ${configure.universal_archs} {
     72        lappend merger_build_args(${arch}) CXX='${configure.cxx} -arch ${arch}'
     73    }
    5874}
    5975
    60 universal_variant   no
     76# configure.py rejects this argument
     77configure.universal_args-delete --disable-dependency-tracking
    6178
    6279livecheck.regex     "Botan-(1.10.\[0-9\]+).tbz"
Note: See TracChangeset for help on using the changeset viewer.