summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2013-10-11 18:10:29 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2013-10-11 18:10:29 +0000
commitfd8f8b726255a0db44c75d0fde1a765a434df3b1 (patch)
treebeee72d2249146ff68f2ca96e96874cf4128d9b7 /games-puzzle/neverball
parentarm stable, bug #482056 (diff)
downloadgentoo-2-fd8f8b726255a0db44c75d0fde1a765a434df3b1.tar.gz
gentoo-2-fd8f8b726255a0db44c75d0fde1a765a434df3b1.tar.bz2
gentoo-2-fd8f8b726255a0db44c75d0fde1a765a434df3b1.zip
Fix underlinking against libm: bug #464014 and fix by Ted Tanberry.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
Diffstat (limited to 'games-puzzle/neverball')
-rw-r--r--games-puzzle/neverball/ChangeLog8
-rw-r--r--games-puzzle/neverball/files/neverball-1.5.4-lm.patch28
-rw-r--r--games-puzzle/neverball/neverball-1.5.4-r1.ebuild84
3 files changed, 119 insertions, 1 deletions
diff --git a/games-puzzle/neverball/ChangeLog b/games-puzzle/neverball/ChangeLog
index a5b6cbe62a48..07fc90a915e1 100644
--- a/games-puzzle/neverball/ChangeLog
+++ b/games-puzzle/neverball/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-puzzle/neverball
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/neverball/ChangeLog,v 1.44 2013/04/10 18:14:42 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/neverball/ChangeLog,v 1.45 2013/10/11 18:10:29 slyfox Exp $
+
+*neverball-1.5.4-r1 (11 Oct 2013)
+
+ 11 Oct 2013; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/neverball-1.5.4-lm.patch, +neverball-1.5.4-r1.ebuild:
+ Fix underlinking against libm: bug #464014 and fix by Ted Tanberry.
10 Apr 2013; Michael Sterrett <mr_bones_@gentoo.org>
+files/neverball-1.5.4-libpng.patch, neverball-1.5.4.ebuild:
diff --git a/games-puzzle/neverball/files/neverball-1.5.4-lm.patch b/games-puzzle/neverball/files/neverball-1.5.4-lm.patch
new file mode 100644
index 000000000000..4245e28fe2f2
--- /dev/null
+++ b/games-puzzle/neverball/files/neverball-1.5.4-lm.patch
@@ -0,0 +1,28 @@
+Fix link faiure against -lm
+
+x86_64-pc-linux-gnu-gcc -Wall -ansi -pedantic -march=core2 -O2 -pipe -ggdb -o neverball-mapc share/vec3.o share/base_image.o share/solid.o share/binary.o share/base_config.o share/common.o share/fs.o share/fs_png.o share/fs_jpg.o share/dir.o share/array.o share/mapc.o -Wl,-O1 -Wl,--as-needed -ljpeg -lpng15 -lphysfs
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: share/mapc.o: undefined reference to symbol 'acosf@@GLIBC_2.2.5'
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'acosf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
+
+Gentoo-bug: http://bugs.gentoo.org/464014
+diff --git a/Makefile b/Makefile
+index 62a87e9..1816707 100644
+--- a/Makefile
++++ b/Makefile
+@@ -132,6 +132,7 @@ ifdef DARWIN
+ endif
+
+ BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
++MAPC_LIBS := -lm # only acosf user
+
+ ifdef DARWIN
+ BASE_LIBS += -L/opt/local/lib
+@@ -318,7 +319,7 @@ $(PUTT_TARG) : $(PUTT_OBJS)
+ $(CC) $(ALL_CFLAGS) -o $(PUTT_TARG) $(PUTT_OBJS) $(LDFLAGS) $(ALL_LIBS)
+
+ $(MAPC_TARG) : $(MAPC_OBJS)
+- $(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(BASE_LIBS)
++ $(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(MAPC_LIBS) $(BASE_LIBS)
+
+ # Work around some extremely helpful sdl-config scripts.
+
diff --git a/games-puzzle/neverball/neverball-1.5.4-r1.ebuild b/games-puzzle/neverball/neverball-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..83aed15fce2a
--- /dev/null
+++ b/games-puzzle/neverball/neverball-1.5.4-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/neverball/neverball-1.5.4-r1.ebuild,v 1.1 2013/10/11 18:10:29 slyfox Exp $
+
+EAPI=2
+inherit eutils games
+
+DESCRIPTION="Clone of Super Monkey Ball using SDL/OpenGL"
+HOMEPAGE="http://icculus.org/neverball/"
+SRC_URI="http://icculus.org/neverball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="nls"
+RESTRICT="test"
+
+RDEPEND="media-libs/libsdl[audio,joystick,opengl,video]
+ media-libs/sdl-ttf
+ media-libs/libpng:0
+ virtual/jpeg
+ media-libs/libvorbis
+ virtual/opengl
+ dev-games/physfs
+ media-fonts/dejavu
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ sed -i \
+ -e 's:mapc:neverball-mapc:g' \
+ -e 's:MAPC:NEVERBALL-MAPC:g' \
+ -e '1 s/ 1 / 6 /' \
+ dist/mapc.1 \
+ || die "sed failed"
+ sed -i \
+ -e 's:-O2:$(E_CFLAGS):' \
+ -e "/^MAPC_TARG/s/mapc/${PN}-mapc/" \
+ Makefile \
+ || die "sed failed"
+ epatch \
+ "${FILESDIR}"/${P}-underlink.patch \
+ "${FILESDIR}"/${P}-libpng.patch \
+ "${FILESDIR}"/${P}-lm.patch
+}
+
+src_compile() {
+ emake \
+ ENABLE_NLS=$(use nls && echo 1 || echo 0) \
+ E_CFLAGS="${CFLAGS}" \
+ LOCALEDIR=/usr/share/locale \
+ DATADIR="${GAMES_DATADIR}/${PN}" \
+ || die "emake failed"
+}
+
+src_install() {
+ dogamesbin ${PN}-mapc neverball neverputt || die
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r data/* || die
+ rm -f "${D}${GAMES_DATADIR}/${PN}"/ttf/DejaVuSans-Bold.ttf
+ dosym /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf \
+ "${GAMES_DATADIR}/${PN}"/ttf/DejaVuSans-Bold.ttf || die
+ if [[ -d locale ]] ; then
+ insinto /usr/share
+ doins -r locale || die
+ fi
+ dodoc CHANGES README || die
+
+ newicon dist/neverball_512.png neverball.png || die
+ newicon dist/neverputt_512.png neverputt.png || die
+ doman dist/*.6 || die
+ newman dist/mapc.1 neverball-mapc.6 || die
+ make_desktop_entry neverball Neverball || die
+ make_desktop_entry neverputt Neverputt neverputt || die
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "${P} will overwrite existing high-score files, so back them up if"
+ elog "you want to preserve your old scores and progress."
+}