freebsd-ports/science/openmx/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

72 lines
2.1 KiB
Makefile

PORTNAME= openmx
DISTVERSION= 3.8.5 # the 18June12 patch upgrades 3.8 -> 3.8.5
PORTREVISION= 7
CATEGORIES= science
MASTER_SITES= http://www.openmx-square.org/ \
http://www.openmx-square.org/bugfixed/18June12/:patch
DISTFILES= ${PORTNAME}${DISTVERSION:R}${EXTRACT_SUFX} \
patch${DISTVERSION}${EXTRACT_SUFX}:patch # this patch isn't a patch, but a set of file updates
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}${DISTVERSION:R}${EXTRACT_SUFX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Nanoscale material simulations using density functional theories (DFT)
WWW= http://www.openmx-square.org/
LICENSE= GPLv2
BROKEN_i386= undefined reference to `__atomic_load', see bug#229605 and https://reviews.llvm.org/D42154
LIB_DEPENDS= libblas.so:math/blas \
libfftw3.so:math/fftw3 \
liblapack.so:math/lapack \
libmpich.so:net/mpich
USES= dos2unix fortran gmake localbase:ldflags
USE_CXXSTD= c++11
DOS2UNIX_FILES= openmx_common.h
MAKEFILE= makefile
WRKSRC= ${WRKDIR}/${PORTNAME}${DISTVERSION:R}
CFLAGS+= -Dkcomp -fcommon
LDFLAGS+= -lmpifort
FFLAGS+= -fallow-argument-mismatch
WRKSRC_SUBDIR= source
MAKE_ENV= MPICH_CC=${CC}
BINARY_ALIAS= gcc=${CXX}
UTIL_PROGS= DosMain jx analysis_example esp polB bandgnu13 bin2txt cube2xsf intensity_map md2axsf
PLIST_FILES= bin/${PORTNAME} ${UTIL_PROGS:C/^/bin\//}
OPTIONS_DEFINE_amd64= SIMD
OPTIONS_DEFINE_i386= SIMD
OPTIONS_DEFAULT_amd64= SIMD
OPTIONS_DEFAULT_i386= SIMD
SIMD_CFLAGS= -msse -msse2 -mfpmath=sse
SIMD_CFLAGS_OFF= -Dnosse
CFLAGS+= ${ARCH:S/amd64//:S/i386//:S/${ARCH}/-Dnosse/}
pre-patch: # overlay files before patching
@cd ${WRKSRC} && ${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/patch${DISTVERSION}${EXTRACT_SUFX}
post-patch:
@cd ${WRKSRC} && ${REINPLACE_CMD} 's|DFT_DATA_PATH|"${DATADIR}/DFT_DATA13"|' Input_std.c check_lead.c SetPara_DFT.c OutData.c OutData_Binary.c
post-install:
.for u in ${UTIL_PROGS}
${INSTALL_PROGRAM} ${WRKSRC}/${u} ${STAGEDIR}${PREFIX}/bin
.endfor
cd ${WRKSRC}/.. && ${COPYTREE_SHARE} DFT_DATA13 ${STAGEDIR}${DATADIR}
# autoplist for potentials: about 500 files in DATADIR
@cd ${STAGEDIR}${PREFIX} && \
${FIND} ${DATADIR:S/^${PREFIX}\///} -type f >> ${TMPPLIST}
.include <bsd.port.mk>