Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/pugixml/, dev-libs/pugixml/files/
Date: Wed, 09 Jan 2019 00:17:32
Message-Id: 1546993033.a8750e4306082f537d9b44d1b9b6b2c9aad503bc.candrews@gentoo
1 commit: a8750e4306082f537d9b44d1b9b6b2c9aad503bc
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 8 21:32:02 2019 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 9 00:17:13 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8750e43
7
8 dev-libs/pugixml: Install pkg-config, EAPI=7
9
10 Closes: https://bugs.gentoo.org/674910
11 Package-Manager: Portage-2.3.54, Repoman-2.3.12
12 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
13
14 ...9-Use-CMAKE_INSTALL_LIBDIR-for-pugixml.pc.patch | 39 ++++++++++++
15 ...ml-1.9-always-install-the-pkg-config-file.patch | 71 ++++++++++++++++++++++
16 ...config-Use-CMake-GnuInstallDirs-FULL-vars.patch | 39 ++++++++++++
17 dev-libs/pugixml/pugixml-1.9-r1.ebuild | 33 ++++++++++
18 4 files changed, 182 insertions(+)
19
20 diff --git a/dev-libs/pugixml/files/pugixml-1.9-Use-CMAKE_INSTALL_LIBDIR-for-pugixml.pc.patch b/dev-libs/pugixml/files/pugixml-1.9-Use-CMAKE_INSTALL_LIBDIR-for-pugixml.pc.patch
21 new file mode 100644
22 index 00000000000..18928e39cd6
23 --- /dev/null
24 +++ b/dev-libs/pugixml/files/pugixml-1.9-Use-CMAKE_INSTALL_LIBDIR-for-pugixml.pc.patch
25 @@ -0,0 +1,39 @@
26 +From c12889f7ccee3a91754f12a4f5b2bf5eb87acabd Mon Sep 17 00:00:00 2001
27 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= <c72578@×××××.de>
28 +Date: Wed, 27 Jun 2018 00:53:42 +0200
29 +Subject: [PATCH] Use CMAKE_INSTALL_LIBDIR for pugixml.pc (#215)
30 +
31 +- Up to now, the libdir was hardcoded to "lib" inside pugixml.pc and
32 + the install directory of pugixml.pc was "lib/pkgconfig"
33 +- Adds support for lib and lib64 by using CMAKE_INSTALL_LIBDIR variable
34 +---
35 + CMakeLists.txt | 2 +-
36 + scripts/pugixml.pc.in | 2 +-
37 + 2 files changed, 2 insertions(+), 2 deletions(-)
38 +
39 +diff --git a/CMakeLists.txt b/CMakeLists.txt
40 +index 148f7b0d..d322a631 100644
41 +--- a/CMakeLists.txt
42 ++++ b/CMakeLists.txt
43 +@@ -76,7 +76,7 @@ install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX
44 + install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
45 +
46 + configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
47 +-install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
48 ++install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig)
49 +
50 + if(BUILD_TESTS)
51 + file(GLOB TEST_SOURCES tests/*.cpp)
52 +diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in
53 +index 04b4d3b0..fbb7f8b8 100644
54 +--- a/scripts/pugixml.pc.in
55 ++++ b/scripts/pugixml.pc.in
56 +@@ -1,7 +1,7 @@
57 + prefix=@CMAKE_INSTALL_PREFIX@
58 + exec_prefix=${prefix}
59 + includedir=${prefix}/include@INSTALL_SUFFIX@
60 +-libdir=${exec_prefix}/lib@INSTALL_SUFFIX@
61 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@@INSTALL_SUFFIX@
62 +
63 + Name: pugixml
64 + Description: Light-weight, simple and fast XML parser for C++ with XPath support.
65
66 diff --git a/dev-libs/pugixml/files/pugixml-1.9-always-install-the-pkg-config-file.patch b/dev-libs/pugixml/files/pugixml-1.9-always-install-the-pkg-config-file.patch
67 new file mode 100644
68 index 00000000000..4551280b372
69 --- /dev/null
70 +++ b/dev-libs/pugixml/files/pugixml-1.9-always-install-the-pkg-config-file.patch
71 @@ -0,0 +1,71 @@
72 +From daeb8013b20f9c47e85730faaa4131064a1f9c2e Mon Sep 17 00:00:00 2001
73 +From: Eli Schwartz <eschwartz93@×××××.com>
74 +Date: Mon, 9 Apr 2018 13:48:53 -0400
75 +Subject: [PATCH] cmake: always install the pkg-config file (#193)
76 +
77 +There's really never a reason to *not* want this installed. If an option
78 +is needed to specify installing in a versioned subdirectory, this option
79 +should be explicitly described rather than hidden in something else.
80 +
81 +As an added bonus, this makes the CMake install code slightly *less*
82 +complicated.
83 +---
84 + CMakeLists.txt | 10 ++++------
85 + scripts/pugixml.pc.in | 6 +++---
86 + 2 files changed, 7 insertions(+), 9 deletions(-)
87 +
88 +diff --git a/CMakeLists.txt b/CMakeLists.txt
89 +index 90fa6793..d7bc1b20 100644
90 +--- a/CMakeLists.txt
91 ++++ b/CMakeLists.txt
92 +@@ -4,7 +4,7 @@ project(pugixml)
93 +
94 + option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
95 + option(BUILD_TESTS "Build tests" OFF)
96 +-option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF)
97 ++option(USE_VERSIONED_LIBDIR "Use a private subdirectory to install the headers and libs" OFF)
98 +
99 + set(BUILD_DEFINES "" CACHE STRING "Build defines")
100 +
101 +@@ -55,7 +55,7 @@ endif()
102 + set_target_properties(pugixml PROPERTIES VERSION 1.9 SOVERSION 1)
103 + get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
104 +
105 +-if(BUILD_PKGCONFIG)
106 ++if(USE_VERSIONED_LIBDIR)
107 + # Install library into its own directory under LIBDIR
108 + set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
109 + endif()
110 +@@ -71,10 +71,8 @@ install(TARGETS pugixml EXPORT pugixml-config
111 + install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
112 + install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
113 +
114 +-if(BUILD_PKGCONFIG)
115 +- configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
116 +- install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
117 +-endif()
118 ++configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
119 ++install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
120 +
121 + if(BUILD_TESTS)
122 + file(GLOB TEST_SOURCES tests/*.cpp)
123 +diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in
124 +index 3c97c28d..804c4d38 100644
125 +--- a/scripts/pugixml.pc.in
126 ++++ b/scripts/pugixml.pc.in
127 +@@ -1,11 +1,11 @@
128 + prefix=@CMAKE_INSTALL_PREFIX@
129 + exec_prefix=${prefix}
130 +-includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@
131 +-libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@
132 ++includedir=${prefix}/include@INSTALL_SUFFIX@
133 ++libdir=${exec_prefix}/lib@INSTALL_SUFFIX@
134 +
135 + Name: pugixml
136 + Description: Light-weight, simple and fast XML parser for C++ with XPath support.
137 + URL: http://pugixml.org/
138 + Version: @PUGIXML_VERSION_STRING@
139 + Cflags: -I${includedir}
140 +-Libs: -L${libdir} -lpugixml
141 +\ No newline at end of file
142 ++Libs: -L${libdir} -lpugixml
143
144 diff --git a/dev-libs/pugixml/files/pugixml-1.9-pkg-config-Use-CMake-GnuInstallDirs-FULL-vars.patch b/dev-libs/pugixml/files/pugixml-1.9-pkg-config-Use-CMake-GnuInstallDirs-FULL-vars.patch
145 new file mode 100644
146 index 00000000000..7a9b0c139cd
147 --- /dev/null
148 +++ b/dev-libs/pugixml/files/pugixml-1.9-pkg-config-Use-CMake-GnuInstallDirs-FULL-vars.patch
149 @@ -0,0 +1,39 @@
150 +From b3db08ffccb78d680d8f7665ad9ed4cff6f92fcf Mon Sep 17 00:00:00 2001
151 +From: Millian Poquet <millian.poquet@×××××.fr>
152 +Date: Mon, 10 Dec 2018 18:54:40 +0100
153 +Subject: [PATCH] pkg-config: Use CMake GnuInstallDirs FULL vars
154 +
155 +Fixes an installation problem in Nix packages, as non-FULL variables are
156 +already absolute paths in this case.
157 +---
158 + CMakeLists.txt | 2 +-
159 + scripts/pugixml.pc.in | 4 ++--
160 + 2 files changed, 3 insertions(+), 3 deletions(-)
161 +
162 +diff --git a/CMakeLists.txt b/CMakeLists.txt
163 +index ddc5a5ad..e8c4f592 100644
164 +--- a/CMakeLists.txt
165 ++++ b/CMakeLists.txt
166 +@@ -76,7 +76,7 @@ install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX
167 + install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
168 +
169 + configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
170 +-install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig)
171 ++install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
172 +
173 + if(BUILD_TESTS)
174 + file(GLOB TEST_SOURCES tests/*.cpp)
175 +diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in
176 +index a1678272..f9c3fd45 100644
177 +--- a/scripts/pugixml.pc.in
178 ++++ b/scripts/pugixml.pc.in
179 +@@ -1,7 +1,7 @@
180 + prefix=@CMAKE_INSTALL_PREFIX@
181 + exec_prefix=${prefix}
182 +-includedir=${prefix}/include@INSTALL_SUFFIX@
183 +-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@@INSTALL_SUFFIX@
184 ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@@INSTALL_SUFFIX@
185 ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@@INSTALL_SUFFIX@
186 +
187 + Name: pugixml
188 + Description: Light-weight, simple and fast XML parser for C++ with XPath support.
189
190 diff --git a/dev-libs/pugixml/pugixml-1.9-r1.ebuild b/dev-libs/pugixml/pugixml-1.9-r1.ebuild
191 new file mode 100644
192 index 00000000000..93ca3d73044
193 --- /dev/null
194 +++ b/dev-libs/pugixml/pugixml-1.9-r1.ebuild
195 @@ -0,0 +1,33 @@
196 +# Copyright 1999-2019 Gentoo Authors
197 +# Distributed under the terms of the GNU General Public License v2
198 +
199 +EAPI=7
200 +
201 +inherit cmake-utils
202 +
203 +if [[ ${PV} == *9999 ]] ; then
204 + EGIT_REPO_URI="https://github.com/zeux/${PN}.git"
205 + inherit git-r3
206 +else
207 + SRC_URI="https://github.com/zeux/${PN}/releases/download/v${PV}/${P}.tar.gz"
208 + KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
209 +fi
210 +
211 +DESCRIPTION="Light-weight, simple, and fast XML parser for C++ with XPath support"
212 +HOMEPAGE="https://pugixml.org/ https://github.com/zeux/pugixml/"
213 +
214 +LICENSE="MIT"
215 +SLOT="0"
216 +
217 +PATCHES=(
218 + "${FILESDIR}/${P}-always-install-the-pkg-config-file.patch"
219 + "${FILESDIR}/${P}-Use-CMAKE_INSTALL_LIBDIR-for-pugixml.pc.patch"
220 + "${FILESDIR}/${P}-pkg-config-Use-CMake-GnuInstallDirs-FULL-vars.patch"
221 +)
222 +
223 +src_configure() {
224 + local mycmakeargs=(
225 + -DBUILD_SHARED_LIBS=ON
226 + )
227 + cmake-utils_src_configure
228 +}