1 Commits
osg ... mbedtls

Author SHA1 Message Date
Timo Gurr
70304ae775 mbedtls: ::hasufell -> ::arbor 2022-01-29 19:32:51 +01:00
3 changed files with 166 additions and 94 deletions

View File

@@ -0,0 +1,80 @@
# Copyright 2013-2014 Thomas Witt
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
MY_PN="OpenSceneGraph"
MY_PNV=${MY_PN}-${PV}
require github [ user=openscenegraph project=${MY_PN} tag=${MY_PNV} ]
require cmake [ api=2 ]
SUMMARY="High performance 3D graphics toolkit"
DESCRIPTION="
The OpenSceneGraph is an open source high performance 3D graphics toolkit, used by application
developers in fields such as visual simulation, games, virtual reality, scientific visualization
and modelling. Written entirely in Standard C++ and OpenGL it runs on all Windows platforms, OSX,
GNU/Linux, IRIX, Solaris, HP-Ux, AIX and FreeBSD operating systems. The OpenSceneGraph is now well
established as the world leading scene graph technology, used widely in the vis-sim, space,
scientific, oil-gas, games and virtual reality industries.
"
HOMEPAGE+=" http://${PN}.org"
LICENCES="wxWinLL-3 LGPL-2.1"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build:
virtual/unzip
build+run:
app-text/poppler[cairo]
dev-libs/glib:2
media/ffmpeg
media-libs/freetype:2
media-libs/giflib:=
media-libs/gstreamer:1.0
media-libs/imath
media-libs/jasper
media-libs/libpng:=
media-libs/openexr[>=3]
media-libs/SDL:0
media-libs/tiff
media-plugins/gst-plugins-base:1.0
net-misc/curl
sys-libs/zlib
x11-dri/mesa
x11-libs/cairo
x11-libs/libX11
x11-libs/libXrandr
providers:ijg-jpeg? ( media-libs/jpeg:= )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/${PN}-3.6.5-openexr3.patch
)
CMAKE_SRC_CONFIGURE_PARAMS=(
-DCMAKE_DISABLE_FIND_PACKAGE_Asio=1
-DCMAKE_DISABLE_FIND_PACKAGE_Inventor=1
-DCMAKE_DISABLE_FIND_PACKAGE_COLLADA=1
-DCMAKE_DISABLE_FIND_PACKAGE_FBX=
-DCMAKE_DISABLE_FIND_PACKAGE_Performer=1
-DCMAKE_DISABLE_FIND_PACKAGE_GDAL=1
-DCMAKE_DISABLE_FIND_PACKAGE_LibVNCServer=1
-DCMAKE_DISABLE_FIND_PACKAGE_OurDCMTK=1
-DCMAKE_DISABLE_FIND_PACKAGE_RSVG=1
-DCMAKE_DISABLE_FIND_PACKAGE_NVTT=1
-DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=1
-DCMAKE_DISABLE_FIND_PACKAGE_Lua51=1
-DCMAKE_DISABLE_FIND_PACKAGE_Lua52=1
-DCMAKE_DISABLE_FIND_PACKAGE_SDL2=1
-DOSG_USE_LOCAL_LUA_SOURCE=OFF
-DOPENGL_PROFILE=GL2
-DDYNAMIC_OPENSCENEGRAPH=ON
-DLIB_POSTFIX=""
)

View File

