Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libxml2] Update to latest commit, remove wrapper #14588

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8b1aa13
[libxml2] Export unofficial target, correct wrapper and usage
Nov 16, 2020
cdc039a
[libxml2] Update to latest and fix dependencies
Nov 16, 2020
21307d8
[libxml2] Re-fix build
Nov 17, 2020
7ac4290
[libxmlmm] Fix dependency libxml2
Nov 17, 2020
5e710df
[libxslt] Fix dependency libxml2
Nov 17, 2020
b38dcf6
[libxml2] Re-fix dependency iconv, re-add usage
Nov 17, 2020
cdbe6a6
[librsvg] Fix dependency libxml2
Nov 17, 2020
0217492
[libsbml] Fix dependency libxml2
Nov 17, 2020
7c3e8c4
[commsdsl] Fix dependency libxml2
Nov 17, 2020
94cc041
[libspatialite] Fix dependency libxml2
Nov 17, 2020
afbe2ca
[libiconv] Fix cmake wrapper
Nov 17, 2020
7782c4f
[libxml2] Re-fix dependency libiconv
Nov 17, 2020
497acda
[libspatialite] Re-fix dependency libxml2
Nov 17, 2020
dcd6758
[libxslt] Fix dependency libxml2
Nov 18, 2020
1db3480
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Nov 18, 2020
211bebb
[libspatialite] use find_library to get libxml2 path
Nov 18, 2020
737bd45
[gdal]Fix dependency libxml2
Nov 18, 2020
44e932e
[libxslt]merge master changes
Nov 18, 2020
78d6ad0
[libspatialite] Merge master branch changes
Nov 18, 2020
e1409f1
[gdal] Fix libxml2 include path
Nov 18, 2020
2e6dfeb
[libarchive] Fix dependency libxml2
Nov 18, 2020
ca9045c
[libxml2] Fix dependency libxml2
Nov 18, 2020
38f9680
[tmx] Fix dependency libxml2
Nov 18, 2020
ca03fbd
[libxml2] Fix dependency libxml2
Nov 18, 2020
436ce40
[vtk] Fix dependency libxml2
Nov 18, 2020
3588816
[libxml2] Fix pkgconfig
Nov 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions ports/commsdsl/fix-dependency-libxml2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt
index eaacb7a..de2cab4 100644
--- a/lib/src/CMakeLists.txt
+++ b/lib/src/CMakeLists.txt
@@ -6,10 +6,10 @@ while (TRUE)
break()
endif ()

- find_package(LibXml2 QUIET)
- if (LIBXML2_FOUND)
+ find_package(libxml2 CONFIG QUIET)
+ if (libxml2_FOUND)
# Find again just to display info
- find_package(LibXml2 REQUIRED)
+ find_package(libxml2 CONFIG REQUIRED)
break()
endif ()

@@ -52,8 +52,8 @@ while (TRUE)
break()
endwhile ()

-if (NOT LIBXML2_FOUND)
- find_package(LibXml2 REQUIRED)
+if (NOT libxml2_FOUND)
+ find_package(libxml2 CONFIG REQUIRED)
endif ()

set (
@@ -123,7 +123,7 @@ endif ()
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${COMMSDSL_VERSION})

