aboutsummaryrefslogtreecommitdiff
path: root/gis/pointcloud/pointcloud.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/pointcloud/pointcloud.SlackBuild')
-rw-r--r--gis/pointcloud/pointcloud.SlackBuild40
1 files changed, 21 insertions, 19 deletions
diff --git a/gis/pointcloud/pointcloud.SlackBuild b/gis/pointcloud/pointcloud.SlackBuild
index 236b83aa0cba..35a4da9a590a 100644
--- a/gis/pointcloud/pointcloud.SlackBuild
+++ b/gis/pointcloud/pointcloud.SlackBuild
@@ -29,7 +29,7 @@ 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
@@ -40,8 +40,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"
@@ -60,11 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-if [ -e $CWD/v$VERSION.tar.gz ]; then
- tar xvf $CWD/v$VERSION.tar.gz
-else
- tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-fi
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -77,23 +73,29 @@ find -L . \
# please remove it on next release
patch -p1 < $CWD/postgresql9.5.patch
-./autogen.sh
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --build=$ARCH \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --build=$ARCH-slackware-linux
+sed -i "s/cppflags/cflags/" CMakeLists.txt
+sed -i "s/CPPFLAGS/CFLAGS/" CMakeLists.txt
+sed -i "s/CPPFLAGS/CFLAGS/" pgsql/CMakeLists.txt
-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 \
+ -DWITH_TESTS=FALSE \
+ ..
+ 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 COPYRIGHT README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYRIGHT NEWS README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install