diff options
author | mandree <mandree@FreeBSD.org> | 2017-01-29 02:22:31 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2017-01-29 02:22:31 +0800 |
commit | 71206ce7d2482852139a2240aa19accd86e67aba (patch) | |
tree | 6afb6712d2a2a79878e30d101886fa5215fa32fd /graphics | |
parent | e9caecea5e095c75a3913c3d0272b8895b12787b (diff) | |
download | freebsd-ports-gnome-71206ce7d2482852139a2240aa19accd86e67aba.tar.gz freebsd-ports-gnome-71206ce7d2482852139a2240aa19accd86e67aba.tar.zst freebsd-ports-gnome-71206ce7d2482852139a2240aa19accd86e67aba.zip |
Fix i386 SSE2 crashes (use clang), and clean up a bit.
GCC 5.4 also does not get the stack properly aligned in i386 for SSE2
and causes SIGBUS on startup when trying to access an 8-byte aligned
double[8] array with SIMD instructions.[1] One workaround would be to use
-mstackrealign, the other is to use clang - we don't get OpenMP on i386
anyhow.
Move DISTVERSIONSUFFIX up to appease portlint.
Drop -fexpensive-optimizations, clang does not support it, and gcc 5.4
includes it in -O2 and -O3.
Note that the upstream discourages the use of 32-bit architectures for
rawtherapee.
Reported by: pkg-fallout@ [1]
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/rawtherapee-devel/Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/graphics/rawtherapee-devel/Makefile b/graphics/rawtherapee-devel/Makefile index 52726ad67fb2..ca79fff00699 100644 --- a/graphics/rawtherapee-devel/Makefile +++ b/graphics/rawtherapee-devel/Makefile @@ -3,10 +3,10 @@ PORTNAME= rawtherapee PORTVERSION= 5.0 +DISTVERSIONSUFFIX= -gtk3 PORTREVISION= 0 CATEGORIES= graphics MASTER_SITES= http://rawtherapee.com/shared/source/ -DISTVERSIONSUFFIX= -gtk3 PKGNAMESUFFIX= -devel MAINTAINER= mandree@FreeBSD.org @@ -27,7 +27,7 @@ LIB_DEPENDS= libcanberra-gtk.so:audio/libcanberra \ libsigc-2.0.so:devel/libsigc++20 \ libtiff.so:graphics/tiff -USES= cmake:outsource compiler:gcc-c++11-lib desktop-file-utils dos2unix \ +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 @@ -68,9 +68,8 @@ NATIVE_DESC= Use -march=native for compilation (do not use for generic packages OPENMP_CMAKE_BOOL= OPTION_OMP -OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -msse2 \ - ${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> @@ -92,14 +91,27 @@ 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/"#' \ |