Changeset View
Changeset View
Standalone View
Standalone View
Makefile
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | # Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= darktable | PORTNAME= darktable | ||||
PORTVERSION= 2.0.7 | PORTVERSION= 2.2.1 | ||||
CATEGORIES= graphics | CATEGORIES= graphics | ||||
MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION:C/\.rc/rc/}/ | MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION:C/\.rc/rc/}/ | ||||
MAINTAINER= dumbbell@FreeBSD.org | MAINTAINER= dumbbell@FreeBSD.org | ||||
COMMENT= Virtual lighttable and darkroom for photographers | COMMENT= Virtual lighttable and darkroom for photographers | ||||
LICENSE= GPLv3 | LICENSE= GPLv3 | ||||
BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:graphics/squish \ | BUILD_DEPENDS= xsltproc:textproc/libxslt | ||||
xsltproc:textproc/libxslt | |||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | LIB_DEPENDS= libcurl.so:ftp/curl \ | ||||
libexiv2.so:graphics/exiv2 \ | libexiv2.so:graphics/exiv2 \ | ||||
libjson-glib-1.0.so:devel/json-glib \ | libjson-glib-1.0.so:devel/json-glib \ | ||||
liblcms2.so:graphics/lcms2 \ | liblcms2.so:graphics/lcms2 \ | ||||
liblensfun.so:graphics/lensfun \ | liblensfun.so:graphics/lensfun \ | ||||
libpng16.so:graphics/png \ | libpng16.so:graphics/png \ | ||||
libpugixml.so:textproc/pugixml \ | libpugixml.so:textproc/pugixml \ | ||||
libsoup-2.4.so:devel/libsoup \ | libsoup-2.4.so:devel/libsoup \ | ||||
libtiff.so:graphics/tiff | libtiff.so:graphics/tiff | ||||
ONLY_FOR_ARCHS= amd64 | ONLY_FOR_ARCHS= amd64 arm64 | ||||
ONLY_FOR_ARCHS_REASON= uses SSE instructions and 64-bit address space | ONLY_FOR_ARCHS_REASON= uses SSE instructions and 64-bit address space | ||||
USES= cmake:outsource compiler:c++11-lib desktop-file-utils \ | USES= cmake:outsource compiler:c++11-lib desktop-file-utils \ | ||||
jpeg ninja pkgconfig sqlite tar:xz | jpeg ninja pkgconfig sqlite tar:xz | ||||
USE_GL= glu | USE_GL= glu | ||||
USE_GNOME= cairo gtk30 intltool librsvg2 libxml2 | USE_GNOME= cairo gtk30 intltool librsvg2 libxml2 | ||||
USE_XORG= ice sm x11 xext xrandr | USE_XORG= ice sm x11 xext xrandr | ||||
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} | USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} | ||||
INSTALLS_ICONS= yes | INSTALLS_ICONS= yes | ||||
OPTIONS_DEFINE= COLORD DOCS FLICKR GEO GNOMEKEYRING GPHOTO GRAPHMAGICK \ | OPTIONS_DEFINE= COLORD DOCS FLICKR GEO GPHOTO GRAPHMAGICK \ | ||||
LIBSECRET LUA NLS OPENEXR OPENJPEG PRINT SLIDESHOW WEBP | LIBSECRET LUA NLS OPENEXR OPENJPEG PRINT WEBP | ||||
GEO_DESC= Support geotagging | GEO_DESC= Support geotagging | ||||
LIBSECRET_DESC= Support libsecret as password backend | LIBSECRET_DESC= Support libsecret as password backend | ||||
SLIDESHOW_DESC= Build OpenGL/SDL slideshow viewer | |||||
OPTIONS_DEFAULT=COLORD FLICKR GEO GPHOTO LUA OPENEXR OPENJPEG \ | OPTIONS_DEFAULT=COLORD FLICKR GEO GPHOTO LUA OPENEXR OPENJPEG \ | ||||
PRINT SLIDESHOW WEBP | PRINT WEBP | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.rc/~rc/} | WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.rc/~rc/} | ||||
CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 | CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 | ||||
CMAKE_ARGS+= -DBUILD_CMSTEST:BOOL=ON | CMAKE_ARGS+= -DBUILD_CMSTEST:BOOL=ON | ||||
CMAKE_ARGS+= -DUSE_KWALLET:BOOL=ON | CMAKE_ARGS+= -DUSE_KWALLET:BOOL=ON | ||||
LDFLAGS+= -L${LOCALBASE}/lib | |||||
# darktable 1.4+ can use colord but provides its own libcolord, | |||||
# statically linked to libdarktable.so. | |||||
COLORD_LIB_DEPENDS= libcolord.so:graphics/colord \ | COLORD_LIB_DEPENDS= libcolord.so:graphics/colord \ | ||||
libcolord-gtk.so:graphics/colord-gtk | libcolord-gtk.so:graphics/colord-gtk | ||||
COLORD_CMAKE_OFF= -DUSE_COLORD:BOOL=OFF | COLORD_CMAKE_OFF= -DUSE_COLORD:BOOL=OFF | ||||
FLICKR_LIB_DEPENDS= libflickcurl.so:www/flickcurl | FLICKR_LIB_DEPENDS= libflickcurl.so:www/flickcurl | ||||
FLICKR_CMAKE_OFF= -DUSE_FLICKR:BOOL=OFF | FLICKR_CMAKE_OFF= -DUSE_FLICKR:BOOL=OFF | ||||
GEO_LIB_DEPENDS= libosmgpsmap-1.0.so:x11-toolkits/osm-gps-map | GEO_LIB_DEPENDS= libosmgpsmap-1.0.so:x11-toolkits/osm-gps-map | ||||
GEO_CMAKE_OFF= -DUSE_GEO:BOOL=OFF | GEO_CMAKE_OFF= -DUSE_MAP:BOOL=OFF | ||||
GNOMEKEYRING_LIB_DEPENDS=libgnome-keyring.so:security/libgnome-keyring | |||||
GNOMEKEYRING_CMAKE_OFF= -DUSE_GNOME_KEYRING:BOOL=OFF | |||||
GPHOTO_LIB_DEPENDS= libgphoto2.so:graphics/libgphoto2 | GPHOTO_LIB_DEPENDS= libgphoto2.so:graphics/libgphoto2 | ||||
GPHOTO_CMAKE_OFF= -DUSE_CAMERA_SUPPORT:BOOL=OFF | GPHOTO_CMAKE_OFF= -DUSE_CAMERA_SUPPORT:BOOL=OFF | ||||
GRAPHMAGICK_LIB_DEPENDS=libGraphicsMagick.so:graphics/GraphicsMagick | GRAPHMAGICK_LIB_DEPENDS=libGraphicsMagick.so:graphics/GraphicsMagick | ||||
GRAPHMAGICK_CMAKE_OFF= -DUSE_GRAPHICSMAGICK:BOOL=OFF | GRAPHMAGICK_CMAKE_OFF= -DUSE_GRAPHICSMAGICK:BOOL=OFF | ||||
LIBSECRET_LIB_DEPENDS= libsecret-1.so:security/libsecret | LIBSECRET_LIB_DEPENDS= libsecret-1.so:security/libsecret | ||||
LIBSECRET_CMAKE_OFF= -DUSE_LIBSECRET:BOOL=OFF | LIBSECRET_CMAKE_OFF= -DUSE_LIBSECRET:BOOL=OFF | ||||
LUA_USES= lua:52 | LUA_USES= lua:52 | ||||
LUA_CMAKE_OFF= -DUSE_LUA:BOOL=OFF | LUA_CMAKE_OFF= -DUSE_LUA:BOOL=OFF | ||||
# FIXME: Even with NLS turned off, darktable(1) is still linked to | # FIXME: Even with NLS turned off, darktable(1) is still linked to | ||||
# libintl.so. | # libintl.so. | ||||
NLS_USES= gettext | NLS_USES= gettext | ||||
NLS_USES_OFF= gettext-runtime | NLS_USES_OFF= gettext-runtime | ||||
NLS_CMAKE_OFF= -DUSE_NLS:BOOL=OFF | NLS_CMAKE_OFF= -DUSE_NLS:BOOL=OFF | ||||
NLS_LDFLAGS= -L${LOCALBASE}/lib -lintl | NLS_LDFLAGS= -L${LOCALBASE}/lib -lintl | ||||
OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR \ | OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR \ | ||||
libIlmThread-2_2.so:graphics/ilmbase | libIlmThread-2_2.so:graphics/ilmbase | ||||
OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF | OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF | ||||
OPENJPEG_LIB_DEPENDS= libopenjpeg.so:graphics/openjpeg15 | OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg | ||||
OPENJPEG_CMAKE_OFF= -DUSE_OPENJPEG:BOOL=OFF | OPENJPEG_CMAKE_OFF= -DUSE_OPENJPEG:BOOL=OFF | ||||
PRINT_LIB_DEPENDS= libcups.so:print/cups | PRINT_LIB_DEPENDS= libcups.so:print/cups | ||||
PRINT_CMAKE_OFF= -DBUILD_PRINT:BOOL=OFF | PRINT_CMAKE_OFF= -DBUILD_PRINT:BOOL=OFF | ||||
SLIDESHOW_USE= GL=gl SDL=sdl | |||||
SLIDESHOW_CMAKE_OFF= -DBUILD_SLIDESHOW:BOOL=OFF | |||||
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp | WEBP_LIB_DEPENDS= libwebp.so:graphics/webp | ||||
WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF | WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
.if ${ARCH} == amd64 && ${COMPILER_TYPE} == clang | .if ${ARCH} == amd64 && ${COMPILER_TYPE} == clang | ||||
# Enable OpenMP support with Clang 3.7. | # Enable OpenMP support with Clang 3.7. | ||||
BUILD_DEPENDS+= clang37:devel/llvm37 | BUILD_DEPENDS+= clang37:devel/llvm37 | ||||
RUN_DEPENDS+= clang37:devel/llvm37 | RUN_DEPENDS+= clang37:devel/llvm37 | ||||
CPP= clang-cpp37 | CPP= clang-cpp37 | ||||
CC= clang37 | CC= clang37 | ||||
CXX= clang++37 | CXX= clang++37 | ||||
# FIXME: At least in 3.7.0 and 3.7.1, Clang doesn't find libomp.so | # FIXME: At least in 3.7.0 and 3.7.1, Clang doesn't find libomp.so | ||||
# itself. Furthermore, there may be a regression in 3.7.1 because we now | # itself. Furthermore, there may be a regression in 3.7.1 because we now | ||||
# need to explicitely link to libm.so as well. | # need to explicitly link to libm.so as well. | ||||
OPENMP_FLAGS= -L${LOCALBASE}/llvm37/lib -lm -lomp | OPENMP_FLAGS= -L${LOCALBASE}/llvm37/lib -lm -lomp | ||||
LDFLAGS+= ${OPENMP_FLAGS} | LDFLAGS+= ${OPENMP_FLAGS} | ||||
# Last but not least, there is a second change or regression in CMake | # Last but not least, there is a second change or regression in CMake | ||||
# 3.4.x: CMAKE_EXE_LINKER_FLAGS is not passed to TRY_COMPILE by default | # 3.4.x: CMAKE_EXE_LINKER_FLAGS is not passed to TRY_COMPILE by default | ||||
# anymore. The CMP0056 policy must be explicitely set to NEW to ensure | # anymore. The CMP0056 policy must be explicitly set to NEW to ensure | ||||
# linker flags are passed. | # linker flags are passed. | ||||
# See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html | # See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html | ||||
CMAKE_ARGS+= -DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW | CMAKE_ARGS+= -DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW | ||||
.endif | .endif | ||||
# On FreeBSD 9.3-RELEASE, powl(3) is hidden behind the following | |||||
# define. So let's define it to fix the build. This is only needed on | |||||
# 9.3-RELEASE, but it's harmless on later branches because this define | |||||
# is not used. | |||||
CFLAGS+= -D_DECLARE_C99_LDBL_MATH | |||||
.if defined(WITH_DEBUG) | .if defined(WITH_DEBUG) | ||||
CMAKE_BUILD_TYPE= RelWithDebInfo | CMAKE_BUILD_TYPE= RelWithDebInfo | ||||
STRIP= | STRIP= | ||||
.endif | .endif | ||||
post-patch: | |||||
@${MV} ${WRKSRC}/data/darktableconfig.dtd ${WRKSRC}/data/darktableconfig.dtd.in | |||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |