diff options
Diffstat (limited to 'graphics/rawtherapee/Makefile')
-rw-r--r-- | graphics/rawtherapee/Makefile | 76 |
1 files changed, 45 insertions, 31 deletions
diff --git a/graphics/rawtherapee/Makefile b/graphics/rawtherapee/Makefile index 01fb2b193d66..41e1bbf2bbe2 100644 --- a/graphics/rawtherapee/Makefile +++ b/graphics/rawtherapee/Makefile @@ -3,7 +3,7 @@ PORTNAME= rawtherapee PORTVERSION= 4.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= graphics MASTER_SITES= http://rawtherapee.com/shared/source/ @@ -12,39 +12,43 @@ COMMENT= Powerful RAW image processing application LICENSE= GPLv3 -LIB_DEPENDS= libgtkmm-2.4.so:x11-toolkits/gtkmm24 \ +LIB_DEPENDS= libcanberra-gtk.so:audio/libcanberra \ + libexpat.so:textproc/expat2 \ + libfftw3.so:math/fftw3 \ + libfftw3f.so:math/fftw3-float \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 \ libiptcdata.so:graphics/libiptcdata \ liblcms2.so:graphics/lcms2 \ libpng.so:graphics/png \ - libtiff.so:graphics/tiff \ libsigc-2.0.so:devel/libsigc++20 \ - libfftw3.so:math/fftw3 \ - libfftw3f.so:math/fftw3-float \ - libcanberra-gtk3.so:audio/libcanberra-gtk3 + libtiff.so:graphics/tiff -USES= cmake:outsource compiler:gcc-c++11-lib desktop-file-utils dos2unix \ - jpeg pkgconfig tar:xz +USES= cmake:outsource desktop-file-utils dos2unix \ + jpeg localbase:ldflags pkgconfig tar:xz DOS2UNIX_REGEX= .*\.(cc|h) -USE_GNOME= gtk20 glib20 +LDFLAGS+= -Wl,--as-needed # fontconfig, freetype, gettext, libX11 +USE_GNOME= gtkmm24 USE_LDCONFIG= yes CFLAGS+= -I${LOCALBASE}/include -fPIC CXXFLAGS+= -I${LOCALBASE}/include -fPIC -LDFLAGS+= -lpthread -L${LOCALBASE}/lib -CONFIGURE_ENV= CFLAGS="${CFLAGS}" \ - LDFLAGS="${LDFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}" +LDFLAGS+= -lpthread CMAKE_ARGS+= -DDOCDIR="${DOCSDIR}" \ -DCREDITSDIR="${DOCSDIR}" \ -DLICENCEDIR="${DOCSDIR}" \ -DDESKTOPDIR="${DESKTOPDIR}" \ -DDATADIR="${DATADIR}" \ - -DCMAKE_C_FLAGS="${CFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}" \ - -DCMAKE_CXX_FLAGS="${CXXFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}" \ - -DCACHE_NAME_SUFFIX="4.1" -SUB_FILES= rawtherapee -SUB_LIST= RTDIR="${RTDIR}" + -DCACHE_NAME_SUFFIX="4.1" \ + -Wno-dev \ + -DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW +# 3.4.x: CMAKE_EXE_LINKER_FLAGS is not passed to TRY_COMPILE by default +# any more. The CMP0056 policy must be explicitly set to NEW to ensure +# linker flags are passed. Else -lomp is not found with clang. +# See: https://cmake.org/cmake/help/v3.4/policy/CMP0056.html + INSTALLS_ICONS= yes -.if defined(PACKAGE_BUILDING) +.if defined(PACKAGE_BUILDING) && empty(CFLAGS:M-march*) CMAKE_ARGS+= -DPROC_TARGET_NUMBER="1" .endif @@ -52,31 +56,41 @@ RTDIR= ${PREFIX}/libdata/${PORTNAME} OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP OPTIONS_DEFAULT= OPTIMIZED_CFLAGS OPENMP -OPENMP_DESC= Enable multicore processing using OpenMP +OPENMP_DESC= Enable multicore processing using OpenMP (amd64) OPTIMIZED_CFLAGS_DESC= Use extra compiler optimizations (requires SSE2 support) OPENMP_CMAKE_BOOL= OPTION_OMP -.include <bsd.port.pre.mk> +OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops \ + ${OPTIMIZED_CFLAGS_CFLAGS_${CHOSEN_COMPILER_TYPE}} +OPTIMIZED_CFLAGS_CFLAGS_gcc= -fexpensive-optimizations -# ------------------------------------------------------------------- +.include <bsd.port.options.mk> -.if ${ARCH} == "amd64" || ${ARCH} == "i386" -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -CFLAGS+= -O3 -fexpensive-optimizations \ - -funroll-loops -msse2 -CXXFLAGS+= -O3 \ - -funroll-loops -msse2 +# ------------------------------------------------------------------- +# + +.if !empty(PORT_OPTIONS:MOPENMP) && ${ARCH} == "amd64" +LIB_DEPENDS+= libomp.so.0:devel/openmp +OPENMP_FLAGS= -lm -lomp +LDFLAGS+= ${OPENMP_FLAGS} +.if ${OSVERSION} < 1100101 +# clang 3.4 doesn't support OpenMP, +# OTOH gcc 4.9 doesn't generate usable code on FreeBSD 11. +USES+= compiler:gcc-c++11-lib +.endif .endif + +.if defined(WITH_DEBUG) +CMAKE_BUILD_TYPE= RelWithDebInfo +STRIP= .endif # ------------------------------------------------------------------- +.include <bsd.port.pre.mk> + post-patch: - @${REINPLACE_CMD} -e 's#<auto_ptr.h>#<memory>#g' \ - ${WRKSRC}/rtgui/darkframe.h \ - ${WRKSRC}/rtgui/flatfield.h \ - ${WRKSRC}/rtgui/icmpanel.h @${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \ ${WRKSRC}/CMakeLists.txt ${RM} ${WRKSRC}/rtengine/dcraw.patch \ |