math/vtk9: Fix build with OSMESA and JAVA option

PR:		277216
This commit is contained in:
Hiroo Ono 2024-02-22 01:24:21 -08:00 committed by Yuri Victorovich
parent 1eb542caf0
commit 35b87f5972
3 changed files with 23 additions and 3 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= vtk PORTNAME= vtk
DISTVERSION= 9.2.6 DISTVERSION= 9.2.6
PORTREVISION= 3 PORTREVISION= 4
CATEGORIES= math graphics CATEGORIES= math graphics
MASTER_SITES= https://vtk.org/files/release/${VTK_SHORT_VER}/ MASTER_SITES= https://vtk.org/files/release/${VTK_SHORT_VER}/
PKGNAMESUFFIX= 9 PKGNAMESUFFIX= 9
@ -22,7 +22,7 @@ LIB_DEPENDS= \
libpng.so:graphics/png \ libpng.so:graphics/png \
libtiff.so:graphics/tiff 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_LDCONFIG= ${PREFIX}/lib/vtk-${VTK_SHORT_VER}
USE_XORG= ice x11 xt xext sm xcursor xfixes xrender 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_BOOL= VTK_WRAP_JAVA
JAVA_CMAKE_ON= -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include \ JAVA_CMAKE_ON= -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include \
-DJAVA_AWT_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so \ -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_USES= tk
TCLTK_CMAKE_ON= -DVTK_GROUP_ENABLE_Tk:STRING=YES \ TCLTK_CMAKE_ON= -DVTK_GROUP_ENABLE_Tk:STRING=YES \

View file

@ -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>

View file

@ -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>