1 |
commit: c83deef5496190a13784839a9b48e20a77458346 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 11 20:02:45 2019 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 11 20:40:12 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83deef5 |
7 |
|
8 |
dev-libs/yajl: fix pkg-config file install |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/677870 |
11 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
13 |
|
14 |
dev-libs/yajl/files/yajl-2.1.0-pkg-config.patch | 50 +++++++++++++++++++++++++ |
15 |
dev-libs/yajl/yajl-2.1.0-r2.ebuild | 38 +++++++++++++++++++ |
16 |
2 files changed, 88 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/yajl/files/yajl-2.1.0-pkg-config.patch b/dev-libs/yajl/files/yajl-2.1.0-pkg-config.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..fc31ef0cf5d |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/yajl/files/yajl-2.1.0-pkg-config.patch |
23 |
@@ -0,0 +1,50 @@ |
24 |
+From 63703fd039fce33ac36e94b9ace4b7c12ef042b9 Mon Sep 17 00:00:00 2001 |
25 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
26 |
+Date: Sun, 24 Feb 2019 10:49:44 +0100 |
27 |
+Subject: [PATCH] cmake: Fix installing pkg-config file into libdir |
28 |
+ |
29 |
+Fix the CMake rules to install pkg-config file into lib/pkgconfig |
30 |
+rather than share/pkgconfig. The former location is correct |
31 |
+for ABI-dependent files such as libraries, while the latter should be |
32 |
+used only for ABI-agnostic resources (data files, executables). |
33 |
+ |
34 |
+This fixes using yajl on multilib systems where 32-bit and 64-bit |
35 |
+versions of the library are installed separately. This requires two |
36 |
+separate pkg-config files to be installed along with the libraries |
37 |
+into appropriate libdirs. When the file was installed into /usr/share, |
38 |
+only one variant was permitted and effectively using the other multilib |
39 |
+variant was broken, breaking other packages. |
40 |
+ |
41 |
+Original bug report: https://bugs.gentoo.org/677870 |
42 |
+--- |
43 |
+ src/CMakeLists.txt | 6 +++--- |
44 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
45 |
+ |
46 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
47 |
+index 99cf9e9..81369e4 100644 |
48 |
+--- a/src/CMakeLists.txt |
49 |
++++ b/src/CMakeLists.txt |
50 |
+@@ -30,7 +30,7 @@ ADD_DEFINITIONS(-DYAJL_BUILD) |
51 |
+ # set up some paths |
52 |
+ SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) |
53 |
+ SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl) |
54 |
+-SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) |
55 |
++SET (pcDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib/pkgconfig) |
56 |
+ |
57 |
+ # set the output path for libraries |
58 |
+ SET(LIBRARY_OUTPUT_PATH ${libDir}) |
59 |
+@@ -61,7 +61,7 @@ FILE(MAKE_DIRECTORY ${incDir}) |
60 |
+ # generate build-time source |
61 |
+ SET(dollar $) |
62 |
+ CONFIGURE_FILE(api/yajl_version.h.cmake ${incDir}/yajl_version.h) |
63 |
+-CONFIGURE_FILE(yajl.pc.cmake ${shareDir}/yajl.pc) |
64 |
++CONFIGURE_FILE(yajl.pc.cmake ${pcDir}/yajl.pc) |
65 |
+ |
66 |
+ # copy public headers to output directory |
67 |
+ FOREACH (header ${PUB_HDRS}) |
68 |
+@@ -84,4 +84,4 @@ INSTALL(TARGETS yajl |
69 |
+ INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) |
70 |
+ INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl) |
71 |
+ INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl) |
72 |
+-INSTALL(FILES ${shareDir}/yajl.pc DESTINATION share/pkgconfig) |
73 |
++INSTALL(FILES ${pcDir}/yajl.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) |
74 |
|
75 |
diff --git a/dev-libs/yajl/yajl-2.1.0-r2.ebuild b/dev-libs/yajl/yajl-2.1.0-r2.ebuild |
76 |
new file mode 100644 |
77 |
index 00000000000..9abc15c922f |
78 |
--- /dev/null |
79 |
+++ b/dev-libs/yajl/yajl-2.1.0-r2.ebuild |
80 |
@@ -0,0 +1,38 @@ |
81 |
+# Copyright 1999-2019 Gentoo Authors |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+ |
84 |
+EAPI=6 |
85 |
+ |
86 |
+inherit cmake-multilib vcs-snapshot |
87 |
+ |
88 |
+DESCRIPTION="Small event-driven (SAX-style) JSON parser" |
89 |
+HOMEPAGE="https://lloyd.github.com/yajl/" |
90 |
+SRC_URI="https://github.com/lloyd/yajl/tarball/${PV} -> ${P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="ISC" |
93 |
+SLOT="0/2" |
94 |
+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" |
95 |
+IUSE="static-libs" |
96 |
+ |
97 |
+PATCHES=( "${FILESDIR}"/${P}-uclibc.patch "${FILESDIR}"/${P}-pkg-config.patch ) |
98 |
+ |
99 |
+src_prepare() { |
100 |
+ cmake-utils_src_prepare |
101 |
+ |
102 |
+ multilib_copy_sources |
103 |
+} |
104 |
+ |
105 |
+src_test() { |
106 |
+ run_test() { |
107 |
+ cd "${BUILD_DIR}"/test/parsing |
108 |
+ ./run_tests.sh ./yajl_test || die |
109 |
+ } |
110 |
+ multilib_parallel_foreach_abi run_test |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ cmake-multilib_src_install |
115 |
+ |
116 |
+ use static-libs || \ |
117 |
+ find "${D}" -name libyajl_s.a -delete |
118 |
+} |