From 09d379acc58c401e97891ae0581b3fd6a6a390c7e6af0fda509264b146a44e24 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 9 Mar 2017 08:35:40 +0000 Subject: [PATCH] Accepting request 477823 from home:bruno_friedmann:branches:Application:Geo - Update to version 1.4.0 visit https://github.com/PDAL/PDAL/releases/tag/1.4.0 and https://github.com/PDAL/PDAL/releases/tag/1.3.0 for all improvements done since 1.2 - Packaging : + Add cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch Fix for being he only distribution with laszip header not in subdir. See upstream https://github.com/PDAL/PDAL/issues/1503 + Move to boost-devel split for TW + Comment Requires for build documentation. + Remove -WL,no-undefined flag from linker (otherwise we can't build) upstream use dlopen. + Clean-up and adapt cmake flag and options OBS-URL: https://build.opensuse.org/request/show/477823 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/PDAL?expand=0&rev=3 --- PDAL-1.2.0.tar.xz | 3 - PDAL-1.4.0-src.tar.bz2 | 3 + PDAL-1.4.0-src.tar.bz2.md5 | 1 + PDAL.changes | 18 +++ PDAL.spec | 135 ++++++++++-------- _service | 21 --- _servicedata | 4 - ...88a04897f9704d5bdfaf4d2979e9ff303aab.patch | 101 +++++++++++++ 8 files changed, 198 insertions(+), 88 deletions(-) delete mode 100644 PDAL-1.2.0.tar.xz create mode 100644 PDAL-1.4.0-src.tar.bz2 create mode 100644 PDAL-1.4.0-src.tar.bz2.md5 delete mode 100644 _service delete mode 100644 _servicedata create mode 100644 cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch diff --git a/PDAL-1.2.0.tar.xz b/PDAL-1.2.0.tar.xz deleted file mode 100644 index 894790e..0000000 --- a/PDAL-1.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7fda8216068f7995942602763dcb510d3ddce8656aba7eb2a96deab9532d080 -size 51232440 diff --git a/PDAL-1.4.0-src.tar.bz2 b/PDAL-1.4.0-src.tar.bz2 new file mode 100644 index 0000000..5719ba9 --- /dev/null +++ b/PDAL-1.4.0-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d563792c26eed83750259e474f52146bc6fdaaa9ac6e2269c05f023b57d89563 +size 62749292 diff --git a/PDAL-1.4.0-src.tar.bz2.md5 b/PDAL-1.4.0-src.tar.bz2.md5 new file mode 100644 index 0000000..09df8c6 --- /dev/null +++ b/PDAL-1.4.0-src.tar.bz2.md5 @@ -0,0 +1 @@ +8e767028e41a9da25561dfe25e60a542 PDAL-1.4.0-src.tar.bz2 diff --git a/PDAL.changes b/PDAL.changes index acb14f1..dbf0aae 100644 --- a/PDAL.changes +++ b/PDAL.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Mar 8 14:51:03 UTC 2017 - bruno@ioda-net.ch + +- Update to version 1.4.0 + visit https://github.com/PDAL/PDAL/releases/tag/1.4.0 and + https://github.com/PDAL/PDAL/releases/tag/1.3.0 for all + improvements done since 1.2 + +- Packaging : + + Add cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch + Fix for being he only distribution with laszip header not in + subdir. See upstream https://github.com/PDAL/PDAL/issues/1503 + + Move to boost-devel split for TW + + Comment Requires for build documentation. + + Remove -WL,no-undefined flag from linker (otherwise we can't + build) upstream use dlopen. + + Clean-up and adapt cmake flag and options + ------------------------------------------------------------------- Sun Apr 24 14:02:39 UTC 2016 - bruno@ioda-net.ch diff --git a/PDAL.spec b/PDAL.spec index 53736bf..444f5bc 100644 --- a/PDAL.spec +++ b/PDAL.spec @@ -20,67 +20,86 @@ # python breathe for doc # python3 +# Mandatory : build -doc appart (too much texlive used otherwise) + # Ask upstream to clarify seems sofull_version is build version -%define soname 2 -%define sovers 2 -%define sofull_version 3.0.0 +%define soname 4 +%define sovers 4 +%define sofull_version 5.0.0 %define lname pdal Name: PDAL -Version: 1.2.0 +Version: 1.4.0 Release: 0 Summary: Point Data Abstraction Library. GDAL for point cloud data #@todo verify with upstream if not BSD-3 License: BSD-2-Clause Group: Productivity/Graphics/CAD Url: http://www.pdal.io/ -# We use git master on upstream recommandation until next March 2016 release -# use osc service dr -Source: %{name}-%{version}.tar.xz -#Source: http://download.osgeo.org/pdal/%%{name}-%%{version}-src.tar.bz2 +Source0: http://download.osgeo.org/pdal/%{name}-%{version}-src.tar.bz2 +Source1: http://download.osgeo.org/pdal/%{name}-%{version}-src.tar.bz2.md5 +# Source2: https://www.pdal.io/PDAL.pdf +# Upstream issue#1503 has hardcoded /usr/include/laszip/laszip.hpp +Patch0: https://github.com/PDAL/PDAL/commit/cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch # Override the problem of libpsl5 in tumbleweed %if 0%{?suse_version} >= 1330 BuildRequires: libpsl5 %endif BuildRequires: bash-completion +%if 0%{?suse_version} > 1325 +BuildRequires: libboost_headers-devel +BuildRequires: libboost_filesystem-devel +BuildRequires: libboost_program_options-devel +%else BuildRequires: boost-devel +%endif BuildRequires: cairo-devel BuildRequires: cmake >= 2.8 BuildRequires: cunit-devel -BuildRequires: dblatex -BuildRequires: doxygen +BuildRequires: curl-devel BuildRequires: fdupes BuildRequires: freeglut-devel +# Needed for tests +BuildRequires: gdal BuildRequires: gcc-c++ +BuildRequires: googletest-devel BuildRequires: hdf5-devel BuildRequires: libcgal-devel BuildRequires: libgdal-devel BuildRequires: libgeos-devel BuildRequires: libgeotiff-devel BuildRequires: libght-devel -BuildRequires: libjson-c-devel +BuildRequires: jsoncpp-devel +BuildRequires: laszip-devel BuildRequires: liblas-devel BuildRequires: libproj-devel BuildRequires: libspatialindex-devel BuildRequires: libtiff-devel BuildRequires: libxml2-devel +BuildRequires: netcdf-devel BuildRequires: pkg-config BuildRequires: postgresql-devel >= 9.1 BuildRequires: libpq5 >= 9.1 +# We don't have it yet # BuildRequires: pointcloud-devel -# BuildRequires: libpqxx-devel -BuildRequires: python-Sphinx -# For doc but only in TW -#BuildRequires: python-sphinxcontrib-breathe +BuildRequires: python-Cython BuildRequires: python-devel -BuildRequires: python-docutils BuildRequires: python-numpy-devel -BuildRequires: python3-Sphinx -# Doesn't exist on obs BuildRequires: python3-breathe -BuildRequires: python3-devel -BuildRequires: python3-docutils -BuildRequires: python3-numpy-devel +BuildRequires: python-setuptools +# BuildRequires: python3-devel +# BuildRequires: python3-numpy-devel +BuildRequires: sqlite3-devel BuildRequires: zlib-devel +# Needed for documentation but we don't build it. +# BuildRequires: dblatex +# BuildRequires: doxygen +# BuildRequires: python-docutils +# BuildRequires: python-Sphinx +# BuildRequires: python3-docutils +# BuildRequires: python3-Sphinx +# For doc but only in TW +# BuildRequires: python-sphinxcontrib-breathe +# Doesn't exist on obs BuildRequires: python3-breathe Requires: lib%{name}%{soname} = %{version} Recommends: bash-completion @@ -163,11 +182,13 @@ This package provides the documentation and sources of examples and data demos o PDAL algorithms. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{version}-src +%patch0 -p1 #Cleanup spurious perms in documentation find ./doc/ -type f -exec chmod -v 0644 {} \; -find ./doc/ -type f -iname "*.orig" -delete +find ./doc/ -type f -iname "*.orig" -o -iname ".gitignore" -delete +find ./doc/ -type f -iname "*.ai" -delete %build %if 0%{?suse_version} == 1310 @@ -178,29 +199,21 @@ export CXXFLAGS="%{optflags} -fPIE -pie" %endif %cmake \ - -G "Unix Makefiles" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ - -DPDAL_LIB_INSTALL_DIR=%{_libdir} \ - -DPDAL_LIB_NAME=lib%{name} \ - -DCMAKE_C_FLAGS_RELEASE="%{optflags} -fno-strict-aliasing -g -DNDEBUG" \ - -DCMAKE_CXX_FLAGS_RELEASE="%{optflags} -fno-strict-aliasing -g -DNDEBUG" \ - -DCMAKE_SKIP_INSTALL_RPATH=ON \ - -DCMAKE_SKIP_RPAH=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ + -DLIB_INSTALL_DIR=%{_libdir} \ + -DLIB_NAME=lib%{name} \ + -DINCLUDE_INSTALL_DIR=%{_includedir} \ -DENABLE_CTEST=ON \ -DWITH_COMPLETION=ON \ - -DWITH_APPS=ON \ -DWITH_TESTS=ON \ - -DWITH_ICONV=ON \ - -DBUILD_PLUGIN_PCL=OFF \ -DWITH_LASZIP=ON \ - -DWITH_GEOTIFF=ON \ + -DLASZIP_INCLUDE_DIR=%{_includedir} \ + -DWITH_GEOTIFF=%{_includedir}/libgeotiff \ -DGEOTIFF_INCLUDE_DIR=%{_includedir}/libgeotiff \ - -DWITH_LAZPERF=OFF \ - -DWITH_LIBXML2=ON \ + -DBUILD_SHARED_LIBS=ON \ -DBUILD_PLUGIN_PYTHON=ON \ - -DBUILD_PLUGIN_ATTRIBUTE=ON \ -DBUILD_PLUGIN_HEXBIN=OFF \ -DBUILD_PLUGIN_ICEBRIDGE=OFF \ -DBUILD_PLUGIN_NITF=OFF \ @@ -208,32 +221,29 @@ export CXXFLAGS="%{optflags} -fPIE -pie" -DBUILD_PLUGIN_PGPOINTCLOUD=ON \ -DBUILD_PLUGIN_SQLITE=ON \ -DBUILD_PLUGIN_GREYHOUND=OFF \ + -DBUILD_PLUGIN_PCL=OFF \ .. -# -DBUILD_PLUGIN_GEOWAVE=OFF \ -# -DGEOWAVE_RUNTIME_JAR=/home/vagrant/geowave/geowave-jace.jar \ -# -DJACE_INCLUDE_DIR=/home/vagrant/geowave/include \ -# -DJACE_LIBRARY=/home/vagrant/geowave/build/libjace.so \ -# -DLAZPERF_INCLUDE_DIR=/home/vagrant/laz-perf \ make VERBOSE=1 %{?_smp_mflags} # Make documentation once fixed upstream # make doxygen html man pdf -# Make the python part - -%check -make %{?_smp_mflags} test +# Make the python part should be build in a dedicated .spec +# It need pdal-config to work +# pushd ../python +# python setup.py build +# popd %install pushd build make DESTDIR=%{buildroot} install %{?_smp_mflags} popd -# Fix location of bash-completion script to be system wide -mkdir -p %{buildroot}%{_datadir}/bash_completion/completions/ -mv -v %{buildroot}%{_prefix}%{_sysconfdir}/bash_completion.d/pdal %{buildroot}%{_datadir}/bash_completion/completions/pdal -rm -rfv %{buildroot}%{_prefix}%{_sysconfdir} + +# pushd ../python +# python setup.py install +# popd #No .la lib find %{buildroot} -type f -name "*.la" -o -name "*.a" -delete -print @@ -243,6 +253,14 @@ find %{buildroot} -type f -name "*.la" -o -name "*.a" -delete -print %fdupes doc %endif +# Not finished yet +#%%check +#pushd build +#export LD_LIBRARY_PATH=%%{buildroot}%%{_libdir}:${LD_LIBRARY_PATH} +#export GDAL_DATA=/usr/share/gdal/ +#ctest -V +#popd + %post -n lib%{name}%{soname} -p /sbin/ldconfig %postun -n lib%{name}%{soname} -p /sbin/ldconfig @@ -250,9 +268,9 @@ find %{buildroot} -type f -name "*.la" -o -name "*.a" -delete -print %files %defattr(-,root,root,-) %{_bindir}/pdal -%dir %{_datadir}/bash_completion -%dir %{_datadir}/bash_completion/completions -%{_datadir}/bash_completion/completions/pdal +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/pdal %files -n lib%{name}%{soname} %defattr(-,root,root,-) @@ -296,10 +314,7 @@ find %{buildroot} -type f -name "*.la" -o -name "*.a" -delete -print %{_bindir}/pdal-config %dir %{_libdir}/pdal/ %dir %{_libdir}/pdal/cmake -%{_libdir}/pdal/cmake/PDALConfig.cmake -%{_libdir}/pdal/cmake/PDALConfigVersion.cmake -%{_libdir}/pdal/cmake/PDALTargets-release.cmake -%{_libdir}/pdal/cmake/PDALTargets.cmake +%{_libdir}/pdal/cmake/PDAL*.cmake %files -n %{name}-doc %defattr(-,root,root,-) diff --git a/_service b/_service deleted file mode 100644 index 74fb193..0000000 --- a/_service +++ /dev/null @@ -1,21 +0,0 @@ - - - git://github.com/PDAL/pdal.git - git - .git - - 1.2.0 - PDAL - enable - - - *.tar - xz - - - PDAL - - diff --git a/_servicedata b/_servicedata deleted file mode 100644 index d74af4a..0000000 --- a/_servicedata +++ /dev/null @@ -1,4 +0,0 @@ - - - git://github.com/PDAL/pdal.git - c93c7c7f361fa6098528f865e3b5a38043b968d4 \ No newline at end of file diff --git a/cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch b/cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch new file mode 100644 index 0000000..94fc6d2 --- /dev/null +++ b/cfb888a04897f9704d5bdfaf4d2979e9ff303aab.patch @@ -0,0 +1,101 @@ +From cfb888a04897f9704d5bdfaf4d2979e9ff303aab Mon Sep 17 00:00:00 2001 +From: Andrew Bell +Date: Mon, 6 Mar 2017 15:41:20 -0600 +Subject: [PATCH] Allow laszip to be found in laszip subdirectory or not. Close + #1503 + +--- + cmake/modules/FindLASzip.cmake | 24 ++++++++++++++++++------ + io/LasZipPoint.hpp | 6 +++--- + pdal/pdal_config.cpp | 2 +- + tools/lasdump/Dumper.cpp | 4 ++-- + 4 files changed, 24 insertions(+), 12 deletions(-) + +diff --git a/cmake/modules/FindLASzip.cmake b/cmake/modules/FindLASzip.cmake +index 38d32c1..27c8352 100644 +--- a/cmake/modules/FindLASzip.cmake ++++ b/cmake/modules/FindLASzip.cmake +@@ -37,12 +37,23 @@ ENDIF() + + + FIND_PATH(LASZIP_INCLUDE_DIR +- laszip/laszip.hpp ++ laszip.hpp + PATHS +- /usr/include +- /usr/local/include +- /tmp/lasjunk/include +- ${OSGEO4W_ROOT_DIR}/include) ++ /usr/include/laszip ++ /usr/local/include/laszip ++ ${OSGEO4W_ROOT_DIR}/include/laszip) ++ ++if (NOT LASZIP_INCLUDE_DIR) ++ FIND_PATH(LASZIP_INCLUDE_DIR ++ laszip/laszip.hpp ++ PATHS ++ /usr/include ++ /usr/local/include ++ ${OSGEO4W_ROOT_DIR}/include) ++ if (LASZIP_INCLUDE_DIR) ++ set(LASZIP_INCLUDE_DIR ${LASZIP_INCLUDE_DIR}/laszip) ++ endif() ++endif() + + SET(LASZIP_NAMES ${OSGEO4W_IMPORT_LIBRARY} laszip) + +@@ -57,7 +68,8 @@ FIND_LIBRARY(LASZIP_LIBRARY + IF(LASZIP_INCLUDE_DIR) + SET(LASZIP_VERSION 0) + +- SET(LASZIP_VERSION_H "${LASZIP_INCLUDE_DIR}/laszip/laszip.hpp") ++ message(STATUS "*** ${LASZIP_INCLUDE_DIR} ***") ++ SET(LASZIP_VERSION_H "${LASZIP_INCLUDE_DIR}/laszip.hpp") + FILE(READ ${LASZIP_VERSION_H} LASZIP_VERSION_H_CONTENTS) + + IF (DEFINED LASZIP_VERSION_H_CONTENTS) +diff --git a/io/LasZipPoint.hpp b/io/LasZipPoint.hpp +index abe6eea..57c049b 100644 +--- a/io/LasZipPoint.hpp ++++ b/io/LasZipPoint.hpp +@@ -37,9 +37,9 @@ + #include + + #ifdef PDAL_HAVE_LASZIP +-#include +-#include +-#include ++#include ++#include ++#include + #endif + + namespace pdal +diff --git a/pdal/pdal_config.cpp b/pdal/pdal_config.cpp +index ca45025..2703ebc 100644 +--- a/pdal/pdal_config.cpp ++++ b/pdal/pdal_config.cpp +@@ -61,7 +61,7 @@ + #endif + + #ifdef PDAL_HAVE_LASZIP +-#include ++#include + #endif + + #include +diff --git a/tools/lasdump/Dumper.cpp b/tools/lasdump/Dumper.cpp +index b4ccb33..d126c2f 100644 +--- a/tools/lasdump/Dumper.cpp ++++ b/tools/lasdump/Dumper.cpp +@@ -32,8 +32,8 @@ + * OF SUCH DAMAGE. + ****************************************************************************/ + +-#include +-#include ++#include ++#include + + #include +