diff options
author | abs <abs@pkgsrc.org> | 2009-01-20 17:26:21 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2009-01-20 17:26:21 +0000 |
commit | 2d67a69e67852396d75bd720357bdb73804d80fc (patch) | |
tree | d167ad4d6fc290f99c809fe9b93e505df93ee5a1 /devel/cpuflags | |
parent | 9d0838f797b2c518f9e6643edbcdf7ef97addf25 (diff) | |
download | pkgsrc-2d67a69e67852396d75bd720357bdb73804d80fc.tar.gz |
Updated devel/cpuflags to 1.35
Make it possible to also include cpuflags.mk directly from the pkgsrc tree
Diffstat (limited to 'devel/cpuflags')
-rw-r--r-- | devel/cpuflags/Makefile | 4 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 22 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.sh | 9 |
3 files changed, 27 insertions, 8 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index ac79a7c70b4..4b1080588ff 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.140 2009/01/12 22:11:58 abs Exp $ +# $NetBSD: Makefile,v 1.141 2009/01/20 17:26:21 abs Exp $ -DISTNAME= cpuflags-1.34 +DISTNAME= cpuflags-1.35 CATEGORIES= devel sysutils MASTER_SITES= # empty DISTFILES= # empty diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index b660eac6eea..7d09455c14c 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,4 +1,4 @@ -# $Id: cpuflags.mk,v 1.18 2008/01/11 12:58:30 abs Exp $ +# $Id: cpuflags.mk,v 1.19 2009/01/20 17:26:21 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@absd.org - freely distributable, no warrenties, stick no bills. @@ -12,13 +12,25 @@ # # CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES) + .ifndef CPU_FLAGS -. if defined(BSD_PKG_MK) || ${USETOOLS:Uyes} == "no" -CPU_FLAGS!=@PREFIX@/bin/cpuflags ${CC} + +. if exists(${.PARSEDIR}/cpuflags.sh) +_CPUFLAGS_SH=${.PARSEDIR}/cpuflags.sh . else -CPU_FLAGS!=@PREFIX@/bin/cpuflags +_CPUFLAGS_SH=@PREFIX@/bin/cpuflags . endif -.endif + +. if defined(CCPATH) +CPU_FLAGS!=${_CPUFLAGS_SH} ${CCPATH} +. elif defined(BSD_PKG_MK) || ${USETOOLS:Uyes} == "no" +CPU_FLAGS!=${_CPUFLAGS_SH} ${CC} +. else +CPU_FLAGS!=${_CPUFLAGS_SH} +. endif +_CPUFLAGS_SH= + +.endif # CPU_FLAGS .ifndef CPU_DIR CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //g' diff --git a/devel/cpuflags/files/cpuflags.sh b/devel/cpuflags/files/cpuflags.sh index 079f707f873..040c0b3570d 100755 --- a/devel/cpuflags/files/cpuflags.sh +++ b/devel/cpuflags/files/cpuflags.sh @@ -1,7 +1,14 @@ #!/bin/sh -# $NetBSD: cpuflags.sh,v 1.4 2008/12/31 14:49:54 abs Exp $ +# $NetBSD: cpuflags.sh,v 1.5 2009/01/20 17:26:21 abs Exp $ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH +# cd to the directory containing the binary, so we can usefully check for +# include files from there +case "$0" in + /*) cd $(dirname $0) ;; + *) cd $(dirname $PWD/$0) ;; +esac + include() { file=$1 |