Files
mathgl/mathgl-libharu2_4-compat.patch
Atri Bhattacharya 9fc6f82fed Accepting request 1004956 from home:badshah400:branches:science
* Add mathgl-libharu2_4-compat.patch: Fix compilation against libharu 2.4.x [https://sourceforge.net/p/mathgl/bugs/48/].
* Build against wxWidgets >= 3.1 (wxGTK3) instead of wxWidgets=3.0.

OBS-URL: https://build.opensuse.org/request/show/1004956
OBS-URL: https://build.opensuse.org/package/show/science/mathgl?expand=0&rev=113
2022-09-21 08:17:40 +00:00

27 lines
810 B
Diff

Index: mathgl-8.0.1/src/prc.cpp
===================================================================
--- mathgl-8.0.1.orig/src/prc.cpp
+++ mathgl-8.0.1/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, c
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);