summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorMario Preksavec <mario@slackware.hr>2018-03-31 13:43:14 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-04-01 08:33:46 +0700
commit0803f85061bb26ef617c50acbe4ed286fd850a2e (patch)
treeedeba1634dd3ad5cad0c0ac066528f2b81434942 /network
parent58e712df58bb486b17f31e952e2fd69b7404a238 (diff)
downloadslackbuilds-0803f85061bb26ef617c50acbe4ed286fd850a2e.tar.gz
network/c-toxcore: Switch to cmake.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
Diffstat (limited to 'network')
-rw-r--r--network/c-toxcore/c-toxcore.SlackBuild37
1 files changed, 17 insertions, 20 deletions
diff --git a/network/c-toxcore/c-toxcore.SlackBuild b/network/c-toxcore/c-toxcore.SlackBuild
index f8bc5a5547..54d332202f 100644
--- a/network/c-toxcore/c-toxcore.SlackBuild
+++ b/network/c-toxcore/c-toxcore.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=c-toxcore
VERSION=${VERSION:-0.2.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
DAEMON=${DAEMON:-no}
@@ -57,8 +57,8 @@ else
fi
case $DAEMON in
- yes) ENABLE_DAEMON="--enable-daemon" ;;
- *) ENABLE_DAEMON="--disable-daemon" ;;
+ yes) ENABLE_DAEMON="-DBOOTSTRAP_DAEMON=ON" ;;
+ *) ENABLE_DAEMON="-DBOOTSTRAP_DAEMON=OFF" ;;
esac
set -e
@@ -76,23 +76,20 @@ 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 {} \;
-./autogen.sh
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- $ENABLE_DAEMON \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DENABLE_STATIC=OFF \
+ $ENABLE_DAEMON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
if [ "$DAEMON" != "no" ]; then
mkdir -p $PKG/usr/sbin