commit d15e31cb8b8aebc3c2eb2f0e1fafc97913d44da6
Author: Jakub Bogusz <qbo...@pld-linux.org>
Date:   Sun Jun 16 09:05:40 2024 +0200

    - patch to fix build with OSMesa; updated BRs

 asymptote-info.patch   |  6 +++---
 asymptote-osmesa.patch | 34 ++++++++++++++++++++++++++++++++++
 asymptote.spec         | 28 +++++++++++++++++++---------
 3 files changed, 56 insertions(+), 12 deletions(-)
---
diff --git a/asymptote.spec b/asymptote.spec
index 30a09ae..90c9410 100644
--- a/asymptote.spec
+++ b/asymptote.spec
@@ -1,7 +1,9 @@
+# TODO: system glew, LspCpp and its dependencies (rapidjson, uri, utfcpp)?
 #
 # Conditional build:
-%bcond_with    doc     # API documentation
+%bcond_with    doc     # API documentation (requires 2020+ LaTeX)
 %bcond_without oiio    # OpenImageIO support
+%bcond_without osmesa  # offscreen support
 #
 Summary:       Asymptote is a powerful descriptive vector graphics language 
for technical drawing
 Summary(hu.UTF-8):     Asymptote egy leíró vektorgrafikus nyelv technikai 
rajzokhoz
@@ -12,28 +14,35 @@ Release:    1
 # uses GPL libraries (gsl, readline), so final license is GPL
 License:       GPL v3+ (LGPL v3+ code)
 Group:         Applications/Science
-Source0:       
http://downloads.sourceforge.net/asymptote/%{name}-%{version}.src.tgz
+Source0:       
https://downloads.sourceforge.net/asymptote/%{name}-%{version}.src.tgz
 # Source0-md5: 905c100fc40b4af24ebf7398b8cce2b7
 Patch0:                %{name}-memrchr.patch
 Patch1:                %{name}-info.patch
 Patch2:                %{name}-no-env.patch
 Patch3:                texinfo.patch
-URL:           http://asymptote.sourceforge.net/
+Patch4:                %{name}-osmesa.patch
+URL:           https://asymptote.sourceforge.net/
 BuildRequires: GLM-devel
-BuildRequires: Mesa-libOSMesa-devel
+%{?with_osmesa:BuildRequires:  Mesa-libOSMesa-devel}
 BuildRequires: OpenGL-GLU-devel
-BuildRequires: OpenGL-devel
+BuildRequires: OpenGL-GLX-devel
+BuildRequires: OpenGL-devel >= 4.3
 BuildRequires: OpenGL-glut-devel
 %{?with_oiio:BuildRequires:    OpenImageIO-devel}
 BuildRequires: autoconf >= 2.50
 BuildRequires: bison
+# boost_filesystem boost_thread
+BuildRequires: boost-devel
+BuildRequires: curl-devel
+BuildRequires: eigen3 >= 3
 BuildRequires: fftw3-devel >= 3
 BuildRequires: flex
-BuildRequires: gc-c++-devel >= 8.0.4
-BuildRequires: gc-devel >= 8.0.4
+BuildRequires: gc-c++-devel >= 8.2.4
+BuildRequires: gc-devel >= 8.2.4
 BuildRequires: ghostscript
 BuildRequires: gsl-devel >= 1.7
-BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libstdc++-devel >= 6:5
+BuildRequires: libtirpc-devel
 BuildRequires: ncurses-devel
 BuildRequires: readline-devel >= 4.3
 BuildRequires: rpm-pythonprov
@@ -176,6 +185,7 @@ Plik składni Vima dla plików asy.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 # actually not executable, contain bogus shebang
 %{__sed} -i -e '1d' GUI/configs/*.py \
@@ -194,7 +204,7 @@ Plik składni Vima dla plików asy.
 %configure \
        %{?with_oiio:--enable-openimageio} \
        --enable-gc=system \
-       --disable-offscreen \
+       --enable-offscreen%{!?with_osmesa:=no} \
        --with-docdir=%{_docdir}/%{name}-doc
 
 %if %{with doc}
diff --git a/asymptote-info.patch b/asymptote-info.patch
index 98804ad..2d85652 100644
--- a/asymptote-info.patch
+++ b/asymptote-info.patch
@@ -1,6 +1,6 @@
---- asymptote-2.59/doc/asymptote.texi.orig     2019-10-20 06:39:42.000000000 
+0200
-+++ asymptote-2.59/doc/asymptote.texi  2019-10-29 05:40:59.716812295 +0100
-@@ -21,9 +21,9 @@
+--- asymptote-2.89/doc/asymptote.texi.orig     2024-06-15 06:52:25.123623767 
+0200
++++ asymptote-2.89/doc/asymptote.texi  2024-06-15 06:54:34.556255903 +0200
+@@ -21,9 +21,9 @@ file LICENSE in the top-level source dir
  @end quotation
  @end copying
  
diff --git a/asymptote-osmesa.patch b/asymptote-osmesa.patch
new file mode 100644
index 0000000..51e9e4e
--- /dev/null
+++ b/asymptote-osmesa.patch
@@ -0,0 +1,34 @@
+--- asymptote-2.89/glrender.h.orig     2024-03-23 22:30:22.000000000 +0100
++++ asymptote-2.89/glrender.h  2024-06-15 08:35:31.186777653 +0200
+@@ -44,6 +44,9 @@
+ #endif
+ 
+ #ifdef HAVE_LIBOSMESA
++#ifndef APIENTRY
++#define APIENTRY
++#endif
+ #include <GL/osmesa.h>
+ #endif
+ 
+@@ -61,6 +64,9 @@
+ #endif
+ 
+ #ifdef HAVE_LIBOSMESA
++#ifndef APIENTRY
++#define APIENTRY
++#endif
+ #include <GL/osmesa.h>
+ #endif
+ 
+--- asymptote-2.89/GL/glew.c.orig      2024-03-23 22:30:22.000000000 +0100
++++ asymptote-2.89/GL/glew.c   2024-06-15 15:10:28.971729067 +0200
+@@ -37,6 +37,9 @@
+ #endif
+ 
+ #if defined(GLEW_OSMESA)
++#  ifndef APIENTRY
++#    define APIENTRY
++#  endif
+ #  define GLAPI extern
+ #  include <GL/osmesa.h>
+ #elif defined(GLEW_EGL)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/asymptote.git/commitdiff/d15e31cb8b8aebc3c2eb2f0e1fafc97913d44da6

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to