mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
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] e7eed096a0
This commit is contained in:
parent
cda040dcec
commit
ecb94f19a4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296995
@ -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:
|
||||
|
11
graphics/meshviewer/files/patch-qt4__glmesh.cpp
Normal file
11
graphics/meshviewer/files/patch-qt4__glmesh.cpp
Normal file
@ -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;
|
11
graphics/meshviewer/files/patch-qt4__glmesh_common.cpp
Normal file
11
graphics/meshviewer/files/patch-qt4__glmesh_common.cpp
Normal file
@ -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();
|
Loading…
Reference in New Issue
Block a user