@ -5,7 +5,6 @@ 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 "
@ -47,7 +46,7 @@ src_configure() {
# 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= \\ \" " ${ E ROOT} " usr/share/${ PN } \\ \" -DPOVCONFDIR= \\ \" " ${ E ROOT} " etc/${ PN } \\ \"
append-cppflags -DPOVLIBDIR= \\ \" " ${ E PREFIX} " / usr/share/${ PN } \\ \" -DPOVCONFDIR= \\ \" " ${ E PREFIX} " / etc/${ PN } \\ \"
# TODO: Restore OpenEXR if upstream start to support OpenEXR 3/imath
econf \
@ -78,11 +77,11 @@ pkg_preinst() {
# 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/"
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