freebsd-ports/graphics/simpleviewer/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

90 lines
2.8 KiB
Makefile

PORTNAME= simpleviewer
PORTVERSION= 3.1.7
PORTREVISION= 14
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/andreyu/simple-viewer-gl/get/
DISTNAME= v${PORTVERSION} # version tag, has no embedded ${PORTNAME}
DIST_SUBDIR= ${PORTNAME} # and that's why we need ${DIST_SUBDIR}
MAINTAINER= danfe@FreeBSD.org
COMMENT= Small and simple image viewer based on OpenGL
WWW= https://bitbucket.org/andreyu/simple-viewer-gl
LICENSE= GPLv2
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libglfw.so:graphics/glfw \
liblz4.so:archivers/liblz4 \
libpng.so:graphics/png
USES= cmake:insource compiler:c++11-lang gl jpeg pkgconfig \
tar:bzip2 xorg
USE_GL= gl glu
USE_XORG= ice sm x11 xcursor xext xinerama xrandr xxf86vm
CMAKE_ARGS= -DAPP_VERSION_MAJOR:STRING=${PORTVERSION:S/./ /g:[1]} \
-DAPP_VERSION_MINOR:STRING=${PORTVERSION:S/./ /g:[2]} \
-DAPP_VERSION_RELEASE:STRING=${PORTVERSION:S/./ /g:[3]}
WRKSRC= ${WRKDIR}/andreyu-simple-viewer-gl-d8928067922d
PLIST_FILES= bin/sviewgl ${DATADIR_REL}/Icon-1024.png \
${DATADIR_REL}/Icon-16.png ${DATADIR_REL}/Icon-32.png
PORTDOCS= README.md
PORTEXAMPLES= config.example
SUB_FILES= pkg-message
EXTRA_FEATURES= CURL GIF IMLIB2 JPEG2000 LCMS2 LIBEXIF OPENEXR TIFF WEBP
OPTIONS_DEFINE= DOCS EXAMPLES ${EXTRA_FEATURES}
OPTIONS_DEFAULT= ${EXTRA_FEATURES}
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
CURL_CMAKE_OFF= -DDISABLE_CURL_SUPPORT:STRING=1
GIF_LIB_DEPENDS= libgif.so:graphics/giflib
GIF_CMAKE_OFF= -DDISABLE_GIF_SUPPORT:STRING=1
IMLIB2_LIB_DEPENDS= libImlib2.so:graphics/imlib2
IMLIB2_CMAKE_OFF= -DDISABLE_IMLIB2_SUPPORT:STRING=1
JPEG2000_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
JPEG2000_CMAKE_OFF= -DDISABLE_JPEG2000_SUPPORT:STRING=1
LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2
LCMS2_CMAKE_OFF= -DDISABLE_LCMS2_SUPPORT:STRING=1
LIBEXIF_LIB_DEPENDS= libexif.so:graphics/libexif
LIBEXIF_CMAKE_OFF= -DDISABLE_EXIF_SUPPORT:STRING=1
OPENEXR_LIB_DEPENDS= libOpenEXR.so:graphics/openexr \
libImath.so:math/Imath
OPENEXR_CMAKE_OFF= -DDISABLE_OPENEXR_SUPPORT:STRING=1
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
TIFF_CMAKE_OFF= -DDISABLE_TIFF_SUPPORT:STRING=1
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
WEBP_CMAKE_OFF= -DDISABLE_WEBP_SUPPORT:STRING=1
post-patch:
@${REINPLACE_CMD} -e '/#include/s,lz4/,,' \
${WRKSRC}/src/formats/formatage.cpp
@${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},' \
${WRKSRC}/src/main.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sviewgl ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/res/Icon-*.png ${STAGEDIR}${DATADIR}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
do-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/config.example ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
JPEG2000_DESC+= via OpenJPEG