target_include_directories(${PROJECT_NAME}
- PRIVATE ${LIBXML2_INCLUDE_DIR}
+ PRIVATE ${LIBXML2_INCLUDE_DIRS}
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib/include>
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
3 changes: 2 additions & 1 deletion ports/commsdsl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ vcpkg_from_github(
SHA512 f9e908f42e11e30aefe07f1b37d65545be2074758f054fb0d519e1a01f0b7060b309d2667459a5a6918a9ad9f535d0c0a0cc2cd0d4a281e78c2c48a6b8ae4a5d
HEAD_REF master
PATCHES
"fix-cmake-cmakedir-path.patch"
fix-cmake-cmakedir-path.patch
fix-dependency-libxml2.patch
)

vcpkg_configure_cmake(
Expand Down
1 change: 1 addition & 0 deletions ports/commsdsl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "commsdsl",
"version-string": "3.5.3",
"port-version": 1,
"description": "DSL schemas parser and code generator for CommsChampion Ecosystem",
"homepage": "https://commschamp.github.io/",
"documentation": "https://github.com/commschamp/commsdsl",
Expand Down
2 changes: 1 addition & 1 deletion ports/libiconv/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libiconv
Version: 1.16
Port-Version: 5
Port-Version: 6
Homepage: https://www.gnu.org/software/libiconv/
Description: GNU Unicode text conversion
9 changes: 7 additions & 2 deletions ports/libiconv/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
include(SelectLibraryConfigurations)

_find_package(${ARGS})
if(Iconv_FOUND)
if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN)
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib)
select_library_configurations(CHARSET)
list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES})
if(CHARSET_LIBRARIES)
list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES})
if(TARGET Iconv::Iconv)
target_link_libraries(Iconv::Iconv INTERFACE ${CHARSET_LIBRARIES})
endif()
endif()
endif()
3 changes: 2 additions & 1 deletion ports/librsvg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(librsvg C)
find_package(unofficial-cairo CONFIG REQUIRED)
find_package(unofficial-libcroco CONFIG REQUIRED)
find_package(unofficial-glib CONFIG REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(libxml2 CONFIG REQUIRED)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
find_library(PANGO_LIB pango-1.0)
find_library(PANGO_CAIRO_LIB pangocairo-1.0)
Expand Down Expand Up @@ -100,6 +100,7 @@ add_library(rsvg-2.40 ${LIBRSVG_SOURCES})
add_library(pixbufloader-svg ${PIXBUFLOADERSVG_SOURCES})

target_compile_definitions(rsvg-2.40 PRIVATE -DRSVG_COMPILATION -D_CRT_SECURE_NO_WARNINGS -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
target_include_directories(rsvg-2.40 PRIVATE ${LIBXML2_INCLUDE_DIRS})

target_include_directories(pixbufloader-svg PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(pixbufloader-svg PRIVATE
Expand Down
3 changes: 2 additions & 1 deletion ports/librsvg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: librsvg
Version: 2.40.20-2
Version: 2.40.20
Port-Version: 3
Homepage: https://gitlab.gnome.org/GNOME/librsvg
Description: A small library to render Scalable Vector Graphics (SVG)
Build-Depends: cairo, pango, gdk-pixbuf, libcroco
1 change: 1 addition & 0 deletions ports/libsbml/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: libsbml
Version: 5.18.0
Port-Version: 1
Description: A library for reading / writing SBML files
Default-Features: expat,comp,fbc,groups,layout,render,libxml2
Supports: !uwp
Expand Down
34 changes: 34 additions & 0 deletions ports/libsbml/fix-dependency-libxml2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ceb8f18..a8bc6c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,6 +464,7 @@ endif(WITH_EXPAT)
#
set(USE_LIBXML OFF)
if(WITH_LIBXML)
+ if (0)
if (NOT LIBXML_LIBRARY)
find_library(LIBXML_LIBRARY
NAMES libxml2.lib xml2
@@ -485,7 +486,11 @@ if(WITH_LIBXML)
DOC "The directory containing the libxml2 include files."
)
endif()
-
+ else()
+ find_package(libxml2 CONFIG REQUIRED)
+ set(LIBXML_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
+ set(LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
+ endif()
add_definitions( -DUSE_LIBXML )
list(APPEND SWIG_EXTRA_ARGS -DUSE_LIBXML)
set(USE_LIBXML ON)
@@ -494,7 +499,7 @@ if(WITH_LIBXML)
set(LIBSBML_XML_LIBRARY_INCLUDE ${LIBXML_INCLUDE_DIR})
set(LIBSBML_XML_LIBRARY_LIBS ${LIBXML_LIBRARY})

- if(NOT EXISTS "${LIBXML_INCLUDE_DIR}/libxml/parser.h")
+ if(0)
message(FATAL_ERROR
"The include directory specified for libxml appears to be invalid.
It should contain the file libxml/parser.h, but it does not.")
4 changes: 3 additions & 1 deletion ports/libsbml/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES fix-linkage-type.patch
PATCHES
fix-linkage-type.patch
fix-dependency-libxml2.patch
)

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME)
Expand Down
2 changes: 1 addition & 1 deletion ports/libspatialite/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libspatialite
Version: 4.3.0a
Port-Version: 5
Port-Version: 6
Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources
Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv
Expand Down
13 changes: 13 additions & 0 deletions ports/libspatialite/fix-dependency-libxml2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/makefile.vc b/makefile.vc
index f510b4f..9791621 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
src\versioninfo\version.obj src\virtualtext\virtualtext.obj
SPATIALITE_DLL = spatialite$(VERSION).dll

-CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
+CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include -I$(LIBXML2_INCLUDES) $(OPTFLAGS)

default: all

14 changes: 8 additions & 6 deletions ports/libspatialite/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ if (VCPKG_TARGET_IS_WINDOWS)
fix-makefiles.patch
fix-sources.patch
fix-latin-literals.patch
fix-dependency-libxml2.patch
)

# fix most of the problems when spacebar is in the path
set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"")
set(LIBXML2_INCLUDE_DIR "\"${CURRENT_INSTALLED_DIR}\"\\include\\libxml2")

if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(CL_FLAGS_DBG "/MDd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(CL_FLAGS_REL "/MD /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2d.lib")
else()
set(CL_FLAGS_DBG "/MTd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(CL_FLAGS_REL "/MT /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H")
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib")
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib")
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2s.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2ds.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib")
endif()
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

set(LIBS_ALL_DBG
Expand Down Expand Up @@ -67,7 +69,7 @@ if (VCPKG_TARGET_IS_WINDOWS)

vcpkg_execute_required_process(
COMMAND ${NMAKE} -f makefile.vc clean install
"INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
"INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} LIBXML2_INCLUDES=${LIBXML2_INCLUDE_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
)
Expand Down Expand Up @@ -147,7 +149,7 @@ elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX
LOGNAME config-${TARGET_TRIPLET}-rel
)
vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_RELEASE}/geos-config" "LIBXML2_LIBS=-lxml2 -llzma" "LIBXML2_CFLAGS=${includedir}"
COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "CFLAGS=-I${includedir} -I${includedir}\libxml2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_RELEASE}/geos-config" "LIBXML2_LIBS=-lxml2 -llzma" "LIBXML2_CFLAGS=${includedir}"
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME config-${TARGET_TRIPLET}-rel
)
Expand Down Expand Up @@ -206,7 +208,7 @@ elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX
LOGNAME config-${TARGET_TRIPLET}-debug
)
vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_DEBUG}/geos-config" "LIBXML2_LIBS=-lxml2 -llzmad" "LIBXML2_CFLAGS=${includedir}"
COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "CFLAGS=-I${includedir} -I${includedir}\libxml2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_DEBUG}/geos-config" "LIBXML2_LIBS=-lxml2 -llzmad" "LIBXML2_CFLAGS=${includedir}"
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME config-${TARGET_TRIPLET}-debug
)
Expand Down
Loading