commit:     3aa4296812cda354ed706d4cadfd8aac5e96479d
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  4 03:49:14 2016 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Thu Aug  4 03:52:26 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aa42968

dev-libs/tinyxml2: version bump to 4.0.1

 dev-libs/tinyxml2/Manifest                         |  1 +
 .../files/tinyxml2-4.0.1-optional-tests.patch      | 30 +++++++++++++++++++
 .../tinyxml2/files/tinyxml2-4.0.1-xmltest.patch    | 11 +++++++
 dev-libs/tinyxml2/tinyxml2-4.0.1.ebuild            | 34 ++++++++++++++++++++++
 4 files changed, 76 insertions(+)

diff --git a/dev-libs/tinyxml2/Manifest b/dev-libs/tinyxml2/Manifest
index 6edb19d..f98ef54 100644
--- a/dev-libs/tinyxml2/Manifest
+++ b/dev-libs/tinyxml2/Manifest
@@ -1,2 +1,3 @@
 DIST tinyxml2-1.0.9_p20121123.tar.bz2 91204 SHA256 
894b6b1136c86cc98bff77892ca077726b470432e871ca8c8c605177047272ea SHA512 
054342b51141771c7611ae5aeb6ea332c42dff603aa6747f802d02bd010cad4b5c84fadf976576d2a604f1cccc7afe95ff23682a98c9294b032c94aa48b09aaf
 WHIRLPOOL 
9aa505e7794b1fe1919b185d2080e63f3b01f44d2daeba94b7da6701f4931ec9188c0f92c9db9c6e8ac02772ef85f582b3a5d64227fd7b353da0a258c8a72eb7
 DIST tinyxml2-2.2.0.tar.gz 455226 SHA256 
f891224f32e7a06bf279290619cec80cc8ddc335c13696872195ffb87f5bce67 SHA512 
e06edb46f96dcc58cf16c8fef91dd072c9bd6dd296bb9ba3e082db059438f5f31e0689015deee7f1c390788d9bd0e64b6f5c0235c9d2839419ee2ab1784f53c4
 WHIRLPOOL 
6310e1492b180cc1a74f856dbf78897c5db7777d44ffd5ef785f85fb87a91462479a9da006d93ad7157763416863ed623b14cfc8d99f35494335de7252cda754
+DIST tinyxml2-4.0.1.tar.gz 344295 SHA256 
14b38ef25cc136d71339ceeafb4856bb638d486614103453eccd323849267f20 SHA512 
4add31a72c62b3f68bdb17fb90630bc51bf96b616f4beafb413082dc77bc699b8d516fa0955d001d5d69bc3371b7ca9ce5cd9696d91dd913b09a1c10681b819e
 WHIRLPOOL 
76fd8f6d15f73845b1051385aaff64d33263639cc630eaaf2563d6f1c3fca1ffae277d7c540197c6eee65ac4429ac6f1f0541ab99520cf809afd655fbdacc9ab

diff --git a/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch 
b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch
new file mode 100644
index 0000000..95e849f
--- /dev/null
+++ b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-optional-tests.patch
@@ -0,0 +1,30 @@
+--- tinyxml2-4.0.1/CMakeLists.txt
++++ tinyxml2-4.0.1/CMakeLists.txt
+@@ -100,15 +100,18 @@
+         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ 
+-add_executable(xmltest xmltest.cpp)
+-if(BUILD_SHARED_LIBS)
+-   add_dependencies(xmltest tinyxml2)
+-   add_dependencies(xmltest ${TARGET_DATA_COPY})
+-   target_link_libraries(xmltest tinyxml2)
+-else(BUILD_STATIC_LIBS)
+-   add_dependencies(xmltest tinyxml2_static)
+-   add_dependencies(xmltest ${TARGET_DATA_COPY})
+-   target_link_libraries(xmltest tinyxml2_static)
++set(BUILD_TEST OFF CACHE BOOL "Set to ON to build tests")
++if(BUILD_TEST)
++      add_executable(xmltest xmltest.cpp)
++      if(BUILD_SHARED_LIBS)
++              add_dependencies(xmltest tinyxml2)
++              add_dependencies(xmltest ${TARGET_DATA_COPY})
++              target_link_libraries(xmltest tinyxml2)
++      else(BUILD_STATIC_LIBS)
++              add_dependencies(xmltest tinyxml2_static)
++              add_dependencies(xmltest ${TARGET_DATA_COPY})
++              target_link_libraries(xmltest tinyxml2_static)
++      endif()
+ endif()
+ install(TARGETS DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 

diff --git a/dev-libs/tinyxml2/files/tinyxml2-4.0.1-xmltest.patch 
b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-xmltest.patch
new file mode 100644
index 0000000..94b2668
--- /dev/null
+++ b/dev-libs/tinyxml2/files/tinyxml2-4.0.1-xmltest.patch
@@ -0,0 +1,11 @@
+--- tinyxml2-4.0.1/xmltest.cpp
++++ tinyxml2-4.0.1/xmltest.cpp
+@@ -1618,7 +1618,7 @@
+ 
+               FILE* perfFP = fopen("resources/dream.xml", "r");
+               fseek(perfFP, 0, SEEK_END);
+-              long size = ftell(fp);
++              long size = ftell(perfFP);
+               fseek(perfFP, 0, SEEK_SET);
+ 
+               char* mem = new char[size + 1];

diff --git a/dev-libs/tinyxml2/tinyxml2-4.0.1.ebuild 
b/dev-libs/tinyxml2/tinyxml2-4.0.1.ebuild
new file mode 100644
index 0000000..be95959
--- /dev/null
+++ b/dev-libs/tinyxml2/tinyxml2-4.0.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A simple, small, efficient, C++ XML parser"
+HOMEPAGE="http://www.grinninglizard.com/tinyxml2/ 
https://github.com/leethomason/tinyxml2/";
+SRC_URI="https://github.com/leethomason/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/4"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static-libs test"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-optional-tests.patch
+       "${FILESDIR}"/${P}-xmltest.patch
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_STATIC_LIBS=$(usex static-libs)
+               -DBUILD_TEST=$(usex test)
+       )
+       cmake-utils_src_configure
+}
+
+src_test() {
+       cmake-utils_src_test
+       ./xmltest || die "Tests failed"
+}

Reply via email to