1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/science/namd/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

71 lines
2.3 KiB
Makefile

PORTNAME= namd
DISTVERSION= 2.12
PORTREVISION= 3
CATEGORIES= science
DISTNAME= ${PORTNAME:tu}_${DISTVERSION}_Source
MAINTAINER= yuri@FreeBSD.org
COMMENT= Computer software for molecular dynamics simulation
WWW= https://www.ks.uiuc.edu/Research/namd/
LICENSE= NAMD_MOLECULAR_DYNAMICS_LICENSE
LICENSE_NAME= NAMD Molecular Dynamics Software
LICENSE_FILE= ${WRKSRC}/license.txt
LICENSE_PERMS= no-auto-accept no-dist-mirror no-pkg-mirror # No redistribution is allowed, commercial use requires a commercial license
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= not clear if it can be built on other architectures
BROKEN_i386= need to fix the fft library handling
BUILD_DEPENDS= bash:shells/bash \
${LOCALBASE}/include/fftw3.h:math/fftw3
LIB_DEPENDS= libck.so:net/charm \
libfftw3f.so:math/fftw3-float
USES= fortran gmake localbase:ldflags python:build shebangfix tcl
SHEBANG_FILES= config
ARCH_STR= Linux-${ARCH:S/amd64/x86_64/:S/i386/x86/}-g++
ARCH_STR_CHARM= linux${ARCH:S/amd64/64/:S/i386/32/}
PATCH_WRKSRC= ${WRKSRC}
BUILD_WRKSRC= ${WRKSRC}/${ARCH_STR}
CFLAGS+= -D_NO_MALLOC_H -D_NO_ALLOCA_H
CXXFLAGS+= -D_NO_MALLOC_H -D_NO_ALLOCA_H
BINARY_ALIAS= gcc=${CC} g++=${CXX}
PLIST_FILES= bin/flipbinpdb \
bin/flipdcd \
bin/namd2 \
bin/psfgen \
bin/sortreplicas
.include <bsd.port.pre.mk>
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
IGNORE= please download the release tarball of the version ${DISTVERSION} (${DISTFILES}) from https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD, put it into ${DISTDIR}, and run 'make' again
.endif
do-configure:
@cd ${WRKSRC} && ${ECHO} "CHARMBASE=${LOCALBASE}" > Make.config
@cd ${WRKSRC} && ./config ${ARCH_STR} --charm-arch multicore-${ARCH_STR_CHARM} ${ARCH:S/amd64/--with-fftw3/:S/${ARCH}//}
@${REINPLACE_CMD} 's|CHARMBASE = .*|CHARMBASE = ${LOCALBASE}|' ${WRKSRC}/Make.charm
@${REINPLACE_CMD} '\
s|FFTDIR=.*|FFTDIR=${LOCALBASE}|; \
s|-lsfftw|-lfft3f|; \
s|-lsrfftw|-lrfft3f|; \
s|TCLDIR=.*|TCLDIR=${LOCALBASE}/include/tcl8.6|; \
s|TCLINCL=.*|TCLINCL=-I${LOCALBASE}/include/tcl8.6|; \
s|TCLLIB=.*|TCLLIB=-L${LOCALBASE}/lib -ltcl86 -lpthread|' \
${WRKSRC}/arch/Linux*
do-install:
.for e in namd2 flipbinpdb flipdcd psfgen sortreplicas
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${e} ${STAGEDIR}${PREFIX}/bin
.endfor
.include <bsd.port.post.mk>