aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2004-09-03 17:02:31 +0800
committervs <vs@FreeBSD.org>2004-09-03 17:02:31 +0800
commit55d1bac4b967c19c3f0f93a177eddc01540ba7f8 (patch)
treeff66e071ea1619cecbd33e9f22870b3d95e47409 /science
parent75ee53679a6f0803cc3abca4dd57da023b02a0b6 (diff)
downloadfreebsd-ports-gnome-55d1bac4b967c19c3f0f93a177eddc01540ba7f8.tar.gz
freebsd-ports-gnome-55d1bac4b967c19c3f0f93a177eddc01540ba7f8.tar.zst
freebsd-ports-gnome-55d1bac4b967c19c3f0f93a177eddc01540ba7f8.zip
Fix build in presence of x11/nvidia-driver
PR: ports/71052 Submitted by: Stephen Montgomery-Smith (maintainer)
Diffstat (limited to 'science')
-rw-r--r--science/vmd/Makefile1
-rw-r--r--science/vmd/files/patch-OpenGLExtensions.C21
-rw-r--r--science/vmd/files/patch-configure10
3 files changed, 29 insertions, 3 deletions
diff --git a/science/vmd/Makefile b/science/vmd/Makefile
index 7530026eef59..79aa4fdcd010 100644
--- a/science/vmd/Makefile
+++ b/science/vmd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= vmd
PORTVERSION= 1.8.2
+PORTREVISION= 1
CATEGORIES= science graphics python tcl84 tk84
MASTER_SITES= #
DISTFILES= ${PORTNAME}-${PORTVERSION}.src.tar.gz
diff --git a/science/vmd/files/patch-OpenGLExtensions.C b/science/vmd/files/patch-OpenGLExtensions.C
new file mode 100644
index 000000000000..5b7510a2695a
--- /dev/null
+++ b/science/vmd/files/patch-OpenGLExtensions.C
@@ -0,0 +1,21 @@
+--- src/OpenGLExtensions.C-xxx Fri Dec 5 13:21:59 2003
++++ src/OpenGLExtensions.C Fri Aug 27 16:42:14 2004
+@@ -117,7 +117,17 @@
+ #endif
+
+ #if !defined(_MSC_VER) && !defined(__APPLE__)
+-#if !defined(ARCH_LINUX) && !defined(ARCH_LINUXALPHA) && !defined(ARCH_LINUXAMD64) && !defined(ARCH_LINUXPPC) && (defined(GLX_VERSION_1_4) || defined(ARCH_SOLARIS2))
++/*
++ Why the !defined(ARCH_FREEBSD)? Typically the X libraries that
++ come with FreeBSD work with glXGetProcAddress. However, if the
++ nvidia-driver port is installed, it seems not to work. But using
++ glXGetProcAddressARB seems to work whether or not the nvidia-driver
++ port is installed. (To be honest, I do feel that this is a bit hackish,
++ and maybe this will break something in other environments, but lets face
++ that bridge when we come to it - email me at stephen@math.missouri.edu
++ about it.)
++*/
++#if !defined(ARCH_FREEBSD) && !defined(ARCH_LINUX) && !defined(ARCH_LINUXALPHA) && !defined(ARCH_LINUXAMD64) && !defined(ARCH_LINUXPPC) && (defined(GLX_VERSION_1_4) || defined(ARCH_SOLARIS2))
+ // GLX 1.4 form found on commercial Unix systems that
+ // don't bother providing the ARB extension version that Linux prefers.
+ return glXGetProcAddress((const GLubyte *) procname);
diff --git a/science/vmd/files/patch-configure b/science/vmd/files/patch-configure
index 61312368177a..19f2bb9934d1 100644
--- a/science/vmd/files/patch-configure
+++ b/science/vmd/files/patch-configure
@@ -1,15 +1,19 @@
--- configure-xxx Fri Dec 5 13:20:58 2003
+++ configure Thu Aug 12 00:22:30 2004
-@@ -1175,7 +1175,7 @@
+@@ -1174,8 +1174,10 @@
+
# XFree 4.0 Direct Rendering Interface and GLX
$opengl_dir = "/usr/X11R6";
- $opengl_include = "-I$opengl_dir/include";
+- $opengl_include = "-I$opengl_dir/include";
- $opengl_library = "-L$opengl_dir/lib";
++# -DGLX_GLXEXT_LEGACY is required for patched OpenGLExtensions.C to compile.
++# See patched OpenGLExtensions.C for explanation.
++ $opengl_include = "-DGLX_GLXEXT_LEGACY -I$opengl_dir/include";
+ $opengl_library = "-L$opengl_dir/lib -L/usr/local/lib";
$opengl_libs = "-lGL -lGLU";
$arch_lex = "flex";
-@@ -1209,7 +1209,7 @@
+@@ -1209,7 +1211,7 @@
# this is to make tcl happy,
# also needed for plugins