freebsd-ports/graphics/darktable/Makefile

149 lines
4.4 KiB
Makefile
Raw Normal View History

# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
PORTNAME= darktable
PORTVERSION= 3.4.1
PORTREVISION= 3
CATEGORIES= graphics
MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION:C/\.rc/rc/}/
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
MAINTAINER= dumbbell@FreeBSD.org
COMMENT= Virtual lighttable and darkroom for photographers
LICENSE= GPLv3
ONLY_FOR_ARCHS= aarch64 amd64 powerpc64le
ONLY_FOR_ARCHS_REASON= uses 64-bit address space
BUILD_DEPENDS= iso-codes>=0:misc/iso-codes \
p5-Pod-Parser>=0:textproc/p5-Pod-Parser \
po4a-translate:textproc/po4a \
xsltproc:textproc/libxslt \
bash:shells/bash
LIB_DEPENDS= libcolord-gtk.so:graphics/colord-gtk \
libcolord.so:graphics/colord \
libcurl.so:ftp/curl \
libexiv2.so:graphics/exiv2 \
libjson-glib-1.0.so:devel/json-glib \
liblcms2.so:graphics/lcms2 \
liblensfun.so:graphics/lensfun \
2017-12-01 08:19:53 +01:00
libpng.so:graphics/png \
libpugixml.so:textproc/pugixml \
libsoup-2.4.so:devel/libsoup \
libtiff.so:graphics/tiff
USES= cmake compiler:c++14-lang desktop-file-utils gl gnome jpeg \
pkgconfig shebangfix sqlite tar:xz xorg
USE_GL= glu
USE_GNOME= cairo gtk30 intltool librsvg2 libxml2
INSTALLS_ICONS= yes
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
USE_XORG= ice sm x11 xext xrandr
SHEBANG_FILES= tools/*.sh
CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 \
-DBUILD_CMSTEST:BOOL=ON \
-DUSE_KWALLET:BOOL=ON
CFLAGS+= -fopenmp
LDFLAGS+= -L${LOCALBASE}/lib
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.rc/~rc/}
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
OPTIONS_DEFINE= DOCS GEO GPHOTO GRAPHMAGICK LIBAVIF LIBSECRET LTO LUA \
NLS OPENEXR OPENJPEG PRINT TOOLS WEBP
OPTIONS_DEFAULT= GEO GPHOTO LUA OPENEXR OPENJPEG PRINT WEBP
OPTIONS_SUB= yes
GEO_DESC= Support geotagging
LIBAVIF_DESC= Support encoding and decoding .avif files
LIBSECRET_DESC= Support libsecret as password backend
GEO_LIB_DEPENDS= libosmgpsmap-1.0.so:x11-toolkits/osm-gps-map
GEO_CMAKE_OFF= -DUSE_MAP:BOOL=OFF
GPHOTO_LIB_DEPENDS= libgphoto2.so:graphics/libgphoto2
GPHOTO_CMAKE_OFF= -DUSE_CAMERA_SUPPORT:BOOL=OFF
GRAPHMAGICK_LIB_DEPENDS=libGraphicsMagick.so:graphics/GraphicsMagick
GRAPHMAGICK_CMAKE_OFF= -DUSE_GRAPHICSMAGICK:BOOL=OFF
LIBAVIF_LIB_DEPENDS= libavif.so:graphics/libavif
LIBAVIF_CMAKE_OFF= -DUSE_LIBAVIF:BOOL=OFF
LIBSECRET_LIB_DEPENDS= libsecret-1.so:security/libsecret
LIBSECRET_CMAKE_OFF= -DUSE_LIBSECRET:BOOL=OFF
LTO_CMAKE_BOOL= RAWSPEED_ENABLE_LTO
LUA_USES= lua:53
LUA_CMAKE_OFF= -DUSE_LUA:BOOL=OFF
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
# FIXME: Even with NLS turned off, darktable(1) is still linked to
# libintl.so.
NLS_USES= gettext
NLS_USES_OFF= gettext-runtime
NLS_CMAKE_OFF= -DUSE_NLS:BOOL=OFF
NLS_LDFLAGS= -L${LOCALBASE}/lib -lintl
OPENEXR_LIB_DEPENDS= libOpenEXR.so:graphics/openexr \
libImath.so:math/Imath
OPENEXR_CFLAGS= -I${LOCALBASE}/include/Imath
OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
OPENJPEG_CMAKE_OFF= -DUSE_OPENJPEG:BOOL=OFF
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
PRINT_LIB_DEPENDS= libcups.so:print/cups
PRINT_CMAKE_OFF= -DBUILD_PRINT:BOOL=OFF
TOOLS_DESC= Install additional scripts
TOOLS_BUILD_DEPENDS= exiftool:graphics/p5-Image-ExifTool
TOOLS_RUN_DEPENDS= exiftool:graphics/p5-Image-ExifTool
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF
graphics/darktable: Update to 1.4.2 The following changes were made to options: o Remove GCC option (see below) o Remove KWALLET option (unused) o Rename FACEBOOK option to FB_PICASA, because both export features depend on json-glib. o Add COLORD option (color management) o Add GRAPHMAGICK option (support GraphicsMagick's image formats) o Add LUA option (embed Lua to add scripting) o Add OPENEXR option (support HDR image format) o Add SQUISH option (use libsquish to compress thumbnails) o Add WEBP option (support WebP image format) The patch enables more options by default, because I think it's more sensible for a photographer using binary packages: o COLORD o FB_PICASA o FLICKR o GEO o GPHOTO (already on) o LUA o NLS o OPENEXR o OPENJPEG o RAWSPEED (already on) o WEBP The GCC option was removed because the usage of GCC along with libc++ in FreeBSD 10 and -CURRENT is unstable (this isn't a general truth, just valid in the case of darktable). In FreeBSD up-to 9, the usage of lang/gcc is mandatory anyway, because GCC 4.2.1 support is best effort only (upstream). Ninja is now used to build darktable, instead of make. This is not mandatory of course, but brings a 33% build time improvement (at least for me). pkg-plist is generated with "make makeplist" this time. That's why the diff seems large. In fact most of the content remains the same, just with a different order. All patches were committed upstream and are removed, except one which comes from upstream but isn't part of release 1.4.2. The port is now "stagified". Finally, I take maintainership of it. PR: ports/186979 Phabricator: D107 Reviewed by: danfe@ (previous version), antoine@ Approved by: antoine@
2014-06-01 20:52:21 +02:00
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64le
CMAKE_ARGS+= -DUSE_OPENCL:BOOL=OFF
CXXFLAGS+= -DGDK_DISABLE_DEPRECATED
PLIST_SUB+= NO_OPENCL="@comment "
.else
PLIST_SUB+= NO_OPENCL=""
.endif
.include <bsd.port.pre.mk>
.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD || ${ARCH} == "i386"
LLVM_DEFAULT= 10
BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}
CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT}
CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT}
.endif
# work around CMAKE/CCACHE flaw (cmake stomps over ccache)
.if "${WITH_CCACHE_BUILD}" == "yes" && !defined(NO_CCACHE)
CMAKE_ARGS+= -DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_BIN} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_BIN}
.endif
.if defined(WITH_DEBUG)
CMAKE_BUILD_TYPE= RelWithDebInfo
STRIP=
.endif
# darktable defines the __XOPEN_SOURCE preprocessor macro, which
# restricts symbol visibility on FreeBSD and causes compilation failures
# on, for instance, the cups_print module, because u_char remains
# undefined. Remove _XOPEN_SOURCE maro definitions.
post-patch:
${REINPLACE_CMD} '/add_definitions."-D_XOPEN_SOURCE=.*"/d' ${WRKSRC}/CMakeLists.txt
post-install-TOOLS-off:
@${RM} -f ${STAGEDIR}${DATADIR}/tools/extract_wb_from_images.sh
.include <bsd.port.post.mk>