commit 7a3699349b13f4d485274bacf7ffdf3a28ac8291
Author: Jakub Bogusz <[email protected]>
Date:   Sun Sep 29 19:15:21 2024 +0200

    - added linking fixes, enable dime support by default (using dime updated 
to 2019 tarball)

 goptical-as-needed.patch | 20 ++++++++++++++++++++
 goptical-link.patch      | 38 ++++++++++++++++++++++++++++++++++++++
 goptical.spec            |  7 ++++++-
 3 files changed, 64 insertions(+), 1 deletion(-)
---
diff --git a/goptical.spec b/goptical.spec
index 4e93e83..4685221 100644
--- a/goptical.spec
+++ b/goptical.spec
@@ -1,4 +1,4 @@
-# TODO: dime (DXF renderer), plplot (renderer)
+# TODO: plplot (renderer)
 #
 # Conditional build:
 %bcond_without static_libs     # static libraries
@@ -14,12 +14,15 @@ Source0:    
https://ftp.gnu.org/gnu/goptical/%{name}-%{version}.tar.gz
 # Source0-md5: a65d1dc6af36d481ef8ea34a0ccd9823
 Patch0:                %{name}-includes.patch
 Patch1:                %{name}-info.patch
+Patch2:                %{name}-as-needed.patch
+Patch3:                %{name}-link.patch
 URL:           http://gnu.org/software/goptical/
 BuildRequires: OpenGL-GLU-devel
 BuildRequires: OpenGL-devel
 BuildRequires: OpenGL-glut-devel
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
+BuildRequires: dime-devel >= 0.9.1-6
 BuildRequires: gd-devel
 BuildRequires: gsl-devel
 BuildRequires: libstdc++-devel
@@ -81,6 +84,8 @@ Statyczne biblioteki Goptical.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize}
diff --git a/goptical-as-needed.patch b/goptical-as-needed.patch
new file mode 100644
index 0000000..97bfc27
--- /dev/null
+++ b/goptical-as-needed.patch
@@ -0,0 +1,20 @@
+--- goptical-1.0/goptical_core/configure.ac.orig       2011-11-30 
12:03:53.000000000 +0100
++++ goptical-1.0/goptical_core/configure.ac    2024-09-29 14:49:09.392388584 
+0200
+@@ -44,7 +44,7 @@ fi
+ # c++ library checking macro
+ AC_DEFUN([AT_CHECK_CPPLIB], [
+   SAVED_LDFLAGS=$LDFLAGS
+-  LDFLAGS="$LDFLAGS $1"
++  LIBS="$LIBS $1"
+   AC_MSG_CHECKING([$1 C++ library availability])
+   AC_LINK_IFELSE(
+     [AC_LANG_PROGRAM([#include <$2>], [$3])],
+@@ -55,7 +55,7 @@ AC_DEFUN([AT_CHECK_CPPLIB], [
+       AC_MSG_RESULT([no])
+     ]
+ )
+-  LDFLAGS=$SAVED_LDFLAGS
++  LIBS=$SAVED_LIBS
+ ])
+ 
+ AC_CHECK_LIB(m, cosf, , AC_MSG_ERROR([can not find m library]))
diff --git a/goptical-link.patch b/goptical-link.patch
new file mode 100644
index 0000000..0435678
--- /dev/null
+++ b/goptical-link.patch
@@ -0,0 +1,38 @@
+--- goptical-1.0/goptical_core/src/Makefile.am.orig    2011-11-09 
20:52:18.000000000 +0100
++++ goptical-1.0/goptical_core/src/Makefile.am 2024-09-29 18:27:21.188130923 
+0200
+@@ -16,6 +16,7 @@
+ SUBDIRS = Goptical
+ 
+ lib_LTLIBRARIES = libgoptical.la
++libgoptical_la_LIBADD = -lgsl
+ 
+ libgoptical_la_SOURCES = curve_array.cc curve_base.cc curve_composer.cc      \
+       curve_conic_base.cc curve_conic.cc curve_flat.cc                \
+@@ -46,22 +47,27 @@ libgoptical_la_SOURCES = curve_array.cc
+ 
+ if GOPTICAL_HAVE_DIME
+ libgoptical_la_SOURCES += io_renderer_dxf.cc
++libgoptical_la_LIBADD += -ldime
+ endif
+ 
+ if GOPTICAL_HAVE_GD
+ libgoptical_la_SOURCES += io_renderer_gd.cc
++libgoptical_la_LIBADD += -lgd
+ endif
+ 
+ if GOPTICAL_HAVE_GL
+ libgoptical_la_SOURCES += io_renderer_opengl.cc
++libgoptical_la_LIBADD += -lGLU -lGL
+ endif
+ 
+ if GOPTICAL_HAVE_X11
+ libgoptical_la_SOURCES += io_renderer_x11.cc
++libgoptical_la_LIBADD += -lX11
+ endif
+ 
+ if GOPTICAL_HAVE_PLPLOT
+ libgoptical_la_SOURCES += io_renderer_plplot.cc
++libgoptical_la_LIBADD += -lplplotcxx -lplplot
+ endif
+ 
+ libgoptical_la_CPPFLAGS = -I$(top_srcdir)/include
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/goptical.git/commitdiff/7a3699349b13f4d485274bacf7ffdf3a28ac8291

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to