summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authortron <tron>2005-08-03 16:55:19 +0000
committertron <tron>2005-08-03 16:55:19 +0000
commitbd4b8411b36470021cbdbe7a4ce2855b1596c2f0 (patch)
tree21c660a68c1b13d475a3ea00960bc1f75d278ec0 /www
parentf1353292fb8c09c7819385a54df4e51cc3876820 (diff)
downloadpkgsrc-bd4b8411b36470021cbdbe7a4ce2855b1596c2f0.tar.gz
Compile without optimization if GCC <4.0 (4.0 not tested) is used on
a powerpc architecture (e.g. NetBSD-mapcppc). This cures display glitches (e.g. text appearing at the wrong location). Bump package revision because of this change.
Diffstat (limited to 'www')
-rw-r--r--www/firefox/Makefile3
-rw-r--r--www/firefox/hacks.mk23
2 files changed, 25 insertions, 1 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 82e0f18bc89..89c88cb949e 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2005/06/03 14:41:19 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2005/08/03 16:55:19 tron Exp $
MOZILLA= firefox
EXTRACT_SUFX= .tar.bz2
+PKGREVISON= 1
COMMENT= Lightweight gecko-based web browser
diff --git a/www/firefox/hacks.mk b/www/firefox/hacks.mk
new file mode 100644
index 00000000000..c8dd1a20d82
--- /dev/null
+++ b/www/firefox/hacks.mk
@@ -0,0 +1,23 @@
+# $NetBSD: hacks.mk,v 1.1 2005/08/03 16:55:19 tron Exp $
+
+# Firefox suffers from display glitches (e.g. text appearing at the wrong
+# location) if it was compiled with optimization.
+
+.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<4.0' ${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])
+PKG_HACKS+= powerpc-codegen
+BUILDLINK_TRANSFORM+= rm:-O[0-9]*
+. endif
+. endif
+.endif