mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
libraries/pthsem: Updated for version 2.0.8.
This commit is contained in:
parent
e068523091
commit
b157b99921
4 changed files with 14 additions and 71 deletions
|
@ -1,35 +0,0 @@
|
|||
From 1eedb024a141665fd186d1d51e73bb64c6202476 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Koegler <mkoegler@auto.tuwien.ac.at>
|
||||
Date: Sat, 23 Aug 2008 00:54:20 +0200
|
||||
Subject: [PATCH] Use montonic clock for pthsem
|
||||
|
||||
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
|
||||
---
|
||||
pth_time.c | 11 +++++++++++
|
||||
1 files changed, 11 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/pth_time.c b/pth_time.c
|
||||
index b94dafe..e81f80a 100644
|
||||
--- a/pth_time.c
|
||||
+++ b/pth_time.c
|
||||
@@ -60,6 +60,17 @@ intern void pth_time_usleep(unsigned long usec)
|
||||
#else
|
||||
#define __gettimeofday(t) gettimeofday(t, NULL)
|
||||
#endif
|
||||
+#undef __gettimeofday
|
||||
+
|
||||
+static int inline __gettimeofday(struct timeval *tv)
|
||||
+{
|
||||
+ struct timespec t;
|
||||
+ int res = clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
+ tv->tv_sec = t.tv_sec;
|
||||
+ tv->tv_usec = t.tv_nsec/1000;
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
#define pth_time_set(t1,t2) \
|
||||
do { \
|
||||
if ((t2) == PTH_TIME_NOW) \
|
||||
--
|
||||
1.5.3.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pthsem is an extended version of the GNU Pth, a user mode multi threading
|
||||
library, with added support for semaphores. This package can be installed
|
||||
in parallel with a normal pth, which is included in Slackware.
|
||||
pthsem is an extended version of the GNU Pth, a user mode
|
||||
multi threading library, with added support for semaphores.
|
||||
This package can be installed in parallel with a normal pth,
|
||||
which is included in Slackware.
|
||||
|
||||
This version includes a patch by the developer to make pthsem use the
|
||||
monotonic clock and be able to react to date and time changes more
|
||||
adequately.
|
||||
Project page:
|
||||
http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Written by V'yacheslav Stetskevych
|
||||
|
||||
PRGNAM=pthsem
|
||||
VERSION=${VERSION:-2.0.7}
|
||||
VERSION=${VERSION:-2.0.8}
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
@ -32,7 +32,7 @@ rm -rf $PKG
|
|||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
tar xvf $CWD/${PRGNAM}_$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . \
|
||||
|
@ -41,10 +41,6 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Apply the patch to use the monotonic clock, for eibd to work correctly
|
||||
# after a date/time change.
|
||||
patch -p1 < $CWD/0001-Use-monotonic-clock-for-pthsem.patch
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -58,35 +54,17 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--enable-static=no \
|
||||
--enable-pthread=no
|
||||
|
||||
# Edit the Makefile to enable compilation with the monotonic clock patch.
|
||||
sed 's/-ldl/-ldl -lrt/' Makefile > Makefile.sed
|
||||
mv Makefile.sed Makefile
|
||||
|
||||
make
|
||||
make test
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
)
|
||||
make install-strip DESTDIR=$PKG
|
||||
|
||||
( cd $PKG/usr/man
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
)
|
||||
|
||||
# Edit the output of pthsem-config to let eibd compile against modified pthsem.
|
||||
( cd $PKG/usr/bin
|
||||
sed 's/-lpthsem/-lpthsem -lrt/' pthsem-config > pthsem-config.sed
|
||||
mv pthsem-config.sed pthsem-config
|
||||
chmod 755 pthsem-config
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a ANNOUNCE AUTHORS COPYING HACKING HISTORY INSTALL NEWS PORTING \
|
||||
README SUPPORT TESTS THANKS USERS $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
README SUPPORT TESTS THANKS USERS ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="pthsem"
|
||||
VERSION="2.0.7"
|
||||
VERSION="2.0.8"
|
||||
HOMEPAGE="http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth"
|
||||
DOWNLOAD="http://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem-2.0.7.tar.gz"
|
||||
MD5SUM="b277716ee1224ca9925176fa29e1f0c5"
|
||||
DOWNLOAD="http://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem_2.0.8.tar.gz"
|
||||
MD5SUM="9144b26dcc27e67498d63dd5456f934c"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="V'yacheslav Stetskevych"
|
||||
EMAIL="slava18@gmail.com"
|
||||
APPROVED="dsomero"
|
||||
APPROVED="Erik Hanson"
|
||||
|
|
Loading…
Reference in a new issue