@@ -0,0 +1,86 @@
Source: Arch, https://github.com/archlinux/svntogit-community/blob/packages/openscenegraph/trunk/openscenegraph-openexr3.patch
Upstream: Reported, https://github.com/openscenegraph/OpenSceneGraph/issues/1075
Reason: Fix build with OpenEXR >= 3
diff --git a/CMakeModules/FindOpenEXR.cmake b/CMakeModules/FindOpenEXR.cmake
index 233be972b..d1b022881 100644
--- a/CMakeModules/FindOpenEXR.cmake
+++ b/CMakeModules/FindOpenEXR.cmake
@@ -51,11 +51,11 @@ MACRO(OPENEXR_FIND libname)
OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY_DEBUG ${libname}d)
ENDMACRO(OPENEXR_FIND)
-OPENEXR_FIND(IlmImf)
+OPENEXR_FIND(OpenEXR)
SET(OPENEXR_FOUND "NO")
-IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)
- SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} )
- SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY )
+IF(OPENEXR_INCLUDE_DIR AND OPENEXR_OpenEXR_LIBRARY)
+ SET(OPENEXR_LIBRARIES ${OPENEXR_OpenEXR_LIBRARY} )
+ SET(OPENEXR_LIBRARIES_VARS OPENEXR_OpenEXR_LIBRARY )
SET(OPENEXR_FOUND "YES")
-ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)
+ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_OpenEXR_LIBRARY)
diff --git a/CMakeModules/Findilmbase.cmake b/CMakeModules/Findilmbase.cmake
index 4b076c7c9..4610497fa 100644
--- a/CMakeModules/Findilmbase.cmake
+++ b/CMakeModules/Findilmbase.cmake
@@ -10,7 +10,7 @@
# Created by Robert Osfield.
-FIND_PATH(ILMBASE_INCLUDE_DIR OpenEXR/ImathVec.h
+FIND_PATH(ILMBASE_INCLUDE_DIR Imath/ImathVec.h
$ENV{ILMBASE_DIR}/include
$ENV{ILMBASE_DIR}
~/Library/Frameworks
@@ -28,7 +28,7 @@ FIND_PATH(ILMBASE_INCLUDE_DIR OpenEXR/ImathVec.h
# example: ILMBASE_FIND_VAR(OPENEXR_IlmThread_LIBRARY IlmThread)
MACRO(ILMBASE_FIND_VAR varname libname)
FIND_LIBRARY( ${varname}
- NAMES ${libname} ${libname}-2_1 ${libname}-2_2
+ NAMES ${libname} ${libname}-2_1 ${libname}-2_2 ${libname}-3_0
PATHS
$ENV{ILMBASE_DIR}/lib
$ENV{ILMBASE_DIR}
@@ -53,11 +53,11 @@ ENDMACRO(ILMBASE_FIND)
ILMBASE_FIND(IlmThread)
ILMBASE_FIND(Iex)
-ILMBASE_FIND(Half)
+ILMBASE_FIND(Imath)
SET(ILMBASE_FOUND "NO")
-IF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)
- SET(ILMBASE_LIBRARIES ${ILMBASE_IlmThread_LIBRARY} ${ILMBASE_Half_LIBRARY} ${ILMBASE_Iex_LIBRARY} )
- SET(ILMBASE_LIBRARIES_VARS ILMBASE_IlmThread_LIBRARY ILMBASE_Half_LIBRARY ILMBASE_Iex_LIBRARY )
+IF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Imath_LIBRARY)
+ SET(ILMBASE_LIBRARIES ${ILMBASE_IlmThread_LIBRARY} ${ILMBASE_Imath_LIBRARY} ${ILMBASE_Iex_LIBRARY} )
+ SET(ILMBASE_LIBRARIES_VARS ILMBASE_IlmThread_LIBRARY ILMBASE_Imath_LIBRARY ILMBASE_Iex_LIBRARY )
SET(ILMBASE_FOUND "YES")
-ENDIF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)
+ENDIF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Imath_LIBRARY)
diff --git a/src/osgPlugins/exr/CMakeLists.txt b/src/osgPlugins/exr/CMakeLists.txt
index 6191ed18f..9a368b2c2 100644
--- a/src/osgPlugins/exr/CMakeLists.txt
+++ b/src/osgPlugins/exr/CMakeLists.txt
@@ -1,4 +1,4 @@
-INCLUDE_DIRECTORIES( ${ILMBASE_INCLUDE_DIR}/OpenEXR )
+INCLUDE_DIRECTORIES( ${ILMBASE_INCLUDE_DIR}/Imath )
INCLUDE_DIRECTORIES( ${OPENEXR_INCLUDE_DIR}/OpenEXR )
SET(TARGET_SRC ReaderWriterEXR.cpp )
diff --git a/src/osgPlugins/exr/ReaderWriterEXR.cpp b/src/osgPlugins/exr/ReaderWriterEXR.cpp
index 7132e97f8..96c5507ef 100644
--- a/src/osgPlugins/exr/ReaderWriterEXR.cpp
+++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp
@@ -13,6 +13,7 @@
#include <osgDB/FileNameUtils>
#include <osgDB/FileUtils>
+#include <ImfInt64.h>
#include <ImfRgbaFile.h>
#include <ImfIO.h>
#include <ImfArray.h>

View File

@@ -1,94 +0,0 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require github [ user=ARMmbed tag=mbedtls-${PV} ]
WORK="${WORKBASE}/${PNV}" # because github.exlib is broken
require cmake [ api=2 ]
SUMMARY="Cryptographic library for embedded systems"
HOMEPAGE="https://tls.mbed.org/"
DOWNLOADS="https://tls.mbed.org/download/${PNV}-gpl.tgz"
LICENCES="|| ( Apache-2.0 GPL-2 )"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
doc
havege [[ description = [ Enable the HAVEGE random generator,
not suitable for virtualized environments! ] ]]
threads [[ description = [ Enables the threading abstraction layer
via pthread. This is used if you do intend
to use contexts between threads. ] ]]
x86_cpu_features:
sse2
"
DEPENDENCIES="
build:
doc? (
app-doc/doxygen[>=1.8.4]
media-gfx/graphviz
)
build+run:
sys-libs/zlib
test:
dev-lang/perl:*
dev-lang/python:*[>=3]
"
CMAKE_SRC_CONFIGURE_PARAMS=(
-DENABLE_PROGRAMS=OFF
-DUSE_SHARED_MBEDTLS_LIBRARY=ON
-DINSTALL_MBEDTLS_HEADERS=ON
-DLIB_INSTALL_DIR="/usr/$(exhost --target)/lib"
-DUSE_STATIC_MBEDTLS_LIBRARY=OFF
-DENABLE_ZLIB_SUPPORT=ON
)
CMAKE_SRC_CONFIGURE_TESTS=(
'-DENABLE_TESTING=ON'
)
enable_mbedtls_option() {
local myopt="$@"
# check that config.h syntax is the same at version bump
edo sed -i \
-e "s://#define ${myopt}:#define ${myopt}:" \
"${CMAKE_SOURCE}"/include/mbedtls/config.h
}
src_prepare() {
option x86_cpu_features:sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2
enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT
option havege && enable_mbedtls_option MBEDTLS_HAVEGE_C
option threads && enable_mbedtls_option MBEDTLS_THREADING_C
option threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD
enable_mbedtls_option MBEDTLS_MD4_C
cmake_src_prepare
}
src_compile() {
default
if option doc ; then
emake apidoc
fi
}
src_test() {
LD_LIBRARY_PATH="${ECMAKE_BUILD_DIR}/library" \
emake test
}
src_install() {
cmake_src_install
if option doc ; then
docinto html
dodoc -r "${CMAKE_SOURCE}"/apidoc/*
fi
}