aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Jaekel <holger.jaekel@gmx.de>2020-05-21 15:08:26 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-05-22 08:14:04 +0000
commitd967d92c01b5b6ab66ef884a5f414bcbf537b8b9 (patch)
tree41c313b02472e048c76dbfc7b57745e5bbb9abc7
parent587061d250657107393c7d177270dc18176513be (diff)
downloadaports-d967d92c01b5b6ab66ef884a5f414bcbf537b8b9.tar.gz
aports-d967d92c01b5b6ab66ef884a5f414bcbf537b8b9.tar.bz2
aports-d967d92c01b5b6ab66ef884a5f414bcbf537b8b9.tar.xz
testing/ogdi: new aport
http://ogdi.sourceforge.net/ Open Geographic Datastore Interface Library
-rw-r--r--testing/ogdi/10-optimisation.patch16
-rw-r--r--testing/ogdi/20-external.patch28
-rw-r--r--testing/ogdi/APKBUILD93
3 files changed, 137 insertions, 0 deletions
diff --git a/testing/ogdi/10-optimisation.patch b/testing/ogdi/10-optimisation.patch
new file mode 100644
index 0000000000..8efa6ad622
--- /dev/null
+++ b/testing/ogdi/10-optimisation.patch
@@ -0,0 +1,16 @@
+Author: Holger Jaekel <holger.jaekel@gmx.de>
+Summary: allow optimisation flags from build script
+Upstream: No
+----
+
+--- a/config/unix.mak
++++ b/config/unix.mak
+@@ -55,7 +55,7 @@ LINK_SW = -L
+ ifeq ($(CFG),debug)
+ OPTIMIZATION = -g
+ else
+-OPTIMIZATION = -O
++OPTIMIZATION =
+ endif
+
+ #
diff --git a/testing/ogdi/20-external.patch b/testing/ogdi/20-external.patch
new file mode 100644
index 0000000000..e95562f3c4
--- /dev/null
+++ b/testing/ogdi/20-external.patch
@@ -0,0 +1,28 @@
+Author: Holger Jaekel <holger.jaekel@gmx.de>
+Summary: ignore external directory as we want to use provided libraries
+Upstream: No
+----
+
+--- a/makefile
++++ b/makefile
+@@ -17,7 +17,7 @@
+ #
+ # Sub-directories that need to be built
+ #
+-subdirs = external vpflib ogdi contrib
++subdirs = vpflib ogdi contrib
+
+ #
+ # Default target to build everything in all sub-directories
+diff -urN a/ogdi/makefile b/ogdi/makefile
+--- a/ogdi/makefile
++++ b/ogdi/makefile
+@@ -15,7 +15,7 @@
+ #
+ # Sub-directories that need to be built
+ #
+-subdirs = include c-api glutil attr_driver driver gltpd examples
++subdirs = include c-api glutil attr_driver driver gltpd
+
+ #
+ # Default target to build everything in all sub-directories
diff --git a/testing/ogdi/APKBUILD b/testing/ogdi/APKBUILD
new file mode 100644
index 0000000000..2af4a474db
--- /dev/null
+++ b/testing/ogdi/APKBUILD
@@ -0,0 +1,93 @@
+# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
+# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
+pkgname=ogdi
+pkgver=4.1.0
+_testver=3.1.0
+pkgrel=0
+pkgdesc="Open Geographic Datastore Interface Library"
+url="http://ogdi.sourceforge.net/"
+arch="all"
+license="MIT"
+makedepends="
+ expat-dev
+ libtirpc-dev
+ tcl-dev
+ unixodbc-dev
+ zlib-dev
+ "
+subpackages="
+ $pkgname-dev
+ $pkgname-odbc
+ $pkgname-tcl
+ "
+source="
+ https://downloads.sourceforge.net/project/ogdi/ogdi/$pkgver/ogdi-$pkgver.tar.gz
+ https://downloads.sourceforge.net/project/ogdi/OGDI_Test_Suite/${_testver%.*}/ogdits-$_testver.tar.gz
+ 10-optimisation.patch
+ 20-external.patch
+ "
+
+build() {
+ export TOPDIR=$builddir TARGET=Linux LD_LIBRARY_PATH=$TOPDIR/bin/Linux
+ rm -r external
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --with-binconfigs \
+ --with-zlib \
+ --with-expat
+ make -j1 # fails to find own libraries if built with more buildjobs
+
+ # build tcl interface
+ make -C ogdi/tcl_interface \
+ TCL_LINKLIB="-ltcl8.6"
+
+ # build contributions
+ make -C contrib/gdal
+
+ # build odbc drivers
+ make -C ogdi/attr_driver/odbc \
+ ODBC_LINKLIB="-lodbc"
+}
+
+check() {
+ export TOPDIR=$builddir TARGET=Linux LD_LIBRARY_PATH=$TOPDIR/bin/Linux PATH=$PATH:$builddir/bin/Linux
+ ogdi_info -u gltp:/vrf/$srcdir/ogdits-${_testver%.*}/data/vpf/vm2alv2/texash | \
+ grep "Projection = \`+proj=longlat +datum=wgs84'"
+}
+
+package() {
+ export TOPDIR=$builddir TARGET=Linux
+ make install \
+ INST_INCLUDE=$pkgdir/usr/include/ogdi \
+ INST_LIB=$pkgdir/usr/lib \
+ INST_BIN=$pkgdir/usr/bin
+
+ # install gdal contribution
+ make install -C contrib/gdal \
+ INST_LIB=$pkgdir/usr/lib
+
+ # install pkgconfig file
+ mkdir -p $pkgdir/usr/lib/pkgconfig
+ install -p -m 644 ogdi.pc $pkgdir/usr/lib/pkgconfig
+}
+
+odbc() {
+ pkgdesc="ODBC driver for $pkgdesc"
+ export TOPDIR=$builddir TARGET=Linux
+ make install -C $builddir/ogdi/attr_driver/odbc \
+ INST_LIB=$subpkgdir/usr/lib
+}
+
+tcl() {
+ pkgdesc="TCL wrapper for $pkgdesc"
+ export TOPDIR=$builddir TARGET=Linux
+ make install -C $builddir/ogdi/tcl_interface \
+ INST_LIB=$subpkgdir/usr/lib
+}
+
+sha512sums="abfc409bfa5ea2f81a90c16361fe6cdc2b2ee39775c22ceb74b13b171aa04d6d6eaffe398cae0ef91dcde8509e5cc25100eedeffdad358e090b78e118d386859 ogdi-4.1.0.tar.gz
+7fbd7c165466b6bf298d3d18b33c13b6f0166c3b1efe12b7c09e77539a20076950bc89db6c4e1e411ba374ebcf81744ec0410d3a414f395bd12339a7ae0e336b ogdits-3.1.0.tar.gz
+24682c9e893e410d08bfc0a1b06196e5d0555d4b552e07662ec26433e07f44a8f99686f79a1a5ed40de71f7da838516ffc33918837a6d79f35ab2a9b380f5592 10-optimisation.patch
+ca0283bd2791919bc4ae71af6ecf8d8900376fdef6b1d0808ae7d598501225c8a652e865214c43efc937e0d9514780f556100128c3dabff71a4792c8dd68380c 20-external.patch"