View | Details | Raw Unified | Return to bug 215675 | Differences between
and this patch

Collapse All | Expand All

(-)graphics/rawtherapee/Makefile (-45 / +27 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	rawtherapee
4
PORTNAME=	rawtherapee
5
PORTVERSION=	4.2
5
PORTVERSION=	4.2
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	graphics
7
CATEGORIES=	graphics
8
MASTER_SITES=	http://rawtherapee.com/shared/source/
8
MASTER_SITES=	http://rawtherapee.com/shared/source/
9
9
Lines 12-83 COMMENT= Powerful RAW image processing application Link Here
12
12
13
LICENSE=	GPLv3
13
LICENSE=	GPLv3
14
14
15
LIB_DEPENDS=	libgtkmm-2.4.so:x11-toolkits/gtkmm24 \
15
LIB_DEPENDS=	libcanberra-gtk.so:audio/libcanberra \
16
		libsigc-2.0.so:devel/libsigc++20 \
17
		liblcms2.so:graphics/lcms2 \
16
		libiptcdata.so:graphics/libiptcdata \
18
		libiptcdata.so:graphics/libiptcdata \
17
		liblcms2.so:graphics/lcms2 \
18
		libpng.so:graphics/png \
19
		libpng.so:graphics/png \
19
		libtiff.so:graphics/tiff \
20
		libtiff.so:graphics/tiff \
20
		libsigc-2.0.so:devel/libsigc++20 \
21
		libfftw3.so:math/fftw3 \
21
		libfftw3.so:math/fftw3 \
22
		libfftw3f.so:math/fftw3-float \
22
		libfftw3f.so:math/fftw3-float \
23
		libcanberra-gtk3.so:audio/libcanberra-gtk3
23
		libexpat.so:textproc/expat2
24
24
25
USES=		cmake:outsource compiler:gcc-c++11-lib desktop-file-utils dos2unix \
25
USES=		cmake:outsource desktop-file-utils dos2unix \
26
		jpeg pkgconfig tar:xz
26
		jpeg localbase:ldflags pkgconfig tar:xz
27
USE_GNOME=	gtkmm24
27
DOS2UNIX_REGEX=	.*\.(cc|h)
28
DOS2UNIX_REGEX=	.*\.(cc|h)
28
USE_GNOME=	gtk20 glib20
29
LDFLAGS+=	-Wl,--as-needed # fontconfig, freetype, gettext, libX11
29
USE_LDCONFIG=	yes
30
CFLAGS+=	-I${LOCALBASE}/include -fPIC
31
CXXFLAGS+=	-I${LOCALBASE}/include -fPIC
32
LDFLAGS+=	-lpthread -L${LOCALBASE}/lib
33
CONFIGURE_ENV=	CFLAGS="${CFLAGS}" \
34
		LDFLAGS="${LDFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}"
35
CMAKE_ARGS+=	-DDOCDIR="${DOCSDIR}" \
30
CMAKE_ARGS+=	-DDOCDIR="${DOCSDIR}" \
36
		-DCREDITSDIR="${DOCSDIR}" \
31
		-DCREDITSDIR="${DOCSDIR}" \
37
		-DLICENCEDIR="${DOCSDIR}" \
32
		-DLICENCEDIR="${DOCSDIR}" \
38
		-DDESKTOPDIR="${DESKTOPDIR}" \
33
		-DDESKTOPDIR="${DESKTOPDIR}" \
39
		-DDATADIR="${DATADIR}" \
34
		-DDATADIR="${DATADIR}" \
40
		-DCMAKE_C_FLAGS="${CFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}" \
41
		-DCMAKE_CXX_FLAGS="${CXXFLAGS:C|-Wl,-rpath=${_GCC_RUNTIME}||:C|-L${_GCC_RUNTIME}||}" \
42
		-DCACHE_NAME_SUFFIX="4.1"
35
		-DCACHE_NAME_SUFFIX="4.1"
43
SUB_FILES=	rawtherapee
44
SUB_LIST=	RTDIR="${RTDIR}"
45
INSTALLS_ICONS=	yes
36
INSTALLS_ICONS=	yes
46
37
47
.if defined(PACKAGE_BUILDING)
38
OPTIONS_DEFINE=		OPENMP OPTIMIZED_CFLAGS
48
CMAKE_ARGS+=	-DPROC_TARGET_NUMBER="1"
39
OPTIONS_DEFAULT=	OPENMP OPTIMIZED_CFLAGS
49
.endif
40
OPTIONS_DEFINE_i386=	SSE SSE2
41
OPTIONS_DEFAULT_i386=	SSE
50
42
51
RTDIR=		${PREFIX}/libdata/${PORTNAME}
43
OPENMP_USES=		compiler:gcc-c++11-lib
44
OPENMP_CMAKE_BOOL=	OPTION_OMP
52
45
53
OPTIONS_DEFINE=		OPTIMIZED_CFLAGS OPENMP
46
OPTIMIZED_CFLAGS_CFLAGS=-O3 -funroll-loops \
54
OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS OPENMP
47
			${OPTIMIZED_CFLAGS_CFLAGS_${CHOSEN_COMPILER_TYPE}}
55
OPENMP_DESC=		Enable multicore processing using OpenMP
48
OPTIMIZED_CFLAGS_CFLAGS_gcc=	-fexpensive-optimizations
56
OPTIMIZED_CFLAGS_DESC=	Use extra compiler optimizations (requires SSE support)
57
49
58
OPENMP_CMAKE_BOOL=	OPTION_OMP
50
SSE_CFLAGS=		-msse
59
51
60
.include <bsd.port.pre.mk>
52
SSE2_DESC=		${SSE_DESC:S/SSE/SSE2/}
53
SSE2_CFLAGS=		-msse2
61
54
62
# -------------------------------------------------------------------
55
.if ! ${CFLAGS:M-march*}
63
56
CMAKE_ARGS+=		${CMAKE_ARGS_${ARCH}}
64
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
57
CMAKE_ARGS_i386=	-DPROC_TARGET_NUMBER="1"
65
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
58
CMAKE_ARGS_amd64=	${CMAKE_ARGS_i386}
66
CFLAGS+=	-O3 -fexpensive-optimizations \
67
		-funroll-loops -msse
68
CXXFLAGS+=	-O3 \
69
		-funroll-loops -msse
70
.endif
59
.endif
71
.endif
72
60
73
# -------------------------------------------------------------------
74
75
post-patch:
61
post-patch:
76
	@${REINPLACE_CMD} -e 's#<auto_ptr.h>#<memory>#g' \
62
	@${REINPLACE_CMD} -e '/DESTINATION/s#share/man#man#' \
77
		${WRKSRC}/rtgui/darkframe.h \
78
		${WRKSRC}/rtgui/flatfield.h \
79
		${WRKSRC}/rtgui/icmpanel.h
80
	@${REINPLACE_CMD} -e 's#DESTINATION "$${CMAKE_INSTALL_PREFIX}/share/man/man1"#DESTINATION "${MANPREFIX}/man/man1/"#' \
81
		${WRKSRC}/CMakeLists.txt
63
		${WRKSRC}/CMakeLists.txt
82
	${RM} ${WRKSRC}/rtengine/dcraw.patch \
64
	${RM} ${WRKSRC}/rtengine/dcraw.patch \
83
		${WRKSRC}/rtengine/dcraw.c
65
		${WRKSRC}/rtengine/dcraw.c
Lines 88-91 post-install: Link Here
88
	${SETENV} HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \
70
	${SETENV} HOME=/dev/null ${STAGEDIR}${PREFIX}/bin/rawtherapee --help 2>&1 \
89
	| ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}"
