git: f06e9ca2524b - main - math/mathgl: unbreak build after print/libharu update to 2.4.3 (+)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Oct 2022 21:11:15 UTC
The branch main has been updated by fluffy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f06e9ca2524b70edfb4ce95cf473fb6cf3f4d34f
commit f06e9ca2524b70edfb4ce95cf473fb6cf3f4d34f
Author: Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-10-14 21:02:09 +0000
Commit: Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-10-14 21:09:27 +0000
math/mathgl: unbreak build after print/libharu update to 2.4.3 (+)
Backport patch from upstream
While here, apply dos2unix conversion
Bump PORTREVISION
---
math/mathgl/Makefile | 5 +++--
math/mathgl/files/patch-src_prc.cpp | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/math/mathgl/Makefile b/math/mathgl/Makefile
index 8b6a04c89738..639e67ba4b6d 100644
--- a/math/mathgl/Makefile
+++ b/math/mathgl/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mathgl
DISTVERSION= 2.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= math graphics
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION}/
@@ -19,10 +19,11 @@ LIB_DEPENDS= libgif.so:graphics/giflib \
libpng.so:graphics/png \
libsz.so:science/libaec
-USES= cmake compiler:c++11-lang gettext-runtime gl jpeg xorg
+USES= cmake compiler:c++11-lang dos2unix gettext-runtime gl jpeg xorg
USE_GL= gl glu glut
USE_XORG= xi xmu
USE_LDCONFIG= yes
+DOS2UNIX_GLOB= *.cpp *.h
.for v in double gif glut gsl hdf5 jpeg ltdl mgl2 opengl pdf png zlib
CMAKE_ARGS+= -Denable-${v}=ON
diff --git a/math/mathgl/files/patch-src_prc.cpp b/math/mathgl/files/patch-src_prc.cpp
new file mode 100644
index 000000000000..863bf044492f
--- /dev/null
+++ b/math/mathgl/files/patch-src_prc.cpp
@@ -0,0 +1,24 @@
+--- src/prc.cpp.orig 2021-12-08 05:59:55 UTC
++++ src/prc.cpp
+@@ -36,6 +36,7 @@
+ #include <hpdf.h>
+ #include <hpdf_u3d.h>
+ #include <hpdf_annotation.h>
++#include <hpdf_version.h>
+ #endif // MGL_HAVE_PDF
+
+
+@@ -959,7 +960,12 @@ void MGL_EXPORT mgl_write_prc(HMGL gr, const char *fna
+ HPDF_U3D_SetDefault3DView(u3d, "DefaultView");
+
+ // Create annotation
+- annot = HPDF_Page_Create3DAnnot (page, rect, u3d );
++ annot
++ #if HPDF_VERSION_ID >= 20400
++ = HPDF_Page_Create3DAnnot (page, rect, HPDF_FALSE, HPDF_FALSE, u3d, NULL);
++ #else
++ = HPDF_Page_Create3DAnnot (page, rect, u3d);
++ #endif
+
+ // Enable toolbar
+ HPDF_Dict action = (HPDF_Dict)HPDF_Dict_GetItem (annot, "3DA", HPDF_OCLASS_DICT);