1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

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.
This commit is contained in:
Matthias Andree 2013-11-17 20:07:07 +00:00
parent f0d6dd3c5f
commit abc21077f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=334119

View File

@ -3,7 +3,7 @@
PORTNAME= rawtherapee PORTNAME= rawtherapee
PORTVERSION= 4.0.11 PORTVERSION= 4.0.11
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= graphics CATEGORIES= graphics
MASTER_SITES= GOOGLE_CODE MASTER_SITES= GOOGLE_CODE
@ -23,12 +23,10 @@ LIB_DEPENDS= libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24 \
libfftw3f.so:${PORTSDIR}/math/fftw3-float \ libfftw3f.so:${PORTSDIR}/math/fftw3-float \
libcanberra-gtk3.so:${PORTSDIR}/audio/libcanberra-gtk3 libcanberra-gtk3.so:${PORTSDIR}/audio/libcanberra-gtk3
USES= cmake:outsource pkgconfig USES= cmake:outsource pkgconfig compiler:features desktop-file-utils
USE_XZ= yes USE_XZ= yes
USE_GNOME= gtk20 glib20 USE_GNOME= gtk20 glib20
USE_LDCONFIG= yes USE_LDCONFIG= yes
# base GCC and clang in 9.1-RELEASE are insufficient:
USE_GCC= yes
CFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS} CFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS}
CXXFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS} CXXFLAGS+= -I${LOCALBASE}/include -fPIC ${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
@ -47,9 +45,17 @@ INSTALLS_ICONS= yes
RTDIR= ${PREFIX}/libdata/${PORTNAME} RTDIR= ${PREFIX}/libdata/${PORTNAME}
OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPENMP
OPTIONS_DEFAULT= 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: post-patch:
@${REINPLACE_CMD} -e 's#<auto_ptr.h>#<memory>#g' \ @${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/"#' \ @${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \
${WRKSRC}/CMakeLists.txt ${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 # paranoia: run rawtherapee --help to be sure it finds all its
# shared libraries (this hinges on proper RPATH setting and propagation) # shared libraries (this hinges on proper RPATH setting and propagation)
post-install: post-install:
${SETENV} HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \ ${SETENV} HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \
| ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}" | ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}"
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "i386" .if ${ARCH} == "amd64" || ${ARCH} == "i386"
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
@ -75,10 +96,11 @@ CXXFLAGS+= -O3 -ffast-math -fexpensive-optimizations \
.endif .endif
.endif .endif
.if ${PORT_OPTIONS:MOPENMP} _OpenMP_args= -DOPTION_OMP:BOOL=OFF
CMAKE_ARGS+= -DOPTION_OMP:BOOL=ON .if ${PORT_OPTIONS:MOPENMP} && ${COMPILER_TYPE} == gcc
.else _OpenMP_args= -DOPTION_OMP:BOOL=ON
CMAKE_ARGS+= -DOPTION_OMP:BOOL=OFF
.endif .endif
CMAKE_ARGS+= ${_OpenMP_args}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>