Changeset View
Standalone View
graphics/darktable/Makefile
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | # Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= darktable | PORTNAME= darktable | ||||
PORTVERSION= 1.6.8 | PORTVERSION= 1.6.9 | ||||
PORTREVISION= 1 | |||||
CATEGORIES= graphics | CATEGORIES= graphics | ||||
MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION}/ | MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION}/ | ||||
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 | ||||
Show All 10 Lines | USES= compiler:c++11-lib cmake:outsource desktop-file-utils \ | ||||
ninja pkgconfig tar:xz | ninja pkgconfig tar:xz | ||||
USE_GNOME= gtk20 intltool librsvg2 | USE_GNOME= gtk20 intltool librsvg2 | ||||
USE_SQLITE= yes | USE_SQLITE= yes | ||||
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} | USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} | ||||
INSTALLS_ICONS= yes | INSTALLS_ICONS= yes | ||||
LDFLAGS+= -L${LOCALBASE}/lib -lintl | LDFLAGS+= -L${LOCALBASE}/lib -lintl | ||||
OPTIONS_DEFINE= COLORD DOCS FB_PICASA FLICKR GEO GNOMEKEYRING GPHOTO \ | OPTIONS_DEFINE= COLORD DOCS FB_PICASA FLICKR GEO GNOMEKEYRING GPHOTO \ | ||||
GRAPHMAGICK LIBSECRET LUA NLS OPENEXR OPENJPEG RAWSPEED \ | GRAPHMAGICK LIBSECRET LUA NLS OPENEXR OPENJPEG OPENMP \ | ||||
SLIDESHOW SQUISH WEBP | RAWSPEED SLIDESHOW SQUISH WEBP | ||||
GEO_DESC= Support geotagging | GEO_DESC= Support geotagging | ||||
FB_PICASA_DESC= Support export to Facebook and Picasa | FB_PICASA_DESC= Support export to Facebook and Picasa | ||||
LIBSECRET_DESC= Support libsecret as password backend | LIBSECRET_DESC= Support libsecret as password backend | ||||
SQUISH_DESC= Compress thumbnail via libsquish | SQUISH_DESC= Compress thumbnail via libsquish | ||||
RAWSPEED_DESC= Compile with rawspeed backend | RAWSPEED_DESC= Compile with rawspeed backend | ||||
SLIDESHOW_DESC= Build OpenGL/SDL slideshow viewer | SLIDESHOW_DESC= Build OpenGL/SDL slideshow viewer | ||||
OPTIONS_DEFAULT=COLORD FB_PICASA FLICKR GEO GPHOTO LUA NLS OPENEXR \ | OPTIONS_DEFAULT=COLORD FB_PICASA FLICKR GEO GPHOTO LUA NLS OPENEXR \ | ||||
OPENJPEG RAWSPEED SLIDESHOW SQUISH WEBP | OPENJPEG OPENMP RAWSPEED SLIDESHOW SQUISH WEBP | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
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 | ||||
# darktable 1.4 can use colord but provides its own libcolord, | # darktable 1.4 can use colord but provides its own libcolord, | ||||
# statically linked to libdarktable.so. | # statically linked to libdarktable.so. | ||||
Show All 39 Lines | |||||
SLIDESHOW_CMAKE_OFF= -DBUILD_SLIDESHOW:BOOL=OFF | SLIDESHOW_CMAKE_OFF= -DBUILD_SLIDESHOW:BOOL=OFF | ||||
SQUISH_BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:${PORTSDIR}/graphics/squish | SQUISH_BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:${PORTSDIR}/graphics/squish | ||||
SQUISH_CMAKE_OFF= -DUSE_SQUISH:BOOL=OFF | SQUISH_CMAKE_OFF= -DUSE_SQUISH:BOOL=OFF | ||||
WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp | WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp | ||||
WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF | WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF | ||||
.include <bsd.port.options.mk> | .include <bsd.port.pre.mk> | ||||
.if ${PORT_OPTIONS:MOPENMP} && \ | |||||
(${COMPILER_TYPE} == clang || ${ALT_COMPILER_TYPE} == clang) | |||||
# Enable OpenMP support with clang 3.7. | |||||
BUILD_DEPENDS+= clang37:${PORTSDIR}/devel/llvm37 | |||||
kwm: This does also need a BUILD_DEPEND | |||||
Done Inline ActionsOk, I will add it. About RUN_DEPENDS, the correct dependency is ${LOCALBASE}/llvm37/lib/libomp.so, not clang37. Is there a way to specify that instead? dumbbell: Ok, I will add it.
About `RUN_DEPENDS`, the correct dependency is… | |||||
Not Done Inline ActionsI'm not sure if it would correctly define all required dependencies (both build- and run-time), but you might consider using USES=compiler:openmp. danfe: I'm not sure if it would correctly define all required dependencies (both build- and run-time)… | |||||
Not Done Inline ActionsUSES=compiler:openmp always pulls in GCC. This can't work with darktable because g++ and libstdc++ are used to build the C++ code and it's not compatible with libc++. The trick used by graphics/rawtherapee is at least as ugly and darktable crashes with it anyway. dumbbell: `USES=compiler:openmp` always pulls in GCC. This can't work with darktable because g++ and… | |||||
Not Done Inline Actions
Oh, I see. Reading the above comment (Enable OpenMP support with Clang 3.7) it looks like that we'd probably want to relax compiler:openmp dependency on GCC, but that's out of scope of this patch today. danfe: > `USES=compiler:openmp` always pulls in GCC.
Oh, I see. Reading the above comment (//Enable… | |||||
RUN_DEPENDS+= clang37:${PORTSDIR}/devel/llvm37 | |||||
CPP= ${LOCALBASE}/bin/clang-cpp37 | |||||
CC= ${LOCALBASE}/bin/clang37 | |||||
CXX= ${LOCALBASE}/bin/clang++37 | |||||
Done Inline ActionsCan darktable find the omp library after linking? Also please check if openMP is actually enabled, ImageMagick and inkscape don't by default when using clang 3.7. kwm: Can darktable find the omp library after linking? Also please check if openMP is actually… | |||||
Done Inline ActionsDarktable works fine on my laptop and lld(1) finds libomp.so. Darktable cmake conf properly detects -fopenmp with Clang 3.7 and enables OpenMP support. dumbbell: Darktable works fine on my laptop and lld(1) finds `libomp.so`.
Darktable cmake conf properly… | |||||
LDFLAGS+= -L${LOCALBASE}/llvm37/lib -lomp | |||||
.endif | |||||
Not Done Inline ActionsNot sure this is needed. kwm: Not sure this is needed. | |||||
Not Done Inline ActionsIt didn't work with bsd.port.options.mk: make(1) complained with a syntax error in the .if below, usually meaning a variable is undefined. dumbbell: It didn't work with `bsd.port.options.mk`: make(1) complained with a syntax error in the `.if`… | |||||
.if defined(WITH_DEBUG) | .if defined(WITH_DEBUG) | ||||
CMAKE_BUILD_TYPE= RelWithDebInfo | CMAKE_BUILD_TYPE= RelWithDebInfo | ||||
STRIP= | STRIP= | ||||
.endif | .endif | ||||
post-install-DOCS-off: | post-install-DOCS-off: | ||||
Not Done Inline ActionsI think this target is not needed (when building docless package, DOCSDIR is ignored). danfe: I think this target is not needed (when building docless package, `DOCSDIR` is ignored). | |||||
${RM} ${STAGEDIR}${DOCSDIR}/AUTHORS | ${RM} ${STAGEDIR}${DOCSDIR}/AUTHORS | ||||
${RM} ${STAGEDIR}${DOCSDIR}/LICENSE | ${RM} ${STAGEDIR}${DOCSDIR}/LICENSE | ||||
${RM} ${STAGEDIR}${DOCSDIR}/README | ${RM} ${STAGEDIR}${DOCSDIR}/README | ||||
${RM} ${STAGEDIR}${DOCSDIR}/TRANSLATORS | ${RM} ${STAGEDIR}${DOCSDIR}/TRANSLATORS | ||||
${RM} ${STAGEDIR}${DOCSDIR}/darktablerc.html | ${RM} ${STAGEDIR}${DOCSDIR}/darktablerc.html | ||||
${RMDIR} ${STAGEDIR}${DOCSDIR} | ${RMDIR} ${STAGEDIR}${DOCSDIR} | ||||
.include <bsd.port.mk> | .include <bsd.port.post.mk> |
This does also need a BUILD_DEPEND