From owner-svn-ports-all@freebsd.org Sat Jan 14 19:39:02 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7826CCAFEE1; Sat, 14 Jan 2017 19:39:02 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C151EA7; Sat, 14 Jan 2017 19:39:02 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EJd152026833; Sat, 14 Jan 2017 19:39:01 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EJd04o026828; Sat, 14 Jan 2017 19:39:00 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <201701141939.v0EJd04o026828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sat, 14 Jan 2017 19:39:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431493 - in head/graphics/rawtherapee: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 19:39:02 -0000 Author: mandree Date: Sat Jan 14 19:39:00 2017 New Revision: 431493 URL: https://svnweb.freebsd.org/changeset/ports/431493 Log: 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@ MFH: 2017Q1 Added: head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc (contents, props changed) head/graphics/rawtherapee/files/patch-rtgui_soundman.cc (contents, props changed) Deleted: head/graphics/rawtherapee/files/patch-CMakeLists.txt head/graphics/rawtherapee/files/patch-rtengine_improcfun.h head/graphics/rawtherapee/files/rawtherapee.in Modified: head/graphics/rawtherapee/Makefile head/graphics/rawtherapee/files/patch-rtengine_safegtk.cc (contents, props changed) head/graphics/rawtherapee/pkg-message Modified: head/graphics/rawtherapee/Makefile ============================================================================== --- head/graphics/rawtherapee/Makefile Sat Jan 14 19:36:59 2017 (r431492) +++ head/graphics/rawtherapee/Makefile Sat Jan 14 19:39:00 2017 (r431493) @@ -3,7 +3,7 @@ PORTNAME= rawtherapee PORTVERSION= 4.2 -PORTREVISION= 5 +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 +OPENMP_DESC= Enable multicore processing using OpenMP (amd64) OPTIMIZED_CFLAGS_DESC= Use extra compiler optimizations (requires SSE2 support) OPENMP_CMAKE_BOOL= OPTION_OMP -.include +OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops \ + ${OPTIMIZED_CFLAGS_CFLAGS_${CHOSEN_COMPILER_TYPE}} +OPTIMIZED_CFLAGS_CFLAGS_gcc= -fexpensive-optimizations + +.include # ------------------------------------------------------------------- +# -.if ${ARCH} == "amd64" || ${ARCH} == "i386" -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -CFLAGS+= -O3 -fexpensive-optimizations \ - -funroll-loops -msse2 -CXXFLAGS+= -O3 \ - -funroll-loops -msse2 +.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 + post-patch: - @${REINPLACE_CMD} -e 's###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 \ Added: head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/rawtherapee/files/patch-rtengine_dcraw.cc Sat Jan 14 19:39:00 2017 (r431493) @@ -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: head/graphics/rawtherapee/files/patch-rtengine_safegtk.cc ============================================================================== --- head/graphics/rawtherapee/files/patch-rtengine_safegtk.cc Sat Jan 14 19:36:59 2017 (r431492) +++ head/graphics/rawtherapee/files/patch-rtengine_safegtk.cc Sat Jan 14 19:39:00 2017 (r431493) @@ -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 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; iget_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)) Added: head/graphics/rawtherapee/files/patch-rtgui_soundman.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/rawtherapee/files/patch-rtgui_soundman.cc Sat Jan 14 19:39:00 2017 (r431493) @@ -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 + #include +-#endif +- +-#ifdef __linux__ ++#elif !defined(__APPLE__) + #include + #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: head/graphics/rawtherapee/pkg-message ============================================================================== --- head/graphics/rawtherapee/pkg-message Sat Jan 14 19:36:59 2017 (r431492) +++ head/graphics/rawtherapee/pkg-message Sat Jan 14 19:39:00 2017 (r431493) @@ -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. ====================================================================== -