[packages/OCE] - up to 0.18.3, use openmp as threading lib

baggins baggins at pld-linux.org
Mon Dec 20 15:30:52 CET 2021


commit 917cf92beca2e20e67aaa75a0a1c1747bf66dfe2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Dec 20 15:30:21 2021 +0100

    - up to 0.18.3, use openmp as threading lib

 OCE.spec        | 19 +++++++++++--------
 oce-build.patch | 14 --------------
 2 files changed, 11 insertions(+), 22 deletions(-)
---
diff --git a/OCE.spec b/OCE.spec
index 2428719..f59aaad 100644
--- a/OCE.spec
+++ b/OCE.spec
@@ -1,15 +1,18 @@
-%bcond_without	tests
+#
+# Conditional build:
+%bcond_without	tests		# build with tests
+%bcond_with	tbb		# Use tbb for multithreading
+%bcond_without	openmp		# Use openmp for multithreading
 #
 Summary:	OpenCASCADE Community Edition
 Name:		OCE
-Version:	0.18.2
-Release:	2
+Version:	0.18.3
+Release:	1
 License:	LGPLv2 with exception
 Group:		Applications/Engineering
 URL:		https://github.com/tpaviot/oce
 Source0:	https://github.com/tpaviot/oce/archive/%{name}-%{version}.tar.gz
-# Source0-md5:	6dfd68e459e2c62387579888a867281f
-Patch0:		oce-build.patch
+# Source0-md5:	1686393c8493bbbb2f3f242330b33cba
 Source1:	DRAWEXE.1
 Source2:	opencascade-draw.desktop
 Source3:	oce-256.png
@@ -26,7 +29,8 @@ BuildRequires:	Mesa-libGLU-devel
 BuildRequires:	ftgl-devel
 BuildRequires:	gl2ps-devel
 BuildRequires:	libgomp
-BuildRequires:	tbb-devel
+%{?with_openmp:BuildRequires:	libopenmpt-devel}
+%{?with_tbb:BuildRequires:	tbb-devel}
 BuildRequires:	tcl-devel
 BuildRequires:	tk-devel
 BuildRequires:	xorg-lib-libXScrnSaver-devel
@@ -149,7 +153,6 @@ OpenCASCADE CAE platform library development files
 
 %prep
 %setup -q -n oce-%{name}-%{version}
-%patch0 -p1
 
 %build
 install -d build
@@ -159,7 +162,7 @@ cd build
 		-DOCE_INSTALL_LIB_DIR=%{_lib} \
 		-DOCE_WITH_FREEIMAGE=ON \
 		-DOCE_WITH_GL2PS=ON \
-		-DOCE_MULTITHREAD_LIBRARY:STRING=TBB \
+		-DOCE_MULTITHREAD_LIBRARY:STRING=%{?with_tbb:TBB}%{!?with_tbb:%{?with_openmp:OPENMP}%{!?with_openmp:NONE}} \
 		-DOCE_DRAW=ON \
 		-DOCE_TESTING=ON \
 		../
diff --git a/oce-build.patch b/oce-build.patch
deleted file mode 100644
index b7cc7fa..0000000
--- a/oce-build.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- oce-OCE-0.18.2/src/Standard/Standard_CLocaleSentry.hxx~	2017-08-11 07:51:11.000000000 +0200
-+++ oce-OCE-0.18.2/src/Standard/Standard_CLocaleSentry.hxx	2017-08-15 21:40:16.105343307 +0200
-@@ -28,11 +28,6 @@
-   #if defined(__APPLE__)
-     #define HAVE_XLOCALE_H
-   #endif
--
--  //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
--  #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
--    #define HAVE_XLOCALE_H
--  #endif
- #endif // ifndef HAVE_LOCALE_H
- 
- #ifdef HAVE_XLOCALE_H
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OCE.git/commitdiff/917cf92beca2e20e67aaa75a0a1c1747bf66dfe2



More information about the pld-cvs-commit mailing list