commit:     a51cd5759012d0a05b9c7bd3c1fa61d7c595383e
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 04:12:00 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 04:12:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a51cd575

media-gfx/enblend: add 4.2.0_p20240424

Closes: https://bugs.gentoo.org/878149
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 media-gfx/enblend/Manifest                         |  1 +
 media-gfx/enblend/enblend-4.2.0_p20240424.ebuild   | 92 ++++++++++++++++++++++
 ...blend-4.2.0_p20240424-doc-install-dir-fix.patch | 45 +++++++++++
 3 files changed, 138 insertions(+)

diff --git a/media-gfx/enblend/Manifest b/media-gfx/enblend/Manifest
index 566364e01dce..9ce037e033f6 100644
--- a/media-gfx/enblend/Manifest
+++ b/media-gfx/enblend/Manifest
@@ -1 +1,2 @@
 DIST enblend-4.2.0_p20161007.tar.xz 494060 BLAKE2B 
8842dd70a1400a27170794246cb5c89d60b6798373e3a9d63e88738ad569e1174cb4303ccb5a2bc79846651e982e05f8cb9ac3e09b83ee33958b6ccf043ebda9
 SHA512 
ede037f19a7c3b358f533ecfb235f70824261eaf189d0bdcde6f9cedaa5952be2a6940884e688418b725cb3a67fc1b7d366483a76b7c62326ca857b8efe3a3f3
+DIST enblend-4.2.0_p20240424.tar.xz 505928 BLAKE2B 
49a9cfd2cb332573a1d3882ce6d50513008ee71d7235f69bb7920fc9b71f6c0c6e5e7ae88de4c5879d4cb2ee94d437b1752d6c13117c07ad81a6832b45985684
 SHA512 
1eed2cac0dd6d0ddec41097c4d21ebbad01981e6abbb5fe3db69fc4ef50728ce997faad73dc17255997e8eee9af9d540e38bc2bdf106eb6ca338ef1650680894

diff --git a/media-gfx/enblend/enblend-4.2.0_p20240424.ebuild 
b/media-gfx/enblend/enblend-4.2.0_p20240424.ebuild
new file mode 100644
index 000000000000..b94694b138e2
--- /dev/null
+++ b/media-gfx/enblend/enblend-4.2.0_p20240424.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Image Blending with Multiresolution Splines"
+HOMEPAGE="http://enblend.sourceforge.net/";
+SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.tar.xz";
+
+S=${WORKDIR}/enblend
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="cpu_flags_x86_sse2 debug doc openmp tcmalloc"
+
+REQUIRED_USE="tcmalloc? ( !debug )"
+
+BDEPEND="
+       sys-apps/help2man
+       virtual/pkgconfig
+       doc? (
+               app-text/ghostscript-gpl
+               app-text/texlive
+               dev-lang/perl
+               dev-perl/Readonly
+               dev-tex/hevea
+               gnome-base/librsvg
+               media-gfx/graphviz
+               >=media-gfx/fig2dev-3.2.9-r1
+               sci-visualization/gnuplot[cairo,gd]
+               virtual/imagemagick-tools[tiff]
+       )
+"
+RDEPEND="
+       media-libs/lcms:2
+       media-libs/openexr:=
+       media-libs/tiff:=
+       media-libs/vigra[openexr]
+       sci-libs/gsl:=
+       debug? ( dev-libs/dmalloc[threads] )
+       tcmalloc? ( dev-util/google-perftools )
+"
+DEPEND="${RDEPEND}
+       dev-libs/boost
+       media-libs/libpng:0
+       media-libs/libjpeg-turbo:=
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-doc-install-dir-fix.patch
+       "${FILESDIR}"/${PN}-4.2.0_p20161007-cmake.patch
+       "${FILESDIR}"/${PN}-4.2.0_p20161007-gcc-10.patch
+       "${FILESDIR}"/${PN}-4.2.0_p20161007-doc-scaleable-fonts.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       sed -i -e "s:share/doc/enblend:share/doc/${PF}:" doc/CMakeLists.txt || 
die
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DENABLE_SSE2=$(usex cpu_flags_x86_sse2)
+               -DENABLE_DMALLOC=$(usex debug)
+               -DDOC=$(usex doc)
+               -DENABLE_OPENMP=$(usex openmp)
+               -DENABLE_TCMALLOC=$(usex tcmalloc)
+       )
+       if use doc; then
+               mycmakeargs+=(
+                       -DINSTALL_HTML_DOC=ON
+                       -DINSTALL_PDF_DOC=ON
+               )
+       fi
+
+       cmake_src_configure
+}
+
+src_compile() {
+       # To allow icon resizing with renderers (no way to disable)
+       addpredict /dev/dri
+
+       # To compile fonts in the temp directory
+       export VARTEXFONTS="${T}/fonts"
+
+       # forcing -j1 as every parallel compilation process needs about 1 GB 
RAM.
+       cmake_src_compile -j1
+}

