[PATCH] emulators/virtualjaguar (Honour CFLAGS and CXXFLAGS)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] emulators/virtualjaguar (Honour CFLAGS and CXXFLAGS)

Frederic Cambus
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}"
+
 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
+
+ # 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)...
+

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] emulators/virtualjaguar (Honour CFLAGS and CXXFLAGS)

Jeremie Courreges-Anglas-2
Frederic Cambus <[hidden email]> writes:

> Hi ports@,
>
> Here is a diff to make emulators/virtualjaguar honour CFLAGS and
> CXXFLAGS everywhere.
>
> Comments? OK?

ok jca@

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] emulators/virtualjaguar (Honour CFLAGS and CXXFLAGS)

Stuart Henderson
In reply to this post by Frederic Cambus
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)...
> +
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] emulators/virtualjaguar (Honour CFLAGS and CXXFLAGS)

Frederic Cambus
On Tue, Mar 14, 2017 at 08:57:35PM +0000, Stuart Henderson wrote:

> > Here is a diff to make emulators/virtualjaguar honour CFLAGS and
> > CXXFLAGS everywhere.

[...]

> > +MAKE_ENV = CXXFLAGS="${CXXFLAGS}"
>
> Use MAKE_FLAGS...

When passing CXXFLAGS using MAKE_FLAGS, the Virtual Jaguar GUI won't
compile because upstream Makefile calls qmake at some point to generate
a Makefile for the GUI and required flags won't be appended correctly.

Loading...