From 1d65eb092e179bdc2deef7d8b1094b66cabbdaa1 Mon Sep 17 00:00:00 2001 From: drochner Date: Fri, 8 Jul 2011 09:40:57 +0000 Subject: [PATCH] allow to use gmp/mpfr/mpc which comes with the system (eg on NetBSD-current with gcc45) --- devel/gmp/builtin.mk | 15 +++++++++++++++ math/mpcomplex/builtin.mk | 13 +++++++++++++ math/mpfr/builtin.mk | 13 +++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 devel/gmp/builtin.mk create mode 100644 math/mpcomplex/builtin.mk create mode 100644 math/mpfr/builtin.mk diff --git a/devel/gmp/builtin.mk b/devel/gmp/builtin.mk new file mode 100644 index 000000000000..c0e089138906 --- /dev/null +++ b/devel/gmp/builtin.mk @@ -0,0 +1,15 @@ +# $NetBSD: builtin.mk,v 1.1 2011/07/08 09:40:57 drochner Exp $ + +BUILTIN_PKG:= gmp + +PKGCONFIG_FILE.gmp= /usr/include/gmp.h +PKGCONFIG_BASE.gmp= /usr + +BUILTIN_VERSION_SCRIPT.gmp= ${AWK} \ + '/\#define[ \t]*__GNU_MP_VERSION[ \t]/ { major = $$3; } \ + /\#define[ \t]*__GNU_MP_VERSION_MINOR[ \t]/ { minor = $$3; } \ + /\#define[ \t]*__GNU_MP_VERSION_PATCHLEVEL[ \t]/ { patch = $$3; } \ + END { if (major!="" && minor!="" && patch!="") \ + print major "." minor "." patch; else print ""; }' + +.include "../../mk/buildlink3/pkgconfig-builtin.mk" diff --git a/math/mpcomplex/builtin.mk b/math/mpcomplex/builtin.mk new file mode 100644 index 000000000000..538e9386dd0b --- /dev/null +++ b/math/mpcomplex/builtin.mk @@ -0,0 +1,13 @@ +# $NetBSD: builtin.mk,v 1.1 2011/07/08 09:40:57 drochner Exp $ + +BUILTIN_PKG:= mpcomplex + +PKGCONFIG_FILE.mpcomplex= /usr/include/mpc.h +PKGCONFIG_BASE.mpcomplex= /usr + +BUILTIN_VERSION_SCRIPT.mpcomplex= ${AWK} \ + '/\#define[ \t]*MPC_VERSION_STRING[ \t]/ { \ + v = substr($$3, 2, length($$3)-2); } \ + END { print v; }' + +.include "../../mk/buildlink3/pkgconfig-builtin.mk" diff --git a/math/mpfr/builtin.mk b/math/mpfr/builtin.mk new file mode 100644 index 000000000000..31c9c7d58012 --- /dev/null +++ b/math/mpfr/builtin.mk @@ -0,0 +1,13 @@ +# $NetBSD: builtin.mk,v 1.1 2011/07/08 09:40:57 drochner Exp $ + +BUILTIN_PKG:= mpfr + +PKGCONFIG_FILE.mpfr= /usr/include/mpfr.h +PKGCONFIG_BASE.mpfr= /usr + +BUILTIN_VERSION_SCRIPT.mpfr= ${AWK} \ + '/\#define[ \t]*MPFR_VERSION_STRING[ \t]/ { \ + v = substr($$3, 2, length($$3)-2); } \ + END { print gensub("-p",".",0,v); }' + +.include "../../mk/buildlink3/pkgconfig-builtin.mk"