mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
system/nbench: Miscellaneous script cleanup
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
7ebc1de42a
commit
11302d0f2c
5 changed files with 51 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
These are Native Mode (a.k.a. Algorithm Level) tests; benchmarks designed to
|
||||
expose the capabilities of a system's CPU, FPU, and memory system.
|
||||
These are Native Mode (a.k.a. Algorithm Level) tests; benchmarks designed
|
||||
to expose the capabilities of a system's CPU, FPU, and memory system.
|
||||
|
||||
This can be compiled on various operating systems, including SunOS,
|
||||
DEC Unix 4.0, DEC OSF1, HP-UX, DEC Ultrix, MS-DOS, and of course Linux.
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- nbench-byte-2.2.3_orig/Makefile 2004-12-30 00:23:30.000000000 -0200
|
||||
+++ nbench-byte-2.2.3/Makefile 2010-02-15 13:05:24.000000000 -0200
|
||||
@@ -22,7 +22,7 @@
|
||||
CC = gcc
|
||||
|
||||
# generic options for gcc
|
||||
-CFLAGS = -s -static -Wall -O3
|
||||
+CFLAGS = -s -static -Wall -O3 @XTRACFLAGS@
|
||||
|
||||
# if your gcc lets you do it, then try this one
|
||||
#CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
|
|
@ -2,21 +2,38 @@
|
|||
|
||||
# Slackware build script for nbench
|
||||
|
||||
# Written by Niels Horn <niels.horn@gmail.com>
|
||||
# Revision date: 2010-02-15
|
||||
# Copyright 2010-2011 Niels Horn, Rio de Janeiro, RJ, Brazil
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Revision date: 2011/12/09
|
||||
|
||||
PRGNAM=nbench
|
||||
VERSION=${VERSION:-2.2.3}
|
||||
SRCVERSION="byte-$VERSION"
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
@ -55,13 +72,12 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# "Configure" manually altering the Makefile
|
||||
patch -p1 < $CWD/cflags.patch
|
||||
sed -i "s/@XTRACFLAGS@/$SLKCFLAGS/" Makefile
|
||||
# Patch makefile to accept our CFLAGS + resolve pointer problem
|
||||
# Source: http://www.tux.org/~mayer/linux/gcc-4.3.3.txt
|
||||
patch -p1 < $CWD/nbench_cflags_pointer.patch
|
||||
|
||||
# Since pointer.h is created by the Makefile, we cannot use anything better
|
||||
# than -j1
|
||||
make -j1
|
||||
CFLAGS=$SLKCFLAGS \
|
||||
make
|
||||
|
||||
strip --strip-unneeded nbench
|
||||
|
||||
|
@ -78,9 +94,8 @@ cat > $PKG/usr/bin/$PRGNAM << EOF
|
|||
cd /usr/share/$PRGNAM
|
||||
${PRGNAM}_bin
|
||||
EOF
|
||||
chmod +x $PKG/usr/bin/$PRGNAM
|
||||
chmod 0755 $PKG/usr/bin/$PRGNAM
|
||||
|
||||
# Copy program documentation into the package
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
Changes README* RESULTS bdoc.txt \
|
||||
|
@ -92,5 +107,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
|
|||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
|
|||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Niels Horn"
|
||||
EMAIL="niels.horn@gmail.com"
|
||||
APPROVED="dsomero"
|
||||
APPROVED="rworkman"
|
||||
|
|
20
system/nbench/nbench_cflags_pointer.patch
Normal file
20
system/nbench/nbench_cflags_pointer.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- nbench-byte-2.2.3/Makefile 2004-12-30 00:23:30.000000000 -0200
|
||||
+++ nbench-byte-2.2.3_patched/Makefile 2011-03-17 10:31:07.000000000 -0300
|
||||
@@ -22,7 +22,7 @@
|
||||
CC = gcc
|
||||
|
||||
# generic options for gcc
|
||||
-CFLAGS = -s -static -Wall -O3
|
||||
+CFLAGS += -s -static -Wall -O3
|
||||
|
||||
# if your gcc lets you do it, then try this one
|
||||
#CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
|
||||
@@ -126,7 +126,7 @@
|
||||
if [ "4" = `./pointer` ] ; then touch pointer.h ;\
|
||||
else echo "#define LONG64" >pointer.h ; fi
|
||||
|
||||
-misc.o: misc.h misc.c Makefile
|
||||
+misc.o: misc.h misc.c pointer.h Makefile
|
||||
$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
|
||||
-c misc.c
|
||||
|
Loading…
Reference in a new issue