summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2005-09-25 07:13:41 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2005-09-25 07:13:41 +0000
commit482f2fdbf639ac5de544877fbeb6b2d052ee1668 (patch)
tree0270dca3ee4a1a134c9ae0cbdcbc914269f32fdd /games-action/d1x
parentmake sure edje was built with USE=png (diff)
downloadgentoo-2-482f2fdbf639ac5de544877fbeb6b2d052ee1668.tar.gz
gentoo-2-482f2fdbf639ac5de544877fbeb6b2d052ee1668.tar.bz2
gentoo-2-482f2fdbf639ac5de544877fbeb6b2d052ee1668.zip
unpack in src_unpack; tidy
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'games-action/d1x')
-rw-r--r--games-action/d1x/ChangeLog7
-rw-r--r--games-action/d1x/d1x-20040118.ebuild98
2 files changed, 49 insertions, 56 deletions
diff --git a/games-action/d1x/ChangeLog b/games-action/d1x/ChangeLog
index 9f0984a5bc88..fa8d43585b95 100644
--- a/games-action/d1x/ChangeLog
+++ b/games-action/d1x/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for games-action/d1x
-# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/d1x/ChangeLog,v 1.4 2004/06/24 21:53:54 agriffis Exp $
+# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-action/d1x/ChangeLog,v 1.5 2005/09/25 07:13:41 mr_bones_ Exp $
+
+ 25 Sep 2005; Michael Sterrett <mr_bones_@gentoo.org> d1x-20040118.ebuild:
+ unpack in src_unpack; tidy
30 Mar 2004; Michael Sterrett <mr_bones_@gentoo.org> d1x-20040118.ebuild:
don't rdepend on nasm; depend on sed >= 4
diff --git a/games-action/d1x/d1x-20040118.ebuild b/games-action/d1x/d1x-20040118.ebuild
index 1f136593767c..e525d4829086 100644
--- a/games-action/d1x/d1x-20040118.ebuild
+++ b/games-action/d1x/d1x-20040118.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/d1x/d1x-20040118.ebuild,v 1.4 2004/06/30 02:32:13 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/d1x/d1x-20040118.ebuild,v 1.5 2005/09/25 07:13:41 mr_bones_ Exp $
inherit eutils games
@@ -13,46 +13,40 @@ SLOT="0"
KEYWORDS="x86"
IUSE="opengl"
-RDEPEND="virtual/libc
- media-libs/libsdl
+RDEPEND="media-libs/libsdl
opengl? (
virtual/opengl
media-libs/libpng
sys-libs/zlib
)"
DEPEND="${RDEPEND}
- >=sys-apps/sed-4
>=dev-lang/nasm-0.97"
-S="${WORKDIR}/${PN}"
+S=${WORKDIR}/${PN}
-pkg_setup () {
+pkg_setup() {
cdrom_get_cds descent
games_pkg_setup
}
-src_unpack () {
+src_unpack() {
unpack ${A}
- local dir="${WORKDIR}/descent1-data"
- mkdir "${dir}" || die
+ mkdir "${WORKDIR}/descent1-data" || die
# Copy data files
- local src="${CDROM_ROOT}/descent"
- cd "${src}" || die
+ cd "${CDROM_ROOT}/descent" || die
- for x in chaos.hog chaos.msn descent.b50 descent.dem descent.hog \
+ cp chaos.hog chaos.msn descent.b50 descent.dem descent.hog \
descent.m50 descent.phx descent.pig descent2.adv descentg.ini \
level18.dem miniboss.dem readme.txt descent.faq orderfrm.txt \
- devteam.pcx; do
- cp "${x}" "${dir}" || die
- done
+ devteam.pcx \
+ "${WORKDIR}/descent1-data" || die
# Apply 1.0 -> 1.5 patch
cd "${WORKDIR}/descent1.5-patch" || die
for x in *.patch; do
- if patch "${dir}/${x%%.patch}" < "${x}" \
- >/dev/null 2>/dev/null; then
+ if patch "${WORKDIR}/descent1-data/${x%%.patch}" < "${x}" &>/dev/null ; then
einfo "Patched ${x%%.patch} to version 1.5"
fi
done
@@ -68,11 +62,32 @@ src_unpack () {
else
sed -i -e 's/^#\(SDL_IO = 1\)/\1/' defines.mak || die
fi
+
+ sed -i \
+ -e 's/make /$(MAKE) /' \
+ makefile rules.mak default.mak \
+ || die "sed failed"
+
+ binname="d1x143"
+ if use opengl; then
+ binname="d1x143_ogl"
+ fi
+
+ cat > "${T}"/d1x <<-EOS
+ #!/bin/sh
+ if [ ! -e "\${HOME}/.d1x" ]; then
+ mkdir "\${HOME}/.d1x"
+ cp "${GAMES_DATADIR}/d1x/d1x.ini" "\${HOME}/.d1x/"
+ fi
+
+ cd "\${HOME}/.d1x/"
+ exec "${GAMES_LIBDIR}"/${PN}/${binname} -missiondir "${GAMES_DATADIR}/d1x" "\$@"
+ EOS
}
-src_compile () {
- make dep || die
- make || die
+src_compile() {
+ emake dep || die
+ emake -j1 || die
}
src_install() {
@@ -80,54 +95,29 @@ src_install() {
cd "${S}"
dodoc d1x.faq d1x.txt d1x140.txt readme.d1x readme.org todo.txt \
bugs.txt || die
- dodir
# Copy data files
- local src="${WORKDIR}/descent1-data"
- local dir="${GAMES_DATADIR}/d1x"
- cd "${src}" || die
+ cd "${WORKDIR}/descent1-data" || die
- dodir "${dir}"
-
- insinto "${dir}"
- for x in chaos.hog chaos.msn descent.b50 descent.dem descent.hog \
+ insinto "${GAMES_DATADIR}/d1x"
+ doins chaos.hog chaos.msn descent.b50 descent.dem descent.hog \
descent.m50 descent.phx descent.pig descent2.adv descentg.ini \
- level18.dem miniboss.dem; do
- doins "${x}" || die
- done
+ level18.dem miniboss.dem || die
# Install original documentation files
- dodoc "readme.txt" "descent.faq" "orderfrm.txt" "devteam.pcx" || die
+ dodoc "readme.txt" "descent.faq" "orderfrm.txt" "devteam.pcx"
# Copy d1x.ini
- cd "${S}" || die
- insinto "${dir}"
+ cd "${S}"
+ insinto "${GAMES_DATADIR}/d1x"
doins d1x.ini || die
# Install the binary executable
- local binname
- if use opengl; then
- binname="d1x143_ogl"
- else
- binname="d1x143"
- fi
-
insinto "${GAMES_LIBDIR}/${PN}"
insopts -m0750
doins "${binname}"
- # Install the shell script wrapper
- local tempbin
- tempbin="${T}/d1x"
- echo -en "#!/bin/sh\n" > "${tempbin}"
- echo -en "if [ ! -e \"\${HOME}/.d1x\" ]; then\n" >> "${tempbin}"
- echo -en " mkdir \"\${HOME}/.d1x\"\n" >> "${tempbin}"
- echo -en " cp \"${dir}/d1x.ini\" \"\${HOME}/.d1x/\"\n" >> "${tempbin}"
- echo -en "fi\n\n" >> "${tempbin}"
- echo -en "cd \"\${HOME}/.d1x/\"\n" >> "${tempbin}"
- echo -en "exec ${GAMES_LIBDIR}/${PN}/${binname} " >> "${tempbin}"
- echo -en "-missiondir \"${dir}\" \"\$@\"\n" >> "${tempbin}"
- dogamesbin "${tempbin}"
+ dogamesbin "${T}/d1x" || die "dogamesbin failed"
prepgamesdirs
}