[91558] trunk/dports/devel/libgcrypt/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Wed Apr 4 19:39:47 PDT 2012
Revision: 91558
https://trac.macports.org/changeset/91558
Author: jeremyhu at macports.org
Date: 2012-04-04 19:39:47 -0700 (Wed, 04 Apr 2012)
Log Message:
-----------
libgcrypt: Build fix for Leopard/i386
Modified Paths:
--------------
trunk/dports/devel/libgcrypt/Portfile
Modified: trunk/dports/devel/libgcrypt/Portfile
===================================================================
--- trunk/dports/devel/libgcrypt/Portfile 2012-04-05 02:37:59 UTC (rev 91557)
+++ trunk/dports/devel/libgcrypt/Portfile 2012-04-05 02:39:47 UTC (rev 91558)
@@ -1,7 +1,8 @@
# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
# $Id$
-PortSystem 1.0
+PortSystem 1.0
+PortGroup muniversal 1.0
name libgcrypt
version 1.5.0
@@ -39,31 +40,41 @@
configure.cflags-append "-std=gnu89"
if {[string match "*clang*" ${configure.compiler}]} {
- # libgcrypt-1.5.0 does some ugly stuff with their udiv_qrnnd macro in mpih-div.c
- # error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast
- configure.cflags-append "-fheinous-gnu-extensions"
+ # libgcrypt-1.5.0 does some ugly stuff with their udiv_qrnnd macro in mpih-div.c
+ # error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast
+ configure.cflags-append "-fheinous-gnu-extensions"
} elseif {${configure.compiler} == "gcc-4.2"} {
- # Some versions of gcc fail to build this for i386 including:
- # gcc-4.0 from XCode 3.1.6 (5493) -- Note that gcc-4.0 from XCode 2.5 (5370) works
- # gcc-4.2 from XCode 3.1.6 (5577)
- # gcc-4.2 from XCode 3.2.6 (5666.3)
- # rijndael.c: In function 'do_aesni_ctr':
- # rijndael.c:895: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
- # rijndael.c:895: error: 'asm' operand has impossible constraints
- configure.compiler llvm-gcc-4.2
+ # Some versions of gcc fail to build this for i386 including:
+ # gcc-4.0 from XCode 3.1.6 (5493) -- Note that gcc-4.0 from XCode 2.5 (5370) works
+ # gcc-4.2 from XCode 3.1.6 (5577)
+ # gcc-4.2 from XCode 3.2.6 (5666.3)
+ # rijndael.c: In function 'do_aesni_ctr':
+ # rijndael.c:895: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
+ # rijndael.c:895: error: 'asm' operand has impossible constraints
+ configure.compiler llvm-gcc-4.2
+} elseif {${configure.compiler} == "gcc-4.0" && [vercmp ${xcodeversion} 3.0] >= 0} {
+ if {[variant_isset universal] || ${build_arch} == "i386"} {
+ depends_build port:clang-3.0
+ depends_skip_archcheck-append clang-3.0
+
+ if {[variant_isset universal]} {
+ set merger_configure_compiler(i386) macports-clang-3.0
+ lappend merger_configure_cflags(i386) -fheinous-gnu-extensions
+ } else {
+ configure.compiler macports-clang-3.0
+ configure.cflags-append "-fheinous-gnu-extensions"
+ }
+ }
}
-# elseif {${configure.compiler} == "gcc-4.0" && [vercmp ${xcodeversion} 3.0] >= 0} {
-# supported_archs ppc x86_64
-#}
-post-configure {
+use_parallel_build yes
+
+post-patch {
if {[variant_isset universal]} {
- system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed && touch stamp-h1"
+ reinplace "s/@LIBGCRYPT_CONFIG_HOST@/${os.arch}-apple-darwin${os.major}/" ${worksrcpath}/src/libgcrypt-config.in
}
}
-use_parallel_build yes
-
post-destroot {
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120404/2fe44cbe/attachment.html>
More information about the macports-changes
mailing list