Skip to content

Commit

Permalink
fixes for libxml on vs and svgtiny on linux arm
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Oct 14, 2016
1 parent deb9b00 commit 86c7c9f
Show file tree
Hide file tree
Showing 9 changed files with 1,079 additions and 24 deletions.
1 change: 0 additions & 1 deletion .appveyor.yml
Expand Up @@ -29,7 +29,6 @@ init:
#- '%MSYS2_PATH%\usr\bin\bash -lc "pacman --noconfirm -Sy pacman"'
#- '%MSYS2_PATH%\usr\bin\bash -lc "pacman --noconfirm -Syu"'
#- '%MSYS2_PATH%\usr\bin\bash -lc "pacman --noconfirm -Su"'
- '%MSYS2_PATH%\usr\bin\bash -lc "pacman --noconfirm -Syuu"'
- '%MSYS2_PATH%\usr\bin\bash -lc "pacman --noconfirm -S unzip dos2unix gperf mingw-w64-i686-libxml2"'
- if "%TARGET%_%PLATFORM%"=="msys2_x86" set MSYSTEM=MINGW32
- if "%TARGET%_%PLATFORM%"=="msys2_x64" set MSYSTEM=MINGW64
Expand Down
34 changes: 13 additions & 21 deletions apothecary/formulas/libxml2/libxml2.sh
Expand Up @@ -26,22 +26,23 @@ function prepare() {
if [ "$TYPE" == "android" ]; then
cp $FORMULA_DIR/glob.h .
fi

if [ "$TYPE" == "vs" ]; then
cp $FORMULA_DIR/vs2015/*.h include/libxml/
cp -r $FORMULA_DIR/vs2015/* win32/VC10/
fi
}

# executed inside the lib src dir
function build() {
if [ "$TYPE" == "vs" ] ; then
unset TMP
unset TEMP
local OF_LIBS_OPENSSL_ABS_PATH=$(realpath ../openssl)
export OPENSSL_PATH=$OF_LIBS_OPENSSL_ABS_PATH
export OPENSSL_LIBRARIES=$OF_LIBS_OPENSSL_ABS_PATH/lib/
PATH=$OPENSSL_LIBRARIES:$PATH cmd //c "projects\\generate.bat vc14"
cd projects/Windows/VC14/lib
cd win32/VC10
if [ $ARCH == 32 ] ; then
PATH=$OPENSSL_LIBRARIES:$PATH vs-build libcurl.sln Build "LIB Release - LIB OpenSSL|Win32"
vs-build libxml2.vcxproj Build "Release|Win32"
else
PATH=$OPENSSL_LIBRARIES:$PATH vs-build libcurl.sln Build "LIB Release - LIB OpenSSL|x64"
vs-build libcurl.vcxproj Build "Release|x64"
fi

elif [ "$TYPE" == "android" ]; then
Expand All @@ -59,7 +60,7 @@ function build() {
elif [ "$TYPE" == "osx" ]; then
export CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_MIN_SDK_VER}"
export LDFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_MIN_SDK_VER}"

./configure --without-lzma --without-zlib --disable-shared --enable-static --without-ftp --without-html --without-http --without-iconv --without-legacy --without-modules --without-output --without-python
make clean
make -j${PARALLEL_MAKE}
Expand All @@ -74,7 +75,7 @@ function build() {
elif [ "$TYPE" == "osx" ]; then
export CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_MIN_SDK_VER}"
export LDFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_MIN_SDK_VER}"

./configure --without-lzma --without-zlib --disable-shared --enable-static --without-ftp --without-html --without-http --without-iconv --without-legacy --without-modules --without-output --without-python
make clean
make -j${PARALLEL_MAKE}
Expand Down Expand Up @@ -135,34 +136,25 @@ function copy() {

# prepare libs directory if needed
mkdir -p $1/lib/$TYPE
cp -Rv include/libxml/* $1/include/libxml/

if [ "$TYPE" == "vs" ] ; then
cp -Rv include/* $1/include
if [ $ARCH == 32 ] ; then
mkdir -p $1/lib/$TYPE/Win32
cp -v "build/Win32/VC14/LIB Release - LIB OpenSSL/libcurl.lib" $1/lib/$TYPE/Win32/libcurl.lib
cp -v "win32/VC10/Release/libxml2.lib" $1/lib/$TYPE/Win32/
elif [ $ARCH == 64 ] ; then
mkdir -p $1/lib/$TYPE/x64
cp -v "build/Win64/VC14/LIB Release - LIB OpenSSL/libcurl.lib" $1/lib/$TYPE/x64/curl.lib
cp -v "win32/VC10/Release/libxml2.lib" $1/lib/$TYPE/x64/
fi
elif [ "$TYPE" == "osx" ] || [ "$TYPE" == "ios" ] || [ "$TYPE" == "tvos" ]; then
# Standard *nix style copy.
# copy headers
cp -Rv include/libxml/* $1/include/libxml/
# copy lib
cp -Rv .libs/libxml2.a $1/lib/$TYPE/xml2.a
elif [ "$TYPE" == "android" ] ; then
mkdir -p $1/lib/$TYPE/$ABI
# Standard *nix style copy.
# copy headers
cp -Rv include/libxml/* $1/include/libxml/
# copy lib
cp -Rv .libs/libxml2.a $1/lib/$TYPE/$ABI/libxml2.a
elif [ "$TYPE" == "emscripten" ] ; then
mkdir -p $1/lib/$TYPE
# Standard *nix style copy.
# copy headers
cp -Rv include/libxml/* $1/include/libxml/
# copy lib
cp -Rv .libs/libxml2.a $1/lib/$TYPE/libxml2.a
fi
Expand Down
184 changes: 184 additions & 0 deletions apothecary/formulas/libxml2/vs2015/libxml2-focus.vcxproj
@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug DLL|Win32">
<Configuration>Debug DLL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release DLL|Win32">
<Configuration>Release DLL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7EA50C94-26BD-4893-B773-625CD3D3DEA6}</ProjectGuid>
<RootNamespace>libxml2</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\focus-lib-debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\focus-lib-debug-dll.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\focus-lib-release.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
<Import Project="..\..\..\focus-lib-release-dll.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)..\..\lib\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
<OutDir>$(ProjectDir)..\..\lib\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)..\..\lib\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
<OutDir>$(ProjectDir)..\..\lib\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
<ClCompile>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\c14n.c" />
<ClCompile Include="..\..\catalog.c" />
<ClCompile Include="..\..\chvalid.c" />
<ClCompile Include="..\..\debugXML.c" />
<ClCompile Include="..\..\dict.c" />
<ClCompile Include="..\..\DOCBparser.c" />
<ClCompile Include="..\..\encoding.c" />
<ClCompile Include="..\..\entities.c" />
<ClCompile Include="..\..\error.c" />
<ClCompile Include="..\..\globals.c" />
<ClCompile Include="..\..\hash.c" />
<ClCompile Include="..\..\HTMLparser.c" />
<ClCompile Include="..\..\HTMLtree.c" />
<ClCompile Include="..\..\legacy.c" />
<ClCompile Include="..\..\list.c" />
<ClCompile Include="..\..\nanoftp.c" />
<ClCompile Include="..\..\nanohttp.c" />
<ClCompile Include="..\..\parser.c" />
<ClCompile Include="..\..\parserInternals.c" />
<ClCompile Include="..\..\pattern.c" />
<ClCompile Include="..\..\relaxng.c" />
<ClCompile Include="..\..\SAX.c" />
<ClCompile Include="..\..\SAX2.c" />
<ClCompile Include="..\..\schematron.c" />
<ClCompile Include="..\..\threads.c" />
<ClCompile Include="..\..\tree.c" />
<ClCompile Include="..\..\uri.c" />
<ClCompile Include="..\..\valid.c" />
<ClCompile Include="..\..\xinclude.c" />
<ClCompile Include="..\..\xlink.c" />
<ClCompile Include="..\..\xmlcatalog.c" />
<ClCompile Include="..\..\xmlIO.c" />
<ClCompile Include="..\..\xmlmemory.c" />
<ClCompile Include="..\..\xmlmodule.c" />
<ClCompile Include="..\..\xmlreader.c" />
<ClCompile Include="..\..\xmlregexp.c" />
<ClCompile Include="..\..\xmlsave.c" />
<ClCompile Include="..\..\xmlschemas.c" />
<ClCompile Include="..\..\xmlschemastypes.c" />
<ClCompile Include="..\..\xmlstring.c" />
<ClCompile Include="..\..\xmlunicode.c" />
<ClCompile Include="..\..\xmlwriter.c" />
<ClCompile Include="..\..\xpath.c" />
<ClCompile Include="..\..\xpointer.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\acconfig.h" />
<ClInclude Include="..\..\elfgcchack.h" />
<ClInclude Include="..\..\libxml.h" />
<ClInclude Include="config.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Binary file added apothecary/formulas/libxml2/vs2015/libxml2.VC.db
Binary file not shown.
40 changes: 40 additions & 0 deletions apothecary/formulas/libxml2/vs2015/libxml2.sln
@@ -0,0 +1,40 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "libxml2.vcxproj", "{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug DLL|Win32 = Debug DLL|Win32
Debug DLL|x64 = Debug DLL|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release DLL|Win32 = Release DLL|Win32
Release DLL|x64 = Release DLL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|Win32.ActiveCfg = Debug|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|Win32.Build.0 = Debug|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|x64.ActiveCfg = Debug|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|x64.Build.0 = Debug|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|Win32.ActiveCfg = Debug|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|Win32.Build.0 = Debug|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|x64.ActiveCfg = Debug|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|x64.Build.0 = Debug|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|Win32.ActiveCfg = Release|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|Win32.Build.0 = Release|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|x64.ActiveCfg = Release|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|x64.Build.0 = Release|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|Win32.ActiveCfg = Release|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|Win32.Build.0 = Release|Win32
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|x64.ActiveCfg = Release|x64
{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

0 comments on commit 86c7c9f

Please sign in to comment.