mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
libraries/frei0r: Updated for version 1.5.0.
Switched to cmake, cleanups Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
5258079ed4
commit
1bb44273a6
2 changed files with 30 additions and 31 deletions
|
@ -1,8 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for frei0r
|
||||
|
||||
# Copyright 2009, Jonathan Larsen (agentc0re), SLC, UT
|
||||
# Contact Info: agentc0re 'AT' learnix 'DOT' net
|
||||
# Copyright 2012-2015 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
|
||||
# Copyright 2012-2016 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -31,15 +33,17 @@
|
|||
# *Updated for 1.4
|
||||
# Sep 7th, 2015
|
||||
# *Patch for opencv-3.0
|
||||
# Dec 29th, 2061
|
||||
# *Updated for 1.5.0
|
||||
|
||||
PRGNAM=frei0r
|
||||
VERSION=${VERSION:-1.4}
|
||||
BUILD=${BUILD:-2}
|
||||
VERSION=${VERSION:-1.5.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
|
@ -50,8 +54,8 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
|
@ -74,39 +78,34 @@ tar xvf $CWD/$PRGNAM-plugins-$VERSION.tar.gz
|
|||
cd $PRGNAM-plugins-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
patch -p2 < $CWD/fix_building_against_opencv_3.0.patch
|
||||
# Fix installation paths
|
||||
sed -i -e "s|lib/|lib$LIBDIRSUFFIX/|" -e "s|lib\"|lib$LIBDIRSUFFIX\"|" CMakeLists.txt
|
||||
|
||||
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
|
||||
|
||||
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 \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
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
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
|
||||
AUTHORS.txt COPYING* ChangeLog.txt README.txt TODO.txt \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
# Remove misplaced docs, thanks to Niki Kovacs
|
||||
rm -fR $PKG/usr/share
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="frei0r"
|
||||
VERSION="1.4"
|
||||
VERSION="1.5.0"
|
||||
HOMEPAGE="http://frei0r.dyne.org"
|
||||
DOWNLOAD="http://ponce.cc/slackware/sources/repo/frei0r-plugins-1.4.tar.gz"
|
||||
MD5SUM="202375d1bcb545c1b6eb8f34e0260ec5"
|
||||
DOWNLOAD="http://ponce.cc/slackware/sources/repo/frei0r-plugins-1.5.0.tar.gz"
|
||||
MD5SUM="afdaa90dc70453c91bb60e0f71e701fd"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
Loading…
Reference in a new issue