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

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

botan: version 1.10.9

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 132679 2015-02-07 09:17:44Z mww@macports.org $
2
3PortSystem          1.0
4PortGroup           muniversal 1.0
5
6name                botan
7version             1.10.9
8categories          security devel
9platforms           darwin
10maintainers         mww
11license             BSD
12description         cryptographic algorithms and formats library in C++
13long_description    Botan is a C++ library implementing a variety of \
14                    cryptographic algorithms and formats. At this time, it is \
15                    quite stable, and is suitable for use in a wide variety of \
16                    programs.
17
18homepage            http://botan.randombit.net/
19master_sites        http://files.randombit.net/botan/
20distfiles           Botan-${version}.tgz
21worksrcdir          Botan-${version}
22checksums           rmd160  2412c33938442ffff6eca67c2db4c7a2a55b2a41 \
23                    sha256  487d27d3a081ae403cf87c0fc78c2a64183f001b48f9feb87e8de1e16fba8df2
24
25depends_build       port:python27
26depends_lib         port:openssl port:zlib port:bzip2
27
28worksrcdir          Botan-${version}
29
30configure.cmd       ${prefix}/bin/python2.7 ./configure.py
31configure.args      --docdir=share/doc --with-openssl --with-zlib --with-bzip2
32
33if {[string match *clang* ${configure.compiler}]} {
34  configure.args-append --cc=clang
35} elseif {[string match *gcc* ${configure.compiler}]} {
36  configure.args-append --cc=gcc
37}
38
39destroot.destdir    DESTDIR=${destroot}${prefix}
40
41platform darwin { configure.args-append --os=darwin }
42
43# botan way of setting cpu type in build phase
44array set merger_configure_args {
45    ppc     --cpu=ppc
46    i386    --cpu=ia32
47    ppc64   --cpu=ppc64
48    x86_64  --cpu=amd64
49}
50
51if {![variant_isset universal]} {
52    if {[info exists build_arch] && ${os.platform} eq "darwin"} {
53        switch ${build_arch} {
54            ppc -
55            i386 {
56                build.args CXX="${configure.cxx} -m32"
57            }
58            ppc64 -
59            x86_64 {
60                build.args CXX="${configure.cxx} -m64"
61            }
62        }
63        if {[info exists merger_configure_args($build_arch)]} {
64            configure.args-append $merger_configure_args(${build_arch})
65        }
66    } else {
67        build.args CXX="${configure.cxx}"
68    }
69} else {
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    }
74}
75
76# configure.py rejects this argument
77configure.universal_args-delete --disable-dependency-tracking
78
79livecheck.regex     "Botan-(1.10.\[0-9\]+).tgz"
80livecheck.url       http://botan.randombit.net/download.html
Note: See TracBrowser for help on using the repository browser.