From 7922130229568b9e30c0dd23a54f7c0850c1f751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 31 Oct 2015 09:35:31 +0100 Subject: [PATCH] New package: osg-3.4.0 OpenSceneGraph required for FlightGear --- common/shlibs | 19 +++++++++ srcpkgs/osg-devel | 1 + srcpkgs/osg/patches/musl-endianess.patch | 15 +++++++ srcpkgs/osg/patches/musl-pthread.patch | 11 +++++ srcpkgs/osg/template | 52 ++++++++++++++++++++++++ 5 files changed, 98 insertions(+) create mode 120000 srcpkgs/osg-devel create mode 100644 srcpkgs/osg/patches/musl-endianess.patch create mode 100644 srcpkgs/osg/patches/musl-pthread.patch create mode 100644 srcpkgs/osg/template diff --git a/common/shlibs b/common/shlibs index b8693bfc84e..415cea4f68e 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2256,3 +2256,22 @@ libu2f-host.so.0 libu2f-host-1.0.0_1 libsqlcipher.so.0 sqlcipher-3.3.1_1 libgta.so.0 libgta-1.0.7_1 libgdal.so.20 libgdal-2.0.1_1 +libosgViewer.so.130 osg-3.4.0_1 +libosgShadow.so.130 osg-3.4.0_1 +libosgParticle.so.130 osg-3.4.0_1 +libOpenThreads.so.20 osg-3.4.0_1 +libosgFX.so.130 osg-3.4.0_1 +libosgText.so.130 osg-3.4.0_1 +libosgUI.so.130 osg-3.4.0_1 +libosg.so.130 osg-3.4.0_1 +libosgAnimation.so.130 osg-3.4.0_1 +libosgDB.so.130 osg-3.4.0_1 +libosgManipulator.so.130 osg-3.4.0_1 +libosgSim.so.130 osg-3.4.0_1 +libosgTerrain.so.130 osg-3.4.0_1 +libosgWidget.so.130 osg-3.4.0_1 +libosgQt.so.130 osg-3.4.0_1 +libosgUtil.so.130 osg-3.4.0_1 +libosgVolume.so.130 osg-3.4.0_1 +libosgGA.so.130 osg-3.4.0_1 +libosgPresentation.so.130 osg-3.4.0_1 diff --git a/srcpkgs/osg-devel b/srcpkgs/osg-devel new file mode 120000 index 00000000000..822d76858a4 --- /dev/null +++ b/srcpkgs/osg-devel @@ -0,0 +1 @@ +osg \ No newline at end of file diff --git a/srcpkgs/osg/patches/musl-endianess.patch b/srcpkgs/osg/patches/musl-endianess.patch new file mode 100644 index 00000000000..32f75305894 --- /dev/null +++ b/srcpkgs/osg/patches/musl-endianess.patch @@ -0,0 +1,15 @@ +This time it's the other way round: both GNU libc and musl libc +have so use defined(__linux__) to use this header +file for setting the target's endianness. + +--- src/osgPlugins/osc/osc/OscHostEndianness.h 2015-07-23 13:14:00.000000000 +0200 ++++ src/osgPlugins/osc/osc/OscHostEndianness.h 2015-10-31 06:39:02.503234496 +0100 +@@ -51,7 +51,7 @@ + + #else + +- #if defined(__GLIBC__) || defined(__ANDROID__) || defined(__CYGWIN__) ++ #if defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__) + #include + #if (__BYTE_ORDER == __LITTLE_ENDIAN) + #ifndef __LITTLE_ENDIAN__ diff --git a/srcpkgs/osg/patches/musl-pthread.patch b/srcpkgs/osg/patches/musl-pthread.patch new file mode 100644 index 00000000000..b90cbd0c648 --- /dev/null +++ b/srcpkgs/osg/patches/musl-pthread.patch @@ -0,0 +1,11 @@ +--- src/OpenThreads/pthreads/PThread.cpp 2015-04-07 20:01:12.000000000 +0200 ++++ src/OpenThreads/pthreads/PThread.cpp 2015-10-31 06:24:45.189319272 +0100 +@@ -27,7 +27,7 @@ + #include + #include + #include +-#if !defined ANDROID ++#if defined __GLIBC__ && !defined ANDROID + #include + #endif + #endif diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template new file mode 100644 index 00000000000..04be8ff895a --- /dev/null +++ b/srcpkgs/osg/template @@ -0,0 +1,52 @@ +# Template file for 'osg' +pkgname=osg +version=3.4.0 +revision=1 +wrksrc=OpenSceneGraph-${version} +build_style=cmake +# don't use /usr/lib64 on 64bit platforms +configure_args="-DLIB_POSTFIX= $(vopt_if qt '-DOSG_USE_QT=1' '-DOSG_USE_QT=0')" +hostmakedepends="cmake pkg-config unzip xrandr" +makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-devel + jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg-devel xine-lib-devel + SDL2-devel gst-plugins-base1-devel + $(vopt_if openexr libopenexr-devel) + $(vopt_if poppler poppler-glib-devel) + $(vopt_if qt qt5-devel) + $(vopt_if vnc libvncserver-devel)" +depends="xrandr" +short_desc="OpenSceneGraph: high performance real-time graphics toolkit" +maintainer="Jürgen Buchmüller " +license="GPL-3" +homepage="http://www.openscenegraph.org" +distfiles="http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-${version}.zip" +checksum=5c727d84755da276adf8c4a4a3a8ba9c9570fc4b4969f06f1d2e9f89b1e3040e + +build_options="openexr poppler qt vnc" +build_options_default="openexr poppler vnc" +desc_option_openexr="Enable support for high dynamic range images" +desc_option_poppler="Enable support for creating PDF" +desc_option_vnc="Enable support for VNC server" +if [ -z "$CROSS_BUILD" ]; then + build_options_default+=" qt" +else + # cmake can't check this when cross compiling + configure_args+=" -DPOPPLER_HAS_CAIRO_EXITCODE=0" + configure_args+=" -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=0" +fi + +post_install() { + # Also install the cmake script FindOSG.cmake for developers to use + vinstall CMakeModules/FindOSG.cmake 644 usr/lib/cmake/OSG +} + +osg-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + vmove usr/lib/*.so + } +}