--- /dev/null
+--- occt-ffce0d6/adm/cmake/occt_toolkit.cmake.orig 2023-03-21 13:36:52.000000000 +0100
++++ occt-ffce0d6/adm/cmake/occt_toolkit.cmake 2023-03-30 19:08:14.199142733 +0200
+@@ -370,10 +370,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_
+ add_definitions (-DHAVE_GLES2)
+ endif()
+
+- if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}")
+- set (CURRENT_CSF "")
+- set (USED_DRACO 1)
+- endif()
+ set (LIBRARY_FROM_CACHE 0)
+ separate_arguments (CURRENT_CSF)
+ foreach (CSF_LIBRARY ${CURRENT_CSF})
+@@ -412,28 +408,6 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_
+ endif()
+ endforeach()
+
+-if (USE_DRACO)
+- if (USED_DRACO)
+- set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY})
+- if (WIN32)
+- set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG})
+- else()
+- set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY})
+- endif()
+- set (USED_LIB_CONF)
+- if (EXISTS ${USED_LIB_DEBUG})
+- set (USED_LIB_CONF "$<$<CONFIG:DEBUG>:${USED_LIB_DEBUG}>;${USED_LIB_CONF}")
+- endif()
+- if (EXISTS ${USED_LIB_RELEASE})
+- set (USED_LIB_CONF "$<$<CONFIG:RELEASE>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
+- set (USED_LIB_CONF "$<$<CONFIG:RELWITHDEBINFO>:${USED_LIB_RELEASE}>;${USED_LIB_CONF}")
+- endif()
+- if (DEFINED USED_LIB_CONF)
+- set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}")
+- endif()
+- endif()
+-endif()
+-
+ if (APPLE)
+ list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
+ if (NOT ${IS_X11_FOUND} EQUAL -1)
# TODO: - separate libs-x (80% of libraries), follow Fedora split or split packages as suggested by Jason Kraftcheck in Debian
# - OpenVR? (USE_OPENVR=ON) https://github.com/ValveSoftware/openvr
-# - USE_RAPIDJSON=ON?
-# - USE_DRACO=ON? https://github.com/google/draco
# Conditional build:
%bcond_without apidocs # API documentation
# Source0-md5: 3e803b63a5b3b8780baceb6eeb2e88a8
Patch0: %{name}-cmake.patch
Patch1: %{name}-inspector-data.patch
+Patch2: %{name}-draco.patch
URL: https://www.opencascade.com/open-cascade-technology/
%{?with_freeimage:BuildRequires: FreeImage-devel}
BuildRequires: OpenGL-GLU-devel
BuildRequires: bison
BuildRequires: cmake >= 3.1
BuildRequires: doxygen >= 1:1.8.4
+BuildRequires: draco-devel
BuildRequires: eigen3
# avcodec avformat avutil swscale
%{?with_ffmpeg:BuildRequires: ffmpeg-devel}
%setup -q -n occt-ffce0d6
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__sed} -i -e '/set (CMAKE_CONFIGURATION_TYPES/ { s/INTERNAL/STRING/;s/ FORCE// }' CMakeLists.txt
%{__sed} -i -e 's/IMPORTED_LOCATION_RELEASE/IMPORTED_LOCATION_PLD/' adm/cmake/tbb.cmake
install -d build
cd build
%cmake .. \
+ -D3RDPARTY_DRACO_INCLUDE_DIR=%{_includedir}/draco \
+ -D3RDPARTY_DRACO_LIBRARY=%{_libdir}/libdraco.so \
%{?with_qt:-D3RDPARTY_QT_DIR=/usr} \
%{?with_qt:-DBUILD_Inspector=ON} \
-DBUILD_YACCLEX=ON \
-DCMAKE_CONFIGURATION_TYPES=%{?debug:Debug}%{!?debug:PLD} \
-DINSTALL_DIR_CMAKE=%{_lib}/cmake/opencascade \
-DINSTALL_DIR_LIB=%{_lib} \
+ -DUSE_DRACO=ON \
-DUSE_EIGEN=ON \
%{?with_ffmpeg:-DUSE_FFMPEG=ON} \
%{?with_freeimage:-DUSE_FREEIMAGE=ON} \
+ -DUSE_RAPIDJSON=ON \
%{?with_tbb:-DUSE_TBB=ON} \
%{?with_vtk:-DUSE_VTK=ON}
# R: libTKBO libTKBRep libTKBin libTKBinL libTKBinXCAF libTKBool libTKCAF libTKCDF libTKDCAF libTKDraw libTKFeat libTKFillet libTKG2d libTKG3d libTKGeomAlgo libTKGeomBase libTKHLR libTKIGES libTKLCAF libTKMath libTKMesh libTKOffset libTKPrim libTKService libTKShHealing libTKStd libTKStdL libTKTObj libTKTopAlgo libTKV3d libTKVCAF libTKViewerTest libTKXCAF libTKXDESTEP libTKXSBase libTKXml libTKXmlL libTKernel
%attr(755,root,root) %{_libdir}/libTKQADraw.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libTKQADraw.so.7.7
-# R: libTKBRep libTKG3d liBTKLCAF libTKMath libTKMesh libTKService libTKXCAF libTKXDE libTKernel
+# R: libTKBRep libTKG3d liBTKLCAF libTKMath libTKMesh libTKService libTKXCAF libTKXDE libTKernel %{?with_draco:draco}
%attr(755,root,root) %{_libdir}/libTKRWMesh.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libTKRWMesh.so.7.7
# R: libTKBRep libTKG2d libTKG3d libTKGeomBase libTKMath libTKSTEP209 libTKSTEPAttr libTKSTEPBase libTKShHealing libTKTopAlgo libTKXSBase libTKernel