summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2020-02-26 02:20:56 +0100
committerAlexey Shvetsov <alexxy@gentoo.org>2020-05-25 22:43:56 +0300
commit8c205ba9c8d44e80a4a009a569913fcc100bb6b8 (patch)
treeea0d7cf0bd4e37bb55810658070974ed7e0c2f00 /media-gfx
parentmedia-gfx/cura: version bump to 4.6.1 (diff)
downloadgentoo-8c205ba9c8d44e80a4a009a569913fcc100bb6b8.tar.gz
gentoo-8c205ba9c8d44e80a4a009a569913fcc100bb6b8.tar.bz2
gentoo-8c205ba9c8d44e80a4a009a569913fcc100bb6b8.zip
media-gfx/tachyon: EAPI 7, custom build
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14777 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/tachyon/files/tachyon-0.99_beta6-r2-ldflags.patch11
-rw-r--r--media-gfx/tachyon/files/tachyon-0.99_beta6-r2-shared.patch179
-rw-r--r--media-gfx/tachyon/tachyon-0.99_beta6-r2.ebuild114
3 files changed, 304 insertions, 0 deletions
diff --git a/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-ldflags.patch b/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-ldflags.patch
new file mode 100644
index 000000000000..220589a8f548
--- /dev/null
+++ b/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -121,7 +121,7 @@ ${MGFLIB} : ../libmgf/Makefile
+ };
+
+ ${ARCHDIR}/tachyon : ${RAYLIB} ${PARSELIB} ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS}
+- ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
++ ${CC} ${CFLAGS} ${LDFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
+ ${STRIP} ${ARCHDIR}/tachyon
+
+ ${ARCHDIR}/animray : ${RAYLIB} ${OBJDIR}/mainanim.o
diff --git a/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-shared.patch b/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-shared.patch
new file mode 100644
index 000000000000..8bd37071a8dc
--- /dev/null
+++ b/media-gfx/tachyon/files/tachyon-0.99_beta6-r2-shared.patch
@@ -0,0 +1,179 @@
+diff -up tachyon/unix/Makefile.shared tachyon/unix/Makefile
+--- a/Makefile.shared 2011-02-07 16:14:38.000000000 +0100
++++ b/Makefile 2011-07-23 20:23:51.000000000 +0200
+@@ -22,7 +22,7 @@ OBJDIR=${ARCHDIR}/libtachyon
+ #
+ # Name of raytracing library file to create
+ #
+-RAYLIB=${ARCHDIR}/libtachyon.a
++RAYLIB=${ARCHDIR}/libtachyon.so
+ RAYLIBDIR=${ARCHDIR}
+
+ #
+@@ -251,124 +251,125 @@ RAYOBJS= ${OBJDIR}/api.o \
+ ${OBJDIR}/tgafile.o \
+ ${OBJDIR}/winbmp.o
+
++VERSION=$(shell grep TACHYON_VERSION_STRING ../src/tachyon.h | cut -d\" -f 2)
++${RAYLIB} : DIRNAME=tachyon-${VERSION}
+ ${RAYLIB} : ${RAYOBJS}
+- rm -f ${RAYLIB}
+- ${AR} ${ARFLAGS} ${RAYLIB} ${RAYOBJS}
+- ${RANLIB} ${RAYLIB}
++ ${CC} ${LDFLAGS} -shared -Wl,-soname,libtachyon.so.${VERSION} -o ${RAYLIBDIR}/libtachyon.so.${VERSION} ${CFLAGS} -fPIC ${RAYOBJS} ${PNGLIB} -lm -lpthread ${JPEGLIB}
++ ln -s libtachyon.so.${VERSION} ${RAYLIBDIR}/libtachyon.so
+
+ ${OBJDIR}/vol.o : ${SRCDIR}/vol.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/vol.c -o ${OBJDIR}/vol.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/vol.c -o ${OBJDIR}/vol.o
+
+ ${OBJDIR}/extvol.o : ${SRCDIR}/extvol.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/extvol.c -o ${OBJDIR}/extvol.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/extvol.c -o ${OBJDIR}/extvol.o
+
+ ${OBJDIR}/winbmp.o : ${SRCDIR}/winbmp.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/winbmp.c -o ${OBJDIR}/winbmp.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/winbmp.c -o ${OBJDIR}/winbmp.o
+
+ ${OBJDIR}/vector.o : ${SRCDIR}/vector.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/vector.c -o ${OBJDIR}/vector.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/vector.c -o ${OBJDIR}/vector.o
+
+ ${OBJDIR}/triangle.o : ${SRCDIR}/triangle.c ${OBJDEPS} ${SRCDIR}/triangle.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/triangle.c -o ${OBJDIR}/triangle.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/triangle.c -o ${OBJDIR}/triangle.o
+
+ ${OBJDIR}/trace.o : ${SRCDIR}/trace.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/trace.c -o ${OBJDIR}/trace.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/trace.c -o ${OBJDIR}/trace.o
+
+ ${OBJDIR}/threads.o : ${SRCDIR}/threads.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/threads.c -o ${OBJDIR}/threads.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/threads.c -o ${OBJDIR}/threads.o
+
+ ${OBJDIR}/tgafile.o : ${SRCDIR}/tgafile.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/tgafile.c -o ${OBJDIR}/tgafile.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/tgafile.c -o ${OBJDIR}/tgafile.o
+
+ ${OBJDIR}/util.o : ${SRCDIR}/util.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/util.c -o ${OBJDIR}/util.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/util.c -o ${OBJDIR}/util.o
+
+ ${OBJDIR}/ui.o : ${SRCDIR}/ui.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ui.c -o ${OBJDIR}/ui.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ui.c -o ${OBJDIR}/ui.o
+
+ ${OBJDIR}/texture.o : ${SRCDIR}/texture.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/texture.c -o ${OBJDIR}/texture.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/texture.c -o ${OBJDIR}/texture.o
+
+ ${OBJDIR}/sphere.o : ${SRCDIR}/sphere.c ${OBJDEPS} ${SRCDIR}/sphere.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/sphere.c -o ${OBJDIR}/sphere.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/sphere.c -o ${OBJDIR}/sphere.o
+
+ ${OBJDIR}/sgirgb.o : ${SRCDIR}/sgirgb.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/sgirgb.c -o ${OBJDIR}/sgirgb.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/sgirgb.c -o ${OBJDIR}/sgirgb.o
+
+ ${OBJDIR}/shade.o : ${SRCDIR}/shade.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/shade.c -o ${OBJDIR}/shade.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/shade.c -o ${OBJDIR}/shade.o
+
+ ${OBJDIR}/ring.o : ${SRCDIR}/ring.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ring.c -o ${OBJDIR}/ring.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ring.c -o ${OBJDIR}/ring.o
+
+ ${OBJDIR}/render.o : ${SRCDIR}/render.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/render.c -o ${OBJDIR}/render.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/render.c -o ${OBJDIR}/render.o
+
+ ${OBJDIR}/quadric.o : ${SRCDIR}/quadric.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/quadric.c -o ${OBJDIR}/quadric.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/quadric.c -o ${OBJDIR}/quadric.o
+
+ ${OBJDIR}/jpeg.o : ${SRCDIR}/jpeg.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/jpeg.c -o ${OBJDIR}/jpeg.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/jpeg.c -o ${OBJDIR}/jpeg.o
+
+ ${OBJDIR}/pngfile.o : ${SRCDIR}/pngfile.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/pngfile.c -o ${OBJDIR}/pngfile.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/pngfile.c -o ${OBJDIR}/pngfile.o
+
+ ${OBJDIR}/ppm.o : ${SRCDIR}/ppm.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ppm.c -o ${OBJDIR}/ppm.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ppm.c -o ${OBJDIR}/ppm.o
+
+ ${OBJDIR}/psd.o : ${SRCDIR}/psd.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/psd.c -o ${OBJDIR}/psd.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/psd.c -o ${OBJDIR}/psd.o
+
+ ${OBJDIR}/plane.o : ${SRCDIR}/plane.c ${OBJDEPS} ${SRCDIR}/plane.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/plane.c -o ${OBJDIR}/plane.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/plane.c -o ${OBJDIR}/plane.o
+
+ ${OBJDIR}/parallel.o : ${SRCDIR}/parallel.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/parallel.c -o ${OBJDIR}/parallel.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/parallel.c -o ${OBJDIR}/parallel.o
+
+ ${OBJDIR}/objbound.o : ${SRCDIR}/objbound.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/objbound.c -o ${OBJDIR}/objbound.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/objbound.c -o ${OBJDIR}/objbound.o
+
+ ${OBJDIR}/light.o : ${SRCDIR}/light.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/light.c -o ${OBJDIR}/light.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/light.c -o ${OBJDIR}/light.o
+
+ ${OBJDIR}/intersect.o : ${SRCDIR}/intersect.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/intersect.c -o ${OBJDIR}/intersect.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/intersect.c -o ${OBJDIR}/intersect.o
+
+ ${OBJDIR}/imageio.o : ${SRCDIR}/imageio.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/imageio.c -o ${OBJDIR}/imageio.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/imageio.c -o ${OBJDIR}/imageio.o
+
+ ${OBJDIR}/imap.o : ${SRCDIR}/imap.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/imap.c -o ${OBJDIR}/imap.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/imap.c -o ${OBJDIR}/imap.o
+
+ ${OBJDIR}/grid.o : ${SRCDIR}/grid.c ${SRCDIR}/grid.h ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/grid.c -o ${OBJDIR}/grid.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/grid.c -o ${OBJDIR}/grid.o
+
+ ${OBJDIR}/global.o : ${SRCDIR}/global.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/global.c -o ${OBJDIR}/global.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/global.c -o ${OBJDIR}/global.o
+
+ ${OBJDIR}/hash.o : ${SRCDIR}/hash.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/hash.c -o ${OBJDIR}/hash.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/hash.c -o ${OBJDIR}/hash.o
+
+ ${OBJDIR}/cylinder.o : ${SRCDIR}/cylinder.c ${OBJDEPS} ${SRCDIR}/cylinder.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/cylinder.c -o ${OBJDIR}/cylinder.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/cylinder.c -o ${OBJDIR}/cylinder.o
+
+ ${OBJDIR}/coordsys.o : ${SRCDIR}/coordsys.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/coordsys.c -o ${OBJDIR}/coordsys.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/coordsys.c -o ${OBJDIR}/coordsys.o
+
+ ${OBJDIR}/camera.o : ${SRCDIR}/camera.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/camera.c -o ${OBJDIR}/camera.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/camera.c -o ${OBJDIR}/camera.o
+
+ ${OBJDIR}/box.o : ${SRCDIR}/box.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/box.c -o ${OBJDIR}/box.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/box.c -o ${OBJDIR}/box.o
+
+ ${OBJDIR}/bndbox.o : ${SRCDIR}/bndbox.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/bndbox.c -o ${OBJDIR}/bndbox.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/bndbox.c -o ${OBJDIR}/bndbox.o
+
+ ${OBJDIR}/apigeom.o : ${SRCDIR}/apigeom.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/apigeom.c -o ${OBJDIR}/apigeom.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/apigeom.c -o ${OBJDIR}/apigeom.o
+
+ ${OBJDIR}/api.o : ${SRCDIR}/api.c ${OBJDEPS} ${SRCDIR}/sphere.h ${SRCDIR}/plane.h ${SRCDIR}/triangle.h ${SRCDIR}/cylinder.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/api.c -o ${OBJDIR}/api.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/api.c -o ${OBJDIR}/api.o
+
+ clean :
+ @echo "Cleaning object files, binaries etc."
diff --git a/media-gfx/tachyon/tachyon-0.99_beta6-r2.ebuild b/media-gfx/tachyon/tachyon-0.99_beta6-r2.ebuild
new file mode 100644
index 000000000000..29bda8a206f2
--- /dev/null
+++ b/media-gfx/tachyon/tachyon-0.99_beta6-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A portable, high performance parallel ray tracing system"
+HOMEPAGE="http://jedi.ks.uiuc.edu/~johns/raytracer/"
+SRC_URI="http://jedi.ks.uiuc.edu/~johns/raytracer/files/${MY_PV}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~x86 ~x64-macos ~x86-macos"
+IUSE="doc examples jpeg mpi +opengl openmp png threads"
+
+PATCHES=( "${FILESDIR}/${PF}-ldflags.patch"
+ "${FILESDIR}/${PF}-shared.patch" )
+
+CDEPEND="
+ jpeg? ( virtual/jpeg:0= )
+ mpi? ( virtual/mpi )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ png? ( media-libs/libpng:0= )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${PN}/unix"
+
+src_prepare() {
+ emakeconf=()
+ use jpeg && \
+ emakeconf+=(
+ USEJPEG=-DUSEJPEG
+ JPEGLIB=-ljpeg
+ )
+
+ use png && \
+ emakeconf+=(
+ USEPNG=-DUSEPNG
+ PNGINC="$($(tc-getPKG_CONFIG) --cflags libpng)"
+ PNGLIB="$($(tc-getPKG_CONFIG) --libs libpng)"
+ )
+
+ if use mpi ; then
+ sed \
+ -e "s:MPIDIR=:MPIDIR=/usr:g" \
+ -e "s:linux-lam:linux-mpi:g" \
+ -i Make-config || die "sed failed"
+ fi
+
+ LIBSLINE='"'
+ CFLAGSLINE='"'
+ use mpi || CCLINE='"CC = $(tc-getCC)"'
+ use mpi && CCLINE='"CC = mpicc"'
+ LIBSLINE+="LIBS = -L. -ltachyon \$(MISCLIB) -lm"
+ CFLAGSLINE+="CFLAGS = -DLinux \$(MISCFLAGS)"
+
+ use threads && CFLAGSLINE+=" \$(THREADSFLAGS) -D_REENTRANT"
+ use threads && LIBSLINE+=" -lpthread"
+ use openmp && CFLAGSLINE+=" -fopenmp -D_REENTRANT"
+ use opengl && CFLAGSLINE+=" -DUSEOPENGL \$(LINUX_GLX_INCS)"
+ use opengl && LIBSLINE+=" \$(LINUX_GLX_LIBS)"
+ use mpi && CFLAGSLINE+=" \$(MPIFLAGS)"
+
+ CFLAGSLINE+=" ${CFLAGS}"
+ CFLAGSLINE+='" \'
+ LIBSLINE+=" ${LDFLAGS}"
+ LIBSLINE+='" \'
+
+ export TACHYON_MAKE_TARGET="gentoo"
+
+ echo "gentoo:" >> Make-arch
+ echo " \$(MAKE) all \\" >> Make-arch
+ echo ' "ARCH = gentoo" \' >> Make-arch
+ echo ' "STRIP = touch" \' >> Make-arch
+ echo " ${LIBSLINE}" >> Make-arch
+ echo " ${CFLAGSLINE}" >> Make-arch
+ echo " ${CCLINE}" >> Make-arch
+
+ default
+}
+
+src_compile() {
+ emake "${TACHYON_MAKE_TARGET}" "${emakeconf[@]}" VERSION="${PV}"
+}
+
+src_install() {
+ cd .. || die
+ dodoc Changes README
+
+ insinto "/usr/include/${PN}"
+ doins src/*.h
+
+ use doc && docinto html && dodoc -r docs/tachyon/.
+
+ cd "compile/${TACHYON_MAKE_TARGET}" || die
+
+ dobin "${PN}"
+ dolib.so lib${PN}.so*
+
+ if use examples; then
+ cd "${S}/../scenes" || die
+ insinto "/usr/share/${PN}/examples"
+ doins *
+ fi
+}