71
	| ${EGREP} -q "RawTherapee, version ${PKGVERSION:C/_.*//:C/,.*//}"
90
72
91
.include <bsd.port.post.mk>
73
.include <bsd.port.mk>
(-)graphics/rawtherapee/files/patch-CMakeLists.txt (-13 lines)
Lines 1-13 Link Here
1
# This is required so that the RPATH information for libgcc/libgomp is
2
# not stripped during CMake's install phase: -- mandree
3
4
--- ./CMakeLists.txt.orig	2013-06-15 19:16:41.000000000 +0200
5
+++ ./CMakeLists.txt	2013-06-15 19:17:02.000000000 +0200
6
@@ -6,6 +6,7 @@
7
 endif (WIN32)
8
 
9
 PROJECT(RawTherapee)
10
+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
11
 
12
 # the default target is 'Debug'
13
 if (CMAKE_BUILD_TYPE STREQUAL "")
(-)graphics/rawtherapee/files/patch-rtengine_dcraw.cc (+12 lines)
Line 0 Link Here
1
--- rtengine/dcraw.cc.orig	2014-10-24 19:03:26 UTC
2
+++ rtengine/dcraw.cc
3
@@ -8726,7 +8726,8 @@ static void decodeFPDeltaRow(Bytef * src
4
       dst[col*3 + 2] = src[col + realTileWidth*2];
5
     }
