# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="FreeDoko is a Doppelkopf-game" HOMEPAGE="http://free-doko.sourceforge.net" SRC_URI="mirror://sourceforge/free-doko/FreeDoko_${PV}.src.zip kdecards? ( mirror://sourceforge/free-doko/kdecarddecks.zip ) xskatcards? ( mirror://sourceforge/free-doko/xskat.zip ) pysolcards? ( mirror://sourceforge/free-doko/pysol.zip ) gnomecards? ( mirror://sourceforge/free-doko/gnome-games.zip ) openclipcards? ( mirror://sourceforge/free-doko/openclipart.zip ) !altenburgcards? ( !xskatcards? ( !kdecards? ( !pysolcards? ( !gnomecards? ( !openclipcards? ( mirror://sourceforge/free-doko/xskat.zip ) ) ) ) ) )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="xskatcards kdecards altenburgcards pysolcards gnomecards openclipcards net doc -sounds" RDEPEND="net? ( net-libs/gnet ) >=dev-cpp/gtkmm-2.4" DEPEND="${RDEPEND} app-arch/unzip dev-util/pkgconfig doc? ( virtual/latex-base )" S=${WORKDIR}/FreeDoko_${PV} src_unpack() { unpack FreeDoko_${PV}.src.zip cd "${S}" edos2unix src/Makefile.rules epatch \ "${FILESDIR}"/portage-cxx.patch \ "${FILESDIR}"/Fix_Cardset_Make.patch use !doc && epatch "${FILESDIR}"/nodoc.patch use !net && epatch "${FILESDIR}"/nonet.patch use !sounds && epatch "${FILESDIR}"/nosounds.patch sed -i \ -e 's/linux binary/Gentoo '${ARCH}' binary/g' \ Makefile \ || die "sed failed" cd data/cardsets use xskatcards && unpack xskat.zip use kdecards && unpack kdecarddecks.zip use pysolcards && unpack pysol.zip use gnomecards && unpack gnome-games.zip use openclipcards && unpack openclipart.zip if use xskatcards || use kdecards || use pysolcards || use gnomecards || use openclipcards ; then use altenburgcards || rm -r Altenburg fi if use !altenburgcards && use !xskatcards && use !kdecards && use !pysolcards && use !gnomecards && use !openclipcards ; then ewarn "You did not choose any cardset!" ewarn "I will install the cardset xskat" ewarn "You may change your mind and hit" ewarn "CTRL+C NOW to choose the cardsets" ewarn "with the USE-Flags" ebeep rm -r Altenburg && unpack xskat.zip fi } src_compile() { export CPPFLAGS="-DPUBLIC_DATA_DIRECTORY_VALUE='\"${GAMES_DATADIR}/${PN}\"'" export OSTYPE=Linux emake release_directory || die "build failed" emake release_data || die "build failed" emake release_linux_binary || die "build failed" } src_install() { RELEASE_TMP=$(grep "RELEASE_TMP = " ${S}/Makefile.install.directories | awk '{printf "%s", $3}') insinto "${GAMES_DATADIR}"/${PN}/ doins -r ${RELEASE_TMP}/FreeDoko_${PV}/* || die "Installation failed" games_make_wrapper freedoko ./FreeDoko ${GAMES_DATADIR}/${PN} fperms ug+x "${GAMES_DATADIR}/${PN}/FreeDoko" dodoc README LIESMICH ChangeLog newicon src/FreeDoko.png ${PN}.png make_desktop_entry ${PN} FreeDoko prepgamesdirs } pkg_postinst () { games_pkg_postinst if use altenburgcards; then elog "License Info:" elog "Verwendung der ASS Altenburger Spielkarten mit Genehmigung" elog "der Spielkartenfabrik Altenburg GmbH" fi }