pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: making gnupg work on AIX





Tobias Nygren wrote:
On Fri, 25 Sep 2009 13:38:26 -0400
Louis Guillaume <lguillaume%berklee.edu@localhost> wrote:

Two issues with gnupg on AIX:

  o We must configure with --disable-asm (have patch).
  o We must build WITHOUT `-On' in CFLAGS. (-O1 might work).

... Can we get this into pkgsrc-2009Q3?

I don't see why not.

This is cumbersome as I have to manually build gnupg with special CFLAGS each time. I have -O3 set in CFLAGS in mk.conf. Is it possible to override this at build time with some setting in the Makefile? Like a substitution?

Yes, have a look at devel/glib2/hacks.mk for inspiration.

-Tobias


Great! that works. Below is my patch. I've tested the patched version but not the patch itself. If we could get it checked in to pkgsrc-2009Q3 it would be fantastic.

Louis


--- security/gnupg/Makefile.orig        2009-09-25 12:46:05.000000000 -0400
+++ security/gnupg/Makefile     2009-09-25 12:46:51.000000000 -0400
@@ -39,6 +39,10 @@
 CONFIGURE_ARGS+=       --disable-asm
 .endif

+.if ${OPSYS} == "AIX" && defined(ABI) && ${ABI} == 64
+CONFIGURE_ARGS+=       --disable-asm
+.endif
+
 # XXX: still needed?
 .if ${OPSYS} == "FreeBSD"
 SUBST_CLASSES+=            fixme
--- security/gnupg/hacks.mk.orig        2009-09-27 09:51:45.000000000 -0400
+++ security/gnupg/hacks.mk     2009-09-27 09:35:54.000000000 -0400
@@ -11,4 +11,13 @@
 BUILDLINK_TRANSFORM+=  rm:-mcpu=.*
 .endif

+# Turn off optimization in CFLAGS for AIX. Otherwise
+# decryption fails with, "Rijndael-128 test encryption failed."
+# at runtime.
+
+.if ${OPSYS} == "AIX"
+PKG_HACKS+=     aix-nooptim
+CFLAGS:=        -O0 ${CFLAGS:C/[+,-]O[0-9]?//g}
+.endif
+
 .endif


Home | Main Index | Thread Index | Old Index