pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fallingtime: Import Falling Time as wip/fallingtime.



Module Name:	pkgsrc-wip
Committed By:	Christian Koch <cfkoch%edgebsd.org@localhost>
Pushed By:	cfkoch
Date:		Wed Jan 27 22:55:42 2016 -0800
Changeset:	e4b4dee3a4488fd5c53827ea5e2c5f875bdb65f1

Modified Files:
	Makefile
Added Files:
	fallingtime/DESCR
	fallingtime/Makefile
	fallingtime/PLIST
	fallingtime/TODO
	fallingtime/distinfo
	fallingtime/patches/patch-CMakeLists.txt
	fallingtime/patches/patch-cfgpath.h
	fallingtime/patches/patch-chipmunk_include_chipmunk_chipmunk.h

Log Message:
fallingtime: Import Falling Time as wip/fallingtime.

Still rough around the edges; in particular, there is no suitable
"install" target and the programs suffers from many hardcoded
paths. At least this compiles on NetBSD/amd64 7.0.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e4b4dee3a4488fd5c53827ea5e2c5f875bdb65f1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 fallingtime/DESCR                                  |  2 +
 fallingtime/Makefile                               | 25 +++++++++++
 fallingtime/PLIST                                  | 41 ++++++++++++++++++
 fallingtime/TODO                                   |  2 +
 fallingtime/distinfo                               |  8 ++++
 fallingtime/patches/patch-CMakeLists.txt           | 39 ++++++++++++++++++
 fallingtime/patches/patch-cfgpath.h                | 48 ++++++++++++++++++++++
 .../patch-chipmunk_include_chipmunk_chipmunk.h     | 14 +++++++
 9 files changed, 180 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 10eb922..f1f1485 100644
--- a/Makefile
+++ b/Makefile
@@ -663,6 +663,7 @@ SUBDIR+=	facedetect
 SUBDIR+=	fairymax
 SUBDIR+=	fakenes
 SUBDIR+=	fala
+SUBDIR+=	fallingtime
 SUBDIR+=	farbfeld
 SUBDIR+=	farsi-ttf
 SUBDIR+=	farstream