diff --git 
a/media-gfx/enblend/files/enblend-4.2.0_p20240424-doc-install-dir-fix.patch 
b/media-gfx/enblend/files/enblend-4.2.0_p20240424-doc-install-dir-fix.patch
new file mode 100644
index 000000000000..7d3a24f72ce5
--- /dev/null
+++ b/media-gfx/enblend/files/enblend-4.2.0_p20240424-doc-install-dir-fix.patch
@@ -0,0 +1,45 @@
+diff -ruN enblend.orig/CMakeLists.txt enblend/CMakeLists.txt
+--- enblend.orig/CMakeLists.txt        2024-04-24 14:42:26.000000000 +1100
++++ enblend/CMakeLists.txt     2024-04-24 14:52:10.533011199 +1100
+@@ -15,9 +15,6 @@
+ endif()
+ 
+ project(enblend)
+-IF(NOT MSVC)
+-  SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, 
options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE)
+-ENDIF(NOT MSVC)
+ # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
+ # is checked
+ # For now, reuse the hugin modules directory
+@@ -140,7 +137,6 @@
+ ENDIF()
+ 
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+-  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math 
-DNDEBUG -Wall")
+   IF(APPLE AND CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5)
+     ## Add needed Compiler and Linker flags for OSX
+     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flat_namespace -undefined suppress")
+diff -ruN enblend.orig/doc/CMakeLists.txt enblend/doc/CMakeLists.txt
+--- enblend.orig/doc/CMakeLists.txt    2024-04-24 14:42:26.000000000 +1100
++++ enblend/doc/CMakeLists.txt 2024-04-24 14:52:10.533011199 +1100
+@@ -406,7 +406,7 @@
+         "${CMAKE_BINARY_DIR}/doc/enfuse.html"
+         ${ENBLEND_PNGFILES}
+         ${ENFUSE_PNGFILES}
+-    DESTINATION ${DocumentsDirectory}
++    DESTINATION ${DocumentsDirectory}/html
+ )
+ endif()
+ 
+diff -ruN enblend.orig/src/CMakeLists.txt enblend/src/CMakeLists.txt
+--- enblend.orig/src/CMakeLists.txt    2024-04-24 14:42:26.000000000 +1100
++++ enblend/src/CMakeLists.txt 2024-04-24 14:55:27.323912752 +1100
+@@ -141,7 +141,7 @@
+   set_target_properties(enblend PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll")
+   set_target_properties(enfuse PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll")
+ endif()
+-install(TARGETS enblend enfuse DESTINATION bin CONFIGURATIONS Release 
RelWithDebInfo MinSizeRel)
++install(TARGETS enblend enfuse DESTINATION bin)
+ 
+ IF(ENABLE_OPENCL AND NOT ${PREFER_SEPARATE_OPENCL_SOURCE})
+     add_dependencies(enblend cl_sources)

Reply via email to