1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/misc/freestyle/patch
2008-06-08 03:56:32 +00:00

183 lines
7.2 KiB
Plaintext

diff -U3 -r a/src/Config.pri b/src/Config.pri
--- a/src/Config.pri 2008-06-06 22:08:06.000000000 +0200
+++ b/src/Config.pri 2008-06-08 03:50:16.000000000 +0200
@@ -80,11 +80,11 @@
win32:QMAKE_CXXFLAGS *= /GR /GX
win32:QMAKE_CFLAGS *= /GR /GX
irix-n32:QMAKE_CFLAGS *= -LANG:std
-irix-n32:QMAKE_CXXFLAGS *= -LANG:std
-linux-g++:QMAKE_CFLAGS *= -Wno-deprecated
-linux-g++:QMAKE_CXXFLAGS *= -Wno-deprecated
-cygwin-g++:QMAKE_CFLAGS *= -Wno-deprecated
-cygwin-g++:QMAKE_CXXFLAGS *= -Wno-deprecated -mno-win32
+QMAKE_CXXFLAGS *= -LANG:std
+QMAKE_CFLAGS *= -Wno-deprecated -fPIC
+QMAKE_CXXFLAGS *= -Wno-deprecated -fPIC
+QMAKE_CFLAGS *= -Wno-deprecated -fPIC
+QMAKE_CXXFLAGS *= -Wno-deprecated -fPIC
mac:QMAKE_CFLAGS *= -Wno-deprecated
mac:QMAKE_CXXFLAGS *= -Wno-deprecated
diff -U3 -r a/src/geometry/Grid.h b/src/geometry/Grid.h
--- a/src/geometry/Grid.h 2008-06-06 22:08:06.000000000 +0200
+++ b/src/geometry/Grid.h 2008-06-06 22:05:52.000000000 +0200
@@ -321,7 +321,7 @@
for (OccludersSet::iterator it = occluders.begin();
it != occluders.end();
it++) {
- if ((unsigned)(*it)->userdata2 != _timestamp) {
+ if ((unsigned long)(*it)->userdata2 != _timestamp) {
(*it)->userdata2 = (void*)_timestamp;
visitor.examineOccluder(*it);
}
diff -U3 -r a/src/libconfig.pri b/src/libconfig.pri
--- a/src/libconfig.pri 2008-06-06 22:08:06.000000000 +0200
+++ b/src/libconfig.pri 2008-06-07 22:23:44.000000000 +0200
@@ -1,110 +1,32 @@
# This file should be viewed as a -*- mode: Makefile -*-
-contains( CONFIG, 3ds1.20 ) {
message ("Using 3ds 1.2.0 module")
- linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX
- linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds
- cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.2.0
- cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.2.0/lib3ds -l3ds
- mac:INCLUDEPATH *= /usr/local/include
- mac:LIBS *= -l3ds
- mac:QMAKE_LIBDIR *= /usr/local/lib
- win32: INCLUDEPATH *= C:\include\lib3ds\1.2.0
- win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.2.0
- win32:debug: LIBS *= lib3ds-120sd.lib
- win32:release: LIBS *= lib3ds-120s.lib
-}
-
-contains( CONFIG, 3ds1.30 ) {
- message ("Using 3ds 1.3.0 module")
- linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX
- linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds
- cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.3.0
- cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.3.0/lib3ds -l3ds
- mac:INCLUDEPATH *= /usr/local/include
- mac:LIBS *= -l3ds
- mac:QMAKE_LIBDIR *= /usr/local/lib
- win32: INCLUDEPATH *= C:\include\lib3ds\1.3.0
- win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.3.0
- win32:debug: LIBS *= lib3ds-1_3d.lib
- win32:release: LIBS *= lib3ds-1_3.lib
-}
+ INCLUDEPATH *= $(lib3ds)/include
+ LIBS *= -L$(lib3ds)/lib -l3ds
contains( CONFIG, qglviewer ) {
message ("Using QGLViewer module")
CONFIG *= qt thread opengl glut
- linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE
- linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer
- cygwin-g++:LIBS *= -lQGLViewer
- win32: INCLUDEPATH *= $(HOME)\INCLUDE
- win32: QMAKE_LIBDIR *= $(HOME)\LIB
- win32: LIBS *= QGLViewer.lib
+ INCLUDEPATH *= $(mesa)/include
+ LIBS *= -L$(mesa)/lib -lQGLViewer
+ LIBS *= -lQGLViewer
}
-contains( CONFIG, python2.3) {
- message ("Using python 2.3 module")
- linux-g++:INCLUDEPATH *= /usr/include/python2.3
- linux-g++:LIBS *= -lpthread -lm -lutil
- linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.3 -L$(HOME)/LIB/LINUX
- win32: INCLUDEPATH *= C:\python23\include
- win32: QMAKE_LIBDIR *= C:\python23\libs
- win32: LIBS *= python23.lib
-}
-
-contains( CONFIG, python2.4) {
- message ("Using python 2.4 module")
- linux-g++:INCLUDEPATH *= /usr/include/python2.4
- linux-g++:LIBS *= -lpthread -lm -lutil
- linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.4 -L$(HOME)/LIB/LINUX
- cygwin-g++:INCLUDEPATH *= /usr/include/python2.4
- cygwin-g++:LIBS *= -lpthread -lm -lutil
- cygwin-g++:LIBS *= -L/usr/lib/python2.4/config -lpython2.4
- win32: INCLUDEPATH *= C:\python24\include
- win32: QMAKE_LIBDIR *= C:\python24\libs
- win32: LIBS *= python24.lib
-}
-
-contains( CONFIG, python2.5) {
- message ("Using python 2.5 module")
- linux-g++:INCLUDEPATH *= /usr/include/python2.5
- linux-g++:LIBS *= -lpthread -lm -lutil
- linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.5 -L$(HOME)/LIB/LINUX
- mac: INCLUDEPATH *= /usr/include/python2.5
- mac: LIBS *= -L/usr/lib/python2.5/config -lpython2.5
- cygwin-g++:INCLUDEPATH *= /usr/include/python2.5
- cygwin-g++:LIBS *= -lpthread -lm -lutil
- cygwin-g++:LIBS *= -L/usr/lib/python2.5/config -lpython2.5
- win32: INCLUDEPATH *= C:\python25\include
- win32: QMAKE_LIBDIR *= C:\python25\libs
- win32: LIBS *= python25.lib
-}
+message ("Using python ${PYTHON_VERSION} module")
+INCLUDEPATH *= ${python}/include/python${PYTHON_VERSION}
+LIBS *= -lpthread -lm -lutil
+LIBS *= -L${python}/lib -lpython${PYTHON_VERSION} -L$(HOME)/LIB/LINUX
contains( CONFIG, glut) {
message ("Using glut module")
- linux-g++:LIBS *= -lglut -lXi
- cygwin-g++:LIBS *= -lglut -lXi
- mac: LIBS *= -framework Glut
- win32:INCLUDEPATH *= C:\include
- win32: QMAKE_LIBDIR *= C:\lib\glut
- win32: LIBS *= glut32.lib
+ INCLUDEPATH *= ${freeglut}/include
+ LIBS *= -lglut -lXi -L{freeglut}/lib
}
contains( CONFIG, qglviewer2 ) {
- message ("Using QGLViewer module")
+ MESSAGE ("Using QGLViewer module")
CONFIG *= qt thread opengl glut
- linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE
- linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer
- mac: LIBS *= -lQGLViewer
- cygwin-g++:LIBS *= -lQGLViewer2
- win32: INCLUDEPATH *= C:\include\QGLViewer\2.2.5
- win32{
- release{
- QMAKE_LIBDIR *= C:\lib\QGLViewer\release
- }
- debug{
- QMAKE_LIBDIR *= C:\lib\QGLViewer\debug
- }
- }
- win32: LIBS *= QGLViewer2.lib
+ INCLUDEPATH *= $(libQGLViewer)/include
+ LIBS *= -L$(libQGLViewer)/lib -lQGLViewer
}
diff -U3 -r a/src/swig/Makefile b/src/swig/Makefile
--- a/src/swig/Makefile 2008-06-06 22:08:06.000000000 +0200
+++ b/src/swig/Makefile 2008-06-08 01:17:31.000000000 +0200
@@ -19,14 +19,15 @@
LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python
IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \
-I../system -I../view_map -I../winged_edge \
- -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}
+ -I${python}/include/python${PYTHON_VERSION}
# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic
#OPTI = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686
DBUG = #-ggdb #-pg
WARN = -w #-W -Wall #-pedantic -ansi
-CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH}
-LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH}
+CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} -fPIC
+LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} -L${python}/lib
+
SWIG_SRC = Freestyle.i
PY_SRC = ${SWIG_SRC:.i=.py}