pkgsrc-WIP-changes archive

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

cannonball: Import of Cannonball 0.3 as wip/cannonball.



Module Name:	pkgsrc-wip
Committed By:	Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By:	fox
Date:		Sun Jun 9 17:15:32 2019 -0500
Changeset:	1479df88333be5dcb08703a25ad1e3525a92bac1

Added Files:
	cannonball/DESCR
	cannonball/Makefile
	cannonball/PLIST
	cannonball/distinfo
	cannonball/files/cannonball.sh.in
	cannonball/patches/patch-cmake_CMakeLists.txt
	cannonball/patches/patch-cmake_bsd.cmake

Log Message:
cannonball: Import of Cannonball 0.3 as wip/cannonball.

Cannonball is a program which allows you to play an enhanced version
of Yu Suzuki's seminal arcade racer, OutRun, on a variety of systems.

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

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

diffstat:
 cannonball/DESCR                              |  2 +
 cannonball/Makefile                           | 55 +++++++++++++++++++++++++++
 cannonball/PLIST                              |  6 +++
 cannonball/distinfo                           |  8 ++++
 cannonball/files/cannonball.sh.in             | 23 +++++++++++
 cannonball/patches/patch-cmake_CMakeLists.txt | 18 +++++++++
 cannonball/patches/patch-cmake_bsd.cmake      | 28 ++++++++++++++
 7 files changed, 140 insertions(+)

