diff --git a/cgnslib.spec b/cgnslib.spec index 10e846a..4863c31 100644 --- a/cgnslib.spec +++ b/cgnslib.spec @@ -1,6 +1,6 @@ Name: cgnslib Version: 3.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Computational Fluid Dynamics General Notation System License: zlib URL: http://www.cgns.org/ @@ -9,6 +9,9 @@ Source0: https://github.com/CGNS/CGNS/archive/v%{version}/%{name}-%{versi Patch0: cgnslib-fmod.patch # Fix cmake error: install TARGETS given no LIBRARY DESTINATION for shared library target Patch1: cgnslib-cmake.patch +# Drop the matherr hack, see https://wiki.tcl.tk/3577. Also, glibc 2.27+ has removed matherr. +# Upstream PR: https://github.com/CGNS/CGNS/pull/55 +Patch2: cgnslib_matherr.patch BuildRequires: cmake BuildRequires: gcc-gfortran @@ -102,6 +105,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test %{_fmoddir}/cgns.mod %changelog +* Sun Feb 04 2018 Sandro Mani - 3.3.1-2 +- Add patch to drop matherr hack. + * Sat Aug 05 2017 Sandro Mani - 3.3.1-1 - Update to 3.3.1 diff --git a/cgnslib_matherr.patch b/cgnslib_matherr.patch new file mode 100644 index 0000000..346b69b --- /dev/null +++ b/cgnslib_matherr.patch @@ -0,0 +1,74 @@ +diff -rupN CGNS-3.3.1/src/cgnstools/cgnscalc/calcwish.c CGNS-3.3.1-new/src/cgnstools/cgnscalc/calcwish.c +--- CGNS-3.3.1/src/cgnstools/cgnscalc/calcwish.c 2017-07-17 23:51:06.000000000 +0200 ++++ CGNS-3.3.1-new/src/cgnstools/cgnscalc/calcwish.c 2018-02-04 11:10:38.609888621 +0100 +@@ -15,14 +15,6 @@ + #include "tk.h" + #include "locale.h" + +-/* +- * The following variable is a special hack that is needed in order for +- * Sun shared libraries to be used for Tcl. +- */ +- +-extern int matherr(); +-int *tclDummyMathPtr = (int *) matherr; +- + #ifdef TK_TEST + extern int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); + extern int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp)); +diff -rupN CGNS-3.3.1/src/cgnstools/cgnsplot/plotwish.c CGNS-3.3.1-new/src/cgnstools/cgnsplot/plotwish.c +--- CGNS-3.3.1/src/cgnstools/cgnsplot/plotwish.c 2017-07-17 23:51:06.000000000 +0200 ++++ CGNS-3.3.1-new/src/cgnstools/cgnsplot/plotwish.c 2018-02-04 11:10:27.229889250 +0100 +@@ -15,14 +15,6 @@ + #include "tk.h" + #include "locale.h" + +-/* +- * The following variable is a special hack that is needed in order for +- * Sun shared libraries to be used for Tcl. +- */ +- +-extern int matherr(); +-int *tclDummyMathPtr = (int *) matherr; +- + extern int Cgnstcl_Init _ANSI_ARGS_((Tcl_Interp *interp)); + extern int Tkogl_Init _ANSI_ARGS_((Tcl_Interp *interp)); + +diff -rupN CGNS-3.3.1/src/cgnstools/cgnsview/cgiowish.c CGNS-3.3.1-new/src/cgnstools/cgnsview/cgiowish.c +--- CGNS-3.3.1/src/cgnstools/cgnsview/cgiowish.c 2017-07-17 23:51:06.000000000 +0200 ++++ CGNS-3.3.1-new/src/cgnstools/cgnsview/cgiowish.c 2018-02-04 11:10:31.067889038 +0100 +@@ -15,14 +15,6 @@ + #include "tk.h" + #include "locale.h" + +-/* +- * The following variable is a special hack that is needed in order for +- * Sun shared libraries to be used for Tcl. +- */ +- +-extern int matherr(); +-int *tclDummyMathPtr = (int *) matherr; +- + #ifdef TK_TEST + extern int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); + extern int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp)); +diff -rupN CGNS-3.3.1/src/cgnstools/tkogl/tkAppInit.c CGNS-3.3.1-new/src/cgnstools/tkogl/tkAppInit.c +--- CGNS-3.3.1/src/cgnstools/tkogl/tkAppInit.c 2017-07-17 23:51:06.000000000 +0200 ++++ CGNS-3.3.1-new/src/cgnstools/tkogl/tkAppInit.c 2018-02-04 11:10:35.027888819 +0100 +@@ -2,16 +2,6 @@ + #include + #include "tkogl.h" + +-/* +- * The following variable is a special hack that is needed in order for +- * Sun shared libraries to be used for Tcl. +- */ +- +-#ifdef NEED_MATHERR +-extern int matherr(); +-int *tclDummyMathPtr = (int *) matherr; +-#endif +- + int Tcl_AppInit(Tcl_Interp *interp) /* Interpreter for application. */ + { + if (Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR;