Date: Tue, 4 Jul 2023 05:44:53 GMT From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b5772e3fcc10 - main - games/gtkradiant: try to fix the port's build against Clang 16 Message-ID: <202307040544.3645ircZ056565@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5772e3fcc106a71e3bfd49abbf73af151645647 commit b5772e3fcc106a71e3bfd49abbf73af151645647 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-07-04 05:41:52 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-07-04 05:41:52 +0000 games/gtkradiant: try to fix the port's build against Clang 16 Ancient `register' keyword is gone with C++17, drop it from various places. Also, ISO C99 and later no longer tolerate implicit function declarations, but the code in question is too convoluted and fragile to fix properly, so just disable the warning for the time being. While here, do not hardcode -O2 for release builds (system-provided compilation flags being correctly upheld) and spell -Wextra correctly (quoting the GCC docs*, this option used to be called -W; the older name is still supported, but the newer name is more descriptive). Reported by: pkg-fallout *) https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wextra --- games/gtkradiant/Makefile | 10 ++++++++-- games/gtkradiant/files/patch-SConstruct | 25 ++++++++++++++----------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/games/gtkradiant/Makefile b/games/gtkradiant/Makefile index 907426700916..3fb93b36f945 100644 --- a/games/gtkradiant/Makefile +++ b/games/gtkradiant/Makefile @@ -19,7 +19,7 @@ LIB_DEPENDS= libgtkglext-x11-1.0.so:x11-toolkits/gtkglext \ libpng.so:graphics/png USES= compiler:c++11-lang gnome pkgconfig python:build scons zip -USE_GNOME= gtk20 libxml2 +USE_GNOME= gdkpixbuf2 gtk20 libxml2 MAKE_ARGS= ${MAKE_ENV} BUILD=release SSP_UNSAFE= yes @@ -44,7 +44,13 @@ post-patch: ${WRKSRC}/radiant/patch.cpp \ ${WRKSRC}/radiant/watchbsp.cpp \ ${WRKSRC}/tools/quake3/common/inout.c -# Fix the build against Clang +# Fix the build against Clang and possibly other modern compilers + @${REINPLACE_CMD} -e 's,register ,,g' \ + ${WRKSRC}/libs/container/hashfunc.h \ + ${WRKSRC}/libs/jpeg6/jdcolor.cpp \ + ${WRKSRC}/libs/jpeg6/jdhuff.* \ + ${WRKSRC}/libs/jpeg6/jdsample.cpp \ + ${WRKSRC}/libs/jpeg6/jutils.cpp @${REINPLACE_CMD} -e '/#include "generic\/reference\.h"/x ; 318G' \ ${WRKSRC}/libs/scenelib.h @${REINPLACE_CMD} -e '/#include "generic\/referencecounted\.h/ { \ diff --git a/games/gtkradiant/files/patch-SConstruct b/games/gtkradiant/files/patch-SConstruct index 7484c3a34b55..1e8ca062178f 100644 --- a/games/gtkradiant/files/patch-SConstruct +++ b/games/gtkradiant/files/patch-SConstruct @@ -121,20 +121,23 @@ p = pickle.Pickler(site_file) p.dump(site_dict) site_file.close() -@@ -172,8 +166,8 @@ LINK = CXX +@@ -170,7 +164,7 @@ SetOption('num_jobs', JOBS) + + LINK = CXX # common flags - warningFlags = '-W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter ' +-warningFlags = '-W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter ' ++warningFlags = '-Wall -Wextra -Wcast-align -Wcast-qual -Wno-implicit-function-declaration -Wno-unused-parameter ' warningFlagsCXX = '-Wno-non-virtual-dtor -Wreorder ' # -Wold-style-cast --CCFLAGS = '' + warningFlags --CXXFLAGS = '-pipe -DQ_NO_STLPORT ' + warningFlags + warningFlagsCXX -+CCFLAGS += ' ' -+CXXFLAGS += ' -pipe -DQ_NO_STLPORT ' - CPPPATH = [] - if (BUILD == 'debug'): + CCFLAGS = '' + warningFlags + CXXFLAGS = '-pipe -DQ_NO_STLPORT ' + warningFlags + warningFlagsCXX +@@ -179,18 +173,17 @@ if (BUILD == 'debug'): CXXFLAGS += '-g -D_DEBUG ' -@@ -182,15 +176,14 @@ elif (BUILD == 'release'): - CXXFLAGS += '-O2 ' - CCFLAGS += '-O2 ' + CCFLAGS += '-g -D_DEBUG ' + elif (BUILD == 'release'): +- CXXFLAGS += '-O2 ' +- CCFLAGS += '-O2 ' ++ # uphold system-provided compilation flags ++ pass elif ( BUILD == 'info' ): - print 'Preparing OSX release' + print('Preparing OSX release')
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307040544.3645ircZ056565>