rpms/tachyon/devel tachyon-shared.patch, NONE, 1.1 tachyon.spec, 1.14, 1.15

Dominik Mierzejewski rathann at fedoraproject.org
Sat Dec 26 14:25:14 UTC 2009


Author: rathann

Update of /cvs/pkgs/rpms/tachyon/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17555

Modified Files:
	tachyon.spec 
Added Files:
	tachyon-shared.patch 
Log Message:
* Sat Dec 26 2009 Dominik 'Rathann' Mierzejewski <rpm at greysector.net> 0.98.7-2
- drop LAM support
- add shared library (based on Debian patch)
- simplify some specfile constructs
- improve descriptions


tachyon-shared.patch:
 Makefile |   85 +++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 43 insertions(+), 42 deletions(-)

--- NEW FILE tachyon-shared.patch ---
diff -up tachyon/unix/Makefile.shared tachyon/unix/Makefile
--- tachyon/unix/Makefile.shared	2009-04-23 17:11:55.000000000 +0200
+++ tachyon/unix/Makefile	2009-12-26 14:48:12.000000000 +0100
@@ -22,7 +22,7 @@ OBJDIR=${ARCHDIR}/libtachyon
 #
 # Name of raytracing library file to create
 #
-RAYLIB=${ARCHDIR}/libtachyon.a
+RAYLIB=${ARCHDIR}/libtachyon.so
 RAYLIBDIR=${ARCHDIR}
 
 #
@@ -254,124 +254,125 @@ RAYOBJS= ${OBJDIR}/api.o \
 	${OBJDIR}/tgafile.o \
 	${OBJDIR}/winbmp.o
 
+${RAYLIB} : VERSION=$(shell grep TACHYON_VERSION_STRING ../src/rtcommon.h | cut -d\" -f 2)
+${RAYLIB} : DIRNAME=tachyon-${VERSION}
 ${RAYLIB} : ${RAYOBJS}
-	rm -f ${RAYLIB}
-	${AR} ${ARFLAGS} ${RAYLIB} ${RAYOBJS}
-	${RANLIB} ${RAYLIB}
+	${CC} -shared -Wl,-soname,lib${DIRNAME}.so -o ${RAYLIBDIR}/lib${DIRNAME}.so ${CFLAGS} -fPIC -lpng -lm -lpthread ${RAYOBJS}
+	ln -s lib${DIRNAME}.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."


Index: tachyon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tachyon/devel/tachyon.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- tachyon.spec	21 Sep 2009 00:33:59 -0000	1.14
+++ tachyon.spec	26 Dec 2009 14:25:13 -0000	1.15
@@ -1,43 +1,47 @@
-%ifarch %{ix86} alpha ppc sparc
-%define target linux
-%endif
-%ifarch ppc64 sparc64 x86_64
+%ifarch alpha ppc64 sparc64 x86_64
 %define target linux-64
+%else
+%define target linux
 %endif
 
 %define variants thr thr-ogl
-%define mpi_variants lam lam-ogl
 
 Summary: Parallel / Multiprocessor Ray Tracing System
 Name: tachyon
 Version: 0.98.7
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://jedi.ks.uiuc.edu/~johns/raytracer/
 Group: Applications/Engineering
 Source0: http://jedi.ks.uiuc.edu/~johns/raytracer/files/%{version}/%{name}-%{version}.tar.gz
 # taken from Debian package
 Source1: %{name}.1
 Patch0: %{name}-rpm.patch
+Patch1: %{name}-shared.patch
 License: BSD with advertising
 BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
-BuildRequires: environment-modules
 BuildRequires: libGLU-devel
 BuildRequires: libpng-devel
 BuildRequires: libjpeg-devel
-BuildRequires: lam-devel
 BuildRequires: latex2html
 BuildRequires: %{_bindir}/dvips
 BuildRequires: %{_bindir}/latex
 BuildRequires: %{_bindir}/pdflatex
 
 %description
-A portable, high performance parallel ray tracing system supporting MPI
-and multithreaded implementations.  Tachyon is built as a C callable
+A portable, high performance parallel ray tracing system with
+multithreaded implementation.
+
+%package libs
+Summary: Parallel / Multiprocessor Ray Tracing System library
+Group: System Environment/Libraries
+
+%description libs
+A portable, high performance parallel ray tracing system with
+multithreaded implementation.  Tachyon is built as a C callable
 library, which can be used with the included demo programs or within
-your own application.  The distribution also includes a simple scene
-file parser front-end which reads a few different formats.
+your own application.
 
-This package contains pthread build.
+This package contains the shared library.
 
 %package gl
 Summary: Parallel / Multiprocessor Ray Tracing System with OpenGL display
@@ -45,41 +49,19 @@ Group: Applications/Engineering
 Provides: %{name} = %{version}-%{release}
 
 %description gl
-A portable, high performance parallel ray tracing system supporting MPI
-and multithreaded implementations.  Tachyon is built as a C callable
-library, which can be used with the included demo programs or within
-your own application.  The distribution also includes a simple scene
-file parser front-end which reads a few different formats.
-
-This package contains pthread build with OpenGL display.
-
-%package lam
-Summary: Parallel / Multiprocessor Ray Tracing System
-Group: Applications/Engineering
-Provides: %{name} = %{version}-%{release}
+A portable, high performance parallel ray tracing system with
+multithreaded implementation.
 
-%description lam
-A portable, high performance parallel ray tracing system supporting MPI
-and multithreaded implementations.  Tachyon is built as a C callable
-library, which can be used with the included demo programs or within
-your own application.  The distribution also includes a simple scene
-file parser front-end which reads a few different formats.
-
-This package contains LAM build.
-
-%package lam-gl
-Summary: Parallel / Multiprocessor Ray Tracing System with OpenGL display
-Group: Applications/Engineering
-Provides: %{name} = %{version}-%{release}
+This package contains OpenGL-enabled build.
 
-%description lam-gl
-A portable, high performance parallel ray tracing system supporting MPI
-and multithreaded implementations.  Tachyon is built as a C callable
-library, which can be used with the included demo programs or within
-your own application.  The distribution also includes a simple scene
-file parser front-end which reads a few different formats.
+%package devel
+Summary: Development files for tachyon
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
 
-This package contains LAM build with OpenGL display.
+%description devel
+This package contains development headers and libraries for developing
+with tachyon.
 
 %package docs
 Summary: Documentation and example scenes for tachyon
@@ -93,6 +75,7 @@ with tachyon.
 %prep
 %setup -q -n %{name}
 %patch0 -p1 -b .r
+%patch1 -p1 -b .shared
 find . -name CVS | xargs %{__rm} -r
 # executable sources
 chmod 644 src/hash.{c,h}
@@ -106,11 +89,6 @@ pushd unix
 for variant in %{variants} ; do
   %{__make} %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS" %{target}-$variant
 done
-source /etc/profile.d/modules.sh
-module load lam-%{_arch}
-for variant in %{mpi_variants} ; do
-  %{__make} %{?_smp_mflags} OPTFLAGS="$CFLAGS $RPM_OPT_FLAGS" %{target}-$variant
-done
 popd
 
 pushd docs
@@ -119,38 +97,41 @@ popd
 
 %install
 %{__rm} -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/tachyon,%{_mandir}/man1}
