In r483285, compiler:c++11-lang was added to USES in order to unbreak the

port on GCC-based architectures, while actually the code predates 2011 by
couple of years.  Turns out that the build against GCC was failing because
of the -Wno-c++11-narrowing option added back in r474518 to unbreak the
build against Clang 6.  Fix the underlying problem with the code instead,
so we can remove offending option from CXXFLAGS and stop bogusly require
C++11-capable compiler just because of that option.

Tested on:	Mac mini G4 (powerpc, gcc-4.2.1-based)
This commit is contained in:
Alexey Dokuchaev 2018-10-31 02:32:50 +00:00
parent 41f8adbfdb
commit b255a93ce3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=483546
2 changed files with 14 additions and 3 deletions

View File

@ -18,7 +18,7 @@ LIB_DEPENDS= libexif.so:graphics/libexif \
libfreetype.so:print/freetype2 \
libexpat.so:textproc/expat2
USES= compiler:c++11-lang gl gmake jpeg libtool localbase:ldflags \
USES= gl gmake jpeg libtool localbase:ldflags \
pathfix pkgconfig python:run shebangfix tar:bzip2
USE_GL= gl glu
GNU_CONFIGURE= yes
@ -27,8 +27,6 @@ USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
SHEBANG_FILES= docs/MacOSX/nBundle.in
CXXFLAGS+= -Wno-c++11-narrowing
OPTIONS_DEFINE= FFMPEG GD GNUTLS QT4
OPTIONS_RADIO= DNSSD
OPTIONS_RADIO_DNSSD= AVAHI MDNSRESPONDER

View File

@ -0,0 +1,13 @@
--- nucleo/gl/texture/glTexture.cxx.orig 2009-06-02 09:34:34 UTC
+++ nucleo/gl/texture/glTexture.cxx
@@ -426,7 +426,9 @@ namespace nucleo {
{left, top, 0.0}
} ;
- GLdouble texinfo[] = { left, bottom, tWidth, tHeight, 1.0, 1.0 } ;
+ GLdouble texinfo[] = { left, bottom,
+ static_cast<GLdouble>(tWidth), static_cast<GLdouble>(tHeight),
+ 1.0, 1.0 } ;
if (tTarget==GL_TEXTURE_2D) {
texinfo[4] = t->getTextureWidth() ;
texinfo[5] = t->getTextureHeight() ;