diff --git a/fallingtime/DESCR b/fallingtime/DESCR
new file mode 100644
index 0000000..5238327
--- /dev/null
+++ b/fallingtime/DESCR
@@ -0,0 +1,2 @@
+Like the fall down games, you are a ball and you must fall into the holes to
+avoid being crushed by the top of the screen!
diff --git a/fallingtime/Makefile b/fallingtime/Makefile
new file mode 100644
index 0000000..2df4db4
--- /dev/null
+++ b/fallingtime/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+DISTNAME=	FallingTime-${GITHUB_TAG}
+PKGNAME=	fallingtime-${GITHUB_TAG}
+CATEGORIES=	games
+GITHUB_TAG=	1.0.1	
+MASTER_SITES=	${MASTER_SITE_GITHUB:=cxong/}
+LICENSE=	gpl-v2
+
+MAINTAINER=	cfkoch%edgebsd.org@localhost
+COMMENT=	Arcade game inspired by Fall Down
+HOMEPAGE=	https://github.com/cxong/FallingTime/
+
+USE_LANGUAGES+=	c c++
+USE_CMAKE=	yes
+CMAKE_ARGS+=	"-DINSTALL_PREFIX:PATH=${PREFIX}/bin"
+CMAKE_ARGS+=	"-DINSTALL_DATA_PREFIX:PATH=${PREFIX}/share/fallingtime"
+
+WRKSRC=		${WRKDIR}/${DISTNAME}
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../audio/SDL2_mixer/buildlink3.mk"
+.include "../../fonts/SDL2_ttf/buildlink3.mk"
+.include "../../graphics/SDL2_image/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fallingtime/PLIST b/fallingtime/PLIST
new file mode 100644
index 0000000..c191f81
--- /dev/null
+++ b/fallingtime/PLIST
@@ -0,0 +1,41 @@
+@comment $NetBSD$
+bin/falling_time
+share/fallingtime/data/LondrinaSolid-Regular.otf
+share/fallingtime/data/graphics/360.png
+share/fallingtime/data/graphics/anim.png
+share/fallingtime/data/graphics/eggplant.png
+share/fallingtime/data/graphics/flare.png
+share/fallingtime/data/graphics/floor0.png
+share/fallingtime/data/graphics/floor1.png
+share/fallingtime/data/graphics/floor2.png
+share/fallingtime/data/graphics/floor3.png
+share/fallingtime/data/graphics/floor4.png
+share/fallingtime/data/graphics/floor5.png
+share/fallingtime/data/graphics/gameover.png
+share/fallingtime/data/graphics/gcw0.png
+share/fallingtime/data/graphics/gcw0analog.png
+share/fallingtime/data/graphics/gcw0g.png
+share/fallingtime/data/graphics/gcw1.png
+share/fallingtime/data/graphics/icebergs.png
+share/fallingtime/data/graphics/icon.png
+share/fallingtime/data/graphics/keyboard0.png
+share/fallingtime/data/graphics/keyboard1.png
+share/fallingtime/data/graphics/penguin_ball.png
+share/fallingtime/data/graphics/penguin_black.png
+share/fallingtime/data/graphics/penguin_blue.png
+share/fallingtime/data/graphics/penguin_red.png
+share/fallingtime/data/graphics/sparks.png
+share/fallingtime/data/graphics/sparks_red.png
+share/fallingtime/data/graphics/stars.png
+share/fallingtime/data/graphics/tail.png
+share/fallingtime/data/sounds/beep.ogg
+share/fallingtime/data/sounds/bounce.ogg
+share/fallingtime/data/sounds/chicken.ogg
+share/fallingtime/data/sounds/lose.ogg
+share/fallingtime/data/sounds/music.ogg
+share/fallingtime/data/sounds/penguin.ogg
+share/fallingtime/data/sounds/quack.ogg
+share/fallingtime/data/sounds/roll.ogg
+share/fallingtime/data/sounds/score.ogg
+share/fallingtime/data/sounds/start.ogg
+share/fallingtime/data/sounds/turkey.ogg
diff --git a/fallingtime/TODO b/fallingtime/TODO
new file mode 100644
index 0000000..cd8794f
--- /dev/null
+++ b/fallingtime/TODO
@@ -0,0 +1,2 @@
+- No suitable "install" target; AFAICT the game's data MUST reside in a
+  subdirectory of the directory where the main executable resides.
diff --git a/fallingtime/distinfo b/fallingtime/distinfo
new file mode 100644
index 0000000..6c991db
--- /dev/null
+++ b/fallingtime/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (FallingTime-1.0.1.tar.gz) = 40abd3595f891b33fcc26f39379ea04be73fa5ba
+RMD160 (FallingTime-1.0.1.tar.gz) = 47591713db84edbc6ed7450dcd9ec4695e676703
+Size (FallingTime-1.0.1.tar.gz) = 1875727 bytes
+SHA1 (patch-CMakeLists.txt) = bc3613d36e72038b85aa6667ca859e0d1272feba
+SHA1 (patch-cfgpath.h) = e615ce4cd230be2f02e9c3d3a33a4481c71d75f6
+SHA1 (patch-chipmunk_include_chipmunk_chipmunk.h) = d428809559e96da1f0ac896b0c49674bcbf8b599
diff --git a/fallingtime/patches/patch-CMakeLists.txt b/fallingtime/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000..3127e8f
--- /dev/null
+++ b/fallingtime/patches/patch-CMakeLists.txt
@@ -0,0 +1,39 @@
+$NetBSD$
+--- CMakeLists.txt.orig	2015-10-21 02:55:38.000000000 -0700
++++ CMakeLists.txt	2016-01-23 21:54:31.000000000 -0800
+@@ -1,7 +1,7 @@
+ project(FallingTime)
+ cmake_minimum_required(VERSION 2.8.10)
+ 
+-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
++set (CMAKE_MODULE_PATH "/usr/pkgsrc/wip/fallingtime/work/.buildlink/cmake-Modules" "/usr/pkgsrc/wip/fallingtime/work/.buildlink/cmake-Modules" ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
+ 
+ if(CMAKE_CROSSCOMPILING)
+     # check for gcw0
+@@ -126,13 +126,11 @@
+ ################
+ 
+ # Executables
+-set(INSTALL_PREFIX ".")
+ if(WIN32)
+ 	set(EXE_EXTENSION ".exe")
+ 	set(LIB_EXTENSION ".dll")
+ elseif(APPLE)
+ 	set(LIB_EXTENSION ".dylib")
+-	set(INSTALL_PREFIX "falling_time")
+ else()
+ 	set(EXE_EXTENSION "")
+ 	set(LIB_EXTENSION ".so")
+@@ -151,11 +149,7 @@
+ SET(SOURCE_DIRECTORY ".")
+ INSTALL(DIRECTORY
+ 	${SOURCE_DIRECTORY}/data
+-	DESTINATION ${INSTALL_PREFIX})
+-INSTALL(FILES
+-	${SOURCE_DIRECTORY}/COPYRIGHT
+-	${SOURCE_DIRECTORY}/README.md
+-	DESTINATION ${INSTALL_PREFIX})
++	DESTINATION ${INSTALL_DATA_PREFIX})
+ IF(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
+ 	# TODO: .desktop file and png icon
+ elseif(WIN32)
diff --git a/fallingtime/patches/patch-cfgpath.h b/fallingtime/patches/patch-cfgpath.h
new file mode 100644
index 0000000..dcd126e
--- /dev/null
+++ b/fallingtime/patches/patch-cfgpath.h
@@ -0,0 +1,48 @@
+$NetBSD$
+--- ./cfgpath.h.orig	2015-10-21 02:55:38.000000000 -0700
++++ ./cfgpath.h	2016-01-23 22:09:05.000000000 -0800
+@@ -39,7 +39,7 @@
+ #define mkdir _mkdir
+ #endif
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+@@ -88,7 +88,7 @@
+  */
+ static inline void get_user_config_file(char *out, unsigned int maxlen, const char *appname)
+ {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ 	const char *out_orig = out;
+ 	char *home = getenv("XDG_CONFIG_HOME");
+ 	unsigned int config_len = 0;
+@@ -194,7 +194,7 @@
+  */
+ static inline void get_user_config_folder(char *out, unsigned int maxlen, const char *appname)
+ {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ 	const char *out_orig = out;
+ 	char *home = getenv("XDG_CONFIG_HOME");
+ 	unsigned int config_len = 0;
+@@ -311,7 +311,7 @@
+  */
+ static inline void get_user_data_folder(char *out, unsigned int maxlen, const char *appname)
+ {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ 	const char *out_orig = out;
+ 	char *home = getenv("XDG_DATA_HOME");
+ 	unsigned int config_len = 0;
+@@ -396,7 +396,7 @@
+  */
+ static inline void get_user_cache_folder(char *out, unsigned int maxlen, const char *appname)
+ {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ 	const char *out_orig = out;
+ 	char *home = getenv("XDG_CACHE_HOME");
+ 	unsigned int config_len = 0;
diff --git a/fallingtime/patches/patch-chipmunk_include_chipmunk_chipmunk.h b/fallingtime/patches/patch-chipmunk_include_chipmunk_chipmunk.h
new file mode 100644
index 0000000..dfbb9ac
--- /dev/null
+++ b/fallingtime/patches/patch-chipmunk_include_chipmunk_chipmunk.h
@@ -0,0 +1,14 @@
+$NetBSD$
+--- ./chipmunk/include/chipmunk/chipmunk.h.orig	2016-01-23 21:07:04.000000000 -0800
++++ ./chipmunk/include/chipmunk/chipmunk.h	2016-01-23 21:07:09.000000000 -0800 
+@@ -33,7 +33,9 @@
+ 	// For alloca().
+ 	#include <malloc.h>
+ #else
+-	#include <alloca.h>
++	#if HAVE_ALLOCA_H
++		#include <alloca.h>
++	#endif
+ #endif
+ 
+ #ifdef __cplusplus


Home | Main Index | Thread Index | Old Index