summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/kiki-makefile.patch
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-04-12 11:28:01 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-04-13 13:08:26 +0200
commitbd71525b7ad1bb4f6896793ca7f6283e178b3a06 (patch)
tree4e1d62800f1f2573fbe33cf5dd33abb6061d91fe /gnu/packages/patches/kiki-makefile.patch
parent0da0f434c61d35739ab7f3741a34daf1e82133e7 (diff)
gnu: Add kiki.
* gnu/packages/games.scm (kiki): New variable. * gnu/packages/patches/kiki-level-selection-crash.patch, gnu/packages/patches/kiki-makefile.patch, gnu/packages/patches/kiki-missing-includes.patch, gnu/packages/patches/kiki-portability-64bit.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/kiki-makefile.patch')
-rw-r--r--gnu/packages/patches/kiki-makefile.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/patches/kiki-makefile.patch b/gnu/packages/patches/kiki-makefile.patch
new file mode 100644
index 0000000000..7329301f2c
--- /dev/null
+++ b/gnu/packages/patches/kiki-makefile.patch
@@ -0,0 +1,57 @@
+Downloaded from https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/kiki-the-nano-bot/debian/patches/Makefile.patch?revision=15681&view=co
+
+Makefile fixes:
+ - Make CXXFLAGS, CPPFLAGS, LDFLAGS available for user-specified flags.
+ - run SWIG before compiling
+
+Peter De Wachter (pdewacht@gmail.com)
+placed in the public domain
+
+--- a/kodilib/linux/Makefile
++++ b/kodilib/linux/Makefile
+@@ -21,7 +21,7 @@
+
+ INCLUDES = $(KODI_INCLUDES) $(X11_INCLUDES) $(SDL_INCLUDES)
+
+-CXXFLAGS = $(INCLUDES) $(SDL_CFLAGS)
++CXXOPTS = -Wall $(INCLUDES) $(SDL_CFLAGS) $(CPPFLAGS) $(CXXFLAGS)
+
+ src = \
+ $(KODISRCDIR)/handler/KEventHandler.cpp \
+@@ -95,4 +95,4 @@
+ $(RM) -f $(obj) libkodi.a
+
+ %.o: %.cpp
+- $(CXX) -c $(CXXFLAGS) -o $@ $<
++ $(CXX) -c $(CXXOPTS) -o $@ $<
+--- a/linux/Makefile
++++ b/linux/Makefile
+@@ -46,7 +46,7 @@
+
+ INCLUDES = $(KIKI_INCLUDES) $(X11_INCLUDES) $(PYTHON_INCLUDES)
+
+-CXXFLAGS = $(INCLUDES) $(SDLCFLAGS)
++CXXOPTS = -Wall $(INCLUDES) $(SDLCFLAGS) $(CPPFLAGS) $(CXXFLAGS)
+
+ src = \
+ $(KIKISRC)/base/KikiAction.cpp \
+@@ -105,8 +105,10 @@
+ obj = $(src:.cpp=.o)
+
+ kiki: $(KIKISRC)/../SWIG/KikiPy_wrap.cpp $(obj)
+- -(cd ../SWIG; swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i; cp kiki.py ../py)
+- $(CXX) $(obj) $(KODILIB) -o kiki $(GLLIBS) $(SDLLIBS) $(PYTHONLIBS)
++ $(CXX) $(LDFLAGS) $(obj) $(KODILIB) -o kiki $(GLLIBS) $(SDLLIBS) $(PYTHONLIBS)
++
++$(KIKISRC)/../SWIG/KikiPy_wrap.cpp: $(wildcard ../SWIG/*.i)
++ (cd ../SWIG && swig -c++ -python -globals kiki -DSWIG_PYTHON_LEGACY_BOOL -o KikiPy_wrap.cpp KikiPy.i && cp kiki.py ../py)
+
+ obj-clean:
+ $(RM) -f $(obj)
+@@ -115,5 +117,5 @@
+ $(RM) -f $(obj) kiki
+
+ %.o: %.cpp
+- $(CXX) -c $(CXXFLAGS) -o $@ $<
++ $(CXX) -c $(CXXOPTS) -o $@ $<
+