1 |
commit: 8e0a99479df558044065d9040b535bd7068981c1 |
2 |
Author: Michael Weber <xmw <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 19 21:25:43 2018 +0000 |
4 |
Commit: Michael Weber <xmw <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 19 21:25:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e0a9947 |
7 |
|
8 |
dev-libs/yajl: Use EAPI=6, fix build with uclibc (bug 512738). |
9 |
|
10 |
Thanks a17r and René Rhéaume. |
11 |
|
12 |
Closes: https://github.com/gentoo/gentoo/pull/9620 |
13 |
Closes: https://bugs.gentoo.org/512738 |
14 |
Package-Manager: Portage-2.3.45, Repoman-2.3.10 |
15 |
|
16 |
dev-libs/yajl/files/yajl-2.1.0-uclibc.patch | 14 +++++++++++ |
17 |
dev-libs/yajl/yajl-2.1.0-r1.ebuild | 38 +++++++++++++++++++++++++++++ |
18 |
2 files changed, 52 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/yajl/files/yajl-2.1.0-uclibc.patch b/dev-libs/yajl/files/yajl-2.1.0-uclibc.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..2e6f176de64 |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/yajl/files/yajl-2.1.0-uclibc.patch |
25 |
@@ -0,0 +1,14 @@ |
26 |
+diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt |
27 |
+index da4032b..d48e218 100644 |
28 |
+--- a/reformatter/CMakeLists.txt |
29 |
++++ b/reformatter/CMakeLists.txt |
30 |
+@@ -26,7 +26,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) |
31 |
+ |
32 |
+ ADD_EXECUTABLE(json_reformat ${SRCS}) |
33 |
+ |
34 |
+-TARGET_LINK_LIBRARIES(json_reformat yajl_s) |
35 |
++TARGET_LINK_LIBRARIES(json_reformat yajl_s m) |
36 |
+ |
37 |
+ # copy the binary into the output directory |
38 |
+ GET_TARGET_PROPERTY(binPath json_reformat LOCATION) |
39 |
+ |
40 |
|
41 |
diff --git a/dev-libs/yajl/yajl-2.1.0-r1.ebuild b/dev-libs/yajl/yajl-2.1.0-r1.ebuild |
42 |
new file mode 100644 |
43 |
index 00000000000..003688ade58 |
44 |
--- /dev/null |
45 |
+++ b/dev-libs/yajl/yajl-2.1.0-r1.ebuild |
46 |
@@ -0,0 +1,38 @@ |
47 |
+# Copyright 1999-2018 Gentoo Foundation |
48 |
+# Distributed under the terms of the GNU General Public License v2 |
49 |
+ |
50 |
+EAPI=6 |
51 |
+ |
52 |
+inherit cmake-multilib vcs-snapshot |
53 |
+ |
54 |
+DESCRIPTION="Small event-driven (SAX-style) JSON parser" |
55 |
+HOMEPAGE="https://lloyd.github.com/yajl/" |
56 |
+SRC_URI="https://github.com/lloyd/yajl/tarball/${PV} -> ${P}.tar.gz" |
57 |
+ |
58 |
+LICENSE="ISC" |
59 |
+SLOT="0/2" |
60 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
61 |
+IUSE="static-libs" |
62 |
+ |
63 |
+PATCHES=( "${FILESDIR}"/${P}-uclibc.patch ) |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ cmake-utils_src_prepare |
67 |
+ |
68 |
+ multilib_copy_sources |
69 |
+} |
70 |
+ |
71 |
+src_test() { |
72 |
+ run_test() { |
73 |
+ cd "${BUILD_DIR}"/test/parsing |
74 |
+ ./run_tests.sh ./yajl_test || die |
75 |
+ } |
76 |
+ multilib_parallel_foreach_abi run_test |
77 |
+} |
78 |
+ |
79 |
+src_install() { |
80 |
+ cmake-multilib_src_install |
81 |
+ |
82 |
+ use static-libs || \ |
83 |
+ find "${D}" -name libyajl_s.a -delete |
84 |
+} |