aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2013-11-18 04:07:07 +0800
committermandree <mandree@FreeBSD.org>2013-11-18 04:07:07 +0800
commit37a74a620037d700ee6dd8752c4ef46a4bd44db7 (patch)
treeb8736fa533fd3fc8289b57f2539bc0852552a691
parent8288b49a89d5e1702034b847d45e08f514cbcc85 (diff)
downloadfreebsd-ports-gnome-37a74a620037d700ee6dd8752c4ef46a4bd44db7.tar.gz
freebsd-ports-gnome-37a74a620037d700ee6dd8752c4ef46a4bd44db7.tar.zst
freebsd-ports-gnome-37a74a620037d700ee6dd8752c4ef46a4bd44db7.zip
Miscellaneous fixes.
- Add desktop-file-utils to the USES list, bumping PORTREVISION. - Force USE_GCC only on OSVERSION < 1000024, to avoid running into a libc++/libstdc++ mismatch in glibmm-2.4 on FreeBSD 10 (which caused linker troubles in the Glib:: namespace due to libc++-based different mangling - glibmm is compiled to use libc++ on 10-STABLE, so we cannot USE_GCC there). - Force disable OpenMP option on non-GCC systems, because clang does not yet support it. - In order to be able to use clang, force ipsharpen.cc to be compiled with -O1 only because -O2 or higher optimization levels lead to excessive compile times, so long that I never waited for the compile to complete (over 10 minutes on a Phenom II at 2.5 GHz). - Quench unused-command-line-arguments warnings on clang. This should fix the compile on 10-STABLE and HEAD. Whether the software actually works I cannot currently test due to lack of a full desktop install of 10-STABLE.
-rw-r--r--graphics/rawtherapee/Makefile44
1 files changed, 33 insertions, 11 deletions
diff --git a/graphics/rawtherapee/Makefile b/graphics/rawtherapee/Makefile
index 8ce0b4420de9..701012c45063 100644
--- a/graphics/rawtherapee/Makefile
+++ b/graphics/rawtherapee/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rawtherapee
PORTVERSION= 4.0.11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= GOOGLE_CODE
@@ -23,12 +23,10 @@ LIB_DEPENDS= libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24 \
libfftw3f.so:${PORTSDIR}/math/fftw3-float \
libcanberra-gtk3.so:${PORTSDIR}/audio/libcanberra-gtk3
-USES= cmake:outsource pkgconfig
+USES= cmake:outsource pkgconfig compiler:features desktop-file-utils
USE_XZ= yes
USE_GNOME= gtk20 glib20
USE_LDCONFIG= yes
-# base GCC and clang in 9.1-RELEASE are insufficient:
-USE_GCC= yes
CFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS}
CXXFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
@@ -47,9 +45,17 @@ INSTALLS_ICONS= yes
RTDIR= ${PREFIX}/libdata/${PORTNAME}
-OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS OPENMP
-OPENMP_DESC= Enable multicore processing using OpenMP
+OPENMP_DESC= Enable multicore processing using OpenMP
+
+.include <bsd.port.options.mk>
+
+.if ${OSVERSION} < 1000024
+USE_GCC= yes
+.endif
+
+.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's#<auto_ptr.h>#<memory>#g' \
@@ -58,13 +64,28 @@ post-patch:
@${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \
${WRKSRC}/CMakeLists.txt
+.if ${COMPILER_TYPE} != gcc
+pre-build:
+ # must compile ipsharpen.cc with lower optimization else the compilation time is excessive
+ # this is clang-specific and does not affect GCC.
+ ${REINPLACE_CMD} -e 's,-o CMakeFiles/rtengine.dir/ipsharpen.cc.o,-O1 &,' \
+ ${CONFIGURE_WRKSRC}/rtengine/CMakeFiles/rtengine.dir/build.make
+.if ${PORT_OPTIONS:MOPENMP}
+ @${ECHO_CMD} "WARNING: ignoring OpenMP option, not supported on clang." ; sleep 5
+.endif
+.endif
+
+.if ${COMPILER_TYPE} == clang
+CFLAGS+= -Qunused-arguments
+CXXFLAGS+= -Qunused-arguments
+.endif
+
# 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/,.*//}"
-.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
@@ -75,10 +96,11 @@ CXXFLAGS+= -O3 -ffast-math -fexpensive-optimizations \
.endif
.endif
-.if ${PORT_OPTIONS:MOPENMP}
-CMAKE_ARGS+= -DOPTION_OMP:BOOL=ON
-.else
-CMAKE_ARGS+= -DOPTION_OMP:BOOL=OFF
+_OpenMP_args= -DOPTION_OMP:BOOL=OFF
+.if ${PORT_OPTIONS:MOPENMP} && ${COMPILER_TYPE} == gcc
+_OpenMP_args= -DOPTION_OMP:BOOL=ON
.endif
+CMAKE_ARGS+= ${_OpenMP_args}
+
.include <bsd.port.post.mk>