mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
science/vmd: various fixes
- fix spelling of VMD license [1] - use USES=tcl,tk instead of direct dependency - patch vmd to support (tcl|tk)86 - fix shebang for tcl [1] - fix detection of netcdf - add sqlite as a dependency (for dmsplugin) [1] - add expact as a dependency (for hoomdplugin) - rework configuration: - explicitly list required components (CONFIGURE_ARGS) - call configure directly (instead of via gmake(1)) - patch configure to accept TCLLDFLAGS and TKLDFLAGS - pass PREFIX as an environment variable instead of using sed(1) - patch Make-arch to accept environment TCLLDFLAGS and NETCDFLDFLAGS - add support for parallel building (except for building plugins) - bump PORTREVISION PR: 219642 Reported by: Yuri Victorovich <yuri@rawbw.com>
This commit is contained in:
parent
a77cdaf7f6
commit
bb547a6642
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=443820
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= vmd
|
||||
DISTVERSION= 1.9.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= science graphics python tcl tk
|
||||
MASTER_SITES= http://jedi.ks.uiuc.edu/~johns/raytracer/files/0.99b6/:tachyon \
|
||||
http://www.photonlimited.com/~johns/tachyon/files/0.99b6/:tachyon \
|
||||
@ -21,15 +21,14 @@ LICENSE_COMB= multi
|
||||
|
||||
BUILD_DEPENDS= makedepend:devel/makedepend \
|
||||
${PYNUMPY}
|
||||
LIB_DEPENDS= libtcl85.so:lang/tcl85 \
|
||||
libtk85.so:x11-toolkits/tk85 \
|
||||
LIB_DEPENDS= libexpat.so:textproc/expat2 \
|
||||
libfltk.so:x11-toolkits/fltk \
|
||||
libnetcdf.so:science/netcdf
|
||||
RUN_DEPENDS= ${PYNUMPY}
|
||||
|
||||
LICENSE_FILE_VMD= ${WRKSRC}/LICENSE
|
||||
LICENSE_PERMS_VMD= auto-accept
|
||||
LICENSE_NAME_VMD= Visaul Molecular Dynamics Software License Agreement
|
||||
LICENSE_NAME_VMD= Visual Molecular Dynamics Software License Agreement
|
||||
LICENSE_DISTFILES_VMD= ${VMD_DIST}
|
||||
|
||||
LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/lib/tachyon/Copyright
|
||||
@ -40,7 +39,9 @@ LICENSE_PERMS_STRIDE= dist-mirror pkg-mirror auto-accept
|
||||
LICENSE_NAME_STRIDE= Stride Copyright Notice
|
||||
LICENSE_DISTFILES_STRIDE=${STRIDE_DIST}
|
||||
|
||||
USES= gmake perl5 python
|
||||
USES= gmake perl5 python shebangfix sqlite tcl tk
|
||||
|
||||
SHEBANG_FILES= ${WRKDIR}/plugins/topotools/*.tcl
|
||||
|
||||
USE_PERL5= build
|
||||
USE_GL= gl glu
|
||||
@ -51,8 +52,28 @@ ONLY_FOR_ARCHS= i386 amd64
|
||||
CONFIGURE_ENV= PYTHON_INCLUDE_DIR=${PYTHON_INCLUDEDIR} \
|
||||
PYTHON_LIBRARY_DIR=${PYTHON_LIBDIR} \
|
||||
NUMPY_INCLUDE_DIR=${PYTHON_SITELIBDIR}/numpy/core/include \
|
||||
NUMPY_LIBRARY_DIR=${PYTHON_SITELIBDIR}
|
||||
NUMPY_LIBRARY_DIR=${PYTHON_SITELIBDIR} \
|
||||
TCL_INCLUDE_DIR=${TCL_INCLUDEDIR} \
|
||||
TCL_LIBRARY_DIR=${LOCALBASE}/lib \
|
||||
TK_INCLUDE_DIR=${TK_INCLUDEDIR} \
|
||||
TK_LIBRARY_DIR=${LOCALBASE}/lib
|
||||
CONFIGURE_ARGS= ${VMD_ARCH} OPENGL FLTK TK IMD TCL PTHREADS LIBTACHYON NETCDF NUMPY PYTHON
|
||||
INSTALL_WRKSRC= ${WRKSRC}/src
|
||||
MAKE_ENV= EXPATINC=-I${LOCALBASE}/include \
|
||||
EXPATLIB=-L${LOCALBASE}/lib \
|
||||
EXPATLDFLAGS=-lexpat \
|
||||
EXPATDYNAMIC=1 \
|
||||
NETCDFINC=-I${LOCALBASE}/include \
|
||||
NETCDFLIB=-L${LOCALBASE}/lib \
|
||||
NETCDFLDFLAGS=-lnetcdf \
|
||||
SQLITEINC=-I${LOCALBASE}/include \
|
||||
SQLITELIB=-L${LOCALBASE}/lib \
|
||||
SQLITELDFLAGS=-lsqlite3 \
|
||||
SQLITEDYNAMIC=1 \
|
||||
TCLLIB=-L${LOCALBASE}/lib \
|
||||
TCLINC=-I${TCL_INCLUDEDIR} \
|
||||
TCLLDFLAGS=-ltcl${TCL_VER:S/.//} \
|
||||
TKLDFLAGS="-ltk${TK_VER:S/.//} -lX11"
|
||||
|
||||
VMD_DIST= ${PORTNAME}-${DISTVERSION}.src.tar.gz
|
||||
TACHYON_DIST= tachyon-0.99b6.tar.gz
|
||||
@ -63,10 +84,8 @@ STRIDE_DOC= stride.doc
|
||||
|
||||
.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}
|
||||
@ -89,14 +108,10 @@ do-extract:
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} \
|
||||
-e "s|-ltk8.5|-ltk85|" \
|
||||
-e "s|-ltcl8.5|-ltcl85|" \
|
||||
-e "s|-lpython2.5|-l${PYTHON_VERSION}${PYTHON_ABIVER}|" \
|
||||
-e "s|%%PREFIX%%|${PREFIX}|g" \
|
||||
-e "s|/usr/local|${LOCALBASE}|g" \
|
||||
-e "s|-fno-for-scope||g" \
|
||||
${WRKSRC}/configure
|
||||
${REINPLACE_CMD} "s/\"gcc\"/\"${CC}\"/;s/\"g++\"/\"${CXX}\"/" \
|
||||
-e "s/\"gcc\"/\"${CC}\"/;s/\"g++\"/\"${CXX}\"/" \
|
||||
${WRKSRC}/configure
|
||||
${REINPLACE_CMD} -e "s/.SILENT:/#.SILENT:/" ${WRKDIR}/plugins/Makefile
|
||||
${REINPLACE_CMD} "s/.SILENT:/#.SILENT:/" ${WRKDIR}/plugins/*/Makefile
|
||||
@ -122,24 +137,16 @@ post-patch:
|
||||
${WRKSRC}/lib/surf/*.c
|
||||
|
||||
do-build:
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} bsd -C ${WRKSRC}/lib/tachyon/unix \
|
||||
&& ${MV} ${WRKSRC}/lib/tachyon/compile/bsd/tachyon \
|
||||
${WRKSRC}/lib/tachyon/tachyon_${VMD_ARCH}
|
||||
${SETENV} ${MAKE_ENV} TCLLIB=-L${PREFIX}/lib/tcl8.5 \
|
||||
TCLINC=-I${PREFIX}/include/tcl8.5 PLUGINDIR=${WRKSRC}/plugins \
|
||||
${MAKE_CMD} ${VMD_ARCH} distrib -C ${WRKDIR}/plugins
|
||||
${SETENV} ${MAKE_ENV} TCL_INCLUDE_DIR=${PREFIX}/include/tcl8.5 \
|
||||
TK_INCLUDE_DIR=${PREFIX}/include/tk8.5 ${MAKE_CMD} \
|
||||
${VMD_TARGET} -C ${WRKSRC}
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} all -C ${WRKSRC}/src
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} depend -C ${WRKSRC}/lib/surf \
|
||||
&& ${SETENV} ${MAKE_ENV} ${MAKE_CMD} surf -C \
|
||||
${WRKSRC}/lib/surf \
|
||||
&& ${MV} ${WRKSRC}/lib/surf/surf \
|
||||
${WRKSRC}/lib/surf/surf_${VMD_ARCH}
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/lib/stride \
|
||||
&& ${MV} ${WRKSRC}/lib/stride/stride \
|
||||
${WRKSRC}/lib/stride/stride_${VMD_ARCH}
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} bsd -C ${WRKSRC}/lib/tachyon/unix
|
||||
${MV} ${WRKSRC}/lib/tachyon/compile/bsd/tachyon ${WRKSRC}/lib/tachyon/tachyon_${VMD_ARCH}
|
||||
${SETENV} ${MAKE_ENV} PLUGINDIR=${WRKSRC}/plugins ${MAKE_CMD} ${VMD_ARCH} distrib -C ${WRKDIR}/plugins
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} all -C ${WRKSRC}/src
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} depend -C ${WRKSRC}/lib/surf
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} surf -C ${WRKSRC}/lib/surf
|
||||
${MV} ${WRKSRC}/lib/surf/surf ${WRKSRC}/lib/surf/surf_${VMD_ARCH}
|
||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} -C ${WRKSRC}/lib/stride
|
||||
${MV} ${WRKSRC}/lib/stride/stride ${WRKSRC}/lib/stride/stride_${VMD_ARCH}
|
||||
|
||||
post-install:
|
||||
${REINPLACE_CMD} -i '' -e 's|${STAGEDIR}||g' ${STAGEDIR}${PREFIX}/bin/vmd
|
||||
|
@ -1,17 +1,19 @@
|
||||
--- ../plugins/Make-arch.orig 2011-03-11 22:38:25.000000000 -0500
|
||||
+++ ../plugins/Make-arch 2011-03-12 00:08:41.000000000 -0500
|
||||
@@ -277,8 +277,8 @@
|
||||
--- ../plugins/Make-arch.orig 2016-10-21 23:34:39.000000000 +0200
|
||||
+++ ../plugins/Make-arch
|
||||
@@ -272,10 +272,8 @@
|
||||
"CC = gcc" \
|
||||
"CXX = g++" \
|
||||
"DEF = -D" \
|
||||
- "CCFLAGS = -O2 -Wall -I/usr/local/include/tcl8.5" \
|
||||
- "CXXFLAGS = -O2 -Wall" \
|
||||
+ "CCFLAGS = ${CFLAGS} -O2 -Wall -I/usr/local/include/tcl8.5" \
|
||||
+ "CXXFLAGS = ${CFLAGS} -O2 -Wall" \
|
||||
"TCLLDFLAGS = -L/usr/local/lib -ltcl85" \
|
||||
"NETCDFLDFLAGS = -lnetcdf " \
|
||||
- "TCLLDFLAGS = -L/usr/local/lib -ltcl85" \
|
||||
- "NETCDFLDFLAGS = -lnetcdf " \
|
||||
+ "CCFLAGS = ${CFLAGS} -Wall" \
|
||||
+ "CXXFLAGS = ${CFLAGS} -Wall" \
|
||||
"AR = ar" \
|
||||
@@ -288,14 +288,14 @@
|
||||
"NM = nm -p" \
|
||||
"RANLIB = touch" \
|
||||
@@ -283,16 +281,14 @@
|
||||
|
||||
FREEBSDAMD64:
|
||||
$(MAKE) dynlibs staticlibs bins \
|
||||
@ -24,8 +26,10 @@
|
||||
"DEF = -D" \
|
||||
- "CCFLAGS = -m64 -O2 -Wall -I/usr/local/include/tcl8.5" \
|
||||
- "CXXFLAGS = -m64 -O2 -Wall" \
|
||||
+ "CCFLAGS = ${CFLAGS} -m64 -O2 -Wall -I/usr/local/include/tcl8.5" \
|
||||
+ "CXXFLAGS = ${CFLAGS} -m64 -O2 -Wall" \
|
||||
"TCLLDFLAGS = -L/usr/local/lib -ltcl85" \
|
||||
"NETCDFLDFLAGS = -lnetcdf " \
|
||||
- "TCLLDFLAGS = -L/usr/local/lib -ltcl85" \
|
||||
- "NETCDFLDFLAGS = -lnetcdf " \
|
||||
+ "CCFLAGS = ${CFLAGS} -Wall" \
|
||||
+ "CXXFLAGS = ${CFLAGS} -Wall" \
|
||||
"AR = ar" \
|
||||
"NM = nm -p" \
|
||||
"RANLIB = touch" \
|
||||
|
@ -5,14 +5,25 @@
|
||||
|
||||
# Directory where VMD startup script is installed, should be in users' paths.
|
||||
-$install_bin_dir="/usr/local/bin";
|
||||
+$install_bin_dir="\${DESTDIR}%%PREFIX%%/bin";
|
||||
+$install_bin_dir="\${DESTDIR}\${PREFIX}/bin";
|
||||
|
||||
# Directory where VMD files and executables are installed
|
||||
-$install_library_dir="/usr/local/lib/$install_name";
|
||||
+$install_library_dir="\${DESTDIR}%%PREFIX%%/lib/$install_name";
|
||||
+$install_library_dir="\${DESTDIR}\${PREFIX}/lib/$install_name";
|
||||
|
||||
|
||||
# optionally override hard-coded defaults above with environment variables
|
||||
@@ -729,8 +729,8 @@ $tcl_include = "-I$stock_tcl_includ
|
||||
if ($config_tk) { $tcl_include .= " -I$stock_tk_include_dir"; }
|
||||
$tcl_library = "-L$stock_tcl_library_dir";
|
||||
if ($config_tk) { $tcl_library .= " -L$stock_tk_library_dir"; }
|
||||
-$tcl_libs = "-ltcl8.5";
|
||||
-if ($config_tk) { $tcl_libs = "-ltk8.5 -lX11 " . $tcl_libs; }
|
||||
+$tcl_libs = "\${TCLLDFLAGS}";
|
||||
+if ($config_tk) { $tcl_libs = "\${TKLDFLAGS} " . $tcl_libs; }
|
||||
|
||||
@tcl_cc = ();
|
||||
@tcl_cu = ();
|
||||
@@ -1105,8 +1105,8 @@ if ($config_liboptix) {
|
||||
# This may be commented out if not required.
|
||||
$libtachyon_defines = "-DVMDLIBTACHYON";
|
||||
|
@ -23,6 +23,7 @@ lib/vmd/plugins/%%VMD_ARCH%%/molfile/crdplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/cubeplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dcdplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dlpolyplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dmsplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dsn6plugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dtrplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/dxplugin.so
|
||||
@ -33,6 +34,7 @@ lib/vmd/plugins/%%VMD_ARCH%%/molfile/graspplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/grdplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/gridplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/gromacsplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/hoomdplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/jsplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/lammpsplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/libmolfile_plugin.a
|
||||
@ -45,6 +47,7 @@ lib/vmd/plugins/%%VMD_ARCH%%/molfile/moldenplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/molemeshplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/msmsplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/namdbinplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/netcdfplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/offplugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/parm7plugin.so
|
||||
lib/vmd/plugins/%%VMD_ARCH%%/molfile/parmplugin.so
|
||||
|
Loading…
Reference in New Issue
Block a user