summaryrefslogtreecommitdiffstats
path: root/gis/libLAS
diff options
context:
space:
mode:
Diffstat (limited to 'gis/libLAS')
-rw-r--r--gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch40
-rw-r--r--gis/libLAS/boost-1.73.patch36
-rw-r--r--gis/libLAS/libLAS.SlackBuild19
3 files changed, 92 insertions, 3 deletions
diff --git a/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch b/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch
new file mode 100644
index 0000000000..fc7dee623e
--- /dev/null
+++ b/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch
@@ -0,0 +1,40 @@
+From af431abce95076b59f4eb7c6ef0930ca57c8a063 Mon Sep 17 00:00:00 2001
+From: Piotr Dobrowolski <dobrypd@gmail.com>
+Date: Thu, 25 Apr 2019 15:33:28 +0200
+Subject: [PATCH] Use LIBLAS_BIG_ENDIAN instead of BOOST_BIG_ENDIAN (#166)
+
+Fixes #165
+---
+ include/liblas/detail/binary.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/include/liblas/detail/binary.hpp b/include/liblas/detail/binary.hpp
+index 3dd8a6fc..8f0b3d47 100644
+--- a/include/liblas/detail/binary.hpp
++++ b/include/liblas/detail/binary.hpp
+@@ -17,6 +17,8 @@
+ #ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED
+ #define LIBLAS_DETAIL_BINARY_HPP_INCLUDED
+
++#include <liblas/detail/endian.hpp>
++
+ #include <cassert>
+ #include <climits>
+ #include <cstring>
+@@ -25,7 +27,6 @@
+
+ #include <boost/config.hpp>
+ #include <boost/static_assert.hpp>
+-#include <boost/detail/endian.hpp>
+ #include <boost/type_traits/is_signed.hpp>
+
+ #if CHAR_BIT != 8
+@@ -43,7 +44,7 @@ namespace detail { namespace binary {
+ struct big_endian_tag {};
+ struct little_endian_tag {};
+
+-#ifdef BOOST_BIG_ENDIAN
++#ifdef LIBLAS_BIG_ENDIAN
+ typedef big_endian_tag native_endian_tag;
+ #else
+ typedef little_endian_tag native_endian_tag;
diff --git a/gis/libLAS/boost-1.73.patch b/gis/libLAS/boost-1.73.patch
new file mode 100644
index 0000000000..818c15ef3b
--- /dev/null
+++ b/gis/libLAS/boost-1.73.patch
@@ -0,0 +1,36 @@
+Qualify placeholders
+Matteo Bernardini <ponce@slackbuilds.org>
+
+diff -Naur libLAS-1.8.1.orig/src/c_api.cpp libLAS-1.8.1/src/c_api.cpp
+--- libLAS-1.8.1.orig/src/c_api.cpp 2016-08-22 15:06:34.000000000 +0200
++++ libLAS-1.8.1/src/c_api.cpp 2020-08-04 14:54:22.311996000 +0200
+@@ -498,7 +498,7 @@
+
+ transforms.erase( std::remove_if( transforms.begin(),
+ transforms.end(),
+- boost::bind( &IsReprojectionTransform, _1 ) ),
++ boost::bind( &IsReprojectionTransform, boost::placeholders::_1 ) ),
+ transforms.end());
+
+ liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
+@@ -1840,7 +1840,7 @@
+
+ transforms.erase( std::remove_if( transforms.begin(),
+ transforms.end(),
+- boost::bind( &IsReprojectionTransform, _1 ) ),
++ boost::bind( &IsReprojectionTransform, boost::placeholders::_1 ) ),
+ transforms.end());
+
+ liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
+diff -Naur libLAS-1.8.1.orig/src/header.cpp libLAS-1.8.1/src/header.cpp
+--- libLAS-1.8.1.orig/src/header.cpp 2016-08-22 15:06:34.000000000 +0200
++++ libLAS-1.8.1/src/header.cpp 2020-08-04 14:53:36.599996000 +0200
+@@ -610,7 +610,7 @@
+
+ m_vlrs.erase( std::remove_if( m_vlrs.begin(),
+ m_vlrs.end(),
+- boost::bind( &SameVLRs, name, id, _1 ) ),
++ boost::bind( &SameVLRs, name, id, boost::placeholders::_1 ) ),
+ m_vlrs.end());
+
+ m_recordsCount = static_cast<uint32_t>(m_vlrs.size());
diff --git a/gis/libLAS/libLAS.SlackBuild b/gis/libLAS/libLAS.SlackBuild
index 706f11fa16..fa1336c7e5 100644
--- a/gis/libLAS/libLAS.SlackBuild
+++ b/gis/libLAS/libLAS.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libLAS
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libLAS
VERSION=${VERSION:-1.8.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,6 +79,9 @@ 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 {} \;
+patch -p1 < $CWD/Use_LIBLAS_BIG_ENDIAN.patch
+patch -p1 < $CWD/boost-1.73.patch
+
mkdir -p build
cd build
cmake \
@@ -97,4 +110,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE