Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2017 21:14:23 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432871 - in head/graphics/darktable: . files
Message-ID:  <201701302114.v0ULENqF071531@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Mon Jan 30 21:14:23 2017
New Revision: 432871
URL: https://svnweb.freebsd.org/changeset/ports/432871

Log:
  graphics/darktable: Update to 2.2.2
  
  Use devel/openmp to provide OpenMP runtime instead of the entire LLVM
  (submitted by mandree@). This allows to use LLVM 3.9 at build time,
  without fearing any dependency to multiple LLVM versions at runtime
  (Mesa pulls LLVM 3.7 for instance).
  
  Change `COMPILER_TYPE` to `CHOSEN_COMPILER_TYPE`, (submitted by
  mandree@). This was blocking bug 199098.
  
  Include the following patch from upstream, which fixes a regression
  (suggested by upstream):
  https://github.com/darktable-org/darktable/commit/f7bc2b3338832a42629cdfaa691b5c921df0701c.patch
  
  PR:		216561
  Submitted by:	mandree (CHOSEN_COMPILER_TYPE and devel/openmp dep.)
  Approved by:	bapt (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9363

Added:
  head/graphics/darktable/files/patch-src_develop_imageop__math.c   (contents, props changed)
Modified:
  head/graphics/darktable/Makefile
  head/graphics/darktable/distinfo
  head/graphics/darktable/files/patch-src_CMakeLists.txt

Modified: head/graphics/darktable/Makefile
==============================================================================
--- head/graphics/darktable/Makefile	Mon Jan 30 21:08:47 2017	(r432870)
+++ head/graphics/darktable/Makefile	Mon Jan 30 21:14:23 2017	(r432871)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	darktable
-PORTVERSION=	2.2.1
+PORTVERSION=	2.2.2
 CATEGORIES=	graphics
 MASTER_SITES=	https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION:C/\.rc/rc/}/
 
@@ -95,21 +95,26 @@ WEBP_CMAKE_OFF=		-DUSE_WEBP:BOOL=OFF
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} == amd64 && ${COMPILER_TYPE} == clang
-# Enable OpenMP support with Clang 3.7.
-BUILD_DEPENDS+=	clang37:devel/llvm37
-RUN_DEPENDS+=	clang37:devel/llvm37
-
-CPP=		clang-cpp37
-CC=		clang37
-CXX=		clang++37
+.if ${ARCH} == amd64 && ${CHOSEN_COMPILER_TYPE} == clang
+# Enable OpenMP support with Clang 3.9.
+LLVM_VER=	39
+BUILD_DEPENDS+=	clang${LLVM_VER}:devel/llvm${LLVM_VER}
+
+CPP=		clang-cpp${LLVM_VER}
+CC=		clang${LLVM_VER}
+CXX=		clang++${LLVM_VER}
 
 # FIXME: At least in 3.7.0 and 3.7.1, Clang doesn't find libomp.so
 # itself. Furthermore, there may be a regression in 3.7.1 because we now
-# need to explicitly link to libm.so as well.
-OPENMP_FLAGS=	-L${LOCALBASE}/llvm37/lib -lm -lomp
+# need to explicitly link to libm.so as well. This remains true with
+# Clang 3.9.1.
+OPENMP_FLAGS=	-L${LOCALBASE}/llvm${LLVM_VER}/lib -lm -lomp
 LDFLAGS+=	${OPENMP_FLAGS}
 
+# Depend on devel/openmp instead of the full LLVM at runtime. Required
+# for a consistent libomp experience.
+LIB_DEPENDS+=	libomp.so.0:devel/openmp
+
 # Last but not least, there is a second change or regression in CMake
 # 3.4.x: CMAKE_EXE_LINKER_FLAGS is not passed to TRY_COMPILE by default
 # anymore. The CMP0056 policy must be explicitly set to NEW to ensure

