freebsd-ports/math/taucs/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

108 lines
3.3 KiB
Makefile

PORTNAME= taucs
PORTVERSION= 2.2
PORTREVISION= 23
CATEGORIES= math
MASTER_SITES= http://www.tau.ac.il/~stoledo/taucs/${PORTVERSION}/ \
LOCAL/bf
DISTNAME= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= C library of sparse linear solvers
WWW= http://www.tau.ac.il/~stoledo/taucs/
LICENSE= TAUCS
LICENSE_NAME= TAUCS License
LICENSE_FILE= ${FILESDIR}/TAUCS-license.txt
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LIB_DEPENDS= libmetis.so:math/metis
USES= blaslapack fortran tar:tgz
USE_LDCONFIG= yes
NO_WRKSUBDIR= yes
HAS_CONFIGURE= yes
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
LDFLAGS+= -L${LOCALBASE}/lib
LIBMETIS?= -lmetis
MAKE_ENV+= LIBBLAS="${BLASLIB}" LIBLAPACK="${LAPACKLIB}" LIBMETIS="${LIBMETIS}"
BINS?= direct iter taucs_run
TESTS?= complex stack timer linsolve memory
.if ${ARCH} == "sparc64"
PICFLAG?= -fPIC
.else
PICFLAG?= -fpic
.endif
post-patch:
@${REINPLACE_CMD} -e 's/succedd/succeed/' \
${WRKSRC}/progs/taucs_blas_underscore_test.c
@${REINPLACE_CMD} -e 's/SUCCEDD/SUCCEED/' \
${WRKSRC}/progs/test_linsolve.c
post-configure:
@${CP} -r ${WRKSRC} ${WRKSRC}_SHARED
archives: configure
@${PRINTF} "\n\n%s\n\n\n" "Building libtaucs archives:"
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} lib/FreeBSD/libtaucs.a)
(cd ${WRKSRC}_SHARED && ${SETENV} ${MAKE_ENV} PICFLAG="${PICFLAG}" \
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} lib/FreeBSD/libtaucs.a)
lib: archives
@${PRINTF} "\n\n%s\n\n\n" "Building shared library:"
(cd ${WRKSRC}_SHARED/lib/FreeBSD && \
${FC} ${CFLAGS} ${PICFLAG} ${LDFLAGS} -shared \
-o libtaucs.so.1 -Wl,-x -Wl,-soname,libtaucs.so.1 \
-Wl,--whole-archive libtaucs.a -Wl,--no-whole-archive)
${STRIP_CMD} ${WRKSRC}_SHARED/lib/FreeBSD/libtaucs.so.1
bins: lib
@${PRINTF} "\n\n%s\n\n\n" "Building (dynamically-linked) executables:"
#for the second pass through WRKSRC_SHARED, use a nonexistent MAKEOBJDIR to
#prevent make from entering the obj subdirectories and breaking the build (see,
#for example, the description of .OBJDIR in make(1)):
(cd ${WRKSRC}_SHARED && \
${SETENV} ${MAKE_ENV} MAKEOBJDIR="${NONEXISTENT}" \
${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ${BINS:S|^|bin/FreeBSD/|})
do-build: bins
do-install:
${INSTALL_DATA} ${WRKSRC}/lib/FreeBSD/libtaucs.a \
${STAGEDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}_SHARED/lib/FreeBSD/libtaucs.so.1 \
${STAGEDIR}${PREFIX}/lib
(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libtaucs.so.1 libtaucs.so)
${INSTALL_DATA} ${WRKSRC}/build/FreeBSD/*.h \
${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/src/*.h ${STAGEDIR}${PREFIX}/include
(cd ${WRKSRC}_SHARED/bin/FreeBSD && \
${INSTALL_PROGRAM} ${BINS} ${STAGEDIR}${PREFIX}/bin)
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/*.pdf ${STAGEDIR}${DOCSDIR}
do-test: # XXX: building tests fail
.for t in ${TESTS}
@${PRINTF} "\n%s\n" "Building test_${t}"
@cd ${WRKSRC}_SHARED ; ${FC} ${FFLAGS} -Llib/FreeBSD -L./ \
${LDFLAGS} -o bin/FreeBSD/test_${t} \
`${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} -V STDDEFS` \
`${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} -V STDINCS` \
progs/test_${t}.c -ltaucs ${LAPACKLIB} ${BLASLIB} ${LIBMETIS}
@${PRINTF} "\n%s\n\n\n" "Running test_${t}:"
-@cd ${WRKSRC}_SHARED ; \
${SETENV} LD_LIBRARY_PATH="lib/FreeBSD:/lib:/usr/lib:${LOCALBASE}/lib" \
bin/FreeBSD/test_${t}
.endfor
.include <bsd.port.mk>