[packages/goptical] - updated to 1.0
qboosh
qboosh at pld-linux.org
Sun Sep 29 12:55:52 CEST 2024
commit b1b08c1d1c7f32534184e7b974f2b5108fece6ab
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 29 12:58:57 2024 +0200
- updated to 1.0
goptical-includes.patch | 22 ++++++++
goptical-sh.patch | 144 ------------------------------------------------
goptical.spec | 18 ++++--
3 files changed, 34 insertions(+), 150 deletions(-)
---
diff --git a/goptical.spec b/goptical.spec
index 132999a..4e93e83 100644
--- a/goptical.spec
+++ b/goptical.spec
@@ -1,21 +1,22 @@
# TODO: dime (DXF renderer), plplot (renderer)
#
# Conditional build:
-%bcond_without static_libs # don't build static libraries
+%bcond_without static_libs # static libraries
#
Summary: GNU Optical design and simulation library
Summary(pl.UTF-8): Biblioteka do projektowania i symulacji optycznych GNU Optical
Name: goptical
-Version: 0.90
-Release: 0.1
+Version: 1.0
+Release: 1
License: GPL v3+
Group: Libraries
-Source0: http://alpha.gnu.org/gnu/goptical/%{name}-%{version}.tar.gz
-# Source0-md5: ad3c85d16815ee8673908780ec287763
-Patch0: %{name}-sh.patch
+Source0: https://ftp.gnu.org/gnu/goptical/%{name}-%{version}.tar.gz
+# Source0-md5: a65d1dc6af36d481ef8ea34a0ccd9823
+Patch0: %{name}-includes.patch
Patch1: %{name}-info.patch
URL: http://gnu.org/software/goptical/
BuildRequires: OpenGL-GLU-devel
+BuildRequires: OpenGL-devel
BuildRequires: OpenGL-glut-devel
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -23,6 +24,7 @@ BuildRequires: gd-devel
BuildRequires: gsl-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:1.5
+BuildRequires: rpmbuild(macros) >= 1.749
BuildRequires: xorg-lib-libX11-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -97,6 +99,10 @@ cd ../goptical_design
%{__autoconf}
%{__automake}
cd ..
+%if "%{_ver_ge %{cxx_version} 7.0}" == "1"
+# code is not ready for C++17
+CXXFLAGS="%{rpmcxxflags} -std=gnu++14"
+%endif
%configure \
%{?with_static_libs:--enable-static}
%{__make}
diff --git a/goptical-includes.patch b/goptical-includes.patch
new file mode 100644
index 0000000..79f9191
--- /dev/null
+++ b/goptical-includes.patch
@@ -0,0 +1,22 @@
+--- goptical-1.0/goptical_core/tests/test_2d_plot.cc.orig 2024-09-29 12:13:34.806291711 +0200
++++ goptical-1.0/goptical_core/tests/test_2d_plot.cc 2024-09-29 12:13:38.442938676 +0200
+@@ -24,6 +24,8 @@
+
+ #include "config.hh"
+
++#include <unistd.h>
++
+ #include <Goptical/Io/Renderer>
+ #include <Goptical/Io/RendererViewport>
+ #include <Goptical/Io/RendererAxes>
+--- goptical-1.0/goptical_core/tests/test_rendering.cc.orig 2011-11-09 20:52:18.000000000 +0100
++++ goptical-1.0/goptical_core/tests/test_rendering.cc 2024-09-29 12:13:53.589523286 +0200
+@@ -24,6 +24,8 @@
+
+ #include "config.hh"
+
++#include <unistd.h>
++
+ #include <Goptical/Io/Renderer>
+ #include <Goptical/Io/RendererViewport>
+ #include <Goptical/Io/Rgb>
diff --git a/goptical-sh.patch b/goptical-sh.patch
deleted file mode 100644
index a354d87..0000000
--- a/goptical-sh.patch
+++ /dev/null
@@ -1,144 +0,0 @@
---- goptical-0.90/configure.ac.orig 2011-11-09 20:52:20.000000000 +0100
-+++ goptical-0.90/configure.ac 2011-11-14 19:31:49.171381508 +0100
-@@ -25,13 +25,13 @@
- AC_PROG_LIBTOOL
- AC_LANG(C++)
-
--CXXFLAGS+=" -Wall "
-+CXXFLAGS="$CXXFLAGS -Wall "
-
- AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, [Enable debug and asserts]), enable_debug=yes)
- if test "x$enable_debug" = "xyes" ; then
-- CXXFLAGS+=" -g "
-+ CXXFLAGS="$CXXFLAGS -g "
- else
-- CPPFLAGS+=" -DNDEBUG "
-+ CPPFLAGS="$CXXFLAGS -DNDEBUG "
- fi
-
- AC_CHECK_LIB(m, cosf, , AC_MSG_ERROR([can not find m library]))
-@@ -51,7 +51,7 @@
- AC_CHECK_HEADER(GL/glut.h, [
- GOPTICAL_HAVE_GL=true
- AC_DEFINE(GOPTICAL_HAVE_GL, 1, [gl rendering library enabled])
-- LDFLAGS+=" -lglut -lGL -lGLU "
-+ LDFLAGS="$LDFLAGS -lglut -lGL -lGLU "
- ])
- ])
- ])
-@@ -62,15 +62,15 @@
- AC_CHECK_HEADER(X11/Xlib.h, [
- GOPTICAL_HAVE_X11=true
- AC_DEFINE(GOPTICAL_HAVE_X11, 1, [x11 rendering library enabled])
-- LDFLAGS+=" -lX11 "
-+ LDFLAGS="$LDFLAGS -lX11 "
- ])
- fi
- AM_CONDITIONAL(GOPTICAL_HAVE_X11, test x$GOPTICAL_HAVE_X11 = xtrue)
-
- abs_srcdir=`cd $srcdir ; pwd`
- abs_builddir=`pwd`
--ac_configure_args+=" --with-goptical-core-include=$abs_srcdir/goptical_core/src "
--ac_configure_args+=" --with-goptical-core-lib=$abs_builddir/goptical_core/src/libgoptical.la "
-+ac_configure_args="$ac_configure_args --with-goptical-core-include=$abs_srcdir/goptical_core/src "
-+ac_configure_args="$ac_configure_args --with-goptical-core-lib=$abs_builddir/goptical_core/src/libgoptical.la "
-
- AC_CONFIG_FILES([
- Makefile
---- goptical-0.90/goptical_core/configure.ac.orig 2011-11-09 20:52:20.000000000 +0100
-+++ goptical-0.90/goptical_core/configure.ac 2011-11-14 19:32:53.521383663 +0100
-@@ -29,16 +29,16 @@
-
- AC_LANG(C++)
-
--CXXFLAGS+=" -Wall "
-+CXXFLAGS="$CXXFLAGS -Wall "
-
- AC_ARG_ENABLE(tests, AC_HELP_STRING(--disable-tests, [Disable compilation of tests]), disable_tests=yes)
- AM_CONDITIONAL(TESTS, test x$disable_tests != xyes)
-
- AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, [Enable debug and asserts]), enable_debug=yes)
- if test "x$enable_debug" = "xyes" ; then
-- CXXFLAGS+=" -g "
-+ CXXFLAGS="$CXXFLAGS -g "
- else
-- CPPFLAGS+=" -DNDEBUG "
-+ CPPFLAGS="$CXXFLAGS -DNDEBUG "
- fi
-
- AC_CHECK_LIB(m, cosf, , AC_MSG_ERROR([can not find m library]))
-@@ -50,13 +50,13 @@
- AC_ARG_ENABLE(plplot, AC_HELP_STRING(--disable-plplot, [Disable use of PlPlot renderer]), GOPTICAL_HAVE_PLPLOT=false)
-
- AC_CHECK_HEADER(gsl/gsl_math.h, , AC_MSG_ERROR([GNU scientific library (libgsl) is missing]))
--LDFLAGS+=" -lgsl -lgslcblas "
-+LDFLAGS="$LDFLAGS -lgsl -lgslcblas "
-
- if test x$GOPTICAL_HAVE_DIME != xfalse ; then
- AC_CHECK_HEADER(dime/Base.h, [
- GOPTICAL_HAVE_DIME=true
- AC_DEFINE(GOPTICAL_HAVE_DIME, 1, [dime DXF rendering library enabled])
-- LDFLAGS+=" -ldime "
-+ LDFLAGS="$LDFLAGS -ldime "
- ])
- fi
- AM_CONDITIONAL(GOPTICAL_HAVE_DIME, test x$GOPTICAL_HAVE_DIME = xtrue)
-@@ -65,7 +65,7 @@
- AC_CHECK_HEADER(gd.h, [
- GOPTICAL_HAVE_GD=true
- AC_DEFINE(GOPTICAL_HAVE_GD, 1, [gd rendering library enabled])
-- LDFLAGS+=" -lgd "
-+ LDFLAGS="$LDFLAGS -lgd "
- ])
- fi
- AM_CONDITIONAL(GOPTICAL_HAVE_GD, test x$GOPTICAL_HAVE_GD = xtrue)
-@@ -76,7 +76,7 @@
- AC_CHECK_HEADER(GL/glut.h, [
- GOPTICAL_HAVE_GL=true
- AC_DEFINE(GOPTICAL_HAVE_GL, 1, [gl rendering library enabled])
-- LDFLAGS+=" -lglut -lGL -lGLU "
-+ LDFLAGS="$LDFLAGS -lglut -lGL -lGLU "
- ])
- ])
- ])
-@@ -87,7 +87,7 @@
- AC_CHECK_HEADER(X11/Xlib.h, [
- GOPTICAL_HAVE_X11=true
- AC_DEFINE(GOPTICAL_HAVE_X11, 1, [x11 rendering library enabled])
-- LDFLAGS+=" -lX11 "
-+ LDFLAGS="$LDFLAGS -lX11 "
- ])
- fi
- AM_CONDITIONAL(GOPTICAL_HAVE_X11, test x$GOPTICAL_HAVE_X11 = xtrue)
-@@ -96,7 +96,7 @@
- AC_CHECK_HEADER(plplot/plstream.h, [
- GOPTICAL_HAVE_PLPLOT=true
- AC_DEFINE(GOPTICAL_HAVE_PLPLOT, 1, [plplot rendering library enabled])
-- LDFLAGS+=" -lplplotcxxd -lplplotd "
-+ LDFLAGS="$LDFLAGS -lplplotcxxd -lplplotd "
- ])
- fi
- AM_CONDITIONAL(GOPTICAL_HAVE_PLPLOT, test x$GOPTICAL_HAVE_PLPLOT = xtrue)
---- goptical-0.90/goptical_design/configure.ac.orig 2011-11-09 20:52:19.000000000 +0100
-+++ goptical-0.90/goptical_design/configure.ac 2011-11-14 19:33:30.608051572 +0100
-@@ -27,7 +27,7 @@
- AC_PROG_LIBTOOL
- AC_LANG(C++)
-
--CXXFLAGS+=" -Wall "
-+CXXFLAGS="$CXXFLAGS -Wall "
- CXXFLAGS="$GOPTICAL_CXXFLAGS $CXXFLAGS"
- LDFLAGS="$GOPTICAL_LDFLAGS $LDFLAGS"
-
-@@ -36,9 +36,9 @@
-
- AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, [Enable debug and asserts]), enable_debug=yes)
- if test "x$enable_debug" = "xyes" ; then
-- CXXFLAGS+=" -g "
-+ CXXFLAGS="$CXXFLAGS -g "
- else
-- CPPFLAGS+=" -DNDEBUG "
-+ CPPFLAGS="$CXXFLAGS -DNDEBUG "
- fi
-
- AC_ARG_WITH([goptical-core-include],
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/goptical.git/commitdiff/b1b08c1d1c7f32534184e7b974f2b5108fece6ab
More information about the pld-cvs-commit
mailing list