FreeBSD Bugzilla – Attachment 152923 Details for
Bug 197584
[PATCH] graphics/darktable: Add SSE2 instructions for old machines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch darktable sse2
darktable.diff (text/plain), 2.51 KB, created by
Carlos J Puga Medina
on 2015-02-12 22:43:45 UTC
(
hide
)
Description:
patch darktable sse2
Filename:
MIME Type:
Creator:
Carlos J Puga Medina
Created:
2015-02-12 22:43:45 UTC
Size:
2.51 KB
patch
obsolete
>diff -urN /usr/ports/graphics/darktable.old/Makefile /usr/ports/graphics/darktable/Makefile >--- /usr/ports/graphics/darktable.old/Makefile 2015-02-07 18:22:03.000000000 +0100 >+++ /usr/ports/graphics/darktable/Makefile 2015-02-12 22:27:12.000000000 +0100 >@@ -3,6 +3,7 @@ > > PORTNAME= darktable > PORTVERSION= 1.6.2 >+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-02-12 22:28:46.000000000 +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");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197584
:
152923
|
152924
|
154118