From 1b4cc7c8d4ed2c7bd7824cb061c951193835ae87 Mon Sep 17 00:00:00 2001 From: Piraty Date: Sat, 14 Apr 2018 14:54:01 +0200 Subject: [PATCH] New package: occt-7.2.0p1 Closes #13404. Signed-off-by: Enno Boland --- common/shlibs | 56 ++++++++++++++++++++++ srcpkgs/occt-devel | 1 + srcpkgs/occt/patches/fix-install-dir.patch | 26 ++++++++++ srcpkgs/occt/patches/musl-fenv.patch | 37 ++++++++++++++ srcpkgs/occt/patches/musl-mallinfo.patch | 17 +++++++ srcpkgs/occt/patches/xlocale.patch | 19 ++++++++ srcpkgs/occt/template | 35 ++++++++++++++ 7 files changed, 191 insertions(+) create mode 120000 srcpkgs/occt-devel create mode 100644 srcpkgs/occt/patches/fix-install-dir.patch create mode 100644 srcpkgs/occt/patches/musl-fenv.patch create mode 100644 srcpkgs/occt/patches/musl-mallinfo.patch create mode 100644 srcpkgs/occt/patches/xlocale.patch create mode 100644 srcpkgs/occt/template diff --git a/common/shlibs b/common/shlibs index f76a748d34f..26a2c0041c0 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3255,6 +3255,62 @@ libwayland-client++.so.0.2 libwaylandpp-2.2.0_1 libwayland-cursor++.so.0.2 libwaylandpp-2.2.0_1 libwayland-client-extra++.so.0.2 libwaylandpp-2.2.0_1 libfwup.so.1 fwupdate-10_1 +libTKBin.so.7 occt-7.2.0p1_1 +libTKDraw.so.7 occt-7.2.0p1_1 +libTKSTEP209.so.7 occt-7.2.0p1_1 +libTKOpenGl.so.7 occt-7.2.0p1_1 +libTKBinTObj.so.7 occt-7.2.0p1_1 +libTKSTL.so.7 occt-7.2.0p1_1 +libTKViewerTest.so.7 occt-7.2.0p1_1 +libTKCAF.so.7 occt-7.2.0p1_1 +libTKService.so.7 occt-7.2.0p1_1 +libTKV3d.so.7 occt-7.2.0p1_1 +libTKXCAF.so.7 occt-7.2.0p1_1 +libTKMesh.so.7 occt-7.2.0p1_1 +libTKSTEP.so.7 occt-7.2.0p1_1 +libTKMath.so.7 occt-7.2.0p1_1 +libTKLCAF.so.7 occt-7.2.0p1_1 +libTKShHealing.so.7 occt-7.2.0p1_1 +libTKGeomAlgo.so.7 occt-7.2.0p1_1 +libTKTObjDRAW.so.7 occt-7.2.0p1_1 +libTKTObj.so.7 occt-7.2.0p1_1 +libTKStd.so.7 occt-7.2.0p1_1 +libTKSTEPBase.so.7 occt-7.2.0p1_1 +libTKIGES.so.7 occt-7.2.0p1_1 +libTKGeomBase.so.7 occt-7.2.0p1_1 +libTKFillet.so.7 occt-7.2.0p1_1 +libTKFeat.so.7 occt-7.2.0p1_1 +libTKG2d.so.7 occt-7.2.0p1_1 +libTKXSBase.so.7 occt-7.2.0p1_1 +libTKDCAF.so.7 occt-7.2.0p1_1 +libTKXml.so.7 occt-7.2.0p1_1 +libTKTopTest.so.7 occt-7.2.0p1_1 +libTKG3d.so.7 occt-7.2.0p1_1 +libTKBRep.so.7 occt-7.2.0p1_1 +libTKVRML.so.7 occt-7.2.0p1_1 +libTKCDF.so.7 occt-7.2.0p1_1 +libTKXSDRAW.so.7 occt-7.2.0p1_1 +libTKXMesh.so.7 occt-7.2.0p1_1 +libTKernel.so.7 occt-7.2.0p1_1 +libTKTopAlgo.so.7 occt-7.2.0p1_1 +libTKHLR.so.7 occt-7.2.0p1_1 +libTKBinXCAF.so.7 occt-7.2.0p1_1 +libTKVCAF.so.7 occt-7.2.0p1_1 +libTKBinL.so.7 occt-7.2.0p1_1 +libTKXmlXCAF.so.7 occt-7.2.0p1_1 +libTKXDEIGES.so.7 occt-7.2.0p1_1 +libTKBO.so.7 occt-7.2.0p1_1 +libTKStdL.so.7 occt-7.2.0p1_1 +libTKXDEDRAW.so.7 occt-7.2.0p1_1 +libTKXmlTObj.so.7 occt-7.2.0p1_1 +libTKPrim.so.7 occt-7.2.0p1_1 +libTKMeshVS.so.7 occt-7.2.0p1_1 +libTKSTEPAttr.so.7 occt-7.2.0p1_1 +libTKBool.so.7 occt-7.2.0p1_1 +libTKOffset.so.7 occt-7.2.0p1_1 +libTKXDESTEP.so.7 occt-7.2.0p1_1 +libTKQADraw.so.7 occt-7.2.0p1_1 +libTKXmlL.so.7 occt-7.2.0p1_1 libargon2.so.1 libargon2-20171227_1 libdazzle-1.0.so.0 libdazzle-3.28.0_1 libjsonrpc-glib-1.0.so.1 jsonrpc-glib-3.28.0_1 diff --git a/srcpkgs/occt-devel b/srcpkgs/occt-devel new file mode 120000 index 00000000000..00aa87b1c0a --- /dev/null +++ b/srcpkgs/occt-devel @@ -0,0 +1 @@ +occt \ No newline at end of file diff --git a/srcpkgs/occt/patches/fix-install-dir.patch b/srcpkgs/occt/patches/fix-install-dir.patch new file mode 100644 index 00000000000..5f866d5030d --- /dev/null +++ b/srcpkgs/occt/patches/fix-install-dir.patch @@ -0,0 +1,26 @@ +# fix cmake install dir references +# source: https://aur.archlinux.org/cgit/aur.git/commit/fix-install-dir-references.patch?h=opencascade7&id=a6a582af3688e26236cf0d4469f8f782908a9ff9 + +--- CMakeLists.txt 2016-11-25 11:50:18.000000000 +0100 ++++ CMakeLists.txt 2017-03-18 08:44:10.406668714 +0100 +@@ -906,7 +906,7 @@ + endforeach() + # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration + install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)") +-install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") ++install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") + + foreach (OCCT_MODULE ${OCCT_MODULES}) + if (BUILD_MODULE_${OCCT_MODULE}) +--- adm/cmake/occt_macros.cmake 2016-11-25 11:50:18.000000000 +0100 ++++ adm/cmake/occt_macros.cmake 2017-03-18 08:44:10.406668714 +0100 +@@ -558,7 +558,7 @@ + "cmake_policy(PUSH) + cmake_policy(SET CMP0007 NEW) + string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) +- file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") ++ file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") + foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES}) + file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT) + file (REMOVE \"\${TARGET_FILENAME}\") + diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch new file mode 100644 index 00000000000..5a09d241121 --- /dev/null +++ b/srcpkgs/occt/patches/musl-fenv.patch @@ -0,0 +1,37 @@ +--- src/OSD/OSD_signal.cxx.orig ++++ src/OSD/OSD_signal.cxx +@@ -687,7 +687,7 @@ + // cout << "OSD::Handler: signal " << (int) theSignal << " occured inside a try block " << endl ; + if ( ADR_ACT_SIGIO_HANDLER != NULL ) + (*ADR_ACT_SIGIO_HANDLER)() ; +-#ifdef __linux__ ++#if defined(__linux__) && defined(__GLIBC__) + if (fFltExceptions) + feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); + //feenableexcept (FE_INVALID | FE_DIVBYZERO); +@@ -805,7 +805,7 @@ + (void)theSignal; // silence GCC warnings + (void)theContext; + +-#ifdef __linux__ ++#if defined(__linux__) && defined(__GLIBC__) + if (fFltExceptions) + feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); + //feenableexcept (FE_INVALID | FE_DIVBYZERO); +@@ -891,14 +891,14 @@ + cerr << "ieee_handler does not work !!! KO " << endl; + #endif + } +-#elif defined (__linux__) ++#elif defined(__linux__) && defined(__GLIBC__) + feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); + fFltExceptions = Standard_True; + #endif + } + else + { +-#if defined (__linux__) ++#if defined(__linux__) && defined(__GLIBC__) + fedisableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); + fFltExceptions = Standard_False; + #endif diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch new file mode 100644 index 00000000000..3561c31f05a --- /dev/null +++ b/srcpkgs/occt/patches/musl-mallinfo.patch @@ -0,0 +1,17 @@ +In musl libc there is no struct mallinfo and no function mallinf() + +--- src/OSD/OSD_MemInfo.cxx.orig ++++ src/OSD/OSD_MemInfo.cxx +@@ -147,8 +147,12 @@ + } + aFile.close(); + ++ #if defined(__GLIBC__) + struct mallinfo aMI = mallinfo(); + myCounters[MemHeapUsage] = aMI.uordblks; ++ #else /* XXX not yet coded */ ++ myCounters[MemHeapUsage] = 0; ++ #endif + + #elif (defined(__APPLE__)) + struct task_basic_info aTaskInfo; diff --git a/srcpkgs/occt/patches/xlocale.patch b/srcpkgs/occt/patches/xlocale.patch new file mode 100644 index 00000000000..2efd3719c3f --- /dev/null +++ b/srcpkgs/occt/patches/xlocale.patch @@ -0,0 +1,19 @@ +Description: fix xlocale.h include for glibc 2.26+ compat + This patch fixes compatibility with glibc 2.26+ due to xlocale.h removal. +Origin: vendor, https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencascade7 +Author: Grey Christoforo +Bug: https://tracker.dev.opencascade.org/view.php?id=28971. +=================================================================== + +--- src/Standard/Standard_CLocaleSentry.hxx ++++ src/Standard/Standard_CLocaleSentry.hxx +@@ -37,7 +37,7 @@ + + #if defined(HAVE_XLOCALE_H) && !(defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 24)) + // xlocale.h is actually a non-standard header file; glibc 2.26 has removed it altogether (all definition comes from locale.h) +- #include ++ #include + #endif + + #if !defined(__ANDROID__) + diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template new file mode 100644 index 00000000000..2728824e919 --- /dev/null +++ b/srcpkgs/occt/template @@ -0,0 +1,35 @@ +# Template file for 'occt' +pkgname=occt +_gittag="V7_2_0p1" +version=7.2.0p1 +revision=1 +wrksrc=occt-${_gittag} +build_style=cmake +configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF + -DINSTALL_SAMPLES=ON" +makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel + tcl-devel tk-devel" +short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications" +maintainer="Piraty " +license="LGPL-2.1" +homepage="https://www.opencascade.com" +distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz" +checksum=530f9981e6026e6cc04c462ab039b4977a568f943d6086dc502262d100a07a79 +conflicts="oce>=0" + +post_install() { + vlicense OCCT_LGPL_EXCEPTION.txt + rm ${DESTDIR}/usr/bin/custom*.sh +} + +occt-devel_package() { + short_desc+=" - development files" + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove "usr/lib/cmake" + mkdir -p ${PKGDESTDIR}/usr/share/${pkgname} + vcopy samples usr/share/${pkgname} + } +}