Skip to content

Commit

Permalink
Update Xalan-C 1.12 (#381)
Browse files Browse the repository at this point in the history
* Update android NDK to 21

IB-6895

Signed-off-by: Raul Metsma <raul@metsma.ee>

* Updata Xalan-C to 1.12

IB-6609

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma authored Sep 24, 2021
1 parent 1034ab4 commit 616d023
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
"zlib:x64-windows-v${{ matrix.toolset }}"
"boost-test:x86-windows-v${{ matrix.toolset }}"
"boost-test:x64-windows-v${{ matrix.toolset }}"
vcpkgGitCommitId: 18376a2f2ce989e022db5c1199b468e43f7c1a79
vcpkgGitCommitId: d417ae59d6e9aa20d9f812b5deb966645c54687d
- name: Install dependencies
run: choco install doxygen.install swig -y > $null
- name: Build xsd
Expand Down
211 changes: 115 additions & 96 deletions etc/Doxyfile.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/ios/libdigidocpp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
4E7663901B5A37AC00672ACF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1230;
ORGANIZATIONNAME = RIA;
TargetAttributes = {
4E7663971B5A37AC00672ACF = {
Expand Down
16 changes: 8 additions & 8 deletions libdigidocpp.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<File Source="$(var.VCPKG_X86)\libssl-1_1.dll"/>
<File Source="$(var.VCPKG_X86)\zlib1.dll"/>
<File Source="$(var.VCPKG_X86)\xerces-c_3_2.dll"/>
<File Source="$(var.VCPKG_X86)\Xalan-C_1_11.dll"/>
<File Source="$(var.VCPKG_X86)\XalanMessages_1_11.dll"/>
<File Source="$(var.VCPKG_X86)\Xalan-C_1_12.dll"/>
<File Source="$(var.VCPKG_X86)\XalanMessages_1_12.dll"/>
<File Source="$(var.VCPKG_X86)\xsec_2_0.dll"/>
<File Source="$(var.libdigidocpp)\x86\bin\digidocpp.dll"/>
<?ifdef var.swig ?>
Expand All @@ -55,8 +55,8 @@
<File Source="$(var.VCPATH)\Debug_NonRedist\x86\Microsoft.VC$(var.VCVER).DebugCRT\msvcp140d.dll"/>
<File Source="$(var.VCPATH)\Debug_NonRedist\x86\Microsoft.VC$(var.VCVER).DebugCRT\vcruntime140d.dll"/>
<File Source="$(var.VCPKG_X86D)\xerces-c_3_2D.dll"/>
<File Source="$(var.VCPKG_X86D)\Xalan-C_1_11D.dll"/>
<File Source="$(var.VCPKG_X86D)\XalanMessages_1_11D.dll"/>
<File Source="$(var.VCPKG_X86D)\Xalan-C_1_12D.dll"/>
<File Source="$(var.VCPKG_X86D)\XalanMessages_1_12D.dll"/>
<File Source="$(var.VCPKG_X86D)\xsec_2_0D.dll"/>
<File Source="$(var.libdigidocpp)\x86\bin\digidoc-tool.pdb"/>
<File Source="$(var.libdigidocpp)\x86\bin\digidocpp.lib"/>
Expand Down Expand Up @@ -97,8 +97,8 @@
<File Source="$(var.VCPKG_X64)\libssl-1_1-x64.dll"/>
<File Source="$(var.VCPKG_X64)\zlib1.dll" Id="zlib1_64.dll"/>
<File Source="$(var.VCPKG_X64)\xerces-c_3_2.dll" Id="xerces_c_3_2.dll_64"/>
<File Source="$(var.VCPKG_X64)\Xalan-C_1_11.dll" Id="Xalan_C_1_11.dll_64"/>
<File Source="$(var.VCPKG_X64)\XalanMessages_1_11.dll" Id="XalanMessages_1_11.dll_64"/>
<File Source="$(var.VCPKG_X64)\Xalan-C_1_12.dll" Id="Xalan_C_1_12.dll_64"/>
<File Source="$(var.VCPKG_X64)\XalanMessages_1_12.dll" Id="XalanMessages_1_12.dll_64"/>
<File Source="$(var.VCPKG_X64)\xsec_2_0.dll" Id="xsec_2_0.dll_64"/>
<File Source="$(var.libdigidocpp)\x64\bin\digidocpp.dll" Id="digidocpp.dll_64"/>
<?ifdef var.swig ?>
Expand All @@ -113,8 +113,8 @@
<File Source="$(var.VCPATH)\Debug_NonRedist\x86\Microsoft.VC$(var.VCVER).DebugCRT\msvcp140d.dll" Id="msvcp140d_64.dll"/>
<File Source="$(var.VCPATH)\Debug_NonRedist\x86\Microsoft.VC$(var.VCVER).DebugCRT\vcruntime140d.dll" Id="vcruntime140d_64.dll"/>
<File Source="$(var.VCPKG_X64D)\xerces-c_3_2D.dll" Id="xerces_c_3_2D.dll_64"/>
<File Source="$(var.VCPKG_X64D)\Xalan-C_1_11D.dll" Id="Xalan_C_1_11D.dll_64"/>
<File Source="$(var.VCPKG_X64D)\XalanMessages_1_11D.dll" Id="XalanMessages_1_11D.dll_64"/>
<File Source="$(var.VCPKG_X64D)\Xalan-C_1_12D.dll" Id="Xalan_C_1_12D.dll_64"/>
<File Source="$(var.VCPKG_X64D)\XalanMessages_1_12D.dll" Id="XalanMessages_1_12D.dll_64"/>
<File Source="$(var.VCPKG_X64D)\xsec_2_0D.dll" Id="xsec_2_0D.dll_64"/>
<File Source="$(var.libdigidocpp)\x64\bin\digidoc-tool.pdb" Id="digidoc_tool.pdb_64"/>
<File Source="$(var.libdigidocpp)\x64\bin\digidocpp.lib" Id="digidocpp.lib_64"/>
Expand Down
Binary file modified patches/MsgCreator
Binary file not shown.
45 changes: 0 additions & 45 deletions patches/xalan-CMakeLists.txt

This file was deleted.

41 changes: 25 additions & 16 deletions prepare_osx_build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

XERCES_DIR=xerces-c-3.2.3
XALAN_DIR=xalan_c-1.12
XMLSEC_DIR=xml-security-c-2.0.2
XSD=xsd-4.0.0-i686-macosx
OPENSSL_DIR=openssl-1.1.1k
Expand Down Expand Up @@ -126,15 +127,20 @@ function xerces {
}

function xalan {
echo Building xalan-c-1.11
if [ ! -f xalan_c-1.11-src.tar.gz ]; then
curl -O -L https://archive.apache.org/dist/xalan/xalan-c/sources/xalan_c-1.11-src.tar.gz
echo Building ${XALAN_DIR}
if [ ! -f ${XALAN_DIR}.tar.gz ]; then
curl -O -L https://archive.apache.org/dist/xalan/xalan-c/sources/${XALAN_DIR}.tar.gz
fi
rm -rf xalan-c-1.11
tar xf xalan_c-1.11-src.tar.gz
cd xalan-c-1.11/c
cp ../../patches/xalan-CMakeLists.txt src/CMakeLists.txt
cp ../../patches/MsgCreator src
rm -rf ${XALAN_DIR}
tar xf ${XALAN_DIR}.tar.gz
cd ${XALAN_DIR}
sed -ie 's!add_subdirectory(samples)!!' CMakeLists.txt
sed -ie 's!add_subdirectory(Tests)!!' CMakeLists.txt
sed -ie 's!add_subdirectory(docs/doxygen)!!' CMakeLists.txt
sed -ie 's!add_subdirectory(src/xalanc/TestXSLT)!!' CMakeLists.txt
sed -ie 's!add_subdirectory(src/xalanc/TestXPath)!!' CMakeLists.txt
sed -n '1102,1500!p' src/xalanc/CMakeLists.txt > tmp
mv tmp src/xalanc/CMakeLists.txt
case "${ARGS}" in
*android*)
cmake \
Expand All @@ -145,7 +151,9 @@ function xalan {
-DCMAKE_FIND_ROOT_PATH=${TARGET_PATH} \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=NO \
src && make -s && sudo make install
.
make -s MsgCreator || cp ../patches/MsgCreator src/xalanc/Utils/MsgCreator
make -s && sudo make install
;;
*ios*|*simulator*)
cmake \
Expand All @@ -154,23 +162,23 @@ function xalan {
-DCMAKE_OSX_SYSROOT=${SYSROOT} \
-DCMAKE_OSX_ARCHITECTURES="${ARCHS// /;}" \
-DCMAKE_INSTALL_PREFIX=${TARGET_PATH} \
-DXercesC_ROOT=${TARGET_PATH} \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=NO \
src && make -s && sudo make install
. && make -s MsgCreator
cp ../patches/MsgCreator src/xalanc/Utils/MsgCreator
make -s && sudo make install
;;
*)
cmake \
-DCMAKE_MACOSX_RPATH=NO \
-DCMAKE_OSX_ARCHITECTURES="${ARCHS// /;}" \
-DCMAKE_INSTALL_PREFIX=${TARGET_PATH} \
-DXercesC_ROOT=${TARGET_PATH} \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=YES \
src && make -s && sudo make install
sudo install_name_tool -id ${TARGET_PATH}/lib/libxalanMsg.111.0.dylib ${TARGET_PATH}/lib/libxalanMsg.*.dylib
sudo install_name_tool -id ${TARGET_PATH}/lib/libxalan-c.111.0.dylib \
-change libxalanMsg.111.0.dylib ${TARGET_PATH}/lib/libxalanMsg.111.0.dylib ${TARGET_PATH}/lib/libxalan-c.*.dylib
. && make -s && sudo make install
sudo install_name_tool -id ${TARGET_PATH}/lib/libxalanMsg.112.dylib ${TARGET_PATH}/lib/libxalanMsg.*.0.dylib
sudo install_name_tool -id ${TARGET_PATH}/lib/libxalan-c.112.dylib \
-change libxalanMsg.112.dylib ${TARGET_PATH}/lib/libxalanMsg.112.dylib ${TARGET_PATH}/lib/libxalan-c.*.0.dylib
;;
esac
cd -
Expand All @@ -187,6 +195,7 @@ function xml_security {
patch -Np1 -i ../patches/vcpkg-ports/xml-security-c/002_xml-security-c-SHA3.patch
sed -ie 's!as_fn_error $? "cannot run test program while cross compiling!$as_echo_n "cannot run test program while cross compiling!' configure
sed -ie 's!#define XSEC_EXPORT!#define XSEC_EXPORT __attribute__ ((visibility("default")))!' xsec/framework/XSECDefs.hpp
sed -ie 's!XALAN_USING_XALAN(\(.*\))!using xalanc::\1;!' xsec/*/*.cpp* xsec/*/*.hpp
CFLAGS="${CFLAGS} -fvisibility=hidden" \
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden" \
xerces_CFLAGS="-I${TARGET_PATH}/include" xerces_LIBS="-L${TARGET_PATH}/lib -lxalanMsg -lxalan-c -lxerces-c" \
Expand Down
11 changes: 6 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,31 +336,32 @@ if( FRAMEWORK )
COMMAND install_name_tool -id 'libxerces-c.dylib'
$<TARGET_FILE_DIR:digidocpp>/Libraries/libxerces-c.dylib
COMMAND install_name_tool -id 'libxalanMsg.dylib'
-change '${LIBPATH}/libxerces-c-3.2.dylib' '@loader_path/libxerces-c.dylib'
$<TARGET_FILE_DIR:digidocpp>/Libraries/libxalanMsg.dylib
COMMAND install_name_tool -id 'libxalan-c.dylib'
-change '${LIBPATH}/libxalanMsg.111.0.dylib' '@loader_path/libxalanMsg.dylib'
-change '${LIBPATH}/libxalanMsg.112.dylib' '@loader_path/libxalanMsg.dylib'
-change '${LIBPATH}/libxerces-c-3.2.dylib' '@loader_path/libxerces-c.dylib'
$<TARGET_FILE_DIR:digidocpp>/Libraries/libxalan-c.dylib
COMMAND install_name_tool -id 'libxml-security-c.dylib'
-change '${LIBPATH}/libcrypto.1.1.dylib' '@loader_path/libcrypto.dylib'
-change '${LIBPATH}/libssl.1.1.dylib' '@loader_path/libssl.dylib'
-change '${LIBPATH}/libxerces-c-3.2.dylib' '@loader_path/libxerces-c.dylib'
-change '${LIBPATH}/libxalan-c.111.0.dylib' '@loader_path/libxalan-c.dylib'
-change '${LIBPATH}/libxalanMsg.111.0.dylib' '@loader_path/libxalanMsg.dylib'
-change '${LIBPATH}/libxalan-c.112.dylib' '@loader_path/libxalan-c.dylib'
-change '${LIBPATH}/libxalanMsg.112.dylib' '@loader_path/libxalanMsg.dylib'
$<TARGET_FILE_DIR:digidocpp>/Libraries/libxml-security-c.dylib
COMMAND install_name_tool
-change '${LIBPATH}/libcrypto.1.1.dylib' '@loader_path/Libraries/libcrypto.dylib'
-change '${LIBPATH}/libssl.1.1.dylib' '@loader_path/Libraries/libssl.dylib'
-change '${LIBPATH}/libxerces-c-3.2.dylib' '@loader_path/Libraries/libxerces-c.dylib'
-change '${LIBPATH}/libxml-security-c.20.dylib' '@loader_path/Libraries/libxml-security-c.dylib'
-change '${LIBPATH}/libxalan-c.111.0.dylib' '@loader_path/Libraries/libxalan-c.dylib'
-change '${LIBPATH}/libxalan-c.112.dylib' '@loader_path/Libraries/libxalan-c.dylib'
$<TARGET_FILE:digidocpp>
COMMAND install_name_tool
-change '${LIBPATH}/libcrypto.1.1.dylib' '@executable_path/../Libraries/libcrypto.dylib'
-change '${LIBPATH}/libssl.1.1.dylib' '@executable_path/../Libraries/libssl.dylib'
-change '${LIBPATH}/libxerces-c-3.2.dylib' '@executable_path/../Libraries/libxerces-c.dylib'
-change '${LIBPATH}/libxml-security-c.20.dylib' '@executable_path/../Libraries/libxml-security-c.dylib'
-change '${LIBPATH}/libxalan-c.111.0.dylib' '@executable_path/../Libraries/libxalan-c.dylib'
-change '${LIBPATH}/libxalan-c.112.dylib' '@executable_path/../Libraries/libxalan-c.dylib'
$<TARGET_FILE_DIR:digidocpp>/Resources/digidoc-tool
COMMAND touch $<TARGET_FILE:digidoc-tool>
)
Expand Down

0 comments on commit 616d023

Please sign in to comment.