Skip to content

Commit

Permalink
math/vtk9: Fix build with OSMESA and JAVA option
Browse files Browse the repository at this point in the history
PR:		277216
  • Loading branch information
Hiroo Ono authored and yurivict committed Feb 22, 2024
1 parent 1eb542c commit 35b87f5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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
Expand All @@ -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

Expand Down Expand Up @@ -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 \
Expand Down
10 changes: 10 additions & 0 deletions 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>
10 changes: 10 additions & 0 deletions 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>

0 comments on commit 35b87f5

Please sign in to comment.