From 3c9270516c1fb07420e7b94d2fd9743d2c2e4672 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 14 Apr 2023 09:13:56 +0200 Subject: [PATCH] Port to C99 Related to: --- octave-iso2mesh-c99.patch | 36 ++++++++++++++++++++++++++++++++++++ octave-iso2mesh.spec | 7 ++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 octave-iso2mesh-c99.patch diff --git a/octave-iso2mesh-c99.patch b/octave-iso2mesh-c99.patch new file mode 100644 index 0000000..464483e --- /dev/null +++ b/octave-iso2mesh-c99.patch @@ -0,0 +1,36 @@ +Avoid implicit function declarations: Declare lsame_ and +xerbla_. Include for dCreate_CompCol_Matrix, +dCreate_Dense_Matrix, dgssv. Prevents build failures with future +compilers. + +Submitted upstream: + +diff -ur iso2mesh-1.9.6.orig/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c iso2mesh-1.9.6/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c +--- iso2mesh-1.9.6.orig/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c 2020-06-20 18:44:57.000000000 +0200 ++++ iso2mesh-1.9.6/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c 2023-04-14 09:02:52.027673795 +0200 +@@ -1480,6 +1480,8 @@ + typedef NLboolean logical ; + typedef NLint ftnlen ; + ++int NL_FORTRAN_WRAP(lsame)(char *ca, char *cb); ++int NL_FORTRAN_WRAP(xerbla)(char *srname, int *info); + + #ifndef max + #define max(x,y) ((x) > (y) ? (x) : (y)) +@@ -3437,6 +3439,16 @@ + + /* SuperLU includes */ + #include ++ ++/* Hide the dgemv, gemv_ prototypes because the local definition is ++ different (the n, m arguments are integers, not pointers to ++ integers here). */ ++#define dgemv dgemv_hidden ++#define dgemv_ dgemv__hidden ++#include ++#undef dgemv ++#undef dgemv_ ++ + #include + + /* Note: SuperLU is difficult to call, but it is worth it. */ diff --git a/octave-iso2mesh.spec b/octave-iso2mesh.spec index 38edfd7..b10d969 100644 --- a/octave-iso2mesh.spec +++ b/octave-iso2mesh.spec @@ -2,7 +2,7 @@ Name: octave-%{octpkg} Version: 1.9.6 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A 3D surface and volumetric mesh generator for MATLAB/Octave # Main package: GPLv3+ # Meshfix: GPLv2+ @@ -25,6 +25,7 @@ Patch0: iso2mesh-1.9.6-CMakeCMP0064.patch # Fix the incorrect detection of Boost version # > -- NOTICE: This program requires Boost >= 1.34.1, and will not be compiled. Patch1: iso2mesh-1.9.6-recent_Boost_version.patch +Patch2: octave-iso2mesh-c99.patch ExcludeArch: armv7hl BuildRequires: make @@ -74,6 +75,7 @@ rm -rf tools/tetgen mv ../cork-0.9.1 tools/cork mv ../meshfix-1.2.2 tools/meshfix mv ../tetgen1.5.1 tools/tetgen +%patch -P 2 -p1 rm -rf bin/*.mex* bin/*.exe bin/*.dll cp COPYING.txt COPYING @@ -165,6 +167,9 @@ install -m 0755 -vp bin/* %{buildroot}%{_libexecdir}/%{octpkg}/ %doc sample %changelog +* Fri Apr 14 2023 Florian Weimer - 1.9.6-11 +- Port to C99 + * Sun Apr 09 2023 Orion Poplawski - 1.9.6-10 - Rebuild for octave 8.1.0