[egoboo] Fix up build options

Bruno Wolff III bruno at fedoraproject.org
Tue Mar 13 02:50:05 UTC 2012


commit 030354b410537b8d8f9bb5304458a039d33e4584
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Mar 11 12:32:20 2012 -0500

    Fix up build options
    
    Don't use bundled enet and use rpm provided c options

 egoboo-opts.patch |   22 ++++++++++++++++++++++
 egoboo.spec       |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/egoboo-opts.patch b/egoboo-opts.patch
new file mode 100644
index 0000000..779ffda
--- /dev/null
+++ b/egoboo-opts.patch
@@ -0,0 +1,22 @@
+--- src/game/Makefile.orig	2012-03-11 12:28:55.080023852 -0500
++++ src/game/Makefile	2012-03-11 12:30:20.639898072 -0500
+@@ -33,8 +33,8 @@
+ # the compiler options
+ 
+ CC      := gcc
+-INC     := -I. -I.. -I../enet/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
+-LDFLAGS := ${SDLCONF_L} -L../enet/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet
++INC     := ${SDLCONF_I} -I./extensions -I./file_formats -I./platform
++LDFLAGS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet
+ 
+ # use different options if the environmental variable PREFIX is defined
+ ifdef ($(PREFIX),"")
+@@ -43,7 +43,7 @@
+ 	OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX
+ endif
+ 
+-CFLAGS  := ${OPT} ${INC}
++CFLAGS  := $RPM_OPT_FLAGS ${INC}
+ 
+ #------------------------------------
+ # definitions of the target projects
diff --git a/egoboo.spec b/egoboo.spec
index bc12109..ee172e8 100644
--- a/egoboo.spec
+++ b/egoboo.spec
@@ -7,6 +7,7 @@ License:        GPLv3
 URL:            http://egoboo.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
+Patch0:         egoboo-opts.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  SDL_mixer-devel SDL_ttf-devel SDL_image-devel enet-devel
 BuildRequires:  desktop-file-utils
@@ -22,6 +23,7 @@ dimension.
 
 %prep
 %setup -q
+%patch0 -b .opts
 
 %build
 # We override ENET_OBJ and LDFLAGS to use the system enet


More information about the scm-commits mailing list