|
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2019 Gentoo Authors |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
|
| 4 |
EAPI=7 |
| 5 |
|
| 6 |
WANT_AUTOMAKE="1.10" |
| 7 |
|
| 8 |
inherit autotools |
| 9 |
|
| 10 |
MY_PN="Pixie" |
| 11 |
S="${WORKDIR}/${MY_PN}" |
| 12 |
|
| 13 |
DESCRIPTION="RenderMan like photorealistic renderer" |
| 14 |
HOMEPAGE="http://www.okanarikan.com/project/2005/05/24/Pixie.html" |
| 15 |
SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-src-${PV}.tgz https://dev.gentoo.org/~dilfridge/distfiles/pixie-2.2.6-gcc6.patch.gz" |
| 16 |
|
| 17 |
LICENSE="GPL-2+" |
| 18 |
IUSE="X static-libs" |
| 19 |
SLOT="0" |
| 20 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
| 21 |
|
| 22 |
RDEPEND="media-libs/libpng |
| 23 |
media-libs/tiff |
| 24 |
media-libs/openexr |
| 25 |
sys-libs/zlib |
| 26 |
virtual/jpeg |
| 27 |
virtual/opengl |
| 28 |
x11-libs/fltk:1[opengl] |
| 29 |
X? ( |
| 30 |
x11-libs/libXext |
| 31 |
x11-libs/libICE |
| 32 |
x11-libs/libSM |
| 33 |
x11-libs/libX11 |
| 34 |
x11-libs/libXau |
| 35 |
x11-libs/libxcb |
| 36 |
x11-libs/libXdmcp |
| 37 |
x11-libs/libXi |
| 38 |
x11-libs/libXmu |
| 39 |
x11-libs/libXt |
| 40 |
)" |
| 41 |
DEPEND="${RDEPEND} |
| 42 |
sys-devel/bison |
| 43 |
sys-devel/flex" |
| 44 |
|
| 45 |
src_prepare() { |
| 46 |
default |
| 47 |
eapply "${FILESDIR}"/${P}-zlib-1.2.5.2.patch |
| 48 |
# FIX: missing @includedir@ |
| 49 |
# https://sf.net/tracker/?func=detail&aid=2923415&group_id=59462&atid=491094 |
| 50 |
eapply "${FILESDIR}"/${P}-autotools.patch |
| 51 |
# bug 594354 |
| 52 |
eapply "${WORKDIR}"/${P}-gcc6.patch |
| 53 |
|
| 54 |
mv configure.{in,ac} || die |
| 55 |
|
| 56 |
eautoreconf |
| 57 |
|
| 58 |
# FIX: removing pre-compiled shaders |
| 59 |
# shaders must be removed before of their compilation or make |
| 60 |
# parallelism can break the regeneration process, with resulting |
| 61 |
# missing shaders. |
| 62 |
rm "${S}"/shaders/*.sdr || die |
| 63 |
|
| 64 |
# FIX: flex does not translate variable name in custom YY_DECL |
| 65 |
sed -i -e '/define YY_DECL/ s/yylval/riblval/' src/ri/rib.l || die |
| 66 |
} |
| 67 |
|
| 68 |
src_configure() { |
| 69 |
# NOTE: the option program-transform-name is used to avoid binary name |
| 70 |
# conflict with package: mail-client/nmh (see #295996) |
| 71 |
econf \ |
| 72 |
$(use_with X x) \ |
| 73 |
$(use_enable static-libs static) \ |
| 74 |
--includedir=/usr/include/pixie \ |
| 75 |
--libdir=/usr/$(get_libdir)/pixie \ |
| 76 |
--with-docdir=/usr/share/doc/${PF}/html \ |
| 77 |
--with-shaderdir=/usr/share/Pixie/shaders \ |
| 78 |
--with-ribdir=/usr/share/Pixie/ribs \ |
| 79 |
--with-texturedir=/usr/share/Pixie/textures \ |
| 80 |
--with-displaysdir=/usr/$(get_libdir)/pixie/displays \ |
| 81 |
--with-modulesdir=/usr/$(get_libdir)/pixie/modules \ |
| 82 |
--enable-openexr-threads \ |
| 83 |
--disable-static-fltk \ |
| 84 |
--mandir=/usr/share/man \ |
| 85 |
--bindir=/usr/bin \ |
| 86 |
--program-transform-name="s/show/pixie-show/" |
| 87 |
} |
| 88 |
|
| 89 |
src_compile() { |
| 90 |
default |
| 91 |
|
| 92 |
# regenerating Pixie shaders - see upstream bug report: |
| 93 |
# https://sf.net/tracker/?func=detail&aid=2923407&group_id=59462&atid=491094 |
| 94 |
einfo "Re-building Pixie Shaders for v${PV} format" |
| 95 |
emake -f "${FILESDIR}/Makefile.shaders" -C "${S}/shaders" |
| 96 |
} |
| 97 |
|
| 98 |
src_install() { |
| 99 |
default |
| 100 |
|
| 101 |
insinto /usr/share/Pixie/textures |
| 102 |
doins "${S}"/textures/* |
| 103 |
|
| 104 |
# remove useless .la files |
| 105 |
find "${D}" -name '*.la' -delete || die "removal of libtool archive files failed" |
| 106 |
} |