source: trunk/dports/devel/libgcrypt/Portfile

Last change on this file was 151564, checked in by mps@…, 13 months ago

libgcrypt: security update to version 1.7.3.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
2# $Id: Portfile 151564 2016-08-17 21:43:55Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       muniversal 1.0
6
7name            libgcrypt
8version         1.7.3
9categories      devel security
10# libs are LGPL, executables and docs are GPL
11license         {GPL-2+ LGPL-2.1+}
12maintainers     mps openmaintainer
13description     Crypto library
14homepage        http://www.gnupg.org/
15platforms       darwin
16
17long_description \
18    Libgcrypt is a general purpose cryptographic library originally \
19    based on code from GnuPG. It provides functions for all \
20    cryptographic building blocks: symmetric cipher algorithms and \
21    modes, hash algorithms, MACs, public key algorithms, large integer \
22    functions, random numbers and a lot of supporting functions.
23
24master_sites    gnupg
25use_bzip2       yes
26
27checksums       rmd160  0d3cd1f17572dfaccf098cfaea79d36d6f484418 \
28                sha256  ddac6111077d0a1612247587be238c5294dd0ee4d76dc7ba783cc55fb0337071
29
30depends_lib     port:libgpg-error
31
32configure.args  --disable-asm
33
34# Build fix for compilers that default to c99 (clang)
35configure.cflags-append "-std=gnu89"
36
37# Some versions of gcc fail to build this for i386 including:
38#     gcc-4.0 from XCode 3.1.6 (5493) -- Note that gcc-4.0 from XCode 2.5 (5370) works
39#     gcc-4.2 from XCode 3.1.6 (5577)
40#     gcc-4.2 from XCode 3.2.6 (5666.3)
41# rijndael.c: In function 'do_aesni_ctr':
42# rijndael.c:895: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
43# rijndael.c:895: error: 'asm' operand has impossible constraints
44if {${build_arch} eq "i386" || ([variant_isset universal] && [lsearch ${universal_archs} i386] != -1)} {
45    if {[vercmp ${xcodeversion} 3.0] >= 0} {
46        compiler.blacklist-append gcc-4.0
47    }
48    compiler.blacklist-append gcc-4.2
49}
50
51if {[string match "*clang*" ${configure.compiler}]} {
52    # libgcrypt-1.5.0 does some ugly stuff with their udiv_qrnnd macro in mpih-div.c
53    # error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast
54    configure.cflags-append "-fheinous-gnu-extensions"
55}
56
57use_parallel_build  yes
58
59post-patch {
60    if {[variant_isset universal]} {
61        reinplace "s/@LIBGCRYPT_CONFIG_HOST@/${os.arch}-apple-darwin${os.major}/" ${worksrcpath}/src/libgcrypt-config.in
62    }
63}
64
65post-destroot {
66    set docdir ${prefix}/share/doc/${name}
67    xinstall -d ${destroot}${docdir}
68    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.LIB ChangeLog \
69        NEWS README THANKS TODO VERSION ${destroot}${docdir}
70}
71
72test.run        yes
73test.target     check
74
75livecheck.type  regex
76livecheck.url   ftp://ftp.gnupg.org/gcrypt/${name}/
77livecheck.regex ${name}-(\\d+\\.\\d+\\.\\d+)
Note: See TracBrowser for help on using the repository browser.