aboutsummaryrefslogtreecommitdiffstats
path: root/games/kiki
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2009-12-14 11:09:19 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2009-12-14 11:09:19 +0800
commit6b7e31c204d2e6a4d1a316ea8d38ef61a7b52b07 (patch)
treea12ae6174556c6de86dc2167a6ab71e689dcca45 /games/kiki
parente385158e41923df65f92478a2038bd94da8a5173 (diff)
downloadfreebsd-ports-gnome-6b7e31c204d2e6a4d1a316ea8d38ef61a7b52b07.tar.gz
freebsd-ports-gnome-6b7e31c204d2e6a4d1a316ea8d38ef61a7b52b07.tar.zst
freebsd-ports-gnome-6b7e31c204d2e6a4d1a316ea8d38ef61a7b52b07.zip
- Support building with newer python versions
- Rework port a bit - Add desktop entry
Diffstat (limited to 'games/kiki')
-rw-r--r--games/kiki/Makefile38
-rw-r--r--games/kiki/files/extra-patch-kodilib-src-types-kvector.h13
-rw-r--r--games/kiki/files/patch-linux-Makefile33
3 files changed, 53 insertions, 31 deletions
diff --git a/games/kiki/Makefile b/games/kiki/Makefile
index 4976fbed438b..c0bcd33e9fab 100644
--- a/games/kiki/Makefile
+++ b/games/kiki/Makefile
@@ -7,43 +7,45 @@
PORTNAME= kiki
PORTVERSION= 1.0.2
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-src/${PORTVERSION}
-DISTNAME= ${PORTNAME}-${PORTVERSION}-src
-EXTRACT_SUFX= .tgz
+EXTRACT_SUFX= -src.tgz
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Kiki the nanobot is a 3-D puzzle game
-USE_PYTHON= 2.3
+BUILD_DEPENDS= swig:${PORTSDIR}/devel/swig13
+
+USE_PYTHON= 2.3+
USE_GMAKE= yes
-USE_GL= glut
+USE_GL= gl glu glut
USE_SDL= sdl mixer image
USE_DOS2UNIX= kodilib/linux/Makefile src/main/KikiController.cpp linux/Makefile kodilib/src/types/KVector.h src/main/KikiPythonWidget.h
+MAKE_ENV= PYTHON_VER=${PYTHON_VERSION:C/^python//}
+MAKE_JOBS_SAFE= yes
WRKSRC= ${WRKDIR}/kiki
+DESKTOP_ENTRIES="kiki the nanobot" \
+ "3-D puzzle game" \
+ "" \
+ "kiki" \
+ "Game;LogicGame;" \
+ false
+
post-patch:
@${REINPLACE_CMD} -e '/^CXXFLAGS/ s|.*|CXXFLAGS+=$$(KODI_INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags`|' ${WRKSRC}/kodilib/linux/Makefile
- @${REINPLACE_CMD} -e '/^X11_INCLUDES/ s|/.*/|${LOCALBASE}/include|' ${WRKSRC}/linux/Makefile
- @${REINPLACE_CMD} -e '/PYTHON/ s|/usr|${LOCALBASE}|' ${WRKSRC}/linux/Makefile
- @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/linux/Makefile
- @${REINPLACE_CMD} -e 's|CXXFLAGS =|CXXFLAGS +=|' ${WRKSRC}/linux/Makefile
- @${REINPLACE_CMD} -e 's|PYTHON_VERSION|PYTHON_VER|' ${WRKSRC}/linux/Makefile
- @${REINPLACE_CMD} -e '/^GLLIBS/ s|$$| -L${LOCALBASE}/lib|' ${WRKSRC}/linux/Makefile
@${REINPLACE_CMD} -e 's|getenv("KIKI_HOME")|"${DATADIR}"|' ${WRKSRC}/src/main/KikiController.cpp
do-build:
- @cd ${WRKSRC}/kodilib/linux && ${SETENV} ${MAKE_ENV} ${GMAKE}
- @cd ${WRKSRC}/linux && ${SETENV} ${MAKE_ENV} ${GMAKE}
+ cd ${WRKSRC}/SWIG && swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i
+ cd ${WRKSRC}/kodilib/linux && ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS}
+ cd ${WRKSRC}/linux && ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/linux/kiki ${PREFIX}/bin
-.for d in py sound
- @cd ${WRKSRC}/${d} && \
- ${FIND} . -type d -exec ${MKDIR} ${DATADIR}/${d}/{} \; ;\
- ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DATADIR}/${d}/{} \;
-.endfor
+ ${MKDIR} ${DATADIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} "py sound" ${DATADIR}/
.include <bsd.port.mk>
diff --git a/games/kiki/files/extra-patch-kodilib-src-types-kvector.h b/games/kiki/files/extra-patch-kodilib-src-types-kvector.h
deleted file mode 100644
index 56ad90070027..000000000000
--- a/games/kiki/files/extra-patch-kodilib-src-types-kvector.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- kodilib/src/types/KVector.h.orig Mon Mar 6 12:42:24 2006
-+++ kodilib/src/types/KVector.h Mon Mar 6 12:42:32 2006
-@@ -12,10 +12,7 @@
- #if defined(__APPLE__) && defined(__MACH__)
- #include <OpenGL/gl.h>
- #else
--#ifdef WIN32
- #define rint(x) (((x) < 0.0) ? (double)(int)((x) - 0.5) : (double)(int)((x) + 0.5))
--#include <GLUT/glut.h>
--#endif
- #include <GL/gl.h>
- #endif
-
diff --git a/games/kiki/files/patch-linux-Makefile b/games/kiki/files/patch-linux-Makefile
new file mode 100644
index 000000000000..8d1f29ffb2f2
--- /dev/null
+++ b/games/kiki/files/patch-linux-Makefile
@@ -0,0 +1,33 @@
+--- linux/Makefile.orig 2004-04-03 15:12:51.000000000 +0400
++++ linux/Makefile 2009-12-14 00:58:21.000000000 +0300
+@@ -5,20 +5,16 @@
+ # you might have to change these to match your system
+ #
+
+-X11_INCLUDES = -I /usr/X11/include/
+-PYTHON_VERSION=2.3
+-PYTHON_INCLUDES = -I /usr/include/python$(PYTHON_VERSION)
+-
+-SDLCFLAGS = $(shell sdl-config --cflags)
+-SDLLIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer
+-
+-GLLIBS = -lglut -lGLU -lGL
+-
+-PYTHONHOME = /usr/lib/python$(PYTHON_VERSION)/
+-PYTHONLIBS = $(PYTHONHOME)/config/libpython$(PYTHON_VERSION).a -lutil \
+- $(PYTHONHOME)/lib-dynload/math.so \
+- $(PYTHONHOME)/lib-dynload/time.so \
+- $(PYTHONHOME)/lib-dynload/_random.so
++X11_INCLUDES = -I ${LOCALBASE}/include/
++PYTHON_INCLUDES = -I ${LOCALBASE}/include/python$(PYTHON_VER)
++
++SDLCFLAGS = $(shell ${SDL_CONFIG} --cflags)
++SDLLIBS = $(shell ${SDL_CONFIG} --libs) -lSDL_image -lSDL_mixer
++
++GLLIBS = -lglut -lGLU -lGL -L${LOCALBASE}/lib
++
++PYTHONHOME = ${LOCALBASE}/lib/python$(PYTHON_VER)/
++PYTHONLIBS = $(PYTHONHOME)/config/libpython$(PYTHON_VER).a -lutil -lpython${PYTHON_VER}
+
+ # change this, if the kodilib directory isn't parallel to the kiki directory
+