aboutsummaryrefslogtreecommitdiff
path: root/science/vmd
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-03-14 12:21:32 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-03-14 12:21:32 +0000
commitf4959ed7bb278087a3168a17af0d0d4a39751233 (patch)
tree3343fed27e82798d5a4ee097c2a34dba1a0e2ef6 /science/vmd
parent106065cc05267a38fba0460ee146def1f8790e0b (diff)
downloadports-f4959ed7bb278087a3168a17af0d0d4a39751233.tar.gz
ports-f4959ed7bb278087a3168a17af0d0d4a39751233.zip
Notes
Diffstat (limited to 'science/vmd')
-rw-r--r--science/vmd/Makefile22
-rw-r--r--science/vmd/files/patch-AtomParser.C2
-rw-r--r--science/vmd/files/patch-Make-arch31
-rw-r--r--science/vmd/files/patch-Makefile9
-rw-r--r--science/vmd/files/patch-configure86
-rw-r--r--science/vmd/files/patch-utilities.C11
-rw-r--r--science/vmd/files/patch-vmd11
-rw-r--r--science/vmd/pkg-plist88
8 files changed, 201 insertions, 59 deletions
diff --git a/science/vmd/Makefile b/science/vmd/Makefile
index f4781f50ad75..87d95062236a 100644
--- a/science/vmd/Makefile
+++ b/science/vmd/Makefile
@@ -38,6 +38,16 @@ STRIDE_DIST= stride.tar.gz
.include <bsd.port.pre.mk>
+.if ${ARCH} == "amd64"
+VMD_ARCH= FREEBSDAMD64
+VMD_TARGET= freebsd.amd64.opengl
+.else
+VMD_ARCH= FREEBSD
+VMD_TARGET= freebsd.opengl
+.endif
+
+PLIST_SUB+= VMD_ARCH=${VMD_ARCH}
+
# Check for VMD sources
.if !exists(${DISTDIR}/${VMD_DIST}) # && !defined(PACKAGE_BUILDING)
ECHO_MSG= ${PRINTF}
@@ -66,15 +76,15 @@ post-patch:
${REINPLACE_CMD} "s/python2.2/${PYTHON_VERSION}/" ${WRKSRC}/configure
do-build:
- cd ${WRKSRC}/lib/tachyon/unix && ${SETENV} ${MAKE_ENV} ${GMAKE} bsd && ${MV} ../compile/bsd/tachyon ../tachyon_FREEBSD
- cd ${WRKDIR}/plugins && ${SETENV} ${MAKE_ENV} PLUGINDIR=${WRKSRC}/plugins ${GMAKE} FREEBSD distrib
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} TCL_INCLUDE_DIR=${PREFIX}/include/tcl8.4 TK_INCLUDE_DIR=${PREFIX}/include/tk8.4 ${GMAKE} freebsd.opengl
+ cd ${WRKSRC}/lib/tachyon/unix && ${SETENV} ${MAKE_ENV} ${GMAKE} bsd && ${MV} ../compile/bsd/tachyon ../tachyon_${VMD_ARCH}
+ cd ${WRKDIR}/plugins && ${SETENV} ${MAKE_ENV} PLUGINDIR=${WRKSRC}/plugins ${GMAKE} ${VMD_ARCH} distrib
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} TCL_INCLUDE_DIR=${PREFIX}/include/tcl8.4 TK_INCLUDE_DIR=${PREFIX}/include/tk8.4 ${GMAKE} ${VMD_TARGET}
cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${GMAKE} all
- cd ${WRKSRC}/lib/surf && ${SETENV} ${MAKE_ENV} ${GMAKE} depend && ${SETENV} ${MAKE_ENV} ${GMAKE} surf && ${MV} surf surf_FREEBSD
- cd ${WRKSRC}/lib/stride && ${SETENV} ${MAKE_ENV} ${GMAKE} && ${MV} stride stride_FREEBSD
+ cd ${WRKSRC}/lib/surf && ${SETENV} ${MAKE_ENV} ${GMAKE} depend && ${SETENV} ${MAKE_ENV} ${GMAKE} surf && ${MV} surf surf_${VMD_ARCH}
+ cd ${WRKSRC}/lib/stride && ${SETENV} ${MAKE_ENV} ${GMAKE} && ${MV} stride stride_${VMD_ARCH}
do-install:
cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${GMAKE} install
-# cd ${WRKSRC}/lib/surf && ${INSTALL_PROGRAM} surf_FREEBSD ${PREFIX}/lib/vmd
+# cd ${WRKSRC}/lib/surf && ${INSTALL_PROGRAM} surf_${VMD_ARCH} ${PREFIX}/lib/vmd
.include <bsd.port.post.mk>
diff --git a/science/vmd/files/patch-AtomParser.C b/science/vmd/files/patch-AtomParser.C
index 775a7f42d34c..370f2b407319 100644
--- a/science/vmd/files/patch-AtomParser.C
+++ b/science/vmd/files/patch-AtomParser.C
@@ -5,7 +5,7 @@
#endif
-#if !defined(_MSC_VER) && !defined(ARCH_MACOSX)
-+#if !defined(_MSC_VER) && !defined(ARCH_MACOSX) && !defined(ARCH_FREEBSD)
++#if !defined(_MSC_VER) && !defined(ARCH_MACOSX) && !defined(ARCH_FREEBSD) && !defined(ARCH_FREEBSDAMD64)
#include <values.h>
#endif
diff --git a/science/vmd/files/patch-Make-arch b/science/vmd/files/patch-Make-arch
new file mode 100644
index 000000000000..b2e6ed661726
--- /dev/null
+++ b/science/vmd/files/patch-Make-arch
@@ -0,0 +1,31 @@
+--- ../plugins/Make-arch.orig Fri Nov 14 07:50:25 2003
++++ ../plugins/Make-arch Fri Jan 21 19:30:53 2005
+@@ -9,6 +9,7 @@
+ @echo "--------------------------------------"
+ @echo " AIX4"
+ @echo " FREEBSD"
++ @echo " FREEBSDAMD64"
+ @echo " HPUX11"
+ @echo " IRIX6"
+ @echo " IRIX6_64"
+@@ -142,6 +143,20 @@
+ "CXX = g++" \
+ "CCFLAGS = -O2 -Wall -ansi -I/usr/local/include/tcl8.4" \
+ "CXXFLAGS = -O2 -Wall" \
++ "TCLLDFLAGS = -L/usr/local/lib -ltcl84" \
++ "NM = nm -p" \
++ "RANLIB = touch" \
++ "SHLD = gcc -shared"
++
++FREEBSDAMD64:
++ $(MAKE) dynlibs staticlibs \
++ "ARCH = FREEBSDAMD64" \
++ "COPTO = -fPIC -m64 -o " \
++ "LOPTO = -fPIC -m64 -o " \
++ "CC = gcc" \
++ "CXX = g++" \
++ "CCFLAGS = -m64 -O2 -Wall -ansi -I/usr/local/include/tcl8.4" \
++ "CXXFLAGS = -m64 -O2 -Wall" \
+ "TCLLDFLAGS = -L/usr/local/lib -ltcl84" \
+ "NM = nm -p" \
+ "RANLIB = touch" \
diff --git a/science/vmd/files/patch-Makefile b/science/vmd/files/patch-Makefile
index 4dc20558ffb5..c8bd108b6b52 100644
--- a/science/vmd/files/patch-Makefile
+++ b/science/vmd/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile-ooo Fri Dec 5 13:20:58 2003
-+++ Makefile Thu Aug 12 00:12:06 2004
-@@ -52,11 +52,11 @@
+--- Makefile.orig Sat Dec 6 04:20:58 2003
++++ Makefile Wed Feb 2 21:30:13 2005
+@@ -52,11 +52,14 @@
## FreeBSD builds
freebsd.mesa:
@@ -11,6 +11,9 @@
freebsd.opengl:
- ./configure FREEBSD OPENGL FLTK TK IMD VRPN SILENT SPACEBALL TCL PTHREADS ACTC LIBTACHYON PYTHON NUMPY
+ ./configure FREEBSD OPENGL FLTK TK IMD SILENT TCL PTHREADS LIBTACHYON PYTHON NUMPY
++
++freebsd.amd64.opengl:
++ ./configure FREEBSDAMD64 OPENGL FLTK TK IMD SILENT TCL PTHREADS LIBTACHYON PYTHON NUMPY
diff --git a/science/vmd/files/patch-configure b/science/vmd/files/patch-configure
index 2e0afa6efc63..252ed252c42f 100644
--- a/science/vmd/files/patch-configure
+++ b/science/vmd/files/patch-configure
@@ -1,6 +1,23 @@
---- configure-xxx Fri Dec 5 13:20:58 2003
-+++ configure Thu Aug 12 00:22:30 2004
-@@ -624,8 +624,8 @@
+--- configure.orig Sat Dec 6 04:20:58 2003
++++ configure Wed Feb 2 21:16:23 2005
+@@ -46,6 +46,7 @@
+ # ---------------------------------------------------------------
+ # AIX4 - compile on an RS/6000 machine (gcc/g++/xlc/xlC)
+ # FREEBSD - compile on a FreeBSD machine (gcc/g++)
++# FREEBSDAMD64- compile on a FreeBSD machine (gcc/g++)
+ # HPUX11 - compile on an HP-UX 11.0 machine (cc/CC/cc/aCC)
+ # IRIX6 - compile on an SGI, IRIX 6.X or later, 32-bit ABI
+ # IRIX6_64 - compile on an SGI, IRIX 6.X or later, 64-bit ABI
+@@ -116,7 +117,7 @@
+
+ #################### Parse command line options ###########
+ # list of allowed architectures
+-@archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'HPUX11', 'AIX4', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXPPC', 'MACOSX', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'WIN32');
++@archlist=('IRIX6', 'IRIX6_64', 'FREEBSD', 'FREEBSDAMD64', 'HPUX11', 'AIX4', 'LINUX', 'LINUXALPHA', 'LINUXAMD64', 'LINUXPPC', 'MACOSX', 'TRU64', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'WIN32');
+
+ if ($#ARGV == -1) {
+ $text = `cat configure.options`;
+@@ -624,8 +625,8 @@
# This may be commented out if not required.
$libtachyon_defines = "-DVMDLIBTACHYON";
$libtachyon_dir = "$vmd_library_dir/tachyon";
@@ -11,7 +28,7 @@
$libtachyon_libs = "-ltachyon";
@libtachyon_cc = ();
@libtachyon_ccpp = ('LibTachyonDisplayDevice.C'
-@@ -1174,8 +1174,10 @@
+@@ -1174,8 +1175,10 @@
# XFree 4.0 Direct Rendering Interface and GLX
$opengl_dir = "/usr/X11R6";
@@ -24,12 +41,71 @@
$opengl_libs = "-lGL -lGLU";
$arch_lex = "flex";
-@@ -1209,7 +1211,7 @@
+@@ -1209,7 +1212,66 @@
# this is to make tcl happy,
# also needed for plugins
- $system_libs .= " -ldl";
+ # $system_libs .= " -ldl";
++
++ if ($config_python) {
++ # this is to make python happy
++ $system_libs .= " -lutil";
++ }
++
++ # this is necessary for the embedded Python interpreter to dynamically
++ # load shared libraries. It increases the size of the binary by 200k.
++ $arch_lopts .= " -Xlinker -export-dynamic";
++}
++
++
++
++if ($config_arch eq "FREEBSDAMD64") {
++ $def_imageviewer="display %s";
++ if ($config_lp64) {
++ print "LP64 ABI is already the default on this platform.\n";
++ }
++
++ # XFree 4.0 Direct Rendering Interface and GLX
++ $opengl_dir = "/usr/X11R6";
++# -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";
++ $arch_yacc = "bison -b y -d "; # If standard yacc doesn't work
++
++ $arch_cc = "gcc";
++ $arch_ccpp = "g++";
++ $arch_depend_flag = "-MM";
++ $arch_shld = "ld -shared";
++ $arch_shlibname = "so";
++ $arch_shcppopts = "-fPIC";
++ $arch_shldopts = "-L/usr/local/lib -L/usr/X11R6/lib";
++
++ $arch_opt_flag = "-m64 -Wall -O6 -ffast-math";
++ $arch_copts = "-m64 -Wall -O6 -ffast-math";
++
++ if ($config_static) {
++ $arch_lopts = "-static";
++ $mesa_libs = "-lMesaGL -lMesaGLU -L/usr/X11R6/lib -lXext -lX11";
++ } else {
++ $arch_lopts = "";
++ $mesa_libs = "-lGL -lGLU -L/usr/X11R6/lib -lXext -lX11";
++ }
++
++ if ($config_shared) {
++ $arch_lopts = "-shared";
++ }
++
++ # a hack - to be removed, just keeps make happy
++ $arch_template_repository = "foobar";
++
++ # this is to make tcl happy,
++ # also needed for plugins
++ # $system_libs .= " -ldl";
if ($config_python) {
# this is to make python happy
diff --git a/science/vmd/files/patch-utilities.C b/science/vmd/files/patch-utilities.C
new file mode 100644
index 000000000000..907676f7548b
--- /dev/null
+++ b/science/vmd/files/patch-utilities.C
@@ -0,0 +1,11 @@
+--- src/utilities.C.orig Sat Jan 22 16:15:24 2005
++++ src/utilities.C Sat Jan 22 16:15:45 2005
+@@ -275,7 +275,7 @@
+ return stringdup("Windows User");
+ }
+ #else
+-#if defined(ARCH_FREEBSD) || defined(ARCH_MACOSX) || defined(ARCH_LINUX) || defined(ARCH_LINUXALPHA) || defined(ARCH_LINUXAMD64) || defined(ARCH_LINUXPPC)
++#if defined(ARCH_FREEBSD) || defined(ARCH_FREEBSDAMD64) || defined(ARCH_MACOSX) || defined(ARCH_LINUX) || defined(ARCH_LINUXALPHA) || defined(ARCH_LINUXAMD64) || defined(ARCH_LINUXPPC)
+ return stringdup(getlogin());
+ #else
+ return stringdup(cuserid(NULL));
diff --git a/science/vmd/files/patch-vmd b/science/vmd/files/patch-vmd
new file mode 100644
index 000000000000..ec90285e80de
--- /dev/null
+++ b/science/vmd/files/patch-vmd
@@ -0,0 +1,11 @@
+--- bin/vmd.orig Tue Feb 1 14:05:15 2005
++++ bin/vmd Tue Feb 1 14:05:59 2005
+@@ -194,6 +194,8 @@
+ # The standard options
+ if (`uname -m` == "i386") then
+ set ARCH=FREEBSD
++ else if (`uname -m` == "amd64") then
++ set ARCH=FREEBSDAMD64
+ endif
+ set VMD_WINTERM=xterm
+ set VMD_WINOPTS='-sb -sl 1000 -e'
diff --git a/science/vmd/pkg-plist b/science/vmd/pkg-plist
index 97dcc5396a18..6018c05ac527 100644
--- a/science/vmd/pkg-plist
+++ b/science/vmd/pkg-plist
@@ -3,10 +3,10 @@ lib/vmd/doc/ug.pdf
lib/vmd/Announcement
lib/vmd/README
lib/vmd/LICENSE
-lib/vmd/vmd_FREEBSD
-lib/vmd/surf_FREEBSD
-lib/vmd/stride_FREEBSD
-lib/vmd/tachyon_FREEBSD
+lib/vmd/vmd_%%VMD_ARCH%%
+lib/vmd/surf_%%VMD_ARCH%%
+lib/vmd/stride_%%VMD_ARCH%%
+lib/vmd/tachyon_%%VMD_ARCH%%
lib/vmd/scripts/CVS/Root
lib/vmd/scripts/CVS/Repository
lib/vmd/scripts/CVS/Entries
@@ -254,42 +254,42 @@ lib/vmd/scripts/python/testMolecule.py
lib/vmd/scripts/python/testdisplay.py
lib/vmd/plugins/include/vmdplugin.h
lib/vmd/plugins/include/molfile_plugin.h
-lib/vmd/plugins/FREEBSD/molfile/cpmdplugin.so
-lib/vmd/plugins/FREEBSD/molfile/psfplugin.so
-lib/vmd/plugins/FREEBSD/molfile/pdbplugin.so
-lib/vmd/plugins/FREEBSD/molfile/dcdplugin.so
-lib/vmd/plugins/FREEBSD/molfile/babelplugin.so
-lib/vmd/plugins/FREEBSD/molfile/gromacsplugin.so
-lib/vmd/plugins/FREEBSD/molfile/parmplugin.so
-lib/vmd/plugins/FREEBSD/molfile/crdplugin.so
-lib/vmd/plugins/FREEBSD/molfile/namdbinplugin.so
-lib/vmd/plugins/FREEBSD/molfile/binposplugin.so
-lib/vmd/plugins/FREEBSD/molfile/webpdbplugin.so
-lib/vmd/plugins/FREEBSD/molfile/graspplugin.so
-lib/vmd/plugins/FREEBSD/molfile/stlplugin.so
-lib/vmd/plugins/FREEBSD/molfile/cubeplugin.so
-lib/vmd/plugins/FREEBSD/molfile/edmplugin.so
-lib/vmd/plugins/FREEBSD/molfile/ccp4plugin.so
-lib/vmd/plugins/FREEBSD/molfile/dsn6plugin.so
-lib/vmd/plugins/FREEBSD/molfile/brixplugin.so
-lib/vmd/plugins/FREEBSD/molfile/pltplugin.so
-lib/vmd/plugins/FREEBSD/molfile/parm7plugin.so
-lib/vmd/plugins/FREEBSD/molfile/raster3dplugin.so
-lib/vmd/plugins/FREEBSD/molfile/rst7plugin.so
-lib/vmd/plugins/FREEBSD/molfile/xyzplugin.so
-lib/vmd/plugins/FREEBSD/molfile/corplugin.so
-lib/vmd/plugins/FREEBSD/molfile/moldenplugin.so
-lib/vmd/plugins/FREEBSD/molfile/phiplugin.so
-lib/vmd/plugins/FREEBSD/molfile/grdplugin.so
-lib/vmd/plugins/FREEBSD/molfile/dxplugin.so
-lib/vmd/plugins/FREEBSD/molfile/mapplugin.so
-lib/vmd/plugins/FREEBSD/molfile/avsplugin.so
-lib/vmd/plugins/FREEBSD/molfile/fs4plugin.so
-lib/vmd/plugins/FREEBSD/molfile/libmolfile_plugin.a
-lib/vmd/plugins/FREEBSD/molfile/libmolfile_plugin.h
-lib/vmd/plugins/FREEBSD/tcl/psfgen1.3/libpsfgen.so
-lib/vmd/plugins/FREEBSD/tcl/psfgen1.3/ug.pdf
-lib/vmd/plugins/FREEBSD/tcl/psfgen1.3/pkgIndex.tcl
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/cpmdplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/psfplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/pdbplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/dcdplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/babelplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/gromacsplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/parmplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/crdplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/namdbinplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/binposplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/webpdbplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/graspplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/stlplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/cubeplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/edmplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/ccp4plugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/dsn6plugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/brixplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/pltplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/parm7plugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/raster3dplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/rst7plugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/xyzplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/corplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/moldenplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/phiplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/grdplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/dxplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/mapplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/avsplugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/fs4plugin.so
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/libmolfile_plugin.a
+lib/vmd/plugins/%%VMD_ARCH%%/molfile/libmolfile_plugin.h
+lib/vmd/plugins/%%VMD_ARCH%%/tcl/psfgen1.3/libpsfgen.so
+lib/vmd/plugins/%%VMD_ARCH%%/tcl/psfgen1.3/ug.pdf
+lib/vmd/plugins/%%VMD_ARCH%%/tcl/psfgen1.3/pkgIndex.tcl
lib/vmd/plugins/noarch/tcl/autoionize1.0/ions.top
lib/vmd/plugins/noarch/tcl/autoionize1.0/pkgIndex.tcl
lib/vmd/plugins/noarch/tcl/autoionize1.0/autoionize.tcl
@@ -410,10 +410,10 @@ lib/vmd/scripts/tk8.0
@dirrm lib/vmd/plugins/noarch/tcl
@dirrm lib/vmd/plugins/noarch
@dirrm lib/vmd/plugins/include
-@dirrm lib/vmd/plugins/FREEBSD/tcl/psfgen1.3
-@dirrm lib/vmd/plugins/FREEBSD/tcl
-@dirrm lib/vmd/plugins/FREEBSD/molfile
-@dirrm lib/vmd/plugins/FREEBSD
+@dirrm lib/vmd/plugins/%%VMD_ARCH%%/tcl/psfgen1.3
+@dirrm lib/vmd/plugins/%%VMD_ARCH%%/tcl
+@dirrm lib/vmd/plugins/%%VMD_ARCH%%/molfile
+@dirrm lib/vmd/plugins/%%VMD_ARCH%%
@dirrm lib/vmd/plugins
@dirrm lib/vmd/doc
@dirrm lib/vmd