diff options
author | mandree <mandree@FreeBSD.org> | 2017-01-29 06:24:39 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2017-01-29 06:24:39 +0800 |
commit | dc210283b09c6d335bf01c7ad4bdfc5758b5f577 (patch) | |
tree | 7f661f97d99dfad0aa473b6bb1667f00e17b9f60 /graphics/rawtherapee/Makefile | |
parent | e699ef6a30ed7ff8899a07fc413d07ec58d56242 (diff) | |
download | freebsd-ports-gnome-dc210283b09c6d335bf01c7ad4bdfc5758b5f577.tar.gz freebsd-ports-gnome-dc210283b09c6d335bf01c7ad4bdfc5758b5f577.tar.zst freebsd-ports-gnome-dc210283b09c6d335bf01c7ad4bdfc5758b5f577.zip |
Update to new 5.0-gtk3 release (synch with graphics/rawtherapee-devel)
Changes: <http://rawtherapee.com/blog/rawtherapee-5-released>
Due to GCC issues on i386 with stack misalignment for SSE2 instructions,
use the base system clang there, and use GCC 5+ on amd64. Since i386
has no OpenMP support, even clang 3.4 in FreeBSD 10.3 is good enough.
Note that the cache directory suffix, which used to be 4.1, is now
empty, so the cache directory is now ~user/.cache/RawTherapee.
~user/.cache/RawTherapee4.1 should be renamed before the start, or
removed.
Miscellaneous cleanups all over the place.
Diffstat (limited to 'graphics/rawtherapee/Makefile')
-rw-r--r-- | graphics/rawtherapee/Makefile | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/graphics/rawtherapee/Makefile b/graphics/rawtherapee/Makefile index 41e1bbf2bbe2..56ee41a1808b 100644 --- a/graphics/rawtherapee/Makefile +++ b/graphics/rawtherapee/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= rawtherapee -PORTVERSION= 4.2 -PORTREVISION= 6 +PORTVERSION= 5.0 +DISTVERSIONSUFFIX= -gtk3 CATEGORIES= graphics MASTER_SITES= http://rawtherapee.com/shared/source/ @@ -13,6 +13,7 @@ COMMENT= Powerful RAW image processing application LICENSE= GPLv3 LIB_DEPENDS= libcanberra-gtk.so:audio/libcanberra \ + libcanberra-gtk3.so:audio/libcanberra-gtk3 \ libexpat.so:textproc/expat2 \ libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ @@ -28,17 +29,20 @@ USES= cmake:outsource desktop-file-utils dos2unix \ jpeg localbase:ldflags pkgconfig tar:xz DOS2UNIX_REGEX= .*\.(cc|h) LDFLAGS+= -Wl,--as-needed # fontconfig, freetype, gettext, libX11 -USE_GNOME= gtkmm24 +USE_GNOME= gtkmm30 USE_LDCONFIG= yes -CFLAGS+= -I${LOCALBASE}/include -fPIC -CXXFLAGS+= -I${LOCALBASE}/include -fPIC +# The -D_GLIBCXX_USE_C99 works around stoi not being defined +# by default because the GCC headers believe FreeBSD insufficiently C99 +# compliant. +CFLAGS+= -I${LOCALBASE}/include -fPIC -D_GLIBCXX_USE_C99 -Wno-deprecated-declarations -Wno-unused-result LDFLAGS+= -lpthread +CONFIGURE_ENV+= CFLAGS="${CFLAGS}" CMAKE_ARGS+= -DDOCDIR="${DOCSDIR}" \ -DCREDITSDIR="${DOCSDIR}" \ -DLICENCEDIR="${DOCSDIR}" \ -DDESKTOPDIR="${DESKTOPDIR}" \ -DDATADIR="${DATADIR}" \ - -DCACHE_NAME_SUFFIX="4.1" \ + -DCACHE_NAME_SUFFIX="" \ -Wno-dev \ -DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW # 3.4.x: CMAKE_EXE_LINKER_FLAGS is not passed to TRY_COMPILE by default @@ -54,31 +58,30 @@ CMAKE_ARGS+= -DPROC_TARGET_NUMBER="1" RTDIR= ${PREFIX}/libdata/${PORTNAME} -OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP +OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP NATIVE OPTIONS_DEFAULT= OPTIMIZED_CFLAGS OPENMP OPENMP_DESC= Enable multicore processing using OpenMP (amd64) OPTIMIZED_CFLAGS_DESC= Use extra compiler optimizations (requires SSE2 support) +NATIVE_DESC= Use -march=native for compilation (do not use for generic packages!) OPENMP_CMAKE_BOOL= OPTION_OMP -OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops \ - ${OPTIMIZED_CFLAGS_CFLAGS_${CHOSEN_COMPILER_TYPE}} -OPTIMIZED_CFLAGS_CFLAGS_gcc= -fexpensive-optimizations +OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -msse2 +# GCC 5.4 includes -fexpensive-optimizations in -O2 already .include <bsd.port.options.mk> # ------------------------------------------------------------------- # +.if ${PORT_OPTIONS:MNATIVE} +CMAKE_ARGS+= -DPROC_TARGET_NUMBER="2" +.endif + .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) @@ -86,20 +89,36 @@ CMAKE_BUILD_TYPE= RelWithDebInfo STRIP= .endif +.if ${ARCH} == i386 +USES+= compiler:c++11-lib +# FIXME: if we were to use GCC on i386, we'd need to use -mstackrealign +# or similar options, else we get SIGBUS when SSE2 is enabled due to +# improper alignment. Base clang is good enough though, i386 does not +# support OpenMP, and those seeking ultimate performance need to use +# amd64. +.else +USES+= compiler:gcc-c++11-lib +.endif + # ------------------------------------------------------------------- .include <bsd.port.pre.mk> +.if ${CHOSEN_COMPILER_TYPE} == gcc +# Workaround: this needs to be late because Mk/Uses/compiler.mk tramples +# over previously set values with gcc-libc++-configure as of r432539. +# GCC 4.9 doesn't generate usable code on FreeBSD 11.0. +USE_GCC= 5+ +.endif + post-patch: @${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \ ${WRKSRC}/CMakeLists.txt - ${RM} ${WRKSRC}/rtengine/dcraw.patch \ - ${WRKSRC}/rtengine/dcraw.c # paranoia: run rawtherapee --help to be sure it finds all its # shared libraries (this hinges on proper RPATH setting and propagation) post-install: - ${SETENV} HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \ - | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}" + ${SETENV} LANG= LC_ALL=C LANGUAGE= DISPLAY= HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \ + | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}|cannot open display:" .include <bsd.port.post.mk> |