aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorBradley J Chambers <brad.chambers@gmail.com>2017-08-02 10:43:23 -0400
committerTimo Teräs <timo.teras@iki.fi>2017-08-29 08:26:37 +0000
commite235329df8a1b9b4d025cbafb622346961ae9312 (patch)
treee73ed5014323a77fed125af0b1284da2a6087ee5 /testing
parent477c10a9e35c2726c09eda96fdc0387c7658172d (diff)
downloadaports-e235329df8a1b9b4d025cbafb622346961ae9312.tar.bz2
aports-e235329df8a1b9b4d025cbafb622346961ae9312.tar.xz
testing/hexer: new aport
https://github.com/hobu/hexer LAS and OGR hexagonal density and boundary surface generation.
Diffstat (limited to 'testing')
-rw-r--r--testing/hexer/10-missing-includes.patch63
-rw-r--r--testing/hexer/20-compile-test-for-execinfo.patch68
-rw-r--r--testing/hexer/APKBUILD37
3 files changed, 168 insertions, 0 deletions
diff --git a/testing/hexer/10-missing-includes.patch b/testing/hexer/10-missing-includes.patch
new file mode 100644
index 0000000000..1145f89ee6
--- /dev/null
+++ b/testing/hexer/10-missing-includes.patch
@@ -0,0 +1,63 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 86d28ab..8f7678f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -128,7 +128,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
+
+ configure_file(
+ "${PROJECT_SOURCE_DIR}/gitsha.cpp.in"
+- "${PROJECT_SOURCE_DIR}/src/gitsha.cpp")
++ "${PROJECT_BINARY_DIR}/src/gitsha.cpp")
+
+ add_subdirectory(src)
+ add_subdirectory(apps)
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index 3ce66d7..3477e59 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -17,6 +17,9 @@ endif()
+ if(CURSE)
+ add_executable(${CURSE} curse.cpp lasfile.hpp las.hpp las.cpp OGR.hpp OGR.cpp mmaplib.hpp pdal_util_export.hpp ProgramArgs.hpp Utils.cpp Utils.hpp )
+ target_link_libraries(${CURSE} ${HEXER_LIB_NAME} ${HEXERBOOST_LIB_NAME})
++ if(NOT WIN32)
++ target_link_libraries(${CURSE} ${CMAKE_DL_LIBS})
++ endif()
+ endif()
+
+ install(TARGETS ${HEXER_UTILITIES}
+diff --git a/include/hexer/Utils.hpp b/include/hexer/Utils.hpp
+index 8c26fd3..fd7ed30 100644
+--- a/include/hexer/Utils.hpp
++++ b/include/hexer/Utils.hpp
+@@ -15,6 +15,9 @@
+
+ #pragma once
+
++#include <cmath>
++#include <limits>
++
+ namespace hexer
+ {
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a98e5f9..8a5b8ed 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -21,7 +21,7 @@ set(HEXER_CPP
+ Path.cpp
+ Processor.cpp
+ Segment.cpp
+- gitsha.cpp
++ "${PROJECT_BINARY_DIR}/src/gitsha.cpp"
+ )
+
+ set(HEXER_SOURCES
+diff --git a/src/gitsha.cpp b/src/gitsha.cpp
+deleted file mode 100644
+index 86e644c..0000000
+--- a/src/gitsha.cpp
++++ /dev/null
+@@ -1,3 +0,0 @@
+-#include <hexer/gitsha.h>
+-#define GIT_SHA1 "b580f07d41a660a35e38d99936547e646d25740b"
+-const char g_GIT_SHA1[] = GIT_SHA1;
diff --git a/testing/hexer/20-compile-test-for-execinfo.patch b/testing/hexer/20-compile-test-for-execinfo.patch
new file mode 100644
index 0000000000..9a08b63c20
--- /dev/null
+++ b/testing/hexer/20-compile-test-for-execinfo.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f7678f..6adf4f1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -122,6 +122,8 @@ endif(WIN32)
+
+ set(hexer_defines_h_in "${CMAKE_CURRENT_SOURCE_DIR}/hexer_defines.h.in")
+ set(hexer_defines_h "${CMAKE_CURRENT_BINARY_DIR}/include/hexer/hexer_defines.h")
++include(CheckIncludeFiles)
++check_include_files(execinfo.h HEXER_HAVE_EXECINFO_H)
+ configure_file(${hexer_defines_h_in} ${hexer_defines_h})
+ HEXER_ADD_INCLUDES("" "" ${hexer_defines_h})
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
+diff --git a/apps/Utils.cpp b/apps/Utils.cpp
+index 92d810b..058539f 100644
+--- a/apps/Utils.cpp
++++ b/apps/Utils.cpp
+@@ -44,7 +44,9 @@
+ #include <cxxabi.h>
+ #include <sys/ioctl.h>
+ #include <sys/wait.h> // WIFEXITED, WEXITSTATUS
++#ifdef HEXER_HAVE_EXECINFO_H
+ #include <execinfo.h> // backtrace
++#endif
+ #include <dlfcn.h> // dladdr
+ #endif
+
+@@ -600,11 +602,11 @@ double Utils::normalizeLongitude(double longitude)
+ return longitude;
+ }
+
+-
+ std::vector<std::string> Utils::backtrace()
+ {
+ std::vector<std::string> lines;
+ #ifndef WIN32
++#ifdef HEXER_HAVE_EXECINFO_H
+ const int MAX_STACK_SIZE(100);
+ void* buffer[MAX_STACK_SIZE];
+ std::vector<std::string> prefixes;
+@@ -657,10 +659,10 @@ std::vector<std::string> Utils::backtrace()
+ }
+ }
+ #endif
++#endif
+ return lines;
+ }
+
+-
+ // Useful for debug on occasion.
+ std::string Utils::hexDump(const char *buf, size_t count)
+ {
+diff --git a/hexer_defines.h.in b/hexer_defines.h.in
+index ded9053..0cdab99 100644
+--- a/hexer_defines.h.in
++++ b/hexer_defines.h.in
+@@ -25,6 +25,11 @@
+ #cmakedefine HEXER_HAVE_GDAL
+
+ /*
++ * availability of execinfo and backtrace
++ */
++#cmakedefine HEXER_HAVE_EXECINFO_H
++
++/*
+ * Debug or Release build?
+ */
+ #define HEXER_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
diff --git a/testing/hexer/APKBUILD b/testing/hexer/APKBUILD
new file mode 100644
index 0000000000..ba71db9d31
--- /dev/null
+++ b/testing/hexer/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
+# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
+pkgname=hexer
+pkgver=1.4.0
+pkgrel=0
+pkgdesc="LAS and OGR hexagonal density and boundary surface generation"
+url="https://github.com/hobu/hexer"
+arch="all"
+license="LGPL2+"
+options="!check"
+depends="gdal"
+makedepends="cmake gdal-dev"
+install=""
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hobu/$pkgname/archive/$pkgver.tar.gz
+ 10-missing-includes.patch
+ 20-compile-test-for-execinfo.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ mkdir build && cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd "$builddir"/build
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="4db94af7fe0a2cc3cd26202c4ec88fadd88408c92d14e11ac117af51ee267aa87cd82aa18b29867f318d272f644be60a826e7fb3c72908baba4124499f39579c hexer-1.4.0.tar.gz
+971434a5c7b817296ecf7fa44222c0b7db909bef0c8bf130daef6b9db0ee68bab7aa8ef59aae1e6eda1daa801e4fbe2a5a88f22083d4c885de5a1e05310f9a0a 10-missing-includes.patch
+9fd03681856e42ac5747b98a45542d24289bcd687c377035382835692df4ba23773bc9601d1b5b2c4e0a345aa8dac8b0c80a95a19f318b27b82a8bbfc87509cc 20-compile-test-for-execinfo.patch"