WANT_CXX, patches inspired by freebsd.

horrible hack to prevent build failure if incompatible ports' glm is
installed...
This commit is contained in:
espie 2017-05-27 08:18:46 +00:00
parent ae18d8c7a4
commit 1d9c03ad5a
5 changed files with 61 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.32 2017/05/24 13:06:47 kirby Exp $ # $OpenBSD: Makefile,v 1.33 2017/05/27 08:18:46 espie Exp $
ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS= amd64 i386
@ -17,11 +17,10 @@ PERMIT_PACKAGE_CDROM= Yes
WANTLIB += GL GLEW GLU Qt5Core Qt5Gui Qt5Script Qt5Widgets SDL2 X11 WANTLIB += GL GLEW GLU Qt5Core Qt5Gui Qt5Script Qt5Widgets SDL2 X11
WANTLIB += Xrandr c crypto fontconfig freetype fribidi harfbuzz iconv WANTLIB += Xrandr c crypto fontconfig freetype fribidi harfbuzz iconv
WANTLIB += intl m ogg openal physfs png pthread theora vorbis WANTLIB += intl m ogg openal physfs png pthread theora vorbis
WANTLIB += vorbisfile z WANTLIB += vorbisfile z ${LIBECXX}
MODULES= x11/qt5 gcc4 MODULES= x11/qt5
MODGCC4_ARCHS = * WANT_CXX = base gcc
MODGCC4_LANGS +=c++
LIB_DEPENDS= audio/libogg \ LIB_DEPENDS= audio/libogg \
audio/libvorbis \ audio/libvorbis \
@ -49,7 +48,13 @@ CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
ac_cv_path_MOC4="${LOCALBASE}/bin/moc4" \ ac_cv_path_MOC4="${LOCALBASE}/bin/moc4" \
ac_cv_path_UIC4="${LOCALBASE}/bin/uic4" ac_cv_path_UIC4="${LOCALBASE}/bin/uic4"
# XXX this is a horrible hack to make sure we get to our glm
# which is 100% incompatible with ports glm
MAKE_FLAGS += "DEFS=-DHAVE_CONFIG_H -I${WRKSRC}/includefirst"
pre-configure: pre-configure:
mkdir -p ${WRKSRC}/includefirst
ln -sf ${WRKSRC}/3rdparty/glm ${WRKSRC}/includefirst/glm
.for _prog in git svn svnversion .for _prog in git svn svnversion
@cd ${WRKDIR}/bin && ln -sf /usr/bin/true ${_prog} @cd ${WRKDIR}/bin && ln -sf /usr/bin/true ${_prog}
.endfor .endfor

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-3rdparty_glm_core_type_half_inl,v 1.1 2017/05/27 08:18:46 espie Exp $
Index: 3rdparty/glm/core/type_half.inl
--- 3rdparty/glm/core/type_half.inl.orig
+++ 3rdparty/glm/core/type_half.inl
@@ -135,9 +135,9 @@ namespace detail
// of float and half (127 versus 15).
//
- register int s = (i >> 16) & 0x00008000;
- register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
- register int m = i & 0x007fffff;
+ int s = (i >> 16) & 0x00008000;
+ int e = ((i >> 23) & 0x000000ff) - (127 - 15);
+ int m = i & 0x007fffff;
//
// Now reassemble s, e and m into a half:

View File

@ -1,9 +1,10 @@
$OpenBSD: patch-configure_ac,v 1.10 2016/08/02 10:19:55 kirby Exp $ $OpenBSD: patch-configure_ac,v 1.11 2017/05/27 08:18:46 espie Exp $
--- configure.ac.orig Thu Jul 28 11:16:04 2016 Index: configure.ac
+++ configure.ac Mon Aug 1 18:02:15 2016 --- configure.ac.orig
@@ -285,7 +285,7 @@ fi +++ configure.ac
@@ -289,7 +289,7 @@ fi
WZ_WARNINGS_GCC="-Wall -Wextra ${WZ_Wno_}unused-parameter ${WZ_Wno_}sign-compare -Wcast-align -Wwrite-strings -Wpointer-arith ${WZ_Wno_}format-security" WZ_WARNINGS_GCC="-Wall -Wextra ${WZ_Wno_}unused-parameter ${WZ_Wno_}sign-compare -Wcast-align -Wwrite-strings -Wpointer-arith ${WZ_Wno_}format-security"
AX_C_CHECK_FLAG([-Werror -Wno-expansion-to-defined -Wno-error=cpp], [#warning x], , WZ_WARNINGS_GCC="${WZ_WARNINGS_GCC} -Wno-expansion-to-defined")
WZ_WARNINGS_GCC_C="${WZ_WARNINGS_GCC} -Wstrict-prototypes -Wdeclaration-after-statement ${CFLAGS_IGNORE_WARNINGS}" WZ_WARNINGS_GCC_C="${WZ_WARNINGS_GCC} -Wstrict-prototypes -Wdeclaration-after-statement ${CFLAGS_IGNORE_WARNINGS}"
-WZ_WARNINGS_GCC_CXX="${WZ_Wno_}enum-compare ${WZ_WARNINGS_GCC}" -WZ_WARNINGS_GCC_CXX="${WZ_Wno_}enum-compare ${WZ_WARNINGS_GCC}"
+WZ_WARNINGS_GCC_CXX="${WZ_WARNINGS_GCC}" +WZ_WARNINGS_GCC_CXX="${WZ_WARNINGS_GCC}"

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-lib_exceptionhandler_exceptionhandler_cpp,v 1.4 2017/05/27 08:18:46 espie Exp $
Index: lib/exceptionhandler/exceptionhandler.cpp
--- lib/exceptionhandler/exceptionhandler.cpp.orig
+++ lib/exceptionhandler/exceptionhandler.cpp
@@ -117,6 +117,7 @@ static LONG WINAPI windowsExceptionHandler(PEXCEPTION_
# include <stdint.h>
# include <signal.h>
# include <string.h>
+# include <errno.h>
// POSIX headers:
# include <unistd.h>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-lib_netplay_netplay_cpp,v 1.1 2017/05/27 08:18:46 espie Exp $
Index: lib/netplay/netplay.cpp
--- lib/netplay/netplay.cpp.orig
+++ lib/netplay/netplay.cpp
@@ -1783,7 +1783,7 @@ static void NETcheckPlayers(void)
// We should not block here.
bool NETrecvNet(NETQUEUE *queue, uint8_t *type)
{
- switch (upnp_status)
+ switch (static_cast<int>(upnp_status))
{
case UPNP_ERROR_CONTROL_NOT_AVAILABLE:
case UPNP_ERROR_DEVICE_NOT_FOUND: