summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-16 23:45:25 +0000
committerjlam <jlam@pkgsrc.org>2004-11-16 23:45:25 +0000
commita37b1ba53e9254a632fcf0573f2e810a18add78c (patch)
tree923d67d90e2964f9932547ee04f205c3904478f0 /databases
parent1f652193aedd01030ec4725a8b2fa10d83f79c0b (diff)
downloadpkgsrc-a37b1ba53e9254a632fcf0573f2e810a18add78c.tar.gz
Migrate powerpc hack to hacks.mk to simplify core logic in Makefile.
Diffstat (limited to 'databases')
-rw-r--r--databases/db4/Makefile24
-rw-r--r--databases/db4/hacks.mk29
2 files changed, 30 insertions, 23 deletions
diff --git a/databases/db4/Makefile b/databases/db4/Makefile
index da9113db5b7..f1099a07de4 100644
--- a/databases/db4/Makefile
+++ b/databases/db4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2004/11/10 15:51:23 jlam Exp $
+# $NetBSD: Makefile,v 1.26 2004/11/16 23:45:25 jlam Exp $
DISTNAME= db-4.2.52
PKGNAME= ${DISTNAME:S/db/db4/}
@@ -34,28 +34,6 @@ CONFIGURE_ARGS+= --program-transform-name=s,db_,db4_,
# needed for this package the following does no harm on other platform.
CONFIGURE_ENV+= F77=${FALSE}
-.if ${MACHINE_ARCH} == "powerpc"
-. include "../../mk/compiler.mk"
-. if !empty(CC_VERSION:Mgcc*)
-. if !defined(_GCC_IS_TOO_OLD)
-_GCC_IS_TOO_OLD!= \
- if ${PKG_ADMIN} pmatch 'gcc<3.3' ${CC_VERSION}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-MAKEFLAGS+= _GCC_IS_TOO_OLD=${_GCC_IS_TOO_OLD}
-. endif
-. if !empty(_GCC_IS_TOO_OLD:M[yY][eE][sS])
-#
-# Pre-3.3 GCC has an optimization bug tickled by the db4 code, so remove
-# optimization.
-#
-BUILDLINK_TRANSFORM+= rm:-O[0-9]*
-. endif
-. endif
-.endif
-
.if defined(WITH_JAVA) && (${WITH_JAVA} == "yes")
CONFIGURE_ARGS+= --enable-java
. include "../../mk/java-vm.mk"
diff --git a/databases/db4/hacks.mk b/databases/db4/hacks.mk
new file mode 100644
index 00000000000..4e2a9336cfb
--- /dev/null
+++ b/databases/db4/hacks.mk
@@ -0,0 +1,29 @@
+# $NetBSD: hacks.mk,v 1.1 2004/11/16 23:45:25 jlam Exp $
+
+### [Sun Mar 14 19:32:40 UTC 2004 : jlam]
+### Pre-3.3 GCC has an optimization bug on powerpc that's tickled by
+### the db4 source code, so remove optimization flags in that case.
+### This fixes PR 23737 by John Klos.
+###
+.if ${MACHINE_ARCH} == "powerpc"
+. include "../../mk/compiler.mk"
+. if !empty(CC_VERSION:Mgcc*)
+. if !defined(_GCC_IS_TOO_OLD)
+_GCC_IS_TOO_OLD!= \
+ if ${PKG_ADMIN} pmatch 'gcc<3.3' ${CC_VERSION}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+MAKEFLAGS+= _GCC_IS_TOO_OLD=${_GCC_IS_TOO_OLD}
+. endif
+. if !empty(_GCC_IS_TOO_OLD:M[yY][eE][sS])
+#
+# Pre-3.3 GCC has an optimization bug tickled by the db4 code, so remove
+# optimization.
+#
+PKG_HACKS+= powerpc-codegen
+BUILDLINK_TRANSFORM+= rm:-O[0-9]*
+. endif
+. endif
+.endif