freebsd-ports/graphics/opendx/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.2 KiB
Makefile

PORTNAME= opendx
PORTVERSION= 4.4.4
PORTREVISION= 35
CATEGORIES= graphics math java
MASTER_SITES= http://www.sfr-fresh.com/unix/misc/
DISTNAME= dx-${PORTVERSION}
MAINTAINER= stephen@FreeBSD.org
COMMENT= IBM's Open Visualization Data Explorer
WWW= http://www.opendx.org/
LICENSE= IBM-OVDX-v1
LICENSE_NAME= IBM PUBLIC LICENSE - Open Visualization Data Explorer VERSION 1.0
LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BROKEN_aarch64= fails to link: undefined symbol: sbrk
LIB_DEPENDS= libtiff.so:graphics/tiff \
libcdf.so:science/cdf
MAKE_JOBS_UNSAFE= yes
USES= bison compiler:c++17-lang gl gmake libtool magick:6 motif xorg
USE_XORG= x11 xt xinerama xext xpm xmu sm ice
USE_GL= gl glu
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared
USE_LDCONFIG= yes
CONFIGURE_ENV= ARCH=freebsd
CPPFLAGS+= ${CXXFLAGS} -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
NO_MTREE= yes
PLIST_SUB= ARCH=freebsd
PKGMESSAGE= ${WRKDIR}/pkg-message
.if defined(WITH_HDF) && !defined(WITHOUT_NETCDF)
IGNORE= HDF and NETCDF are conflicting
.endif
.if defined(WITH_HDF)
LIB_DEPENDS+= libmfhdf.so:science/hdf
.else
CONFIGURE_ARGS+= --without-hdf
.endif
.if !defined(WITHOUT_NETCDF)
LIB_DEPENDS+= libnetcdf.so:science/netcdf
.else
CONFIGURE_ARGS+= --without-netcdf
.endif
.if defined(WITH_JAVA)
ONLY_FOR_ARCHS= i386
USE_JAVA= yes
BUILD_DEPENDS+= ${JAVALIBDIR}/npcosmop211.jar:graphics/cosmoplayer
RUN_DEPENDS+= ${JAVALIBDIR}/npcosmop211.jar:graphics/cosmoplayer
CONFIGURE_ARGS+= --with-cosmojar-path=${JAVALIBDIR}/npcosmop211.jar \
--with-java40jar-path=${JAVALIBDIR}/java40.jar \
--with-jni-path=${JAVA_HOME}/include:${JAVA_HOME}/include/freebsd
PLIST_SUB+= JAVA=""
DIR2PRUNE= dx/java/user dx/java/server/nets
.else
CONFIGURE_ARGS+= --without-javadx
PLIST_SUB+= JAVA="@comment "
.endif
PLIST_SUB+= UNAMEP=${ARCH}
.include <bsd.port.pre.mk>
post-patch:
@${RM} ${WRKSRC}/include/stamp-h.in
.for dir in doc help html man
@${FIND} ${WRKSRC}/${dir} -type f | ${XARGS} \
${REINPLACE_CMD} -e "s;/usr/lpp;${PREFIX};g"
.endfor
@${REINPLACE_CMD} -e "s;/usr/X11R6;${LOCALBASE};g" \
${WRKSRC}/configure
@${REINPLACE_CMD} -e "s|startserver.bat||" \
${WRKSRC}/src/uipp/java/server/Makefile.in
@${REINPLACE_CMD} -e 's|$$(ARCH)|@ARCH@|' \
${WRKSRC}/src/misc/Makefile.*
@${REINPLACE_CMD} -e 's/void exit (int);/[[noreturn]] void exit (int);/' \
${WRKSRC}/configure
for f in `find ${WRKSRC} -name "*.bm"`; do \
if [ $${f%/*} != "${WRKSRC}/src/uipp/widgets" ]; then \
${REINPLACE_CMD} -E 's/0x(..)/static_cast<char>(0x\1)/g' $$f; \
${REINPLACE_CMD} -E 's/static unsigned char/static char/g' $$f; \
fi; \
done
post-install:
@${CP} ${FILESDIR}/pkg-message.in ${PKGMESSAGE}
.if defined(WITH_JAVA)
${CHMOD} 0775 ${STAGEDIR}${PREFIX}/dx/java/server/nets
${TOUCH} ${DIR2PRUNE:S|^|${STAGEDIR}${PREFIX}/|:S|$|/.keepme|}
@${ECHO} "---------------------------------------------------------" \
>> ${PKGMESSAGE}
@${ECHO} "Before starting ${PREFIX}/dx/java/server/bin/startserver" \
>> ${PKGMESSAGE}
@${ECHO} "you must install the port graphics/opendx-samples." \
>> ${PKGMESSAGE}
.endif
@${ECHO} "---------------------------------------------------------" \
>> ${PKGMESSAGE}
.include <bsd.port.post.mk>