diff options
author | Patrick Northon | 2020-05-21 12:38:16 -0400 |
---|---|---|
committer | Patrick Northon | 2020-05-21 12:38:16 -0400 |
commit | 2734207f2e8317a6b0f1eb1cee79f82b14c07428 (patch) | |
tree | 519eb7bed2cbff0ed84979cf212761b55cc5e51f | |
download | aur-2734207f2e8317a6b0f1eb1cee79f82b14c07428.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | fix-cross-compile.patch | 50 |
4 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7b28ad29a3f7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = mingw-w64-xalan-c-git + pkgdesc = The Apache Xalan-C++ Project provides a library and a command line program to transform XML documents using a stylesheet that conforms to XSLT 1.0 standards. + pkgver = 1.12.0.r0 + pkgrel = 1 + url = https://xalan.apache.org/ + arch = any + license = APACHE + makedepends = mingw-w64-cmake + makedepends = mingw-w64-wine + makedepends = git + depends = mingw-w64-crt + depends = mingw-w64-xerces-c + provides = mingw-w64-xalan-c + conflicts = mingw-w64-xalan-c + options = !strip + options = !buildflags + options = staticlibs + source = git+https://github.com/apache/xalan-c + source = fix-cross-compile.patch + sha256sums = SKIP + sha256sums = 08400961f038c1aed090174425e894673ffc359b52bcbad73d2c537a89ea34b7 + +pkgname = mingw-w64-xalan-c-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..72e8ffc0db8a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4ba63d03f4f9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca> + +pkgname=mingw-w64-xalan-c-git +conflicts=("mingw-w64-xalan-c") +provides=("mingw-w64-xalan-c") +pkgver=1.12.0.r0 +pkgrel=1 +pkgdesc="The Apache Xalan-C++ Project provides a library and a command line program to transform XML documents using a stylesheet that conforms to XSLT 1.0 standards." +arch=(any) +url="https://xalan.apache.org/" +license=("APACHE") +makedepends=('mingw-w64-cmake' 'mingw-w64-wine' 'git') +depends=('mingw-w64-crt' 'mingw-w64-xerces-c') +options=('!strip' '!buildflags' 'staticlibs') +source=("git+https://github.com/apache/xalan-c" + "fix-cross-compile.patch") +sha256sums=( + "SKIP" + "08400961f038c1aed090174425e894673ffc359b52bcbad73d2c537a89ea34b7") + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "xalan-c" + git apply "../fix-cross-compile.patch" +} + +build() { + for _arch in ${_architectures}; do + ${_arch}-cmake -S "xalan-c" -B "build-${_arch}" -DCMAKE_BUILD_TYPE=Release -Ddoxygen=OFF + make -C "build-${_arch}" + done +} + +package() { + for _arch in ${_architectures}; do + make DESTDIR="${pkgdir}" -C "build-${_arch}" install + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} diff --git a/fix-cross-compile.patch b/fix-cross-compile.patch new file mode 100644 index 000000000000..efb234e50896 --- /dev/null +++ b/fix-cross-compile.patch @@ -0,0 +1,50 @@ +diff --git a/src/xalanc/Include/XalanVersion.hpp.in b/src/xalanc/Include/XalanVersion.hpp.in +index d0a7d971..63911ede 100644 +--- a/src/xalanc/Include/XalanVersion.hpp.in ++++ b/src/xalanc/Include/XalanVersion.hpp.in +@@ -26,11 +26,11 @@ + #define XALANVERSION_HEADER_GUARD_1357924680 + + /// Xalan-C major version. +-#define XALAN_VERSION_MAJOR (@xalan-c_VERSION_MAJOR@) ++#define XALAN_VERSION_MAJOR @xalan-c_VERSION_MAJOR@ + /// Xalan-C minor version. +-#define XALAN_VERSION_MINOR (@xalan-c_VERSION_MINOR@) ++#define XALAN_VERSION_MINOR @xalan-c_VERSION_MINOR@ + /// Xalan-C patch version. +-#define XALAN_VERSION_REVISION (@xalan-c_VERSION_PATCH@) ++#define XALAN_VERSION_REVISION @xalan-c_VERSION_PATCH@ + + /** + * Xalan-C++ version represented as a single integer value. +diff --git a/src/xalanc/Utils/CMakeLists.txt b/src/xalanc/Utils/CMakeLists.txt +index dc39ad0c..78b61601 100644 +--- a/src/xalanc/Utils/CMakeLists.txt ++++ b/src/xalanc/Utils/CMakeLists.txt +@@ -41,13 +41,22 @@ add_custom_target(locale ALL) + set_target_properties(locale PROPERTIES FOLDER "Message Library") + + if(msgloader STREQUAL "inmemory") ++ set(MsgCreatorCommandFilename "${XLIFF_FILE_NAME}") ++ set(MsgCreatorCommand "$<TARGET_FILE:MsgCreator>" -TYPE inmem -LOCALE ${LOCALE}) ++ ++ if(CMAKE_CROSSCOMPILING_EMULATOR) ++ set(MsgCreatorCommand "${CMAKE_CROSSCOMPILING_EMULATOR}" "${MsgCreatorCommand}") ++ if(WIN32) ++ set(MsgCreatorCommandFilename "Z:${MsgCreatorCommandFilename}") ++ endif() ++ endif() ++ ++ set(MsgCreatorCommand "${MsgCreatorCommand}" "${MsgCreatorCommandFilename}") ++ + add_custom_command( + OUTPUT "${GENMSGINDEX}" + "${GENMSGDATA}" +- COMMAND "$<TARGET_FILE:MsgCreator>" +- "${XLIFF_FILE_NAME}" +- -TYPE inmem +- -LOCALE ${LOCALE} ++ COMMAND ${MsgCreatorCommand} + WORKING_DIRECTORY "${XSL_NLS_GEN_DIR}" + COMMENT "Generating inmemory locale message data" + DEPENDS MsgCreator "${XLIFF_FILE_NAME}") |