From: Theo Buehler Subject: Re: amnesia-tdd, crack-attack, manaplus vs libcxx update To: ports@openbsd.org, namn@openbsd.org, mattieu@brimbelle.org, bcallah@openbsd.org Date: Tue, 2 Jan 2024 13:23:53 +0100 On Tue, Jan 02, 2024 at 12:17:26PM +0000, Stuart Henderson wrote: > On 2024/01/02 11:13, Theo Buehler wrote: > > The following games will no longer build once robert updates libcxx and > > friends because they use std::unary_function or std::binary_function, > > which were deprecated in C++11 and removed in C++17. > > > > An ugly workaround is to re-enable these to fix the build as in the diff > > below. Another ugly workaround is to switch to a build with C++ <= 14. > > > > Please check if upstream has fixed this already and do either one of > > 1. update the port > > 2. backport the fix > > 3. remove the annotations in the affected functions and test > > 4. if you don't like the below, figure out a better fix. > > > > Thanks > > I think these should append rather than override CXXFLAGS? Yes, thanks. I generally fixed this up before commit but forgot to do that here. Index: games/amnesia-tdd/Makefile =================================================================== RCS file: /cvs/ports/games/amnesia-tdd/Makefile,v diff -u -p -r1.7 Makefile --- games/amnesia-tdd/Makefile 30 Apr 2023 19:05:02 -0000 1.7 +++ games/amnesia-tdd/Makefile 2 Jan 2024 12:20:56 -0000 @@ -39,6 +39,8 @@ LIB_DEPENDS = audio/libogg \ CONFIGURE_ARGS = -DSYSTEMWIDE_RESOURCES=ON \ -DSYSTEMWIDE_RESOURCES_LOCATION="${PREFIX}/share/amnesia-tdd" +CONFIGURE_ENV += CXXFLAGS="$CXXFLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" + WRKSRC = ${WRKDIST}/amnesia/src post-install: Index: games/crack-attack/Makefile =================================================================== RCS file: /cvs/ports/games/crack-attack/Makefile,v diff -u -p -r1.30 Makefile --- games/crack-attack/Makefile 26 Sep 2023 09:41:33 -0000 1.30 +++ games/crack-attack/Makefile 28 Dec 2023 02:03:58 -0000 @@ -30,6 +30,8 @@ CONFIGURE_STYLE=gnu CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" +CXXFLAGS += -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION + post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/applications ${PREFIX}/share/pixmaps cd ${WRKSRC}/data; \ Index: games/manaplus/Makefile =================================================================== RCS file: /cvs/ports/games/manaplus/Makefile,v diff -u -p -r1.106 Makefile --- games/manaplus/Makefile 26 Sep 2023 09:41:38 -0000 1.106 +++ games/manaplus/Makefile 2 Jan 2024 10:03:56 -0000 @@ -41,6 +41,8 @@ CONFIGURE_ARGS = --without-librt \ --with-sdl2 \ --without-internalsdlgfx +CXXFLAGS += -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION + FAKE_FLAGS += desktopdir=${PREFIX}/share/applications/ AUTOCONF_VERSION = 2.69