aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroo Ono <hiroo.ono+freebsd@gmail.com>2024-02-22 09:24:21 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-02-22 09:38:42 +0000
commit35b87f5972e2a55f4dd6704665eca9de71011ef3 (patch)
tree70d028651321b8f4340aa6db6af24f79b81a4193
parent1eb542caf0039b5523db74154ea522efaac7b7ce (diff)
downloadports-35b87f5972e2a55f4dd6704665eca9de71011ef3.tar.gz
ports-35b87f5972e2a55f4dd6704665eca9de71011ef3.zip
math/vtk9: Fix build with OSMESA and JAVA option
PR: 277216
-rw-r--r--math/vtk9/Makefile6
-rw-r--r--math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glew.c10
-rw-r--r--math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glewinfo.c10
3 files changed, 23 insertions, 3 deletions
diff --git a/math/vtk9/Makefile b/math/vtk9/Makefile
index 69729940f2ee..dd192c6800fc 100644
--- a/math/vtk9/Makefile
+++ b/math/vtk9/Makefile
@@ -1,6 +1,6 @@
PORTNAME= vtk
DISTVERSION= 9.2.6
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= math graphics
MASTER_SITES= https://vtk.org/files/release/${VTK_SHORT_VER}/
PKGNAMESUFFIX= 9
@@ -22,7 +22,7 @@ LIB_DEPENDS= \
libpng.so:graphics/png \
libtiff.so:graphics/tiff
-USES= alias cmake compiler:c++11-lang gl jpeg localbase xorg
+USES= alias cmake compiler:c++11-lang jpeg localbase xorg
USE_LDCONFIG= ${PREFIX}/lib/vtk-${VTK_SHORT_VER}
USE_XORG= ice x11 xt xext sm xcursor xfixes xrender
@@ -104,7 +104,7 @@ JAVA_VARS= USE_JAVA=yes
JAVA_CMAKE_BOOL= VTK_WRAP_JAVA
JAVA_CMAKE_ON= -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include \
-DJAVA_AWT_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so \
- -DJAVA_JVM_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ATCH}/libjava.so
+ -DJAVA_JVM_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ARCH}/libjava.so
TCLTK_USES= tk
TCLTK_CMAKE_ON= -DVTK_GROUP_ENABLE_Tk:STRING=YES \
diff --git a/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glew.c b/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glew.c
new file mode 100644
index 000000000000..65889826bdd6
--- /dev/null
+++ b/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glew.c
@@ -0,0 +1,10 @@
+--- ThirdParty/glew/vtkglew/src/glew.c.orig 2024-02-21 22:29:42 UTC
++++ ThirdParty/glew/vtkglew/src/glew.c
+@@ -38,6 +38,7 @@
+
+ #if defined(GLEW_OSMESA)
+ # define GLAPI extern
++# define APIENTRY __stdcall
+ # include <GL/osmesa.h>
+ #elif defined(GLEW_EGL)
+ # include <GL/eglew.h>
diff --git a/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glewinfo.c b/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glewinfo.c
new file mode 100644
index 000000000000..0ea9659d6ec5
--- /dev/null
+++ b/math/vtk9/files/patch-ThirdParty_glew_vtkglew_src_glewinfo.c
@@ -0,0 +1,10 @@
+--- ThirdParty/glew/vtkglew/src/glewinfo.c.orig 2024-02-21 22:29:54 UTC
++++ ThirdParty/glew/vtkglew/src/glewinfo.c
+@@ -38,6 +38,7 @@
+ #include <GL/eglew.h>
+ #elif defined(GLEW_OSMESA)
+ #define GLAPI extern
++#define APIENTRY __stdcall
+ #include <GL/osmesa.h>
+ #elif defined(_WIN32)
+ #include <GL/wglew.h>