# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils DESCRIPTION="Enhanced port of the official DOOM source code,that also support Heretic,Hexen and Strife" HOMEPAGE="http://www.zdoom.org" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2" #SRC_URI="mirror://sourceforge/${PN}/${P}-src.7z" LICENSE="|| ( doomsource buildlic ravenlic zdoom )" SLOT="0" KEYWORDS="~x86" IUSE="debug" DEPEND=">=media-libs/libsdl-1.2.8-r1 >=dev-lang/nasm-0.98.39-r3 >=media-libs/fmod-3.74 >=media-libs/flac-1.1.2-r3 media-libs/jpeg" pkg_setup() { games_pkg_setup } dir="${GAMES_DATADIR}/doom-data" src_unpack() { unpack ${A} || die "unpack failed" epatch ${FILESDIR}/zdoom-2.1.0-path.diff || die "epatch failed" # ------------------------------------------------------------------ # --- TO DISABLE USE OF CCDV, UNCOMMENT THE FOLLOWING BLOCK OF LINES # Making compilation more verbose (disabling use of CCDV) #sed -i Makefile.linux \ # -e "/^CCDV =/d" \ # || die "sed Makefile failed" #sed -i tools/updaterevision/Makefile \ # -e "/CCDV =/d" \ # || die "sed Makefile failed" #sed -i Makefile.linux \ # -e 's/^$(ZDOOMBIN): ccdv updaterev $(OBJDIR) $(OBJS)/$(ZDOOMBIN): updaterev $(OBJDIR) $(OBJS)/' \ # || die "sed Makefile failed" # ------------------------------------------------------------------ # CXXFLAGS is already defined in /etc/make.conf, fix Makefile accordingly sed -i Makefile.linux \ -e 's/^CXXFLAGS += $(CFLAGS)/CXXFLAGS = $(CFLAGS)/' \ || die "sed Makefile failed" } src_compile() { make clean || die "make clean failed" if use debug; then DEBUG=1 make -f Makefile.linux || die "make failed" else make -f Makefile.linux || die "make failed" fi } src_install() { local myexe exeinto "${GAMES_DATADIR}/${PN}" if use debug; then myexe="${PN}d" newexe ${myexe} ${PN} || die "newexe failed" else doexe ${PN} || die "doexe failed" fi games_make_wrapper ${PN} ${GAMES_DATADIR}/${PN}/${PN} "${dir}" "${dir}" insinto "${GAMES_DATADIR}/${PN}" doins wadsrc/${PN}.pk3 || die "doins failed" dosym "${GAMES_DATADIR}/${PN}/${PN}.pk3" "${dir}/${PN}.pk3" dodoc docs/{commands,history,rh-log,zdoom}.txt prepgamesdirs } pkg_postinst() { games_pkg_postinst }