From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B756F138335 for ; Wed, 12 Jun 2019 13:39:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEA1DE08C2; Wed, 12 Jun 2019 13:39:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A0C88E08C2 for ; Wed, 12 Jun 2019 13:39:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ABFF7345F61 for ; Wed, 12 Jun 2019 13:39:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 15032603 for ; Wed, 12 Jun 2019 13:39:35 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1560346341.649fe89d3ad950852bfb145ef01a290a682f39a3.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/yafaray/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/yafaray/yafaray-3.3.0-r2.ebuild X-VCS-Directories: media-gfx/yafaray/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 649fe89d3ad950852bfb145ef01a290a682f39a3 X-VCS-Branch: master Date: Wed, 12 Jun 2019 13:39:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 03411c09-e63a-45d7-be46-abac862dcf6f X-Archives-Hash: 3454ade6faeed1aa9bdcc7390e657d9a commit: 649fe89d3ad950852bfb145ef01a290a682f39a3 Author: Bernd Waibel gmail com> AuthorDate: Fri May 31 19:57:54 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Jun 12 13:32:21 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=649fe89d media-gfx/yafaray: bump to EAPI 7 Also fixes an issue, where some binaries didn't link successfully, due to missing pthread (see https://github.com/YafaRay/Core/issues/113) Closes: https://bugs.gentoo.org/687068 Package-Manager: Portage-2.3.67, Repoman-2.3.13 Signed-off-by: Bernd Waibel gmail.com> Closes: https://github.com/gentoo/gentoo/pull/12144 Signed-off-by: Andreas Sturmlechner gentoo.org> media-gfx/yafaray/yafaray-3.3.0-r2.ebuild | 111 ++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild b/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild new file mode 100644 index 00000000000..c54d1fbb0c7 --- /dev/null +++ b/media-gfx/yafaray/yafaray-3.3.0-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit cmake-utils 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-utils_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-utils_src_configure +} + +src_install() { + cmake-utils_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 +}