aboutsummaryrefslogtreecommitdiff
path: root/development/simulavr/simulavr.SlackBuild
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2022-02-26 14:34:05 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-27 01:09:57 +0700
commit4484adf1c71b1ef2b2d7393c86804d142eccc37a (patch)
tree3d7d6fa928c2312ede9d0e07500367c14b112190 /development/simulavr/simulavr.SlackBuild
parentfbcdde7c084d07e50e5396ed580e1818ef7c7b31 (diff)
development/simulavr: Updated for version 20201006_32985f7.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/simulavr/simulavr.SlackBuild')
-rw-r--r--development/simulavr/simulavr.SlackBuild43
1 files changed, 25 insertions, 18 deletions
diff --git a/development/simulavr/simulavr.SlackBuild b/development/simulavr/simulavr.SlackBuild
index 4f354265e3617..05d23af92b7d0 100644
--- a/development/simulavr/simulavr.SlackBuild
+++ b/development/simulavr/simulavr.SlackBuild
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=simulavr
-VERSION=${VERSION:-git20170521}
+VERSION=${VERSION:-20201006_32985f7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -70,7 +70,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.?z
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -79,21 +79,29 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./bootstrap
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux \
- --with-tclconfig=/usr/lib${LIBDIRSUFFIX}
-make
-make install DESTDIR=$PKG
+# Respect standard locations and avoid overwriting system headers
+sed -i \
+ -e "s|DESTINATION\ \"lib|DESTINATION \"lib$LIBDIRSUFFIX|" \
+ -e "s|DESTINATION\ \"include|DESTINATION \"include/$PRGNAM|" \
+ libsim{,ulavr}/CMakeLists.txt
+sed -i \
+ -e "s|share/man|man|" \
+ -e "s|share/doc/common|doc/$PRGNAM-$VERSION|" \
+ {app,doc}/CMakeLists.txt
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_TCL=ON \
+ -DBUILD_PYTHON=ON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make -j1
+ make -j1 progdoc
+ make install DESTDIR=$PKG
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -103,7 +111,6 @@ rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING README.* INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install