source: trunk/dports/security/botan/Portfile @ 127982

Last change on this file since 127982 was 127982, checked in by jmr@…, 5 years ago

botan: fix parse failure (#45742)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 127982 2014-11-10 02:33:54Z jmr@macports.org $
2
3PortSystem          1.0
4PortGroup           muniversal 1.0
5
6name                botan
7version             1.10.8
8revision            1
9categories          security devel
10platforms           darwin
11maintainers         mww
12license             BSD
13description         cryptographic algorithms and formats library in C++
14long_description    Botan is a C++ library implementing a variety of \
15                    cryptographic algorithms and formats. At this time, it is \
16                    quite stable, and is suitable for use in a wide variety of \
17                    programs.
18
19homepage            http://botan.randombit.net/
20master_sites        http://files.randombit.net/botan/
21distfiles           Botan-${version}.tbz
22worksrcdir          Botan-${version}
23checksums           rmd160  fc3ef01435a88d8c189f20bbaa671c4142adc537 \
24                    sha256  bc2fd5fe904bba7cd688df021689f53a2d2f87ae728b647196a6b5954d184ea0
25use_bzip2           yes
26
27depends_build       port:python27
28depends_lib         port:openssl port:zlib port:bzip2
29
30worksrcdir          Botan-${version}
31
32configure.cmd       ${prefix}/bin/python2.7 ./configure.py
33configure.args      --docdir=share/doc --with-openssl --with-zlib --with-bzip2
34
35if {[string match *clang* ${configure.compiler}]} {
36  configure.args-append --cc=clang
37} elseif {[string match *gcc* ${configure.compiler}]} {
38  configure.args-append --cc=gcc
39}
40
41destroot.destdir    DESTDIR=${destroot}${prefix}
42
43platform darwin { configure.args-append --os=darwin }
44
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        if {[info exists merger_configure_args($build_arch)]} {
66            configure.args-append $merger_configure_args(${build_arch})
67        }
68    } else {
69        build.args CXX="${configure.cxx}"
70    }
71} else {
72    # the arch flag is lost in the build phase, so put it back
73    foreach arch ${configure.universal_archs} {
74        lappend merger_build_args(${arch}) CXX='${configure.cxx} -arch ${arch}'
75    }
76}
77
78# configure.py rejects this argument
79configure.universal_args-delete --disable-dependency-tracking
80
81livecheck.regex     "Botan-(1.10.\[0-9\]+).tbz"
82livecheck.url       http://botan.randombit.net/download.html
Note: See TracBrowser for help on using the repository browser.