mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-17 08:01:36 +00:00
Fix build with gcc-42.
Submitted by: danfe
This commit is contained in:
parent
daa9b89179
commit
ddbd3a322b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=195046
@ -22,11 +22,11 @@ USE_GMAKE= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
WRKSRC= ${WRKDIR}/GeometricTools/${PORTNAME}${MV}
|
||||
DOS2UNIX_REGEX= .*\.(wm${MV}|h|inl)
|
||||
DOS2UNIX_REGEX= .*\.(wm${MV}|h|inl|cpp)
|
||||
MAKEFILE= makefile.wm${MV}
|
||||
ALL_TARGET= build
|
||||
MAKE_ARGS= CFG=${CONFIG} SYS=${OPSYS:L} GRF=${GRF}
|
||||
MAKE_ENV= CC=${CXX} GCC=${CC} AR=${AR} EGL=${EGL} EGL0=glx EGL1=Glx \
|
||||
MAKE_ENV= CC=${CXX} GCC=${CXX} AR=${AR} EGL=${EGL} EGL0=glx EGL1=Glx \
|
||||
INCPATH="-I${LOCALBASE}/include -I${X11BASE}/include" \
|
||||
LIBPATH="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
|
||||
XLIBS="-lX11 -lXext" GLIBS="-lGL -lGLU"
|
||||
@ -57,18 +57,13 @@ CONFIG= Release
|
||||
#CFLAGS+= -DNDEBUG
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 700042
|
||||
BROKEN= Broken with gcc 4.2
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
${FIND} ${WRKSRC} -name "*.wm${MV}" | ${XARGS} \
|
||||
${REINPLACE_CMD} -e 's|make -f|${SETENV} ${MAKE_ENV} ${GMAKE} -f|; \
|
||||
s|; make |; ${SETENV} ${MAKE_ENV} ${GMAKE} |; \
|
||||
s|-O2 -DNDEBUG|${CFLAGS} |;s|CFLAGS := -c|CFLAGS += -c|;\
|
||||
s|INCPATH := |INCPATH += |; s|LIBPATH := |LIBPATH += |'
|
||||
s|INCPATH := |INCPATH += |; s|LIBPATH := |LIBPATH += |; \
|
||||
s|$$(CC)|$$(CXX)|'
|
||||
${REINPLACE_CMD} -e 's|GetEnv("WM4_PATH")|"${DATADIR}"|' \
|
||||
${WRKSRC}/LibFoundation/System/Wm4System.cpp
|
||||
|
||||
@ -102,4 +97,4 @@ do-install:
|
||||
${FIND} ${EXAMPLESDIR} -name "*.bak" -delete
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -0,0 +1,18 @@
|
||||
--- LibFoundation/Mathematics/Wm4ColorRGB.cpp.orig Sun Mar 11 23:15:10 2007
|
||||
+++ LibFoundation/Mathematics/Wm4ColorRGB.cpp Wed Jul 4 18:32:14 2007
|
||||
@@ -131,13 +131,13 @@
|
||||
fScalar*m_afTuple[2]);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
-ColorRGB Wm4::operator* (float fScalar, const ColorRGB& rkC)
|
||||
+namespace Wm4 { ColorRGB operator* (float fScalar, const ColorRGB& rkC)
|
||||
{
|
||||
return ColorRGB(
|
||||
fScalar*rkC.m_afTuple[0],
|
||||
fScalar*rkC.m_afTuple[1],
|
||||
fScalar*rkC.m_afTuple[2]);
|
||||
-}
|
||||
+} }
|
||||
//----------------------------------------------------------------------------
|
||||
ColorRGB& ColorRGB::operator+= (const ColorRGB& rkC)
|
||||
{
|
@ -0,0 +1,19 @@
|
||||
--- LibFoundation/Mathematics/Wm4ColorRGBA.cpp.orig Sun Mar 11 23:15:10 2007
|
||||
+++ LibFoundation/Mathematics/Wm4ColorRGBA.cpp Wed Jul 4 18:32:46 2007
|
||||
@@ -142,14 +142,14 @@
|
||||
fScalar*m_afTuple[3]);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
-ColorRGBA Wm4::operator* (float fScalar, const ColorRGBA& rkC)
|
||||
+namespace Wm4 { ColorRGBA operator* (float fScalar, const ColorRGBA& rkC)
|
||||
{
|
||||
return ColorRGBA(
|
||||
fScalar*rkC.m_afTuple[0],
|
||||
fScalar*rkC.m_afTuple[1],
|
||||
fScalar*rkC.m_afTuple[2],
|
||||
fScalar*rkC.m_afTuple[3]);
|
||||
-}
|
||||
+} }
|
||||
//----------------------------------------------------------------------------
|
||||
ColorRGBA& ColorRGBA::operator+= (const ColorRGBA& rkC)
|
||||
{
|
Loading…
Reference in New Issue
Block a user