summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2016-03-06 12:55:10 +0100
committerMartin Väth <martin@mvath.de>2016-03-06 12:55:10 +0100
commit57add74bd930d113ec36ff002bebbe4cf9a80f8a (patch)
tree7abce9c2b767cf5ebc44b4dfcbe84fecd534e4eb /games-action
parentsys-fs/squashmount: Version bump (diff)
downloadmv-57add74bd930d113ec36ff002bebbe4cf9a80f8a.tar.gz
mv-57add74bd930d113ec36ff002bebbe4cf9a80f8a.tar.bz2
mv-57add74bd930d113ec36ff002bebbe4cf9a80f8a.zip
games-action/trackballs: Add old gentoo ebuild, bumped to EAPI=6
Diffstat (limited to 'games-action')
-rw-r--r--games-action/trackballs/Manifest2
-rw-r--r--games-action/trackballs/files/trackballs-1.1.4-warning.patch45
-rw-r--r--games-action/trackballs/metadata.xml8
-rw-r--r--games-action/trackballs/trackballs-1.1.4-r1.ebuild79
4 files changed, 134 insertions, 0 deletions
diff --git a/games-action/trackballs/Manifest b/games-action/trackballs/Manifest
new file mode 100644
index 00000000..435b6b39
--- /dev/null
+++ b/games-action/trackballs/Manifest
@@ -0,0 +1,2 @@
+DIST trackballs-1.1.4.tar.gz 7229541 SHA256 459dbaec27354fb4afff3d1aa491bc21b4fc2c0769eae86a47aaeb545cb434a6
+DIST trackballs-music-1.4.tar.bz2 18825033 SHA256 bf9b793b6fab81e59fb9a373944a5724af279b0faebb2461bb98beb5aa466058
diff --git a/games-action/trackballs/files/trackballs-1.1.4-warning.patch b/games-action/trackballs/files/trackballs-1.1.4-warning.patch
new file mode 100644
index 00000000..c4e21582
--- /dev/null
+++ b/games-action/trackballs/files/trackballs-1.1.4-warning.patch
@@ -0,0 +1,45 @@
+diff -ru trackballs-1.1.4.orig/src/glHelp.cc trackballs-1.1.4/src/glHelp.cc
+--- trackballs-1.1.4.orig/src/glHelp.cc 2007-04-07 09:15:09.000000000 -0400
++++ trackballs-1.1.4/src/glHelp.cc 2011-04-12 12:04:01.142847026 -0400
+@@ -741,29 +741,6 @@
+ }
+ }
+
+-/* C <- A(B) */
+-void useMatrix(Matrix4d A,const double B[3],double C[3]) {
+- int i,k;
+- for(i=0;i<3;i++) {
+- C[i] = A[i][3];
+- for(k=0;k<3;k++)
+- C[i] += A[i][k] * B[k];
+- }
+- double h=A[3][3];
+- for(k=0;k<3;k++) h+=A[3][k];
+- for(k=0;k<3;k++) C[k] /= h;
+-}
+-
+-/* C <- A(B) */
+-void useMatrix(Matrix3d A,const double B[3],double C[3]) {
+- int i,k;
+- for(i=0;i<3;i++) {
+- C[i] = A[i][3];
+- for(k=0;k<3;k++)
+- C[i] += A[i][k] * B[k];
+- }
+-}
+-
+ /* C <- A */
+ void assign(const Matrix4d A,Matrix4d C) {
+ int i,j;
+diff -ru trackballs-1.1.4.orig/src/glHelp.h trackballs-1.1.4/src/glHelp.h
+--- trackballs-1.1.4.orig/src/glHelp.h 2006-08-05 11:22:32.000000000 -0400
++++ trackballs-1.1.4/src/glHelp.h 2011-04-12 12:04:16.689745593 -0400
+@@ -57,8 +57,6 @@
+ void zero(double[3]);
+
+ void debugMatrix(Matrix4d);
+-void useMatrix(Matrix4d,const double[3],double[3]);
+-void useMatrix(Matrix3d,const double[3],double[3]);
+ void identityMatrix(Matrix4d);
+ void assign(const Matrix4d,Matrix4d);
+ void matrixMult(Matrix4d,Matrix4d,Matrix4d);
diff --git a/games-action/trackballs/metadata.xml b/games-action/trackballs/metadata.xml
new file mode 100644
index 00000000..b919c846
--- /dev/null
+++ b/games-action/trackballs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-action/trackballs/trackballs-1.1.4-r1.ebuild b/games-action/trackballs/trackballs-1.1.4-r1.ebuild
new file mode 100644
index 00000000..b1acf6f0
--- /dev/null
+++ b/games-action/trackballs/trackballs-1.1.4-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit eutils user
+RESTRICT="mirror"
+
+DESCRIPTION="simple game similar to the classical game Marble Madness"
+HOMEPAGE="http://trackballs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://sourceforge/${PN}/${PN}-music-1.4.tar.bz2"
+
+LICENSE="GPL-2 FML-1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="nls"
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/libsdl[sound,joystick,video]
+ >=dev-scheme/guile-1.8:12[deprecated]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ media-libs/sdl-ttf
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup(){
+ enewgroup gamestat 36
+}
+
+src_prepare() {
+ sed -i \
+ -e 's/icons //' \
+ -e 's/games/gamestat/' \
+ share/Makefile.in \
+ || die
+ sed -i \
+ -e '/^localedir/s:=.*:=/usr/share/locale:' \
+ src/Makefile.in \
+ po/Makefile.in.in \
+ || die
+ # Fix _FORTIFY_SOURCE buffer overflow due to wrong sizeof
+ sed -i \
+ -e 's/\(snprintf(\(name\),sizeof\)(str)/\1(\2)/' \
+ src/enterHighScoreMode.cc || die
+ # Fix -Wformat-security warning due to non-literal with no format arguments
+ sed -i \
+ -e 's/\(snprintf(levelname,sizeof(levelname),\)\(name)\)/\1 "%s", \2/' \
+ -e 's/\(snprintf(Settings::settings->specialLevel,sizeof(Settings::settings->specialLevel),\)\(levelname)\)/\1 "%s", \2/' \
+ src/editMode.cc || die
+ sed -i \
+ -e 's/\(snprintf(\(textureName\),\)63\(,textureNames\[i\])\)/\1 sizeof(\2), "%s"\3/' \
+ src/map.cc || die
+ eapply "${FILESDIR}"/${P}-warning.patch
+ eapply_user
+}
+
+src_configure() {
+ econf \
+ --datadir=/usr/share/games \
+ --datarootdir=/usr/share \
+ --disable-dependency-tracking \
+ --with-highscores=/var/games/${PN}.score \
+ $(use_enable nls)
+}
+
+src_install() {
+ make DESTDIR="${D}" install
+ insinto /usr/share/games/${PN}/music
+ doins "${WORKDIR}"/trackballs-music/*.ogg
+ newicon share/icons/${PN}-64x64.png ${PN}.png
+ make_desktop_entry ${PN} Trackballs
+ dodoc AUTHORS ChangeLog FAQ NEWS README TODO
+ fowners root:gamestat /usr/bin/${PN}
+ fperms 2755 /usr/bin/${PN}
+}