From b79d5a787a45f287a2c2a231c5a4c0a9e90426f5 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Tue, 2 Jan 2024 01:46:49 +0300 Subject: media-gfx/povray: several fixes - add use and upstream to metadata.xml - EROOT with EAPI=7+ requires explicit slash after - use EPREFIX rather than EROOR for built-in config paths Signed-off-by: Alexander Golubev (cherry picked from commit 66b9980c01415d4fbac29e1ece821fed4bad0860) --- media-gfx/povray/metadata.xml | 6 ++ media-gfx/povray/povray-3.7.0.10-r1.ebuild | 90 +++++++++++++++++++++++++++++ media-gfx/povray/povray-3.7.0.10.ebuild | 91 ------------------------------ 3 files changed, 96 insertions(+), 91 deletions(-) create mode 100644 media-gfx/povray/povray-3.7.0.10-r1.ebuild delete mode 100644 media-gfx/povray/povray-3.7.0.10.ebuild (limited to 'media-gfx/povray') diff --git a/media-gfx/povray/metadata.xml b/media-gfx/povray/metadata.xml index 689e1534..77a212ff 100644 --- a/media-gfx/povray/metadata.xml +++ b/media-gfx/povray/metadata.xml @@ -5,4 +5,10 @@ team-gentoo@trinitydesktop.org Trinity Gentoo ebuilds project + + POV-Ray's mechanism for control of I/O operations + + + POV-Ray/povray + diff --git a/media-gfx/povray/povray-3.7.0.10-r1.ebuild b/media-gfx/povray/povray-3.7.0.10-r1.ebuild new file mode 100644 index 00000000..1b1ad3ed --- /dev/null +++ b/media-gfx/povray/povray-3.7.0.10-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic virtualx + +DESCRIPTION="The Persistence of Vision Raytracer" +HOMEPAGE="https://www.povray.org/" +SRC_URI="https://github.com/POV-Ray/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm64 ~x86" +IUSE="debug +io-restrictions tiff X" + +DEPEND=" + dev-libs/boost:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= + sys-libs/zlib + tiff? ( media-libs/tiff:= ) + X? ( media-libs/libsdl )" +RDEPEND="${DEPEND}" +DEPEND="${DEPEND} + sys-devel/autoconf-archive" + +src_prepare() { + pushd unix &>/dev/null || die + bash -x prebuild.sh || die + popd &>/dev/null || die + + rm -rf libraries || die + + eautoreconf + eapply_user +} + +src_configure() { + # Fixes bug 71255 + if [[ $(get-flag march) == k6-2 ]]; then + filter-flags -fomit-frame-pointer + fi + + # The config files are installed correctly (e.g. povray.conf), + # but the code compiles using incorrect [default] paths + # (based on /usr/local...), so povray will not find the system + # config files without the following fix: + append-cppflags -DPOVLIBDIR=\\\""${EPREFIX}"/usr/share/${PN}\\\" -DPOVCONFDIR=\\\""${EPREFIX}"/etc/${PN}\\\" + + # TODO: Restore OpenEXR if upstream start to support OpenEXR 3/imath + econf \ + COMPILED_BY="Portage (Gentoo $(uname)) on $(hostname -f)" \ + $(use_enable debug) \ + $(use_enable io-restrictions) \ + --without-openexr \ + $(use_with tiff libtiff "${EPREFIX}/usr/$(get_libdir)") \ + $(use_with X libsdl "${EPREFIX}/usr/$(get_libdir)") \ + $(use_with X x "${EPREFIX}/usr/$(get_libdir)") \ + $(usex tiff "" "NON_REDISTRIBUTABLE_BUILD=yes") \ + --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \ + --without-libmkl \ + --disable-pipe \ + --disable-static \ + --disable-strip \ + --disable-optimiz \ + --disable-optimiz-arch +} + +src_test() { + virtx default +} + +pkg_preinst() { + # Copy the old config files if they are in the old location + # but do not yet exist in the new location. + # This way, they can be treated by CONFIG_PROTECT as normal. + local conf_file version_dir + for conf_file in "${ED}"/etc/"${PN}"/*; do + if [ ! -e "${EROOT}/etc/${PN}/${conf_file}" ]; then + for version_dir in $(echo "${EROOT}"/etc/"${PN}"/* | grep "^[0-9]" | sort -rn); do + if [ -e "${EROOT}/etc/${PN}/${version_dir}/${conf_file}" ]; then + mv "${EROOT}/etc/${PN}/${version_dir}/${conf_file}" "${EROOT}/etc/${PN}" || die + elog "Note: ${conf_file} moved from ${EROOT}/etc/povray/${version_dir}/ to ${EROOT}/etc/povray/" + break + fi + done + fi + done +} diff --git a/media-gfx/povray/povray-3.7.0.10.ebuild b/media-gfx/povray/povray-3.7.0.10.ebuild deleted file mode 100644 index c7f8873a..00000000 --- a/media-gfx/povray/povray-3.7.0.10.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools flag-o-matic virtualx - - -DESCRIPTION="The Persistence of Vision Raytracer" -HOMEPAGE="https://www.povray.org/" -SRC_URI="https://github.com/POV-Ray/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="AGPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm64 ~x86" -IUSE="debug +io-restrictions tiff X" - -DEPEND=" - dev-libs/boost:= - media-libs/libjpeg-turbo:= - media-libs/libpng:= - sys-libs/zlib - tiff? ( media-libs/tiff:= ) - X? ( media-libs/libsdl )" -RDEPEND="${DEPEND}" -DEPEND="${DEPEND} - sys-devel/autoconf-archive" - -src_prepare() { - pushd unix &>/dev/null || die - bash -x prebuild.sh || die - popd &>/dev/null || die - - rm -rf libraries || die - - eautoreconf - eapply_user -} - -src_configure() { - # Fixes bug 71255 - if [[ $(get-flag march) == k6-2 ]]; then - filter-flags -fomit-frame-pointer - fi - - # The config files are installed correctly (e.g. povray.conf), - # but the code compiles using incorrect [default] paths - # (based on /usr/local...), so povray will not find the system - # config files without the following fix: - append-cppflags -DPOVLIBDIR=\\\""${EROOT}"usr/share/${PN}\\\" -DPOVCONFDIR=\\\""${EROOT}"etc/${PN}\\\" - - # TODO: Restore OpenEXR if upstream start to support OpenEXR 3/imath - econf \ - COMPILED_BY="Portage (Gentoo $(uname)) on $(hostname -f)" \ - $(use_enable debug) \ - $(use_enable io-restrictions) \ - --without-openexr \ - $(use_with tiff libtiff "${EPREFIX}/usr/$(get_libdir)") \ - $(use_with X libsdl "${EPREFIX}/usr/$(get_libdir)") \ - $(use_with X x "${EPREFIX}/usr/$(get_libdir)") \ - $(usex tiff "" "NON_REDISTRIBUTABLE_BUILD=yes") \ - --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \ - --without-libmkl \ - --disable-pipe \ - --disable-static \ - --disable-strip \ - --disable-optimiz \ - --disable-optimiz-arch -} - -src_test() { - virtx default -} - -pkg_preinst() { - # Copy the old config files if they are in the old location - # but do not yet exist in the new location. - # This way, they can be treated by CONFIG_PROTECT as normal. - local conf_file version_dir - for conf_file in "${ED}"/etc/"${PN}"/*; do - if [ ! -e "${EROOT}etc/${PN}/${conf_file}" ]; then - for version_dir in $(echo "${EROOT}"etc/"${PN}"/* | grep "^[0-9]" | sort -rn); do - if [ -e "${EROOT}etc/${PN}/${version_dir}/${conf_file}" ]; then - mv "${EROOT}etc/${PN}/${version_dir}/${conf_file}" "${EROOT}etc/${PN}" || die - elog "Note: ${conf_file} moved from ${EROOT}etc/povray/${version_dir}/ to ${EROOT}etc/povray/" - break - fi - done - fi - done -} -- cgit v1.2.1