commit:     76cb1c9b4b513143c25e1bf7d0ab9034ec0f9682
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  2 20:16:21 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Jan  2 20:16:51 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76cb1c9b

dev-libs/xerces-c: use ninja, fix XercesMessages_en_US.cat path

Closes: https://bugs.gentoo.org/673548
Package-Manager: Portage-2.3.53, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../files/xerces-c-3.2.2-fix-XERCESC-2163.patch    |  24 +++++
 dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild         | 118 +++++++++++++++++++++
 2 files changed, 142 insertions(+)

diff --git a/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch 
b/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch
new file mode 100644
index 00000000000..57dde722098
--- /dev/null
+++ b/dev-libs/xerces-c/files/xerces-c-3.2.2-fix-XERCESC-2163.patch
@@ -0,0 +1,24 @@
+From db7a8b0cd2a163de1e3ef8c950cf9e708b0b5f98 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <[email protected]>
+Date: Wed, 2 Jan 2019 15:01:21 -0500
+Subject: [PATCH] build: Install XercesMessages_en_US.cat to
+ /usr/share/xerces-c/msg
+
+Fixes XERCESC-2163
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c29aa257b..6f1929d99 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1198,7 +1198,7 @@ if(XERCES_USE_MSGLOADER_ICONV)
+ 
+   install(
+     FILES "${RESTARGET}"
+-    DESTINATION "${CMAKE_INSTALL_PREFIX}/msg"
++    DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/xerces-c/msg"
+     COMPONENT "runtime")
+ endif()
+ 

diff --git a/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild 
b/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild
new file mode 100644
index 00000000000..2c447d12051
--- /dev/null
+++ b/dev-libs/xerces-c/xerces-c-3.2.2-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+
+inherit cmake-utils prefix
+
+DESCRIPTION="A validating XML parser written in a portable subset of C++"
+HOMEPAGE="https://xerces.apache.org/xerces-c/";
+
+if [[ ${PV} == *9999 ]] ; then
+       ESVN_REPO_URI="https://svn.apache.org/repos/asf/xerces/c/trunk";
+       inherit subversion
+else
+       SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 
~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+IUSE="cpu_flags_x86_sse2 curl doc elibc_Darwin elibc_FreeBSD examples iconv 
icu static-libs test threads"
+
+RDEPEND="icu? ( dev-libs/icu:0= )
+       curl? ( net-misc/curl )
+       virtual/libiconv"
+DEPEND="${RDEPEND}
+       doc? ( app-doc/doxygen )
+       test? ( dev-lang/perl )"
+
+DOCS=( CREDITS KEYS NOTICE README )
+PATCHES=(
+       "${FILESDIR}/${P}-fix-XERCESC-2161.patch"
+       "${FILESDIR}/${P}-fix-XERCESC-2163.patch"
+)
+
+pkg_setup() {
+       export ICUROOT="${EPREFIX}/usr"
+
+       if use iconv && use icu; then
+               ewarn "This package can use iconv or icu for loading messages"
+               ewarn "and transcoding, but not both. ICU takes precedence."
+       fi
+}
+
+src_configure() {
+       # 'cfurl' is only available on OSX and 'socket' isn't supposed to work.
+       # But the docs aren't clear about it, so we would need some testing...
+       local netaccessor
+       if use curl; then
+               netaccessor="curl"
+       elif use elibc_Darwin; then
+               netaccessor="cfurl"
+       else
+               netaccessor="socket"
+       fi
+
+       local msgloader
+       if use icu; then
+               msgloader="icu"
+       elif use iconv; then
+               msgloader="iconv"
+       else
+               msgloader="inmemory"
+       fi
+
+       local transcoder
+       if use icu; then
+               transcoder="icu"
+       elif use elibc_Darwin; then
+               transcoder="macosunicodeconverter"
+       elif use elibc_FreeBSD; then
+               transcoder="iconv"
+       else
+               transcoder="gnuiconv"
+       fi
+       # for interix maybe: transcoder="windows"
+
+       local mycmakeargs=(
+               -Dnetwork-accessor="${netaccessor}"
+               -Dmessage-loader="${msgloader}"
+               -Dtranscoder="${transcoder}"
+               -Dthreads:BOOL="$(usex threads)"
+               -Dsse2:BOOL="$(usex cpu_flags_x86_sse2)"
+       )
+
+       cmake-utils_src_configure
+}
+
+src_compile() {
+       cmake-utils_src_compile
+
+       use doc && cmake-utils_src_compile doc-style createapidocs doc-xml
+}
+
+src_install () {
+       cmake-utils_src_install
+
+       # package provides .pc files
+       find "${D}" -name '*.la' -delete || die
+
+       if use examples; then
+               # clean out object files, executables, Makefiles
+               # and the like before installing examples
+               find samples/ \( -type f -executable -o -iname 'runConfigure' 
-o -iname '*.o' \
+                       -o -iname '.libs' -o -iname 'Makefile*' \) -exec rm -rf 
'{}' + || die
+               docinto examples
+               dodoc -r samples/.
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+
+       # To make sure an appropriate NLS msg file is around when using
+       # the iconv msgloader ICU has the messages compiled in.
+       if use iconv && ! use icu; then
+               doenvd "$(prefixify_ro "${FILESDIR}/50xerces-c")"
+       fi
+}

Reply via email to