diff options
author | thierry <thierry@FreeBSD.org> | 2007-07-06 13:05:57 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2007-07-06 13:05:57 +0800 |
commit | c56bbbe7caa20a12247c58b026f57be1d8f77d41 (patch) | |
tree | d921cfaca6d8932c5954d68f8d18c7ede2e23324 | |
parent | 276b415189c6538f4d37290219815fbbb415c7ba (diff) | |
download | freebsd-ports-graphics-c56bbbe7caa20a12247c58b026f57be1d8f77d41.tar.gz freebsd-ports-graphics-c56bbbe7caa20a12247c58b026f57be1d8f77d41.tar.zst freebsd-ports-graphics-c56bbbe7caa20a12247c58b026f57be1d8f77d41.zip |
Fix build with gcc-42.
Submitted by: danfe
3 files changed, 42 insertions, 10 deletions
diff --git a/graphics/wildmagic/Makefile b/graphics/wildmagic/Makefile index 7fa895d7f66..481a562bb24 100644 --- a/graphics/wildmagic/Makefile +++ b/graphics/wildmagic/Makefile @@ -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> diff --git a/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGB.cpp b/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGB.cpp new file mode 100644 index 00000000000..32d791be7ff --- /dev/null +++ b/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGB.cpp @@ -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) + { diff --git a/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGBA.cpp b/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGBA.cpp new file mode 100644 index 00000000000..ad1d7ebcf12 --- /dev/null +++ b/graphics/wildmagic/files/patch-LibFoundation_Mathematics_Wm4ColorRGBA.cpp @@ -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) + { |