aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Paulyshka <me@mixaill.tk>2017-09-03 22:23:07 +0300
committerMikhail Paulyshka <me@mixaill.tk>2017-09-03 22:23:07 +0300
commit2c4bc8c2dbdd04bd888413d98a9d60638afe2157 (patch)
tree22564b199b748c9840851df4ba5330fc4229f3a6
parent35a9d223bc14fb4b35d6ad876d208897c8ce590a (diff)
downloadvcpkg-2c4bc8c2dbdd04bd888413d98a9d60638afe2157.tar.gz
vcpkg-2c4bc8c2dbdd04bd888413d98a9d60638afe2157.zip
[tinyxml] add version 2.6.2
-rw-r--r--ports/tinyxml/0001_use_stl.patch27
-rw-r--r--ports/tinyxml/CMakeLists.txt25
-rw-r--r--ports/tinyxml/CONTROL3
-rw-r--r--ports/tinyxml/License.txt20
-rw-r--r--ports/tinyxml/portfile.cmake30
5 files changed, 105 insertions, 0 deletions
diff --git a/ports/tinyxml/0001_use_stl.patch b/ports/tinyxml/0001_use_stl.patch
new file mode 100644
index 000000000..a36f930ee
--- /dev/null
+++ b/ports/tinyxml/0001_use_stl.patch
@@ -0,0 +1,27 @@
+From 5ca492fee93015411a0f10e0b2f1d3503bf962a1 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 3 Sep 2017 21:43:36 +0300
+Subject: [PATCH] enforce STL usage
+
+---
+ tinyxml.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tinyxml.h b/tinyxml.h
+index a3589e5..7195033 100644
+--- a/tinyxml.h
++++ b/tinyxml.h
+@@ -43,6 +43,10 @@ distribution.
+ #define DEBUG
+ #endif
+
++#ifndef TIXML_USE_STL
++#define TIXML_USE_STL
++#endif
++
+ #ifdef TIXML_USE_STL
+ #include <string>
+ #include <iostream>
+--
+2.12.2.windows.2
+
diff --git a/ports/tinyxml/CMakeLists.txt b/ports/tinyxml/CMakeLists.txt
new file mode 100644
index 000000000..9b55aa717
--- /dev/null
+++ b/ports/tinyxml/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.4)
+project(tinyxml)
+
+set(HEADERS "tinyxml.h")
+
+set(SOURCES "tinyxml.cpp"
+ "tinyxmlerror.cpp"
+ "tinyxmlparser.cpp"
+)
+
+option(BUILD_SHARED_LIBS "Build shared libs" OFF)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+add_library(tinyxml ${SOURCES})
+target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL")
+
+install(
+ TARGETS tinyxml
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+
+install(FILES ${HEADERS} DESTINATION include)
diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL
new file mode 100644
index 000000000..3b1978208
--- /dev/null
+++ b/ports/tinyxml/CONTROL
@@ -0,0 +1,3 @@
+Source: tinyxml
+Version: 2.6.2-1
+Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.
diff --git a/ports/tinyxml/License.txt b/ports/tinyxml/License.txt
new file mode 100644
index 000000000..2987cf75f
--- /dev/null
+++ b/ports/tinyxml/License.txt
@@ -0,0 +1,20 @@
+TinyXML is released under the zlib license:
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution. \ No newline at end of file
diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake
new file mode 100644
index 000000000..54d462bb4
--- /dev/null
+++ b/ports/tinyxml/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz"
+ FILENAME "tinyxml_2_6_2.tar.gz"
+ SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright)