On 2017/03/13 19:19, Frederic Cambus wrote: > Hi ports@, > > Here is a diff to make emulators/virtualjaguar honour CFLAGS and > CXXFLAGS everywhere. > > Comments? OK? > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/emulators/virtualjaguar/Makefile,v > retrieving revision 1.4 > diff -u -p -r1.4 Makefile > --- Makefile 4 Mar 2017 16:16:32 -0000 1.4 > +++ Makefile 13 Mar 2017 16:57:20 -0000 > @@ -34,6 +34,8 @@ MAKE_FLAGS = CC="${CC}" \ > LINK="${CXX}" \ > V=1 > > +MAKE_ENV = CXXFLAGS="${CXXFLAGS}"
Use MAKE_FLAGS... > + > NO_TEST = Yes > > pre-configure: > Index: patches/patch-Makefile > =================================================================== > RCS file: patches/patch-Makefile > diff -N patches/patch-Makefile > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-Makefile 13 Mar 2017 16:57:20 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > +--- Makefile.orig Fri Oct 10 15:54:48 2014 > ++++ Makefile Mon Mar 13 17:25:21 2017 > +@@ -24,8 +24,8 @@ QMAKE_EXTRA := -spec macx-g++ > + endif > + > + # Set basic flags, these can be overridden from the environment > +-CFLAGS = -O2 > +-CXXFLAGS = -O2 > ++CFLAGS ?= -O2 > ++CXXFLAGS ?= -O2 ...and then you shouldn't need to change anything here because command-line variables normally override those in the Makefile. (But I'd set CFLAGS in MAKE_FLAGS as well, even if it's not actually used). > + > + # Add CPPFLAGS > + CFLAGS += $(CPPFLAGS) > Index: patches/patch-virtualjaguar_pro > =================================================================== > RCS file: patches/patch-virtualjaguar_pro > diff -N patches/patch-virtualjaguar_pro > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-virtualjaguar_pro 13 Mar 2017 16:57:20 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > +--- virtualjaguar.pro.orig Fri Oct 10 15:54:48 2014 > ++++ virtualjaguar.pro Mon Mar 13 17:25:21 2017 > +@@ -47,8 +47,8 @@ macx { ICON = res/vj-icon.icns } > + # NOTE: May have to put -Wall back in, but only on non-release cycles. It > can > + # cause problems if you're not careful. (Can do this via command line > in > + # qmake) > +-QMAKE_CFLAGS += `$(CROSS)sdl-config --cflags` > +-QMAKE_CXXFLAGS += `$(CROSS)sdl-config --cflags` > ++QMAKE_CFLAGS = `$(CROSS)sdl-config --cflags` > ++QMAKE_CXXFLAGS = `$(CROSS)sdl-config --cflags` > + > + # Need to add libcdio stuffola (checking/including)... > + >