aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/meshviewer
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2012-05-20 11:27:54 +0800
committerrakuco <rakuco@FreeBSD.org>2012-05-20 11:27:54 +0800
commit57a4ed850c311d37f7a30fba94010d7606c9c34a (patch)
tree04de91e0d733c375f443f9a7dcc521e5147a0686 /graphics/meshviewer
parent2a1f33f6469250d9bbd86138cb0b07b2385080ea (diff)
downloadfreebsd-ports-gnome-57a4ed850c311d37f7a30fba94010d7606c9c34a.tar.gz
freebsd-ports-gnome-57a4ed850c311d37f7a30fba94010d7606c9c34a.tar.zst
freebsd-ports-gnome-57a4ed850c311d37f7a30fba94010d7606c9c34a.zip
Make the port build with the upcoming Qt 4.8.x series.
Since 4.8.0 [1], Qt itself does not automatically include GLU's headers and libraries with its OpenGL module, so applications which relied on Qt to get these need to be adjusted. This has also involved polishing the port Makefile a little. It still needs a lot of love. For now: - Remove the modeline from the beginning of the file. Add an - explicit dependency on GLU via USE_GL=glu. Move the CXXFLAGS and - LDFLAGS lines up in the file. Merge the two lines setting LDFLAGS. - Fix the port's build system to use CXXFLAGS instead of CPPFLAGS for - C++ compiler flags, so that we need not set FLAGS in MAKE_ARGS anymore. [1] http://qt.gitorious.org/qt/qt/commit/e7eed096a0c33607a7a37baaf06e5952dc9d556b
Diffstat (limited to 'graphics/meshviewer')
-rw-r--r--graphics/meshviewer/Makefile17
-rw-r--r--graphics/meshviewer/files/patch-qt4__glmesh.cpp11
-rw-r--r--graphics/meshviewer/files/patch-qt4__glmesh_common.cpp11
3 files changed, 30 insertions, 9 deletions
diff --git a/graphics/meshviewer/Makefile b/graphics/meshviewer/Makefile
index 45e53ecad93b..8e04c2995a3a 100644
--- a/graphics/meshviewer/Makefile
+++ b/graphics/meshviewer/Makefile
@@ -1,4 +1,3 @@
-# ex:ts=8
# Ports collection makefile for: meshviewer
# Date created: Jun 10, 2002
# Whom: ijliao
@@ -7,7 +6,7 @@
PORTNAME= meshviewer
PORTVERSION= 0.3.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= SF/mview/mview/${PORTVERSION}
DISTNAME= mview-src-${PORTVERSION}
@@ -17,23 +16,23 @@ COMMENT= Mesh Viewer
WRKSRC= ${WRKDIR}/mview-${PORTVERSION}
+USE_GL= glu
USE_QT_VER= 4
QT_COMPONENTS= corelib gui opengl moc_build
USE_GMAKE= yes
-LDFLAGS+= ${PTHREAD_LIBS}
+CXXFLAGS+= -I. -Imesh -Imathvector \
+ `pkg-config --cflags QtOpenGL glu`
+LDFLAGS+= ${PTHREAD_LIBS} \
+ `pkg-config --libs QtOpenGL glu`
MAKE_ARGS= QTDIR="${QT_PREFIX}" CC="${CXX}" MOC="${MOC}" \
- CPPFLAGS="${CPPFLAGS}" FLAGS="${CXXFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
LIBPATH="" LIBS_QT4="${LDFLAGS}"
PORTDOCS= *
PLIST_FILES= bin/mview
-CPPFLAGS+= -I. -Imesh -Imathvector \
- `pkg-config --cflags QtOpenGL glu`
-LDFLAGS+= `pkg-config --libs QtOpenGL glu`
-
post-patch:
- @${REINPLACE_CMD} -e 's|make |$$(MAKE) |g' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's|make |$$(MAKE) |g' -e 's|CPPFLAGS|CXXFLAGS|g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|<values.h>|<cmath>|g' ${WRKSRC}/mesh/mesh.cpp
do-install:
diff --git a/graphics/meshviewer/files/patch-qt4__glmesh.cpp b/graphics/meshviewer/files/patch-qt4__glmesh.cpp
new file mode 100644
index 000000000000..24f07ed78bc7
--- /dev/null
+++ b/graphics/meshviewer/files/patch-qt4__glmesh.cpp
@@ -0,0 +1,11 @@
+--- qt4/glmesh.cpp~ 2012-05-20 00:04:04.000000000 -0300
++++ qt4/glmesh.cpp 2012-05-20 00:04:21.000000000 -0300
+@@ -21,6 +21,8 @@
+ #include "mview.h"
+ #include "coordinates.h"
+
++#include <GL/glu.h>
++
+ // for FPS
+ unsigned long timeCounter;
+ unsigned int frameCounter;
diff --git a/graphics/meshviewer/files/patch-qt4__glmesh_common.cpp b/graphics/meshviewer/files/patch-qt4__glmesh_common.cpp
new file mode 100644
index 000000000000..16bef5058d22
--- /dev/null
+++ b/graphics/meshviewer/files/patch-qt4__glmesh_common.cpp
@@ -0,0 +1,11 @@
+--- qt4/glmesh_common.cpp~ 2012-05-20 00:04:54.000000000 -0300
++++ qt4/glmesh_common.cpp 2012-05-20 00:05:03.000000000 -0300
+@@ -10,6 +10,8 @@
+
+ #include "glmesh.h"
+
++#include <GL/glu.h>
++
+ void GLMesh::checkForTraps(const char *string, int value)
+ {
+ GLenum errorCode = glGetError();