-for variant in %{variants} %{mpi_variants} ; do
+mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_libdir},{%{_datadir},%{_includedir}}/tachyon,%{_mandir}/man1}
+for variant in %{variants} ; do
   install -pm755 compile/%{target}-$variant/tachyon $RPM_BUILD_ROOT%{_bindir}/tachyon-$variant
 done
 rename -thr "" $RPM_BUILD_ROOT%{_bindir}/*
-%{__mv} docs/tachyon docs/html
+mkdir docs/html
+%{__cp} -pr docs/tachyon/*.{css,html,png} docs/html
 %{__cp} -pr scenes $RPM_BUILD_ROOT%{_datadir}/tachyon/
 install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/
+echo ".so tachyon.1" > $RPM_BUILD_ROOT%{_mandir}/man1/tachyon-ogl.1
+%{__cp} -a compile/%{target}-thr/libtachyon*.so $RPM_BUILD_ROOT%{_libdir}/
+install -pm644 src/{hash,rtcommon,tachyon,util}.h $RPM_BUILD_ROOT%{_includedir}/tachyon/
 
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc Copyright README
 %attr(755,root,root) %{_bindir}/%{name}
 %{_mandir}/man1/%{name}.1*
 
-%files gl
+%files libs
 %defattr(644,root,root,755)
 %doc Copyright README
-%attr(755,root,root) %{_bindir}/%{name}-ogl
+%{_libdir}/libtachyon-%{version}.so
 
-%files lam
+%files gl
 %defattr(644,root,root,755)
-%doc Copyright README
-%attr(755,root,root) %{_bindir}/%{name}-lam
+%attr(755,root,root) %{_bindir}/%{name}-ogl
+%{_mandir}/man1/%{name}-ogl.1*
 
-%files lam-gl
+%files devel
 %defattr(644,root,root,755)
-%doc Copyright README
-%attr(755,root,root) %{_bindir}/%{name}-lam-ogl
+%{_includedir}/tachyon
+%{_libdir}/libtachyon.so
 
 %files docs
 %defattr(644,root,root,755)
@@ -158,6 +139,12 @@ install -pm644 %{SOURCE1} $RPM_BUILD_ROO
 %{_datadir}/tachyon
 
 %changelog
+* Sat Dec 26 2009 Dominik 'Rathann' Mierzejewski <rpm at greysector.net> 0.98.7-2
+- drop LAM support
+- add shared library (based on Debian patch)
+- simplify some specfile constructs
+- improve descriptions
+
 * Sun Sep 20 2009 Dominik 'Rathann' Mierzejewski <rpm at greysector.net> 0.98.7-1
 - update to 0.98.7 release
 - simplify specfile ifdeffery and reduce patch size




More information about the fedora-extras-commits mailing list