aboutsummaryrefslogtreecommitdiff
path: root/graphics/simpleviewer
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2019-12-03 11:27:14 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2019-12-03 11:27:14 +0000
commit47bbd012712b679f2b8af2cd3e61aadb0954b920 (patch)
treeb2bf2cba8dcc46712a772cec861801b2fc90c042 /graphics/simpleviewer
parenta48cf9602b0d30e8e36d2ac16fe052c226a14888 (diff)
downloadports-47bbd012712b679f2b8af2cd3e61aadb0954b920.tar.gz
ports-47bbd012712b679f2b8af2cd3e61aadb0954b920.zip
- Allow to disable a lot of extra features via options
- Report correct (actual) program version in various places - Simplify the grammar in the explanation about DIST_SUBDIR - Wrap USES string a little earlier and put missing `gl' to USE_GL list as reported by stage Q/A
Notes
Notes: svn path=/head/; revision=518932
Diffstat (limited to 'graphics/simpleviewer')
-rw-r--r--graphics/simpleviewer/Makefile57
1 files changed, 41 insertions, 16 deletions
diff --git a/graphics/simpleviewer/Makefile b/graphics/simpleviewer/Makefile
index 35cce29aebf8..e51a884298e3 100644
--- a/graphics/simpleviewer/Makefile
+++ b/graphics/simpleviewer/Makefile
@@ -5,29 +5,25 @@ PORTNAME= simpleviewer
PORTVERSION= 3.1.7
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/andreyu/simple-viewer-gl/get/
-DISTNAME= v${PORTVERSION} # version tag, thus no embedded ${PORTNAME}
-DIST_SUBDIR= ${PORTNAME} # and hence the need for ${DIST_SUBDIR}
+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
LICENSE= GPLv2
-LIB_DEPENDS= libIlmImf.so:graphics/openexr \
- libImlib2.so:graphics/imlib2 \
- libexif.so:graphics/libexif \
- libfreetype.so:print/freetype2 \
- libgif.so:graphics/giflib \
+LIB_DEPENDS= libfreetype.so:print/freetype2 \
libglfw.so:graphics/glfw \
- liblcms2.so:graphics/lcms2 \
- libpng.so:graphics/png \
- libtiff.so:graphics/tiff \
- libwebp.so:graphics/webp
-
-USES= cmake:insource compiler:c++11-lang gl jpeg pkgconfig tar:bzip2 \
- xorg
-USE_GL= glu
+ 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
@@ -37,7 +33,36 @@ PORTDOCS= README.md
PORTEXAMPLES= config.example
SUB_FILES= pkg-message
-OPTIONS_DEFINE= DOCS EXAMPLES
+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= libIlmImf.so:graphics/openexr
+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 's,%%DATADIR%%,${DATADIR},' \