[packages/opencsg] - initial from FC
arekm
arekm at pld-linux.org
Thu Apr 30 14:37:14 CEST 2015
commit 70b8ddd8da2419a0de0d54ccebd56a8a0187375b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Apr 30 14:37:00 2015 +0200
- initial from FC
opencsg-build.patch | 48 +++++++++++++++++++++++++++++
opencsg.spec | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
---
diff --git a/opencsg.spec b/opencsg.spec
new file mode 100644
index 0000000..c6450f4
--- /dev/null
+++ b/opencsg.spec
@@ -0,0 +1,89 @@
+Summary: Library for Constructive Solid Geometry using OpenGL
+Name: opencsg
+Version: 1.4.0
+Release: 1
+Group: Libraries
+# license.txt contains a linking exception for CGAL
+License: GPLv2 with exceptions
+URL: http://www.opencsg.org/
+Source0: http://www.opencsg.org/OpenCSG-%{version}.tar.gz
+# Source0-md5: e7fe5fa2bfa1b466f470699da41eb0a2
+Patch0: %{name}-build.patch
+BuildRequires: dos2unix
+BuildRequires: freeglut-devel
+BuildRequires: glew-devel
+BuildRequires: qt-devel
+
+%description
+OpenCSG is a library that does image-based CSG rendering using OpenGL.
+
+CSG is short for Constructive Solid Geometry and denotes an approach
+to model complex 3D-shapes using simpler ones. I.e., two shapes can be
+combined by taking the union of them, by intersecting them, or by
+subtracting one shape of the other. The most basic shapes, which are
+not result of such a CSG operation, are called primitives. Primitives
+must be solid, i.e., they must have a clearly defined interior and
+exterior. By construction, a CSG shape is also solid then.
+
+Image-based CSG rendering (also z-buffer CSG rendering) is a term that
+denotes algorithms for rendering CSG shapes without an explicit
+calculation of the geometric boundary of a CSG shape. Such algorithms
+use frame-buffer settings of the graphics hardware, e.g., the depth
+and stencil buffer, to compose CSG shapes. OpenCSG implements a
+variety of those algorithms, namely the Goldfeather algorithm and the
+SCS algorithm, both of them in several variants.
+
+%package devel
+Summary: OpenCSG development files
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for OpenCSG.
+
+%prep
+%setup -q -n OpenCSG-%{version}
+%patch0 -p1
+
+rm src/Makefile RenderTexture/Makefile Makefile example/Makefile
+dos2unix license.txt
+# New FSF Address
+for FILE in src/*.h src/*.cpp include/opencsg.h
+do
+ sed -i s/"59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"/"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"/ $FILE
+done
+
+# Use Fedora's glew
+rm -rf glew/
+
+%build
+qmake-qt4
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# No make install
+chmod g-w lib/*
+install -d $RPM_BUILD_ROOT/%{_libdir}
+install -d $RPM_BUILD_ROOT/%{_includedir}
+cp -pP lib/* $RPM_BUILD_ROOT/%{_libdir}/
+cp -p include/opencsg.h $RPM_BUILD_ROOT/%{_includedir}/
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc changelog.txt doc license.txt
+%attr(755,root,root) %{_libdir}/libopencsg.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libopencsg.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/*
+%attr(755,root,root) %{_libdir}/libopencsg.so
+
+%changelog
+
+%clean
+rm -rf $RPM_BUILD_ROOT
diff --git a/opencsg-build.patch b/opencsg-build.patch
new file mode 100644
index 0000000..bc0a198
--- /dev/null
+++ b/opencsg-build.patch
@@ -0,0 +1,48 @@
+diff --git a/example/example.pro b/example/example.pro
+index 362c813..8fee802 100644
+--- a/example/example.pro
++++ b/example/example.pro
+@@ -4,7 +4,7 @@ TARGET = opencsgexample
+ CONFIG += opengl warn_on release
+ CONFIG -= qt
+ INCLUDEPATH += ../include
+-LIBS += -L../lib -lopencsg -lGLEW
++LIBS += -L../lib -lopencsg -lGLEW -lGLU
+
+ INSTALLDIR = /usr/local
+ INSTALLS += target
+diff --git a/opencsg.pro b/opencsg.pro
+index b56e622..5cf2d6d 100644
+--- a/opencsg.pro
++++ b/opencsg.pro
+@@ -1,2 +1,2 @@
+ TEMPLATE = subdirs
+-SUBDIRS = src example
++SUBDIRS = src
+diff --git a/src/src.pro b/src/src.pro
+index 9091251..c616185 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -3,8 +3,10 @@ TARGET = opencsg
+ VERSION = 1.4.0
+
+ CONFIG += opengl warn_on release
+-INCLUDEPATH += ../include ../
++INCLUDEPATH += ../include ../glew/include ../
+ CONFIG -= qt
++QT -= gui core
++LIBS -= -lQtGui -lQtCore -lm
+ LIBS += -lGLEW
+
+ DESTDIR = ../lib
+--- OpenCSG-1.4.0/src/src.pro~ 2015-04-30 14:34:25.000000000 +0200
++++ OpenCSG-1.4.0/src/src.pro 2015-04-30 14:34:28.402261494 +0200
+@@ -7,7 +7,7 @@ INCLUDEPATH += ../include ../glew/includ
+ CONFIG -= qt
+ QT -= gui core
+ LIBS -= -lQtGui -lQtCore -lm
+-LIBS += -lGLEW
++LIBS += -lGLEW -lX11
+
+ DESTDIR = ../lib
+ INSTALLDIR = /usr/local
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/opencsg.git/commitdiff/70b8ddd8da2419a0de0d54ccebd56a8a0187375b
More information about the pld-cvs-commit
mailing list