tech-pkg archive

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

gmp/builtin.mk inappropriately uses cpp ... was Re: pkg_chk twisted



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 26/09/14 22:56, Richard PALO a écrit :
> I've not come across this before:
> 
>> richard@omnis:/home/richard/src/pkgsrc$ pkg_chk -u -q
>> devel/nss - nss-3.16.4 < nss-3.16.5
>> bash: gcc: command not found
>> bmake: "../../devel/gmp/../../devel/gmp/builtin.mk" line 34: warning: Couldn't read shell's output for "{ echo "#include </usr/include/gmp/gmp.h>";		 echo "__GNU_MP_VERSION/__GNU_MP_VERSION_MINOR/__GNU_MP_VERSION_PATCHLEVEL";	 } | gcc -E  - | /opt/local/bin/nbsed -e 's,/,.,g' | /usr/xpg4/bin/tail -1"
> 
> using pkgsrc gcc naturally, but this seems to be bypassing something...
> needed to add $GCCBASE/bin to $PATH which should be unnecessary.
> 
> 

I've been running this partial revert for awhile...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJUe/7QAAoJECAB22fHtp27CbQIALmK7N+lp7TD4nvUQxqf/iEl
ZZvZrkrNV1/y5eUQkOTm2wRRuJvxtwwyQ+KdzxHr1DYG7J8ZtUT97JyRCEkafWdR
tvGVRExJd8Bh+SMm8aOnjWK3xuGEn1VdAKQucaaOSo1vkykhny/6qT0b+BDhY0aq
2KLY6Bsbv4zYFKJt1K7IrED2o3rY6Df7PTuvo7rgPFru88+AofcPWEzxTGkT6jzC
V/+s3MszAe6AmVXuPnd1tU44zNgAf4pLYNmdvWpu9osciAD+yaRJwJ074ofmCEgI
RZmLVZXkSHBQpCHXe1PizAnMpdA8LSY+Nd3WOeDFFHcAsR9dEuOMyYtPsA7dojU=
=rROx
-----END PGP SIGNATURE-----
commit 620b3524c5a36a2b1338db2f42fa2621be6dc4c6
Author: Richard PALO <richard%NetBSD.org@localhost>
Date:   Mon Oct 27 07:10:06 2014 +0100

    gmp builtin revert to non cpp version test

diff --git a/devel/gmp/builtin.mk b/devel/gmp/builtin.mk
index b86e193..4d2d791 100644
--- a/devel/gmp/builtin.mk
+++ b/devel/gmp/builtin.mk
@@ -5,10 +5,12 @@ BUILTIN_PKG:=	gmp
 BUILTIN_FIND_HEADERS_VAR:=	H_GMP
 BUILTIN_FIND_HEADERS.H_GMP=	gmp.h gmp/gmp.h
 
-BUILTIN_VERSION_SCRIPT.gmp= 						\
-		{ ${ECHO} "\#include <${H_GMP}>";			\
-		  ${ECHO} "__GNU_MP_VERSION/__GNU_MP_VERSION_MINOR/__GNU_MP_VERSION_PATCHLEVEL";								\
-		} | ${CCPATH:U${CC}} -E  - | ${SED} -e 's,/,.,g' | ${TAIL} -1
+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/bsd.builtin.mk"
 
@@ -31,7 +33,7 @@ MAKEVARS+=	IS_BUILTIN.gmp
 .if !defined(BUILTIN_PKG.gmp) && \
     !empty(IS_BUILTIN.gmp:M[yY][eE][sS]) && \
     empty(H_GMP:M__nonexistent__)
-BUILTIN_VERSION.gmp!=	${BUILTIN_VERSION_SCRIPT.gmp}
+BUILTIN_VERSION.gmp!=	${BUILTIN_VERSION_SCRIPT.gmp} ${H_GMP}
 BUILTIN_PKG.gmp=	gmp-${BUILTIN_VERSION.gmp}
 .endif
 MAKEVARS+=	BUILTIN_PKG.gmp


Home | Main Index | Thread Index | Old Index