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

87 lines
2.6 KiB
Makefile

PORTNAME= lrng
PORTVERSION= 20130314
CATEGORIES= math
MASTER_SITES= http://www.iro.umontreal.ca/~simardr/rng/:1 \
http://www.iro.umontreal.ca/~lecuyer/myftp/papers/:2 \
LOCAL/bf/${PORTNAME}/${PORTVERSION}/:1,2
DISTFILES= ex1.c:1 lfsr258.c:1 lfsr113.c:1 WELL1024a.h:1 WELL19937a.h:1 WELL512a.h:1 \
WELL44497a.h:1 WELL19937a.c:1 WELL1024a.c:1 WELL512a.c:1 WELL44497a.c:1 \
MRG63k3a.c:1 MRG32k3a.c:1 MRG32k5a.c:1 MRG63k3a.h:1 MRG32k5a.h:1 MRG32k3a.h:1 \
lfsr258.h:1 lfsr113.h:1
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
EXTRACT_ONLY=
MAINTAINER= ports@FreeBSD.org
COMMENT= Uniform random number generators of P. L'Ecuyer and his colleagues
WWW= https://www.iro.umontreal.ca/~simardr/
LICENSE= GPLv3
CLEANFILES= ${SRCS}
LIB= ${PORTNAME}
LIBDIR= ${PREFIX}/lib
MAKE_ENV+= CLEANFILES="${CLEANFILES}" \
LIB="${LIB}" LIBDIR="${LIBDIR}" SHLIB_MAJOR="${SHLIB_MAJOR}" \
SRCS="${SRCS}" SRCCONF="${SRCCONF}"
NO_WRKSUBDIR= yes
OPTIONS_DEFINE= PROFILE DOCS EXAMPLES
PLIST_FILES= ${DISTFILES:M*.h\:1:S|:1$||:S|^|include/${PORTNAME}/|:} \
lib/lib${LIB}.a lib/lib${LIB}.so \
lib/lib${LIB}.so.${SHLIB_MAJOR}
SHLIB_MAJOR= 0
SRCCONF= /dev/null
SRCS= ${DISTFILES:M*.c\:1:Nex1.c\:1:S|:1$||}
USE_LDCONFIG= yes
USES= uidfix
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS} || make(makesum)
DISTFILES+= combmrg2.ps:2 lfsr04.pdf:2 tausme2.ps:2
.endif
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= ${DISTFILES:M*\:2:S|:2||}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES= ex1.c
.endif
.if ${PORT_OPTIONS:MPROFILE}
.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)
IGNORE= you have defined WITH_PROFILE, but have also defined\
WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE
.elif !exists(/usr/lib/libc_p.a)
IGNORE= you have chosen WITH_PROFILE, but have not installed the\
base system profiling libraries
.endif
PLIST_FILES+= lib/lib${LIB}_p.a
.else
MAKE_ENV+= WITHOUT_PROFILE=yes
.endif
post-extract:
@${CP} ${_DISTDIR}/* ${WRKSRC}
@${ECHO_CMD} ".include <bsd.lib.mk>" > ${WRKSRC}/Makefile
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}; ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR})
do-test:
@${CC} ${CFLAGS} -o ${WRKSRC}/ex1 ${WRKSRC}/ex1.c ${WRKSRC}/lib${LIB}.a
@${WRKSRC}/ex1
@${CC} ${CFLAGS} ${LDFLAGS} -o ${WRKSRC}/ex1s ${WRKSRC}/ex1.c -L${WRKSRC} -l${LIB}
@${SETENV} LD_LIBRARY_PATH=${WRKSRC} ${WRKSRC}/ex1s
.include <bsd.port.mk>