pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/cpuflags Updated devel/cpuflags to 1.35



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3fc5850fb70e
branches:  trunk
changeset: 553406:3fc5850fb70e
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue Jan 20 17:26:21 2009 +0000

description:
Updated devel/cpuflags to 1.35

Make it possible to also include cpuflags.mk directly from the pkgsrc tree

diffstat:

 devel/cpuflags/Makefile          |   4 ++--
 devel/cpuflags/files/cpuflags.mk |  22 +++++++++++++++++-----
 devel/cpuflags/files/cpuflags.sh |   9 ++++++++-
 3 files changed, 27 insertions(+), 8 deletions(-)

diffs (70 lines):

diff -r bb96f9f4ff12 -r 3fc5850fb70e devel/cpuflags/Makefile
--- a/devel/cpuflags/Makefile   Tue Jan 20 17:13:30 2009 +0000
+++ b/devel/cpuflags/Makefile   Tue Jan 20 17:26:21 2009 +0000
@@ -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 -r bb96f9f4ff12 -r 3fc5850fb70e devel/cpuflags/files/cpuflags.mk
--- a/devel/cpuflags/files/cpuflags.mk  Tue Jan 20 17:13:30 2009 +0000
+++ b/devel/cpuflags/files/cpuflags.mk  Tue Jan 20 17:26:21 2009 +0000
@@ -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@localhost - 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 -r bb96f9f4ff12 -r 3fc5850fb70e devel/cpuflags/files/cpuflags.sh
--- a/devel/cpuflags/files/cpuflags.sh  Tue Jan 20 17:13:30 2009 +0000
+++ b/devel/cpuflags/files/cpuflags.sh  Tue Jan 20 17:26:21 2009 +0000
@@ -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



Home | Main Index | Thread Index | Old Index