summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-07-17 09:18:27 +0000
committerobache <obache@pkgsrc.org>2014-07-17 09:18:27 +0000
commit2b08c27d68cb81f8bf08eda8f9c29eeba032e2ea (patch)
treed0b2001603994901dc385345e9901b9fffa99820
parenta3776d2bf86a1adda6e2dcc119857152a43812bd (diff)
downloadpkgsrc-2b08c27d68cb81f8bf08eda8f9c29eeba032e2ea.tar.gz
Add hack for using gcc builtin atomic function, missing for i386.
PR pkg/48990. Bump PKGREVISION.
-rw-r--r--textproc/json-c/Makefile4
-rw-r--r--textproc/json-c/hacks.mk15
2 files changed, 17 insertions, 2 deletions
diff --git a/textproc/json-c/Makefile b/textproc/json-c/Makefile
index 34061c3e116..25eeade564d 100644
--- a/textproc/json-c/Makefile
+++ b/textproc/json-c/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2014/05/10 04:09:41 pho Exp $
+# $NetBSD: Makefile,v 1.10 2014/07/17 09:18:27 obache Exp $
DISTNAME= json-c-0.12
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= textproc
MASTER_SITES= https://s3.amazonaws.com/json-c_releases/releases/
diff --git a/textproc/json-c/hacks.mk b/textproc/json-c/hacks.mk
new file mode 100644
index 00000000000..23d7fb03024
--- /dev/null
+++ b/textproc/json-c/hacks.mk
@@ -0,0 +1,15 @@
+# $NetBSD: hacks.mk,v 1.1 2014/07/17 09:18:27 obache Exp $
+
+.if !defined(JSON_C_HACKS_MK)
+JSON_C_HACKS_MK= # defined
+
+# json-c>=0.12 depends on builtin functions which enabled with i486 and
+# later with GCC.
+#
+.include "../../mk/compiler.mk"
+.if !empty(MACHINE_PLATFORM:MNetBSD-[0-5].*-i386) && !empty(CC_VERSION:Mgcc-*)
+GNU_ARCH.i386= i486
+CFLAGS+= -march=i486
+.endif
+
+.endif