aboutsummaryrefslogtreecommitdiffstats
path: root/community/openscenegraph
diff options
context:
space:
mode:
Diffstat (limited to 'community/openscenegraph')
-rw-r--r--community/openscenegraph/APKBUILD39
-rw-r--r--community/openscenegraph/add-missing-include-for-ppc64le.patch13
-rw-r--r--community/openscenegraph/musl-fixes.patch22
3 files changed, 74 insertions, 0 deletions
diff --git a/community/openscenegraph/APKBUILD b/community/openscenegraph/APKBUILD
new file mode 100644
index 0000000000..9b1e3bcf4a
--- /dev/null
+++ b/community/openscenegraph/APKBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=openscenegraph
+pkgver=3.6.5
+pkgrel=4
+pkgdesc="High performance 3D graphics toolkit"
+url="http://www.openscenegraph.org/"
+arch="all !s390x !mips !mips64 !riscv64" # gdal and openjdk8 availability
+license="LGPL-2.1-or-later" # also Custom and wxWindows-3
+makedepends="$depends_dev cmake mesa-dev curl-dev giflib-dev zlib-dev
+ freetype-dev jpeg-dev tiff-dev sdl-dev sdl2-dev libxml2-dev gdal-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-$pkgver.tar.gz
+ musl-fixes.patch
+ add-missing-include-for-ppc64le.patch
+ "
+builddir="$srcdir"/OpenSceneGraph-OpenSceneGraph-$pkgver
+
+prepare() {
+ default_prepare
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-narrowing"
+}
+
+build() {
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ install -D -m644 LICENSE.txt "$pkgdir/usr/share/doc/$pkgname/LICENSE"
+ if [ -d "$pkgdir/usr/lib64" ]; then
+ mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib"
+ fi
+}
+
+sha512sums="7002fa30a3bcf6551d2e1050b4ca75a3736013fd190e4f50953717406864da1952deb09f530bc8c5ddf6e4b90204baec7dbc283f497829846d46d561f66feb4b OpenSceneGraph-3.6.5.tar.gz
+016b09874bd6ca14cf1dba9274df4fc0413d2d97c3438135ecf6c5726029963f1ff279eb4986afe86173739512799e1e8ee5f7443e30fe1131524405a9d002be musl-fixes.patch
+a3e69609b2e3c51002f4babd1c5bd64fc9c32b14fc9232f4b4f345c6e96134bc80a0fe54ce3445059b4d0512d5ac1ec434101fe976b71f24c68b3569265e21d9 add-missing-include-for-ppc64le.patch"
diff --git a/community/openscenegraph/add-missing-include-for-ppc64le.patch b/community/openscenegraph/add-missing-include-for-ppc64le.patch
new file mode 100644
index 0000000000..8731b33a88
--- /dev/null
+++ b/community/openscenegraph/add-missing-include-for-ppc64le.patch
@@ -0,0 +1,13 @@
+--- OpenSceneGraph-3.4.0/src/OpenThreads/pthreads/PThread.cpp
++++ OpenSceneGraph-3.4.0/src/OpenThreads/pthreads/PThread.cpp
+@@ -57,6 +57,10 @@
+
+ #include <iostream>
+
++#ifdef __powerpc64__
++#include <string.h>
++#endif
++
+ using namespace OpenThreads;
+
+ #ifdef DEBUG
diff --git a/community/openscenegraph/musl-fixes.patch b/community/openscenegraph/musl-fixes.patch
new file mode 100644
index 0000000000..234c507e35
--- /dev/null
+++ b/community/openscenegraph/musl-fixes.patch
@@ -0,0 +1,22 @@
+--- a/src/OpenThreads/pthreads/PThread.cpp
++++ b/src/OpenThreads/pthreads/PThread.cpp
+@@ -23,7 +23,7 @@
+ #include <pthread.h>
+ #include <limits.h>
+
+-#if defined __linux__ || defined __sun || defined __APPLE__ || ANDROID
++#if defined __GLIBC__ || defined __sun || defined __APPLE__ || ANDROID
+ #include <string.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+--- a/src/osgPlugins/osc/osc/OscHostEndianness.h
++++ b/src/osgPlugins/osc/osc/OscHostEndianness.h
+@@ -51,7 +51,7 @@
+
+ #else
+
+- #if defined(__GLIBC__) || defined(__ANDROID__) || defined(__CYGWIN__)
++ #if defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__)
+ #include <endian.h>
+ #if (__BYTE_ORDER == __LITTLE_ENDIAN)
+ #ifndef __LITTLE_ENDIAN__