summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-board/acnchess/Manifest1
-rw-r--r--games-board/acnchess/acnchess-0_p20140917.ebuild34
-rw-r--r--games-board/acnchess/files/acnchess-0_p20140917-bundle.patch72
-rw-r--r--games-board/acnchess/metadata.xml8
4 files changed, 115 insertions, 0 deletions
diff --git a/games-board/acnchess/Manifest b/games-board/acnchess/Manifest
new file mode 100644
index 0000000..54f15e4
--- /dev/null
+++ b/games-board/acnchess/Manifest
@@ -0,0 +1 @@
+DIST acnchess-0_p20140917.tar.xz 1124664 SHA256 122f447aafb2100c14e064ae4271a9a7684ebea9a991997577a3c7931fd7872b SHA512 c99c7a6b3fb4ac5076c88ca88f1e40d006d1f7324458810898987138b5574a207411de39ae70a5fb0cdbfe1108c47d7f4fede589592b392f8f925d30afe31482 WHIRLPOOL b8e65560e2be7853f877ab9c03933aa620b081f7c72260a275d86bc952df05a6cccdd4e91bcd74b9a02f7350a796dd6f19b885ecdefaab6a00a29f8dc70162a3
diff --git a/games-board/acnchess/acnchess-0_p20140917.ebuild b/games-board/acnchess/acnchess-0_p20140917.ebuild
new file mode 100644
index 0000000..60cfd7d
--- /dev/null
+++ b/games-board/acnchess/acnchess-0_p20140917.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+inherit eutils cmake-utils
+
+DESCRIPTION="GTK+ 2.x Xiangqi GUI + engine 'acnguy'"
+HOMEPAGE="https://github.com/naihe2010/acnchess"
+SRC_URI="http://www.hartwork.org/public/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ x11-libs/gtk+:2
+ dev-libs/glib
+ dev-libs/libttdht
+ dev-libs/libecco-bin"
+
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ # TODO rm -R libs/iniparser3.0b || die
+ rm -R libs/openssl-0.9.8k || die
+ rm -R libs/ecco || die
+ rmdir libs/libttdht || die
+
+ epatch "${FILESDIR}"/${P}-bundle.patch
+}
diff --git a/games-board/acnchess/files/acnchess-0_p20140917-bundle.patch b/games-board/acnchess/files/acnchess-0_p20140917-bundle.patch
new file mode 100644
index 0000000..3ee5d07
--- /dev/null
+++ b/games-board/acnchess/files/acnchess-0_p20140917-bundle.patch
@@ -0,0 +1,72 @@
+From 78a33443b762a169fbed1aa66f607f06ec517ade Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 7 Sep 2014 19:57:52 +0200
+Subject: [PATCH] Fix bundling
+
+---
+ CMakeLists.txt | 4 ----
+ libs/CMakeLists.txt | 6 ------
+ src/CMakeLists.txt | 6 ++----
+ 3 files changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 94d4427..65cf228 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -87,10 +87,6 @@ IF (WIN32)
+ INSTALL (FILES
+ ${CMAKE_SOURCE_DIR}/libs/ecco/ECCO.DLL
+ DESTINATION .)
+-ELSE (WIN32)
+- INSTALL (FILES
+- ${CMAKE_SOURCE_DIR}/libs/ecco/libecco.so
+- DESTINATION ${CMAKE_PREFIX_PATH}/lib)
+ ENDIF (WIN32)
+
+ SET (CPACK_PACKAGE_VENDOR "Alf, Inc.")
+diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
+index b96d952..a34363e 100644
+--- a/libs/CMakeLists.txt
++++ b/libs/CMakeLists.txt
+@@ -12,12 +12,6 @@ SET (INIPARSER_SOURCE iniparser3.0b)
+ FILE (GLOB INIPARSER_SRCS "${INIPARSER_SOURCE}/src/*.[ch]")
+ ADD_LIBRARY (iniparser STATIC ${INIPARSER_SRCS})
+
+-# compile libttdht
+-SET (LIBTTDHT_SOURCE libttdht)
+-FILE (GLOB LIBTTDHT_SRCS "${LIBTTDHT_SOURCE}/src/*.[ch]")
+-ADD_LIBRARY (ttdht STATIC ${LIBTTDHT_SRCS})
+-
+ ADD_CUSTOM_TARGET (libs COMMAND echo "Compile libs OK")
+
+ ADD_DEPENDENCIES (libs iniparser)
+-ADD_DEPENDENCIES (libs ttdht)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 60e3276..b97bf8a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -20,11 +20,9 @@ LINK_DIRECTORIES (${GTK2_LIBRARY_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR})
+
+ INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR}/libs/iniparser3.0b/src"
+- "${CMAKE_SOURCE_DIR}/libs/libttdht/src"
++ "/usr/include/libttdht/"
+ )
+ LINK_DIRECTORIES ("${CMAKE_BINARY_DIR}/libs"
+- "${CMAKE_SOURCE_DIR}/libs/openssl-0.9.8k/lib"
+- "${CMAKE_SOURCE_DIR}/libs/ecco"
+ )
+
+ IF (WIN32)
+@@ -37,7 +35,7 @@ IF (WIN32)
+ -D_CRT_SECURE_NO_WARNINGS)
+ ELSE (WIN32)
+ SET (CMAKE_C_FLAGS "-Wall -D_FILE_OFFSET_BITS=64")
+- SET (REQ_LIBRARIES -lssl -lttdht -liniparser)
++ SET (REQ_LIBRARIES -lttdht -ldl -liniparser)
+
+ OPTION (ACNCHESS_ENABLE_DEBUG "If build binary with debug infomations." OFF)
+ IF (ACNCHESS_ENABLE_DEBUG)
+--
+2.1.0
+
diff --git a/games-board/acnchess/metadata.xml b/games-board/acnchess/metadata.xml
new file mode 100644
index 0000000..16bcc9f
--- /dev/null
+++ b/games-board/acnchess/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+</pkgmetadata>