svn commit: r431558 - in branches/2017Q1/graphics/rawtherapee: . files
Matthias Andree
mandree at FreeBSD.org
Sun Jan 15 13:20:26 UTC 2017
Author: mandree
Date: Sun Jan 15 13:20:24 2017
New Revision: 431558
URL: https://svnweb.freebsd.org/changeset/ports/431558
Log:
MFH: r430611 r431493
Upgrade CPU flags to use SSE2 by default on i386.
Reported by: Ingo Weyrich
Further cleanup, 11-RELEASE build fixes.
Prune unused dependencies via -Wl,--as-needed.
Build with as few requirements as works for 10.3-RELEASE and
11.0-RELEASE, i386 and amd64. This should use the base CC on anything
but 10.3-RELEASE amd64, where we use GCC 4.9 for OpenMP support.
Specifically, 11.0-RELEASE compilations do *not* work with GCC 4.9 and
the result fails with SIGBUS with apparent bogus SSE code generation and
misalignment.
Fix sound theme support via libcanberra (change Linux ifdefs to !Apple
ifdefs).
Apply -DPROC_TARGET_NUMBER="1" (i. e. build an executable with generic
tuning) only when building packages and unless -march is in CFLAGS.
USE_GNOME upgraded from gtkmm20 to gtkm24, and add devel/openmp as
requisite on amd64 (rather than implicit clang or gcc libs), bumping
PORTREVISION.
Silence cmake developer warnings, and be sure to export linker flags to
cmake (so it finds -lomp in its configuration phase)
[-DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW]
Cleanups: leverage USES=localbase, and drop/avoid duplicate definitions
and dead code from the Makefile and support for unsupported older
FreeBSD releases.
Based in part on v0.3 patch of...
PR: 215675
Submitted by: jbeich@
Approved by: ports-secteam (junovitch@)
Added:
branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_dcraw.cc
- copied unchanged from r431493, head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc
branches/2017Q1/graphics/rawtherapee/files/patch-rtgui_soundman.cc
- copied unchanged from r431493, head/graphics/rawtherapee/files/patch-rtgui_soundman.cc
Deleted:
branches/2017Q1/graphics/rawtherapee/files/patch-CMakeLists.txt
branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_improcfun.h
branches/2017Q1/graphics/rawtherapee/files/rawtherapee.in
Modified:
branches/2017Q1/graphics/rawtherapee/Makefile
branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_safegtk.cc (contents, props changed)
branches/2017Q1/graphics/rawtherapee/pkg-message
Directory Properties:
branches/2017Q1/ (props changed)
Modified: branches/2017Q1/graphics/rawtherapee/Makefile
==============================================================================
--- branches/2017Q1/graphics/rawtherapee/Makefile Sun Jan 15 13:13:31 2017 (r431557)
+++ branches/2017Q1/graphics/rawtherapee/Makefile Sun Jan 15 13:20:24 2017 (r431558)
@@ -3,7 +3,7 @@
PORTNAME= rawtherapee
PORTVERSION= 4.2
-PORTREVISION= 4
+PORTREVISION= 6
CATEGORIES= graphics
MASTER_SITES= http://rawtherapee.com/shared/source/
@@ -12,39 +12,43 @@ COMMENT= Powerful RAW image processing a
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
-OPTIMIZED_CFLAGS_DESC= Use extra compiler optimizations (requires SSE support)
+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 -msse
-CXXFLAGS+= -O3 \
- -funroll-loops -msse
+.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 \
Copied: branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_dcraw.cc (from r431493, head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_dcraw.cc Sun Jan 15 13:20:24 2017 (r431558, copy of r431493, head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc)
@@ -0,0 +1,12 @@
+--- rtengine/dcraw.cc.orig 2017-01-14 17:35:19 UTC
++++ rtengine/dcraw.cc
+@@ -8726,7 +8726,8 @@ static void decodeFPDeltaRow(Bytef * src
+ dst[col*3 + 2] = src[col + realTileWidth*2];
+ }
+ } else {
+- if (((union { uint32_t x; uint8_t c; }){1}).c) {
++ union X { uint32_t x; uint8_t c; };
++ if (((union X){1}).c) {
+ for (size_t col = 0; col < tileWidth; ++col) {
+ for (size_t byte = 0; byte < bytesps; ++byte)
+ dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)]; // Little endian
Modified: branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_safegtk.cc
==============================================================================
--- branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_safegtk.cc Sun Jan 15 13:13:31 2017 (r431557)
+++ branches/2017Q1/graphics/rawtherapee/files/patch-rtengine_safegtk.cc Sun Jan 15 13:20:24 2017 (r431558)
@@ -1,6 +1,6 @@
---- ./rtengine/safegtk.cc.orig 2012-01-31 05:00:05.000000000 +0400
-+++ ./rtengine/safegtk.cc 2012-03-29 19:31:25.000000000 +0400
-@@ -98,7 +98,7 @@
+--- rtengine/safegtk.cc.orig 2017-01-14 17:35:18 UTC
++++ rtengine/safegtk.cc
+@@ -184,7 +184,7 @@ void safe_build_file_list (Glib::RefPtr<
Glib::RefPtr<Gio::FileEnumerator> dirList;
if (dir) {
SAFE_ENUMERATOR_CODE_START
@@ -9,7 +9,7 @@
SAFE_ENUMERATOR_CODE_END;
}
}
-@@ -113,7 +113,7 @@
+@@ -199,7 +199,7 @@ void safe_build_file_list (Glib::RefPtr<
if (dir) {
if (!extensions) {
SAFE_ENUMERATOR_CODE_START
@@ -18,25 +18,25 @@
SAFE_ENUMERATOR_CODE_END;
}
else {
-@@ -124,7 +124,7 @@
+@@ -210,7 +210,7 @@ void safe_build_file_list (Glib::RefPtr<
SAFE_ENUMERATOR_CODE_START
// convert the current filename to lowercase in a new ustring
- Glib::ustring fname = Glib::ustring(info->get_name()).lowercase();
+ Glib::ustring fname = Glib::ustring(info->get_display_name()).lowercase();
- int pos = fname.find_last_of('.');
- if (pos > -1 && pos < (fname.length()-1)) {
-@@ -135,7 +135,7 @@
+ size_t pos = fname.find_last_of('.');
+ if (pos < (fname.length()-1)) {
+@@ -221,7 +221,7 @@ void safe_build_file_list (Glib::RefPtr<
// look out if it has one of the retained extensions
- for (unsigned int i=0; i<lcExtensions.size(); i++) {
+ for (size_t i=0; i<lcExtensions.size(); i++) {
if (lcFileExt == lcExtensions[i]) {
- names.push_back (Glib::build_filename (directory, info->get_name()));
+ names.push_back (Glib::build_filename (directory, info->get_display_name()));
break;
}
}
-@@ -156,7 +156,7 @@
+@@ -242,7 +242,7 @@ void safe_build_subdir_list (Glib::RefPt
SAFE_ENUMERATOR_CODE_START
if (info->get_file_type() == Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || add_hidden))
Copied: branches/2017Q1/graphics/rawtherapee/files/patch-rtgui_soundman.cc (from r431493, head/graphics/rawtherapee/files/patch-rtgui_soundman.cc)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2017Q1/graphics/rawtherapee/files/patch-rtgui_soundman.cc Sun Jan 15 13:20:24 2017 (r431558, copy of r431493, head/graphics/rawtherapee/files/patch-rtgui_soundman.cc)
@@ -0,0 +1,22 @@
+--- rtgui/soundman.cc.orig 2017-01-14 17:35:19 UTC
++++ rtgui/soundman.cc
+@@ -24,9 +24,7 @@
+ #ifdef WIN32
+ #include <windows.h>
+ #include <mmsystem.h>
+-#endif
+-
+-#ifdef __linux__
++#elif !defined(__APPLE__)
+ #include <canberra-gtk.h>
+ #endif
+
+@@ -65,7 +63,7 @@ void SoundManager::playSoundAsync(const
+ wchar_t *wfilename = (wchar_t*)g_utf8_to_utf16 (sound.c_str(), -1, NULL, NULL, NULL);
+ PlaySoundW(wfilename, NULL, sndParam);
+ g_free( wfilename );
+-#elif defined(__linux__)
++#elif !defined(__APPLE__)
+ ca_context_play(ca_gtk_context_get(), 0, CA_PROP_EVENT_ID, sound.c_str(), CA_PROP_MEDIA_FILENAME, sound.c_str(), NULL);
+ #endif
+ }
Modified: branches/2017Q1/graphics/rawtherapee/pkg-message
==============================================================================
--- branches/2017Q1/graphics/rawtherapee/pkg-message Sun Jan 15 13:13:31 2017 (r431557)
+++ branches/2017Q1/graphics/rawtherapee/pkg-message Sun Jan 15 13:20:24 2017 (r431558)
@@ -10,4 +10,3 @@ remove older cache directories.
Also, after configurations have been moved to the new version's
directory, older $HOME/.config/RawTherapee* directories may be removed.
======================================================================
-
More information about the svn-ports-all
mailing list