diff -urN /usr/ports/graphics/darktable.old/Makefile /usr/ports/graphics/darktable/Makefile --- /usr/ports/graphics/darktable.old/Makefile 2015-03-09 10:02:27.000000000 +0100 +++ /usr/ports/graphics/darktable/Makefile 2015-03-10 01:06:02.317578000 +0100 @@ -3,6 +3,7 @@ PORTNAME= darktable PORTVERSION= 1.6.3 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION}/ @@ -103,6 +104,10 @@ STRIP= .endif +.if ! ${MACHINE_CPU:Msse2} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sse2 +.endif + .if ! ${PORT_OPTIONS:MDOCS} post-install: ${RM} ${STAGEDIR}${DOCSDIR}/AUTHORS diff -urN /usr/ports/graphics/darktable.old/files/extra-patch-sse2 /usr/ports/graphics/darktable/files/extra-patch-sse2 --- /usr/ports/graphics/darktable.old/files/extra-patch-sse2 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/graphics/darktable/files/extra-patch-sse2 2015-03-10 00:23:42.225237000 +0100 @@ -0,0 +1,38 @@ +--- ./src/CMakeLists.txt.orig 2015-02-12 21:57:26.000000000 +0100 ++++ ./src/CMakeLists.txt 2015-02-12 21:58:18.000000000 +0100 +@@ -385,7 +385,7 @@ + + if(NOT CUSTOM_CFLAGS) + #we MUST always specify our requred instruction set, native might not detect it +- set(DT_REQ_INSTRUCTIONS "-msse3") ++ set(DT_REQ_INSTRUCTIONS "-msse2") + + if(NOT BINARY_PACKAGE_BUILD AND (NOT APPLE OR CMAKE_C_COMPILER_ID STREQUAL "Clang")) + MESSAGE("-- Checking for -march=native support") +--- ./src/common/darktable.c.orig 2015-02-12 22:00:14.000000000 +0100 ++++ ./src/common/darktable.c 2015-02-12 22:01:30.000000000 +0100 +@@ -397,19 +397,19 @@ + #define __has_builtin(x) false + #endif + +-#ifndef __SSE3__ ++#ifndef __SSE2__ + #error "Unfortunately we depend on SSE3 instructions at this time." + #error "Please contribute a backport patch (or buy a newer processor)." + #else +- int sse3_supported = 0; ++ int sse2_supported = 0; + + #if(__GNUC_PREREQ(4, 8) || __has_builtin(__builtin_cpu_supports)) + // NOTE: _may_i_use_cpu_feature() looks better, but only avaliable in ICC +- sse3_supported = __builtin_cpu_supports("sse3"); ++ sse2_supported = __builtin_cpu_supports("sse2"); + #else +- sse3_supported = dt_detect_cpu_features() & CPU_FLAG_SSE3; ++ sse2_supported = dt_detect_cpu_features() & CPU_FLAG_SSE2; + #endif +- if(!sse3_supported) ++ if(!sse2_supported) + { + fprintf(stderr, "[dt_init] unfortunately we depend on SSE3 instructions at this time.\n"); + fprintf(stderr, "[dt_init] please contribute a backport patch (or buy a newer processor).\n");