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.37



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e8f7dafae23a
branches:  trunk
changeset: 553734:e8f7dafae23a
user:      abs <abs%pkgsrc.org@localhost>
date:      Wed Jan 28 23:30:50 2009 +0000

description:
Updated devel/cpuflags to 1.37

Substitute @SH@ so we can use $() everywhere (Solaris)

diffstat:

 devel/cpuflags/Makefile          |   9 +++++++--
 devel/cpuflags/files/cpuflags.mk |   4 ++--
 devel/cpuflags/files/cpuflags.sh |  26 ++++++++++++--------------
 devel/cpuflags/files/subr_SunOS  |  10 +++++-----
 4 files changed, 26 insertions(+), 23 deletions(-)

diffs (152 lines):

diff -r 71f5fb0b4b2c -r e8f7dafae23a devel/cpuflags/Makefile
--- a/devel/cpuflags/Makefile   Wed Jan 28 23:27:59 2009 +0000
+++ b/devel/cpuflags/Makefile   Wed Jan 28 23:30:50 2009 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.142 2009/01/23 00:04:45 abs Exp $
+# $NetBSD: Makefile,v 1.143 2009/01/28 23:30:50 abs Exp $
 
-DISTNAME=      cpuflags-1.36
+DISTNAME=      cpuflags-1.37
 CATEGORIES=    devel sysutils
 MASTER_SITES=  # empty
 DISTFILES=     # empty
@@ -16,6 +16,11 @@
 NO_CHECKSUM=   yes
 NO_CONFIGURE=  yes
 
+SUBST_CLASSES+=                cpuflags
+SUBST_STAGE.cpuflags=  post-patch
+SUBST_FILES.cpuflags=  cpuflags.sh
+SUBST_SED.cpuflags=    -e s,@@SH@@,${SH:Q},
+
 do-extract:
        ${MKDIR} ${WRKSRC}
        ${CP} ${FILESDIR}/Makefile ${WRKSRC}
diff -r 71f5fb0b4b2c -r e8f7dafae23a devel/cpuflags/files/cpuflags.mk
--- a/devel/cpuflags/files/cpuflags.mk  Wed Jan 28 23:27:59 2009 +0000
+++ b/devel/cpuflags/files/cpuflags.mk  Wed Jan 28 23:30:50 2009 +0000
@@ -1,4 +1,4 @@
-# $Id: cpuflags.mk,v 1.19 2009/01/20 17:26:21 abs Exp $
+# $Id: cpuflags.mk,v 1.20 2009/01/28 23:30:50 abs Exp $
 # Makefile include fragment to simplify use of cpuflags in pkgsrc
 # abs%absd.org@localhost - freely distributable, no warrenties, stick no bills.
 
@@ -16,7 +16,7 @@
 .ifndef CPU_FLAGS
 
 . if exists(${.PARSEDIR}/cpuflags.sh)
-_CPUFLAGS_SH=${.PARSEDIR}/cpuflags.sh
+_CPUFLAGS_SH=${SH} ${.PARSEDIR}/cpuflags.sh
 . else
 _CPUFLAGS_SH=@PREFIX@/bin/cpuflags
 . endif
diff -r 71f5fb0b4b2c -r e8f7dafae23a devel/cpuflags/files/cpuflags.sh
--- a/devel/cpuflags/files/cpuflags.sh  Wed Jan 28 23:27:59 2009 +0000
+++ b/devel/cpuflags/files/cpuflags.sh  Wed Jan 28 23:30:50 2009 +0000
@@ -1,14 +1,12 @@
-#!/bin/sh
-# $NetBSD: cpuflags.sh,v 1.6 2009/01/23 00:04:45 abs Exp $
+#!@@SH@@
+# $NetBSD: cpuflags.sh,v 1.7 2009/01/28 23:30:50 abs Exp $
 PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
 
-# Note - this script needs to run on Solaris sh, so no use of $(...)
-
 # 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`;;