6
   } else {
7
-    if (((union { uint32_t x; uint8_t c; }){1}).c) {
8
+    union X { uint32_t x; uint8_t c; };
9
+    if (((union X){1}).c) {
10
 		for (size_t col = 0; col < tileWidth; ++col) {
11
 			for (size_t byte = 0; byte < bytesps; ++byte)
12
 				dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)];  // Little endian
(-)graphics/rawtherapee/files/patch-rtengine_improcfun.h (-14 lines)
Lines 1-14 Link Here
1
--- ./rtengine/improcfun.h.orig	2012-01-31 05:00:05.000000000 +0400
2
+++ ./rtengine/improcfun.h	2012-03-31 11:46:27.000000000 +0400
3
@@ -19,6 +19,11 @@
4
 #ifndef _IMPROCFUN_H_
5
 #define _IMPROCFUN_H_
6
 
7
+#include <sys/param.h>
8
+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
9
+#define log2(x) (log(x) / M_LN2)
10
+#endif
11
+
12
 #include "imagefloat.h"
13
 #include "image16.h"
14
 #include "image8.h"
(-)graphics/rawtherapee/files/patch-rtengine_sleef.c (+13 lines)
Line 0 Link Here
1
rtengine/sleef.c:792: error: integer constant is too large for 'long' type
2
3
--- rtengine/sleef.c.orig	2014-10-24 19:03:26 UTC
4
+++ rtengine/sleef.c
5
@@ -789,7 +789,7 @@ __inline double xsqrt(double d) { // max
6
   }
7
 
8
   // http://en.wikipedia.org/wiki/Fast_inverse_square_root
9
-  double x = longBitsToDouble(0x5fe6ec85e7de30da - (doubleToRawLongBits(d + 1e-320) >> 1));
10
+  double x = longBitsToDouble(0x5fe6ec85e7de30daull - (doubleToRawLongBits(d + 1e-320) >> 1));
11
 
12
   x = x * (1.5 - 0.5 * d * x * x);
13
   x = x * (1.5 - 0.5 * d * x * x);
(-)graphics/rawtherapee/files/patch-rtgui_soundman.cc (+22 lines)
Line 0 Link Here
1
--- rtgui/soundman.cc.orig	2014-10-24 19:03:26 UTC
2
+++ rtgui/soundman.cc
3
@@ -24,9 +24,7 @@
4
 #ifdef WIN32
5
 #include <windows.h>
6
 #include <mmsystem.h>
7
-#endif
8
-
9
-#ifdef __linux__
10
+#elif !defined(__APPLE__)
11
 #include <canberra-gtk.h>
12
 #endif
13
 
14
@@ -65,7 +63,7 @@ void SoundManager::playSoundAsync(const 
15
     wchar_t *wfilename = (wchar_t*)g_utf8_to_utf16 (sound.c_str(), -1, NULL, NULL, NULL);
16
     PlaySoundW(wfilename, NULL, sndParam);
17
     g_free( wfilename );
18
-#elif defined(__linux__)
19
+#elif !defined(__APPLE__)
20
     ca_context_play(ca_gtk_context_get(), 0, CA_PROP_EVENT_ID, sound.c_str(), CA_PROP_MEDIA_FILENAME, sound.c_str(), NULL);
21
 #endif
22
 }
(-)graphics/rawtherapee/files/rawtherapee.in (-8 lines)
Lines 1-8 Link Here
1
#!/bin/csh
2
#
3
# $FreeBSD$
4
5
set RTH = "%%RTDIR%%/rth"
6
set CONFDIR = "%%RTDIR%%"
7
8
exec "${RTH}" ${CONFDIR}

Return to bug 215675