$ git show --format=fuller --patch-with-stat --summary 3c723f2d42264d7b91b5d326601ecb4b823c98a3
commit 3c723f2d42264d7b91b5d326601ecb4b823c98a3
Author: Bernhard Rosenkränzer <bero@lindev.ch>
AuthorDate: Wed Jan 12 05:30:46 2022 +0100
Commit: Bernhard Rosenkränzer <bero@lindev.ch>
CommitDate: Wed Jan 12 05:30:46 2022 +0100
7.6.0, fix buildroot references, switch to upstream's upstream
---
.abf.yml | 2 +-
opencascade-7.6.0-set-env-correctly.patch | 12 +++++++++
opencascade-fix_externlib.patch | 10 --------
opencascade.spec | 42 ++++++++++++++++---------------
4 files changed, 35 insertions(+), 31 deletions(-)
create mode 100644 opencascade-7.6.0-set-env-correctly.patch
delete mode 100644 opencascade-fix_externlib.patch
diff --git a/.abf.yml b/.abf.yml
index 4d86658..74d6add 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- opencascade-7.5.0.tar.gz: fbbfc779b738ba10bfd5b2e8684dc26476842eb2
+ opencascade-7.6.0.tgz: 0e719f4ffb88f0deef1d06dd2c07f864cd886036
diff --git a/opencascade-7.6.0-set-env-correctly.patch b/opencascade-7.6.0-set-env-correctly.patch
new file mode 100644
index 0000000..4f89df1
--- /dev/null
+++ b/opencascade-7.6.0-set-env-correctly.patch
@@ -0,0 +1,12 @@
+diff -up opencascade-7.6.0/adm/templates/custom.build.sh.in.omv~ opencascade-7.6.0/adm/templates/custom.build.sh.in
+--- opencascade-7.6.0/adm/templates/custom.build.sh.in.omv~ 2022-01-12 04:05:12.227180642 +0100
++++ opencascade-7.6.0/adm/templates/custom.build.sh.in 2022-01-12 04:06:30.088406684 +0100
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+
+-if [ "$1" == "@BIN_LETTER@" ]; then
++if true; then
+ if [ "$2" == "@COMPILER_BITNESS@" ]; then
+ # set environment variables used by OCCT
+ export CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
+diff -up opencascade-7.6.0/adm/templates/env.sh.omv~ opencascade-7.6.0/adm/templates/env.sh
diff --git a/opencascade-fix_externlib.patch b/opencascade-fix_externlib.patch
deleted file mode 100644
index 29d7480..0000000
--- a/opencascade-fix_externlib.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/TKIVtkDraw/EXTERNLIB
-+++ b/src/TKIVtkDraw/EXTERNLIB
-@@ -18,6 +18,7 @@
- TKOpenGl
- TKIVtk
- vtkIOImage
-+vtkIOMPIImage
- vtkImagingCore
- vtkInteractionStyle
- vtkRenderingOpenGL
diff --git a/opencascade.spec b/opencascade.spec
index 7fa1431..f589ba6 100644
--- a/opencascade.spec
+++ b/opencascade.spec
@@ -1,11 +1,10 @@
-%define major 7
+%define major %(echo %{version} |cut -d. -f1)
%define libname %mklibname %{name} %{major}
%define devname %mklibname -d %{name}
-%define version 7.5.0
%define occtag %(echo %version | tr . _)
-# Enabe this in order to use git snapshiot
+# Enabe this in order to use git snapshot
%define _from_git 0
%if %_from_git
@@ -15,22 +14,25 @@
Name: opencascade
Group: Sciences/Physics
-Version: %{version}
-Release: 6
+Version: 7.6.0
+Release: 1
Summary: 3D modeling & numerical simulation
-License: LGPLv2 with exceptions
-URL: https://github.com/tpaviot/oce
+License: LGPLv2.1 with exceptions
+# Also look at
+# https://github.com/tpaviot/oce
+# for a Community Edition -- but as of
+# 7.6.0, it has fallen too far behind
+# upstream to still be useful
+URL: https://opencascade.org/
%if %_from_git
# Source cannot be downloaded directly from git so download from from an address like the following:
# https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=%{commit};sf=tgz
# then rename as %{name}-%{version}.tgz
-Source0: %{name}-%{version}.tgz
+Source0: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=80ffc5f84dae96de6ed093d3e5d2466a9e368b27;sf=tgz#/opencascade-%{version}.tar.gz
%else
-Source0: https://github.com/tpaviot/oce/archive/upstream/V%{occtag}/%{name}-%{version}.tar.gz
+Source0: https://dev.opencascade.org/system/files/occt/OCC_%{version}_release/opencascade-%{version}.tgz
%endif
-Patch1: opencascade-fix_externlib.patch
-Patch2: opencascade-compile.patch
-# (fedora)
+Patch2: opencascade-7.6.0-set-env-correctly.patch
Patch3: opencascade-cmake.patch
Patch4: oce-7.5.0-clang.patch
# (upstream)
@@ -62,7 +64,6 @@ BuildRequires: pkgconfig(tk)
BuildRequires: pkgconfig(tbb)
BuildRequires: pkgconfig(xi)
-Requires: pdksh
Requires: tcl
Requires: tix
Requires: tk
@@ -141,7 +142,7 @@ edition to heavy industry.
%if %_from_git
%autosetup -p1 -n occt-%{shortcommit}
%else
-%autosetup -p1 -n oce-upstream-V%{occtag}
+%autosetup -p1
%endif
%build
@@ -168,10 +169,11 @@ ninja install -C build
# Draw binary should not be versioned.
mv %{buildroot}%{_bindir}/DRAWEXE-%{version} \
%{buildroot}%{_bindir}/DRAWEXE
-
-# adjust environment/directories to avoid (too much) script patching
-#ln -sf %{_libdir} %{buildroot}%{_datadir}/%{name}/lib
-#ln -sf %{_includedir}/%{name} %{buildroot}%{_datadir}/%{name}/inc
-#ln -sf %{_datadir}/%{name} %{buildroot}%{_datadir}/%{name}/lin
-#ln -sf %{_datadir}/%{name} %{buildroot}%{_datadir}/%{name}/Linux
+# Remove buildroot references from the launcher script
+sed -i -e 's,%{buildroot},,g' %{buildroot}%{_bindir}/env.sh
+
+# And ignore release/debug/... build identifier, that's a Windoze thing
+sed -i -e 's,\[ "$1" == "i" \],true,g' %{buildroot}%{_bindir}/custom_*.sh
+cd %{buildroot}%{_bindir}
+[ -e custom.sh ] || ln -s custom_*.sh custom.sh