+    /*) cd $(dirname $0);;
+    *)  cd $(dirname $PWD/$0);;
 esac
 
 include()
@@ -29,7 +27,7 @@
     return 0
     }
 
-UNAME=`uname`
+UNAME=$(uname)
 
 if [ "$1" = -v ] ; then
     shift
@@ -60,25 +58,25 @@
 
 # Determine the flags for this OS/machine
 extract_hw_details
-if [ `gcc_ser $CC` -gt 4002 ] ; then
+if [ $(gcc_ser $CC) -gt 4002 ] ; then
     ARCH="$M_ARCH_NATIVE"
 else
-    ARCH=`determine_arch`
+    ARCH=$(determine_arch)
 fi
-FEATURES=`determine_features`
+FEATURES=$(determine_features)
 
 test "x$ARCH" != "x$M_ARCH_NATIVE" &&  # gcc have not autodetection
     case "$hw_machine_arch" in         # all known x86 mnemonics
     i386|i486|i586|i686|x86_64|amd64|i86pc)
        include subr_x86        # this provides flags_fixup_x86arch()
-       l_arch=`flags_fixup_x86arch "$ARCH" "$FEATURES"`
+       l_arch=$(flags_fixup_x86arch "$ARCH" "$FEATURES")
        test -n "$l_arch" && ARCH="-march=$l_arch"
     esac
 
 # Fixup any flags which are too new for our gcc version
 #
-CPUFLAGS=`gcc_fixup_arch_flags $CC $ARCH $FEATURES`
-CPUFLAGS=`echo $CPUFLAGS`
+CPUFLAGS=$(gcc_fixup_arch_flags $CC $ARCH $FEATURES)
+CPUFLAGS=$(echo $CPUFLAGS)
 
 if [ -n "$opt_v" ] ; then
     if [ -n "$NOARCH" ] ; then
@@ -91,7 +89,7 @@
 ARCH            : $ARCH
 FEATURES        : $FEATURES
 CPUFLAGS        : $CPUFLAGS
-GCC version     : `gcc_ver $CC`
+GCC version     : $(gcc_ver $CC)
 END
     display_hw_details
     exit;
diff -r 71f5fb0b4b2c -r e8f7dafae23a devel/cpuflags/files/subr_SunOS
--- a/devel/cpuflags/files/subr_SunOS   Wed Jan 28 23:27:59 2009 +0000
+++ b/devel/cpuflags/files/subr_SunOS   Wed Jan 28 23:30:50 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: subr_SunOS,v 1.3 2008/12/18 01:01:33 abs Exp $
+# $NetBSD: subr_SunOS,v 1.4 2009/01/28 23:30:50 abs Exp $
 
 AWK=nawk
 SED=sed
@@ -6,7 +6,7 @@
 display_hw_details()
     {
     cat <<END
-OS             : '`uname`'
+OS             : '$(uname)'
 arch            : '$hw_arch'
 psrinfo         : '$hw_psrinfo'
 END
@@ -14,8 +14,8 @@
 
 extract_hw_details()
     {
-    hw_arch=`/usr/bin/uname -m`
-    hw_psrinfo=`psrinfo -pv | $AWK 'NR==3{print}'` # Just gets the first CPU
+    hw_arch=$(/usr/bin/uname -m)
+    hw_psrinfo=$(psrinfo -pv | $AWK 'NR==3{print}') # Just gets the first CPU
     }
 
 determine_arch()
@@ -27,7 +27,7 @@
        sun4u )                 ARCH='-mcpu=v9' ;;
        i86pc )
            include subr_x86    # this provides map_x86_brand_string()
-           ARCH=`map_x86_brand_string "$cpu_brand"`
+           ARCH=$(map_x86_brand_string "$cpu_brand")
            if [ -z "$ARCH" ] ; then
                case "$hw_psrinfo" in
                    *)



Home | Main Index | Thread Index | Old Index