summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2018-03-04 22:50:34 +0800
committerYixun Lan <dlan@gentoo.org>2018-03-04 22:53:20 +0800
commit8f69d6fe4ca77d44807f58f55a5143d1fd5c1bbd (patch)
treedfbedb5826dfbe3e7eaf5e8d70c20c2d9b387cea /net-libs/libcork
parentdev-python/urdf_parser_py: bump to 0.4.0; add src_test; drop python3 as tests... (diff)
downloadgentoo-8f69d6fe4ca77d44807f58f55a5143d1fd5c1bbd.tar.gz
gentoo-8f69d6fe4ca77d44807f58f55a5143d1fd5c1bbd.tar.bz2
gentoo-8f69d6fe4ca77d44807f58f55a5143d1fd5c1bbd.zip
net-libs/libcork: fix build err
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'net-libs/libcork')
-rw-r--r--net-libs/libcork/files/libcork-0.15.0-git.patch16
-rw-r--r--net-libs/libcork/files/libcork-0.15.0-version.patch15
-rw-r--r--net-libs/libcork/libcork-0.15.0.ebuild21
3 files changed, 50 insertions, 2 deletions
diff --git a/net-libs/libcork/files/libcork-0.15.0-git.patch b/net-libs/libcork/files/libcork-0.15.0-git.patch
new file mode 100644
index 00000000000..54a54a412f4
--- /dev/null
+++ b/net-libs/libcork/files/libcork-0.15.0-git.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1e236f9..c8770f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,11 +49,6 @@ execute_process(
+ OUTPUT_VARIABLE GIT_SHA1
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+-if(GIT_SHA1_RESULT)
+- message(FATAL_ERROR
+- "Cannot determine git commit: " ${GIT_SHA1_RESULT})
+-endif(GIT_SHA1_RESULT)
+-
+ #-----------------------------------------------------------------------
+ # Check for building on Tilera
+ # If the Tilera environment is installed, then $TILERA_ROOT is defined
diff --git a/net-libs/libcork/files/libcork-0.15.0-version.patch b/net-libs/libcork/files/libcork-0.15.0-version.patch
new file mode 100644
index 00000000000..64cef927443
--- /dev/null
+++ b/net-libs/libcork/files/libcork-0.15.0-version.patch
@@ -0,0 +1,15 @@
+diff --git a/version.sh b/version.sh
+index 40e8d05..e06443f 100755
+--- a/version.sh
++++ b/version.sh
+@@ -17,8 +17,8 @@
+ # Note that the RELEASE-VERSION file should *not* be checked into git;
+ # please add it to your top-level .gitignore file.
+
+-version=$(git describe)
+-if [ -n ${version} ]; then
++[ -d .git ] && version=$(git describe)
++if [ -n "${version}" ]; then
+ # If we got something from git-describe, write the version to the
+ # output file.
+ echo ${version} > RELEASE-VERSION
diff --git a/net-libs/libcork/libcork-0.15.0.ebuild b/net-libs/libcork/libcork-0.15.0.ebuild
index 3a4e572ad7f..f31843ee66b 100644
--- a/net-libs/libcork/libcork-0.15.0.ebuild
+++ b/net-libs/libcork/libcork-0.15.0.ebuild
@@ -3,6 +3,8 @@
EAPI=6
+inherit cmake-utils
+
DESCRIPTION="A simple, easily embeddable cross-platform C library"
HOMEPAGE="https://github.com/dcreager/libcork"
SRC_URI="https://github.com/dcreager/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
@@ -12,5 +14,20 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-DEPEND=""
-RDEPEND="${DEPEND}"
+RDEPEND="dev-libs/check"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ if ! [ -e "${S}"/RELEASE-VERSION ] ; then
+ echo ${PV} > "${S}"/RELEASE-VERSION || die
+ fi
+ eapply "${FILESDIR}"/${P}-git.patch
+ eapply "${FILESDIR}"/${P}-version.patch
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+}