summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-board/gambit/gambit-0_p47.ebuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/games-board/gambit/gambit-0_p47.ebuild b/games-board/gambit/gambit-0_p47.ebuild
new file mode 100644
index 0000000..922464c
--- /dev/null
+++ b/games-board/gambit/gambit-0_p47.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+CMAKE_IN_SOURCE_BUILD=true
+inherit cmake-utils subversion
+
+DESCRIPTION="Qt-based chess application + engine \"gupta\""
+HOMEPAGE="http://sourceforge.net/projects/gambitchess/"
+ESVN_REPO_URI="svn://svn.code.sf.net/p/gambitchess/code/"
+ESVN_REVISION=${PV/*_p/}
+
+LICENSE="CC0-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui
+ x11-libs/libX11
+ x11-libs/libICE"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN^}-${PV}
+
+src_prepare() {
+ rm svn_update_revision_number_header.sh || die
+ sed 's|svn_update_revision_number_header\.sh|/dev/null|' -i CMakeLists.txt || die
+
+ subversion_wc_info # to fill ESVN_WC_REVISION
+ cat <<-HEADER_H > src/svn_revision_number.h
+ #ifndef SVN_REVISION_NUMBER_H
+ #define SVN_REVISION_NUMBER_H
+
+ #define SVN_REVISION_NUMBER ${ESVN_WC_REVISION}
+ #define SVN_REVISION_NUMBER_STRING "${ESVN_WC_REVISION}"
+
+ #endif
+ HEADER_H
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCONFIG_ENABLE_UPDATE_CHECKER=OFF
+ -DCONFIG_GUPTA_ENGINE_DIRECTORY=/usr/bin/
+ -DCONFIG_RESOURCE_PATH_PREFIX=/usr/share/games/${PN}/
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ emake -C engine/gupta STRIP=/bin/true CFLAGS_RELEASE= release || die
+}
+
+src_install() {
+ insinto /usr/share/games/${PN}
+ doins -r data/* || die
+
+ doicon artwork/icons/${PN}/${PN}.svg
+ make_desktop_entry ${PN}chess ${PN^} ${PN} Game || die
+ dodoc doc/contributors.txt || die
+
+ dobin engine/gupta/gupta || die
+ dobin ${PN}chess || die
+}