diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
commit | deba8115d2c2af26df42966b91ef04ff4dd79cde (patch) | |
tree | 9a48f42594e1a9e6b2020d5535a784314434d7a7 /media-gfx/yafaray | |
parent | 38423c67c8a23f6a1bc42038193182e2da3116eb (diff) |
gentoo resync : 14.05.2020
Diffstat (limited to 'media-gfx/yafaray')
7 files changed, 183 insertions, 158 deletions
diff --git a/media-gfx/yafaray/Manifest b/media-gfx/yafaray/Manifest index 35ab9f93b925..2758bc62bdc1 100644 --- a/media-gfx/yafaray/Manifest +++ b/media-gfx/yafaray/Manifest @@ -1,7 +1,5 @@ -AUX yafaray-3.3.0-blender-exporter-paths.patch 536 BLAKE2B 558b85f1ffc6afe3daf58a395b54e31d7affc239a5f5fd79dead9410925e09b14ff907bb2ddf3899b57451e19b11d776cd5c7a0ebf8e590a8c45a337a5100abd SHA512 a7ee5f2112a21da653049f36b50851551f3402a54b4f1644e3e151beb83b827493c2992059a94ad06583e9906bd58f8929a79c6da49ccc9dcba63c9397e69440 -AUX yafaray-3.3.0-respect-cflags.patch 502 BLAKE2B 1df4f8667e8c2577812c690baf17c200912abc12748b41f0ea436add977eb111077b0655ba0cf83b3994d819e96b35893fa8ba4c29c85414b000178497115577 SHA512 ce1ebe180240861d553b54bccc42cbf01a91b5767a5e52e0d1578c8b4be4247a92331069a3946a628fa45d62fd02fd2112c3cd028cf1d1cdc05083d4e1dabd79 -AUX yafaray-3.3.0-strip-debug-mode.patch 767 BLAKE2B 42351950158441bd328e3fd3265e8e9e0f96ee51cf9aadf427c3dda7b57b77716e022801183271dd7206d9ec58b1e239159736894423ca53885c033a2b7e8e0f SHA512 f139d622162d02bfd1d95d38ffa2fcb29fd32cdd51cc14aec986dc481c00aa3c982e537ead2ae8d1972401312aaf9ef8cd92b81fc1fd3ee819f350eadac5d2d2 -DIST yafaray-blender-exporter-3.3.0.tar.gz 377928 BLAKE2B 7876c78ca6228282648909e566803b33304be0082fab48819340845e3927877b9734f7bc7e09702bf7cbf6477c68932637eb766dc98b9e8e4ab42ca99d2a3595 SHA512 70a1a806d97f6f3b43cdb5d6caac6104f0f63720d5920f6a623078e05e6977d065d2fabca4da1644deb97f09176b88347f0278e4bc699c783d807d3f530421d0 -DIST yafaray-core-3.3.0.tar.gz 1135360 BLAKE2B 67f6956a3866bfe0b4167f30a7c2c7f05ee23556e9fff7041ff3937e90011e4c2538b706ae27e02351ae555d0d05531f3eb711257591d85f779683c9c42ac6f7 SHA512 32efb87872485c4a188483ae1172cac2eca2281e7b9ab29f184c047b94f3986d65da199a74c169d0e2fd6af59cf37b7deb69dcfb1cb4763bb1ebca30d46b5b90 -EBUILD yafaray-3.3.0-r2.ebuild 3595 BLAKE2B c003f4f4c09d588962f46b13526035fe8f8c54bef3be260fdf0a66ed47d5111f0068b0fa7dbcaf9d979749946ea3a15c4ef97e39b04a82aa9571a96f6067782d SHA512 6f80e1877fe2ed934819d2cb336e249fa3f81667396b85e99a853ab0ba59e401f36c6eadce72d42d754f851cbbfbb7d9e2b5106229c29c90a07f31a2dea7885f +AUX yafaray-3.4.1-0001-Respect-user-pre-defined-CXXFLAGS.patch 1160 BLAKE2B 2145d744a269b25dad27b78afb52baec14b23c7a90041263b907020145b51482165ccd4dd833c537dadd4ca0074cdd90fefb642d8fb3bb5853d37164f5e3f2eb SHA512 d6b327c887badb28685277487fcb76917206781aa5e1d6ebd0f6832a28d573945bca2cce5a0e856a1b573c103a696cf7b7b10a91bb6135649249e8ca143ff8fc +DIST yafaray-blender-exporter-3.4.1.tar.gz 381253 BLAKE2B b1483c79b14581729f598b92ca504af4a8a73cff54ff2014e8be646eaa2eea7f10074d1dc8c58251d8a987ac6e5ac10d1bc34b80c229f74e6d580bbaa3a3c461 SHA512 1f7baf7bf5953be8b4e004b1509cc23164df0a05e28d33a2301195ea21ad4d4cd6fdd67a0b1af11c1075bab7018e64b38f564be8b647d8513db46feee7d8bf85 +DIST yafaray-core-3.4.1.tar.gz 1136077 BLAKE2B a2ce3945f52315084ee744ff4a6733255018196f0000ca6b1786fbd2ec49ade64cb62e98dfba95dca4dec361f47235d59a8c9bd95ee7d095214fc0afbdcb1ee4 SHA512 a9116273fbc2aaaadbc38a65b1eaaa502070ff06f8a2929e880714a9db57188e65cf319c20a3f96e08146af36a67aea139709a633eb024be65319a64330e6f68 +EBUILD yafaray-3.4.1.ebuild 4381 BLAKE2B ac952d608b2aac41f46e17a080fa1d86f5619f3adf97498a275da52279fea0ee4f6ee4112fc1d66131fdb832693661147e68c7309ef88f8f29a510b81e5b4d09 SHA512 c13a2d24795a64c8d6f2f64bf937f7f0367320efc0d1bb5c34c9fca374d4f2bbe76edccb5814b3fdc0d4e4da1b0b94cf0654ce13c482a38d3e2de0a38d33a250 MISC metadata.xml 1135 BLAKE2B c889a0d76e5dace50fac8a3b2ec5dc8e04b88baba19ff7db575a3790ea92b90c9a17cad5320f85e5de85ccb6db3c37323589118cd9d4cf10d8f9f674a04f6318 SHA512 86c9cb6eeab7ed39b4192a6e1a9caf7b4d75df2c7e9fe8e16ccec5a1b11e9663c828ef62160240c228847ee6b1ffb7d0c8589a4b4f5aba20ba34cba59ae2c3fa diff --git a/media-gfx/yafaray/files/yafaray-3.3.0-blender-exporter-paths.patch b/media-gfx/yafaray/files/yafaray-3.3.0-blender-exporter-paths.patch deleted file mode 100644 index 9bf4f2b91f68..000000000000 --- a/media-gfx/yafaray/files/yafaray-3.3.0-blender-exporter-paths.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/work/Blender-Exporter-3.3.0/__init__.py b/work/Blender-Exporter-3.3.0/__init__.py -index 85dc1c2..70a79e8 100644 ---- a/__init__.py -+++ b/__init__.py -@@ -22,8 +22,8 @@ import sys - import os - import ctypes - --PLUGIN_PATH = os.path.join(__path__[0], 'bin', 'yafaray-plugins') --BIN_PATH = os.path.join(__path__[0], 'bin') -+PLUGIN_PATH = '/usr/lib/yafaray-plugins' -+BIN_PATH = '/usr/bin' - YAF_ID_NAME = "YAFA_V3_RENDER" - - # Version to be automatically populated during the cmake build process, getting the version from git tags diff --git a/media-gfx/yafaray/files/yafaray-3.3.0-respect-cflags.patch b/media-gfx/yafaray/files/yafaray-3.3.0-respect-cflags.patch deleted file mode 100644 index c22ff7e41ea6..000000000000 --- a/media-gfx/yafaray/files/yafaray-3.3.0-respect-cflags.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/work/Core-3.3.0/CMakeLists.txt b/work/Core-3.3.0/CMakeLists.txt -index 75fd2c6..94c2502 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -219,9 +219,6 @@ if(NOT WIN32) - set(YAF_BINDINGS_RUBY_DIR ${YAF_LIB_DIR}) - endif(NOT YAF_BINDINGS_RUBY_DIR) - -- # build flags -- set(CMAKE_CXX_FLAGS "-Wall" CACHE STRING "Default compiler flags" FORCE) -- - if(USER_RELEASE_OPTIMIZATION_FLAGS) - set(YAF_CXX_FLAGS_RELEASE ${USER_RELEASE_OPTIMIZATION_FLAGS}) - else(USER_RELEASE_OPTIMIZATION_FLAGS) diff --git a/media-gfx/yafaray/files/yafaray-3.3.0-strip-debug-mode.patch b/media-gfx/yafaray/files/yafaray-3.3.0-strip-debug-mode.patch deleted file mode 100644 index 3bdb4eeef361..000000000000 --- a/media-gfx/yafaray/files/yafaray-3.3.0-strip-debug-mode.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/work/Core-3.3.0/CMakeLists.txt b/work/Core-3.3.0/CMakeLists.txt -index 75fd2c6..52c6b3d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -17,7 +17,6 @@ option(WITH_YAF_PY_BINDINGS "Enable the YafaRay Python bindings" ON) - option(WITH_YAF_RUBY_BINDINGS "Enable the YafaRay Ruby bindings" OFF) - option(WITH_OSX_ADDON "Enable the use of blender's included python lib on OSX platforms" OFF) - option(WITH_OpenCV "Build OpenCV image processing support" ON) --option(DEBUG_BUILD "Enable debug build mode" OFF) - option(EMBED_FONT_QT "Embed font for QT GUI (usefull for some buggy QT installations)" OFF) - option(FAST_MATH "Enable mathematic approximations to make code faster" ON) - option(FAST_TRIG "Enable trigonometric approximations to make code faster" ON) diff --git a/media-gfx/yafaray/files/yafaray-3.4.1-0001-Respect-user-pre-defined-CXXFLAGS.patch b/media-gfx/yafaray/files/yafaray-3.4.1-0001-Respect-user-pre-defined-CXXFLAGS.patch new file mode 100644 index 000000000000..90b2786c3c54 --- /dev/null +++ b/media-gfx/yafaray/files/yafaray-3.4.1-0001-Respect-user-pre-defined-CXXFLAGS.patch @@ -0,0 +1,35 @@ +From 2f77edf05ed02955dc08821f322a529063dbfa28 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Sun, 19 Apr 2020 15:39:45 +0200 +Subject: [PATCH] Respect user pre-defined CXXFLAGS + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 047456f..6733b7d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,7 +224,7 @@ if(NOT WIN32) + endif(NOT YAF_BINDINGS_RUBY_DIR) + + # build flags +- set(CMAKE_CXX_FLAGS "-Wall" CACHE STRING "Default compiler flags" FORCE) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" CACHE STRING "Default compiler flags" FORCE) + + if(USER_RELEASE_OPTIMIZATION_FLAGS) + set(YAF_CXX_FLAGS_RELEASE ${USER_RELEASE_OPTIMIZATION_FLAGS}) +@@ -263,7 +263,7 @@ else(NOT WIN32) + + # build flags + if(MINGW) +- set(CMAKE_CXX_FLAGS "-Wall" CACHE STRING "Default compiler flags" FORCE) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" CACHE STRING "Default compiler flags" FORCE) + + if(USER_RELEASE_OPTIMIZATION_FLAGS) + set(YAF_CXX_FLAGS_RELEASE ${USER_RELEASE_OPTIMIZATION_FLAGS}) +-- +2.26.1 + diff --git a/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild b/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild deleted file mode 100644 index b1f99de4d347..000000000000 --- a/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) - -inherit cmake flag-o-matic python-single-r1 - -DESCRIPTION="A free open-source montecarlo raytracing engine" -HOMEPAGE="http://www.yafaray.org" -SRC_URI="https://github.com/YafaRay/Core/archive/v${PV}.tar.gz -> ${PN}-core-${PV}.tar.gz - https://github.com/YafaRay/Blender-Exporter/archive/v${PV}.tar.gz -> ${PN}-blender-exporter-${PV}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+blender +fastmath +fasttrig jpeg opencv openexr png +python tiff truetype" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - dev-libs/boost:= - dev-libs/libxml2:2 - sys-libs/zlib - blender? ( media-gfx/blender ) - jpeg? ( virtual/jpeg:0 ) - opencv? ( >=media-libs/opencv-3.1.0:=[openexr?] ) - openexr? ( >=media-libs/openexr-2.2.0:= ) - png? ( media-libs/libpng:0= ) - python? ( ${PYTHON_DEPS} ) - tiff? ( media-libs/tiff:0 ) - truetype? ( media-libs/freetype:2 ) -" -DEPEND="${RDEPEND}" -BDEPEND="dev-lang/swig" - -S="${WORKDIR}/Core-${PV}" - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - append-flags "-pthread" - cmake_src_prepare - - sed -i -e "s/@YAFARAY_BLENDER_EXPORTER_VERSION@/v${PV}/" "${WORKDIR}/Blender-Exporter-${PV}/__init__.py" || die - - eapply "${FILESDIR}/${P}-strip-debug-mode.patch" - eapply "${FILESDIR}/${P}-respect-cflags.patch" - pushd "${WORKDIR}/Blender-Exporter-${PV}" || die - eapply "${FILESDIR}/${P}-blender-exporter-paths.patch" - popd || dir - eapply_user -} - -src_configure() { - local mycmakeargs=( - -DYAF_LIB_DIR=$(get_libdir) - -DWITH_YAF_PY_BINDINGS=$(usex python) - -DYAF_PY_VERSION=${EPYTHON#python} - -DWITH_YAF_RUBY_BINDINGS=OFF - -DBLENDER_ADDON=OFF # addon is a separate package called blender-exporter - -DCMAKE_SKIP_RPATH=ON # NULL DT_RUNPATH security problem - -DFAST_MATH=$(usex fastmath) - -DFAST_TRIG=$(usex fasttrig) - -DWITH_JPEG="$(usex jpeg)" - -DWITH_OpenCV="$(usex opencv)" - -DWITH_OpenEXR="$(usex openexr)" - -DWITH_PNG="$(usex png)" - -DWITH_QT=OFF # qt4 only at the moment - -DWITH_TIFF="$(usex tiff)" - -DWITH_Freetype="$(usex truetype)" - ) - - cmake_src_configure -} - -src_install() { - cmake_src_install - - python_domodule "${BUILD_DIR}/src/bindings/yafaray_v3_interface.py" - python_domodule "${BUILD_DIR}/src/bindings/_yafaray_v3_interface.so" - rm -v "${ED}"/usr/$(get_libdir)/{yafaray_v3_interface.py,_yafaray_v3_interface.so} || die - rm -rv "${ED}"/usr/share/doc/${PN} || die - - if use blender; then - pushd "${WORKDIR}/Blender-Exporter-${PV}" || die - rm README LICENSES INSTALL CHANGELOG .gitignore || die - # grab blender version number for plugin directory - local blender_plugin_dir=$(best_version media-gfx/blender) - blender_plugin_dir=${blender_plugin_dir##*/} # remove category - blender_plugin_dir=${blender_plugin_dir#*-} # remove package name - blender_plugin_dir=${blender_plugin_dir%%-*} # remove revision number if exists - insinto /usr/share/blender/${blender_plugin_dir}/scripts/addons/yafaray_v3 - doins -r . - popd || die - fi -} - -pkg_postinst() { - einfo "To confirm your installation is working as expected, run" - einfo "yafaray-xml with /usr/share/yafaray/tests/test01/test01.xml" - einfo "as an input file, then compare the result to" - einfo "'/usr/share/yafaray/tests/test01/test01 - expected render result.png'" - if use blender; then - elog - elog "To use within Blender, navigate to File -> User Preferences -> Add-ons (tab)" - elog "and enable 'Render: YafaRay v3 Exporter'. This will make YafaRay available" - elog "in the render engines drop-down." - fi -} diff --git a/media-gfx/yafaray/yafaray-3.4.1.ebuild b/media-gfx/yafaray/yafaray-3.4.1.ebuild new file mode 100644 index 000000000000..e583d32d4b7c --- /dev/null +++ b/media-gfx/yafaray/yafaray-3.4.1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_6 ) + +# doesn't build with ninja when qt5 and python USE flags are both enabled +CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake flag-o-matic python-single-r1 + +DESCRIPTION="A free open-source montecarlo raytracing engine" +HOMEPAGE="http://www.yafaray.org" +SRC_URI="https://github.com/YafaRay/Core/archive/v${PV}.tar.gz -> ${PN}-core-${PV}.tar.gz + blender? ( https://github.com/YafaRay/Blender-Exporter/archive/v${PV}.tar.gz -> ${PN}-blender-exporter-${PV}.tar.gz )" + +S="${WORKDIR}/Core-${PV}" + +LICENSE="blender? ( GPL-2+ ) LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="blender +fastmath +fasttrig jpeg opencv openexr png +python qt5 tiff truetype" +RESTRICT="test" + +REQUIRED_USE=" + blender? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +# Note: according to upstream, the blender plugin doesn't work with blender-2.8 (yet). +RDEPEND=" + dev-libs/boost:=[nls] + dev-libs/libxml2:2 + sys-libs/zlib + jpeg? ( virtual/jpeg:0 ) + opencv? ( >=media-libs/opencv-3.1.0:= ) + openexr? ( >=media-libs/openexr-2.2.0:= ) + png? ( media-libs/libpng:0= ) + python? ( + ${PYTHON_DEPS} + blender? ( ~media-gfx/blender-2.79b[${PYTHON_SINGLE_USEDEP}] ) + ) + qt5? ( dev-qt/qtwidgets:5 ) + tiff? ( media-libs/tiff:0 ) + truetype? ( media-libs/freetype:2 ) +" +DEPEND="${RDEPEND}" +BDEPEND="python? ( dev-lang/swig )" + +PATCHES=( + "${FILESDIR}/${P}-0001-Respect-user-pre-defined-CXXFLAGS.patch" +) + +DOCS=( AUTHORS CHANGELOG CODING INSTALL README ) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + append-flags -pthread + append-ldflags -pthread + + cmake_src_prepare + + if use blender; then + # fix PLUGIN_PATH + sed -e "s/PLUGIN_PATH = os.path.join(__path__\[0\], 'bin'/PLUGIN_PATH = os.path.join(__path__\[0\], '"$(get_libdir)"'/" \ + -e "s/@YAFARAY_BLENDER_EXPORTER_VERSION@/v"${PV}"/" \ + -i "${WORKDIR}"/Blender-Exporter-${PV}/__init__.py || die "patching startup file failed" + fi +} + +src_configure() { + local mycmakeargs=( + # enabling BLENDER_ADDON doesn't build anything, but set's some wierd + # installation paths, so keep it off and install the files manually. + -DBLENDER_ADDON=OFF + -DCMAKE_SKIP_RPATH=ON # NULL DT_RUNPATH security problem + -DFAST_MATH=$(usex fastmath) + -DFAST_TRIG=$(usex fasttrig) + -DWITH_Freetype=$(usex truetype) + -DWITH_JPEG=$(usex jpeg) + -DWITH_OpenCV=$(usex opencv) + -DWITH_OpenEXR=$(usex openexr) + -DWITH_PNG=$(usex png) + -DWITH_QT=$(usex qt5) + -DWITH_TIFF=$(usex tiff) + -DWITH_XML_LOADER=ON # internal + -DWITH_YAF_PY_BINDINGS=$(usex python) + -DWITH_YAF_RUBY_BINDINGS=OFF + -DYAF_LIB_DIR=$(get_libdir) + ) + + if use python; then + mycmakeargs+=( -DYAF_PY_VERSION=${EPYTHON#python} ) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use python; then + python_domodule "${BUILD_DIR}/src/bindings/yafaray_v3_interface.py" + mv "${ED}"/usr/$(get_libdir)/_yafaray_v3_interface.so "${ED}"/$(python_get_sitedir)/ || die + rm -v "${ED}"/usr/$(get_libdir)/yafaray_v3_interface.py || die + + if use qt5; then + python_domodule "${BUILD_DIR}/src/bindings/yafqt.py" + mv "${ED}"/usr/$(get_libdir)/_yafqt.so "${ED}"/$(python_get_sitedir)/ || die + rm -v "${ED}"/usr/$(get_libdir)/yafqt.py || die + fi + fi + + rm -rv "${ED}"/usr/share/doc/${PN} || die + + if use blender; then + pushd "${WORKDIR}/Blender-Exporter-${PV}" || die + # grab blender version number for plugin directory + local blender_plugin_dir=$(best_version media-gfx/blender) + blender_plugin_dir=${blender_plugin_dir##*/} # remove category + blender_plugin_dir=${blender_plugin_dir#*-} # remove package name + blender_plugin_dir=${blender_plugin_dir%%-*} # remove revision number if exists + insinto /usr/share/blender/${blender_plugin_dir}/scripts/addons/yafaray_v3 + doins -r . + popd || die + fi +} + +pkg_postinst() { + einfo "To confirm your installation is working as expected, run" + einfo "yafaray-xml with /usr/share/yafaray/tests/test01/test01.xml" + einfo "as an input file, then compare the result to" + einfo "'/usr/share/yafaray/tests/test01/test01 - expected render result.png'" + if use blender; then + elog + elog "To use within Blender, navigate to File -> User Preferences -> Add-ons (tab)" + elog "and enable 'Render: YafaRay v3 Exporter'. This will make YafaRay available" + elog "in the render engines drop-down." + fi +} |