Modified: head/graphics/darktable/distinfo
==============================================================================
--- head/graphics/darktable/distinfo	Mon Jan 30 21:08:47 2017	(r432870)
+++ head/graphics/darktable/distinfo	Mon Jan 30 21:14:23 2017	(r432871)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1483541541
-SHA256 (darktable-2.2.1.tar.xz) = da843190f08e02df19ccbc02b9d1bef6bd242b81499494c7da2cccdc520e24fc
-SIZE (darktable-2.2.1.tar.xz) = 3058236
+TIMESTAMP = 1485537770
+SHA256 (darktable-2.2.2.tar.xz) = 766d7d734e7bd5a33f6a6932a43b15cc88435c64ad9a0b20410ba5b4706941c2
+SIZE (darktable-2.2.2.tar.xz) = 3079424

Modified: head/graphics/darktable/files/patch-src_CMakeLists.txt
==============================================================================
--- head/graphics/darktable/files/patch-src_CMakeLists.txt	Mon Jan 30 21:08:47 2017	(r432870)
+++ head/graphics/darktable/files/patch-src_CMakeLists.txt	Mon Jan 30 21:14:23 2017	(r432871)
@@ -1,6 +1,6 @@
---- src/CMakeLists.txt.orig	2016-12-31 12:42:13 UTC
+--- src/CMakeLists.txt.orig	2017-01-27 11:03:43 UTC
 +++ src/CMakeLists.txt
-@@ -254,7 +254,7 @@ if(USE_OPENJPEG)
+@@ -257,7 +257,7 @@ if(USE_OPENJPEG)
      add_definitions("-DHAVE_OPENJPEG")
      list(APPEND SOURCES "common/imageio_j2k.c")
  
@@ -9,7 +9,7 @@
      list(APPEND LIBS ${OpenJPEG_LIBRARIES})
    endif(OpenJPEG_FOUND)
  endif(USE_OPENJPEG)
-@@ -415,8 +415,9 @@ if(NOT CUSTOM_CFLAGS)
+@@ -418,8 +418,9 @@ if(NOT CUSTOM_CFLAGS)
    #-g MUST be set for ALL builds, or there will be no support for them when bugs happen
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MARCH} ${DT_REQ_INSTRUCTIONS} -g")
    set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2")
@@ -20,7 +20,7 @@
      if(BUILD_SSE2_CODEPATHS)
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
      endif()
-@@ -429,8 +430,9 @@ if(NOT CUSTOM_CFLAGS)
+@@ -432,8 +433,9 @@ if(NOT CUSTOM_CFLAGS)
  
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MARCH} ${DT_REQ_INSTRUCTIONS} -g")
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2")

Added: head/graphics/darktable/files/patch-src_develop_imageop__math.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/darktable/files/patch-src_develop_imageop__math.c	Mon Jan 30 21:14:23 2017	(r432871)
@@ -0,0 +1,18 @@
+--- src/develop/imageop_math.c.orig	2017-01-27 11:03:43 UTC
++++ src/develop/imageop_math.c
+@@ -195,13 +195,13 @@ void dt_iop_clip_and_zoom_mosaic_half_si
+ 
+     const float fy = (y + roi_out->y) * px_footprint;
+     const int miny = CLAMPS((int)floorf(fy - px_footprint), 0, roi_in->height-3);
+-    const int maxy = MIN(roi_in->height-1, (int)ceilf(fy + px_footprint));
++    const int maxy = MIN(roi_in->height-2, (int)ceilf(fy + px_footprint));
+ 
+     float fx = roi_out->x * px_footprint;
+     for(int x = 0; x < roi_out->width; x++, fx += px_footprint, outc++)
+     {
+       const int minx = CLAMPS((int)floorf(fx - px_footprint), 0, roi_in->width-3);
+-      const int maxx = MIN(roi_in->width-1, (int)ceilf(fx + px_footprint));
++      const int maxx = MIN(roi_in->width-2, (int)ceilf(fx + px_footprint));
+ 
+       const int c = FC(y, x, filters);
+       int num = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701302114.v0ULENqF071531>