mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/lbench: Updated for version 1.9 +fixes for gcc-4.7
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
parent
77afa5e670
commit
0ec818b795
3 changed files with 48 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
# Slackware build script for lbench
|
||||
# simple Linux multithread benchmarking tool
|
||||
|
||||
# Copyright 2010-2011 Niels Horn, Rio de Janeiro, RJ, Brazil
|
||||
# Copyright 2010-2012 Niels Horn, Rio de Janeiro, RJ, Brazil
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,10 +23,10 @@
|
|||
# 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/28
|
||||
# Revision date 2012/09/13
|
||||
|
||||
PRGNAM=lbench
|
||||
VERSION=${VERSION:-1.7}
|
||||
VERSION=${VERSION:-1.9}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -72,12 +72,21 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Patch source to remove hardcoded location for userguide
|
||||
patch -p1 < $CWD/lbench_userguide.patch
|
||||
|
||||
# Fix makefile to not "install" the .desktop file
|
||||
sed -i "s/xdg-desktop/# xdg-desktop/g" Makefile
|
||||
# and accept LIBS variable
|
||||
sed \
|
||||
-e "s/xdg-desktop/# xdg-desktop/g" \
|
||||
-e "/^LIBS/s/=/+=/" \
|
||||
-i Makefile
|
||||
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
LIBS="-lpthread" \
|
||||
PREFIX=/usr \
|
||||
make
|
||||
make \
|
||||
DOCDIR=/usr/doc/$PRGNAM-$VERSION \
|
||||
|
||||
PREFIX=/usr \
|
||||
make install \
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="lbench"
|
||||
VERSION="1.7"
|
||||
VERSION="1.9"
|
||||
HOMEPAGE="http://kornelix.squarespace.com/lbench/"
|
||||
DOWNLOAD="http://kornelix.squarespace.com/storage/downloads/lbench-1.7.tar.gz"
|
||||
MD5SUM="cfbf0edb0fd1bbac552ccddf02585eda"
|
||||
DOWNLOAD="http://www.kornelix.com/uploads/1/3/0/3/13035936/lbench-1.9.tar.gz"
|
||||
MD5SUM="6a46b57765058af2562146a36500a62b"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
31
system/lbench/lbench_userguide.patch
Normal file
31
system/lbench/lbench_userguide.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- lbench-1.9/zfuncs.cc 2012-07-29 08:48:24.000000000 -0300
|
||||
+++ lbench-1.9_patched/zfuncs.cc 2012-09-13 19:00:01.000000000 -0300
|
||||
@@ -3232,6 +3232,7 @@
|
||||
using namespace zfuncs;
|
||||
|
||||
char work[200];
|
||||
+ char doc[200];
|
||||
char logfile[200], oldlog[200];
|
||||
cchar *appfile;
|
||||
int secs, err;
|
||||
@@ -3254,7 +3255,8 @@
|
||||
strncatv(zdatadir,199,work,"/share/",zappname,"/data",null); // /prefix/share/appname/data
|
||||
strncatv(zicondir,199,work,"/share/",zappname,"/icons",null); // /prefix/share/appname/icons
|
||||
strncatv(zlocalesdir,199,work,"/share/",zappname,"/locales",null); // /prefix/share/appname/locales
|
||||
- strncatv(zdocdir,199,work,"/share/doc/",zappname,null); // /prefix/share/doc/appname
|
||||
+ strncpy0(doc,DOCDIR,199);
|
||||
+ strcpy(zdocdir,doc); // as defined in Makefile
|
||||
|
||||
snprintf(zuserdir,199,"%s/.%s",getenv("HOME"),zappname); // /home/user/.appname/
|
||||
err = stat(zuserdir,&statdat); // does it exist already?
|
||||
--- lbench-1.9/Makefile 2012-07-29 08:48:24.000000000 -0300
|
||||
+++ lbench-1.9_patched/Makefile 2012-09-13 18:54:12.000000000 -0300
|
||||
@@ -28,7 +28,7 @@
|
||||
$(CXX) $(CFLAGS) -o $(PROGRAM).o $(SOURCE)
|
||||
|
||||
zfuncs.o: zfuncs.cc
|
||||
- $(CXX) $(CFLAGS) zfuncs.cc -D PREFIX=\"$(PREFIX)\"
|
||||
+ $(CXX) $(CFLAGS) zfuncs.cc -D PREFIX=\"$(PREFIX)\" -D DOCDIR=\"$(DOCDIR)\"
|
||||
|
||||
install: $(PROGRAM)
|
||||
mkdir -p $(DESTDIR)$(BINDIR)
|
Loading…
Reference in a new issue