diffs:
diff --git a/cannonball/DESCR b/cannonball/DESCR
new file mode 100644
index 0000000000..439592e6e5
--- /dev/null
+++ b/cannonball/DESCR
@@ -0,0 +1,2 @@
+Cannonball is a program which allows you to play an enhanced version
+of Yu Suzuki's seminal arcade racer, OutRun, on a variety of systems.
diff --git a/cannonball/Makefile b/cannonball/Makefile
new file mode 100644
index 0000000000..cab47dc8af
--- /dev/null
+++ b/cannonball/Makefile
@@ -0,0 +1,55 @@
+# $NetBSD$
+
+DISTNAME=	cannonball-0.3
+CATEGORIES=	emulators
+MASTER_SITES=	${MASTER_SITE_GITHUB:=djyt/}
+GITHUB_TAG=	0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6
+EXTRACT_USING=	bsdtar
+
+MAINTAINER=	fox%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/djyt/cannonball/wiki
+COMMENT=	Enhanced OutRun Engine
+LICENSE=	mame-license
+
+USE_LANGUAGES=		c c++
+USE_TOOLS+=		pkg-config
+USE_CMAKE=		yes
+CONFIGURE_DIRS=		build
+CMAKE_ARG_PATH=		..
+BUILD_MAKE_FLAGS+=	VERBOSE=1
+
+INSTALLATION_DIRS+=	bin libexec share/cannonball share/cannonball/res \
+			share/cannonball/conf
+
+SUBST_CLASSES+=		prefix
+SUBST_STAGE.prefix=	pre-configure
+SUBST_MESSAGE.prefix=	Set correct prefix in bsd.cmake
+SUBST_FILES.prefix=	${WRKSRC}/cmake/bsd.cmake
+SUBST_VARS.prefix=	PREFIX
+
+pre-configure:
+	${MKDIR} ${WRKSRC}/build
+
+do-configure:
+	cd ${WRKSRC}/build && cmake -G "Unix Makefiles" -DTARGET=bsd ${WRKSRC}/cmake
+
+post-build:
+	${SED} -e 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/cannonball.sh.in > \
+	    ${WRKDIR}/cannonball.sh
+
+do-install:
+	${INSTALL_DATA} ${WRKSRC}/build/res/tilemap.bin \
+	    ${DESTDIR}${PREFIX}/share/cannonball/res/tilemap.bin
+	${INSTALL_DATA} ${WRKSRC}/build/res/tilepatch.bin \
+	    ${DESTDIR}${PREFIX}/share/cannonball/res/tilepatch.bin
+	${INSTALL_DATA} ${WRKSRC}/build/config.xml \
+	    ${DESTDIR}${PREFIX}/share/cannonball/conf/config.xml
+	${INSTALL_SCRIPT} ${WRKDIR}/cannonball.sh \
+	    ${DESTDIR}${PREFIX}/bin/cannonball
+	${INSTALL_PROGRAM} ${WRKSRC}/build/cannonball \
+	    ${DESTDIR}${PREFIX}/libexec
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cannonball/PLIST b/cannonball/PLIST
new file mode 100644
index 0000000000..0a21ac1814
--- /dev/null
+++ b/cannonball/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD$
+bin/cannonball
+libexec/cannonball
+share/cannonball/conf/config.xml
+share/cannonball/res/tilemap.bin
+share/cannonball/res/tilepatch.bin
diff --git a/cannonball/distinfo b/cannonball/distinfo
new file mode 100644
index 0000000000..da25c38800
--- /dev/null
+++ b/cannonball/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.18 2015/11/03 20:31:10 agc Exp $
+
+SHA1 (cannonball-0.3-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = a92cea8856b9c625541841969de01b72ff149cd6
+RMD160 (cannonball-0.3-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = 79f33565344ec4f5b6d37ff0967c033ea8751bba
+SHA512 (cannonball-0.3-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = b387e1d855c7949a9685d0fc9dac1a917962e2a1679a0ef5813f0efe6a936e5e25e57ccd80d54f28384c390a74f0285f40c673d2294c24693a52cb52ece80de0
+Size (cannonball-0.3-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = 277449 bytes
+SHA1 (patch-cmake_CMakeLists.txt) = 1776821704ccf44ef788f1a64b8e65903465b0db
+SHA1 (patch-cmake_bsd.cmake) = c331da7ef49e2351395959da641cd7ec0847bd38
diff --git a/cannonball/files/cannonball.sh.in b/cannonball/files/cannonball.sh.in
new file mode 100644
index 0000000000..43cdddca9a
--- /dev/null
+++ b/cannonball/files/cannonball.sh.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+CANNONBALL_DIR=${HOME}/.local/share/cannonball
+RESOURCE_DIR=${CANNONBALL_DIR}/res
+ROMS_DIR=${CANNONBALL_DIR}/roms
+
+mkdir -p "${CANNONBALL_DIR}" "${ROMS_DIR}"
+
+if [ ! -f "${CANNONBALL_DIR}/config.xml" ]; then
+    cp @PREFIX@/share/cannonball/conf/config.xml \
+       "${CANNONBALL_DIR}"
+fi
+
+if [ ! -d "${RESOURCE_DIR}" ]; then
+    mkdir -p "${RESOURCE_DIR}"
+    cp @PREFIX@/share/cannonball/res/tilemap.bin \
+       "${RESOURCE_DIR}"
+    cp @PREFIX@/share/cannonball/res/tilepatch.bin \
+       "${RESOURCE_DIR}"
+fi
+
+
+cd "${CANNONBALL_DIR}" && exec "@PREFIX@/libexec/cannonball" "$@"
diff --git a/cannonball/patches/patch-cmake_CMakeLists.txt b/cannonball/patches/patch-cmake_CMakeLists.txt
new file mode 100644
index 0000000000..a5b2159daa
--- /dev/null
+++ b/cannonball/patches/patch-cmake_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Remove the boost directory reference.
+
+Not required in pkgsrc, since boost libraries are directly installed
+in ${PREFIX}/include
+
+--- cmake/CMakeLists.txt.orig	2019-06-09 15:46:42.350731953 +0000
++++ cmake/CMakeLists.txt
+@@ -25,7 +25,7 @@ else()
+     include(${DCMAKE})
+ endif(TARGET)
+ 
+-set(BOOST_INCLUDEDIR ${lib_base}/boost_1_54_0)
++set(BOOST_INCLUDEDIR ${lib_base})
+ find_package(Boost REQUIRED)
+ 
+ # Include
diff --git a/cannonball/patches/patch-cmake_bsd.cmake b/cannonball/patches/patch-cmake_bsd.cmake
new file mode 100644
index 0000000000..44d0168350
--- /dev/null
+++ b/cannonball/patches/patch-cmake_bsd.cmake
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Create a cmake file for NetBSD build.
+
+--- cmake/bsd.cmake.orig	2019-06-09 15:29:08.087446737 +0000
++++ cmake/bsd.cmake
+@@ -0,0 +1,21 @@
++# Default CMake Setup. Used for NetBSD Builds.
++
++set(lib_base @PREFIX@/include)
++
++set(sdl_root ${lib_base}/SDL)
++
++include_directories("${sdl_root}")
++
++link_libraries(cannonball
++    SDL
++)
++
++# Linking
++link_directories(
++    "@PREFIX@/lib"
++)
++
++# Location for Cannonball to create save files
++# Used to auto-generate setup.hpp with various file paths
++set(xml_directory ./)
++set(sdl_flags "SDL_DOUBLEBUF | SDL_SWSURFACE")


Home | Main Index | Thread Index | Old Index