From 48875ef02dd78e84ea180e0ccb9c91b8aad9282f Mon Sep 17 00:00:00 2001 From: Agisight Date: Tue, 16 May 2023 13:48:24 -0500 Subject: [PATCH 1/2] Swapping xmlversion-device.h file, excluding MacOS-iPad target --- Libxml2Module.podspec | 5 +- module_parser.rb | 1 + xmlversion-device.h | 556 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 560 insertions(+), 2 deletions(-) create mode 100644 xmlversion-device.h diff --git a/Libxml2Module.podspec b/Libxml2Module.podspec index 13d79b3..a064819 100644 --- a/Libxml2Module.podspec +++ b/Libxml2Module.podspec @@ -15,8 +15,9 @@ Pod::Spec.new do |s| s.module_map = 'Libxml2.modulemap' s.module_name = 'Libxml2' - s.source_files = 'dummy-source.m', 'headers/*.h' - s.public_header_files = 'headers/*.h' + s.source_files = 'dummy-source.m', 'headers/*.h', 'xmlversion-device.h' + s.public_header_files = 'headers/*.h', 'xmlversion-device.h' + s.exclude_files = 'headers/xmlversion-device.h' s.prepare_command = <<-CMD ruby module_parser.rb > Libxml2.modulemap diff --git a/module_parser.rb b/module_parser.rb index c8dbbcf..b489452 100644 --- a/module_parser.rb +++ b/module_parser.rb @@ -19,6 +19,7 @@ def process_folder(headers_folder, local_folder, suffix) if fname == "DOCBparser.h" then next end #deprecated file if fname == "module.modulemap" then next end #not a header + if fname == "xmlversion-device.h" then next end #to change with other content local = fname.sub(/\.h/, "-#{suffix}.h") imports += " header \"#{local}\"\n" diff --git a/xmlversion-device.h b/xmlversion-device.h new file mode 100644 index 0000000..1623d63 --- /dev/null +++ b/xmlversion-device.h @@ -0,0 +1,556 @@ +/* + * Summary: compile-time version information + * Description: compile-time version information for the XML library + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_VERSION_H__ +#define __XML_VERSION_H__ + +#import "xmlexports-device.h" + +#if defined(__APPLE__) && defined(TARGET_OS_MAC) +@import Darwin.C.Availability; +@import Darwin.C.TargetConditionals; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * use those to be sure nothing nasty will happen if + * your library and includes mismatch + */ +#ifndef LIBXML2_COMPILING_MSCCDEF +XMLPUBFUN void XMLCALL xmlCheckVersion(int version); +#endif /* LIBXML2_COMPILING_MSCCDEF */ + +/** + * LIBXML_DOTTED_VERSION: + * + * the version string like "1.2.3" + */ +#define LIBXML_DOTTED_VERSION "2.9.13" + +/** + * LIBXML_VERSION: + * + * the version number: 1.2.3 value is 10203 + */ +#define LIBXML_VERSION 20913 + +/** + * LIBXML_VERSION_STRING: + * + * the version number string, 1.2.3 value is "10203" + */ +#define LIBXML_VERSION_STRING "20913" + +/** + * LIBXML_VERSION_EXTRA: + * + * extra version information, used to show a git commit description + */ +#define LIBXML_VERSION_EXTRA "" + +/** + * LIBXML_TEST_VERSION: + * + * Macro to check that the libxml version in use is compatible with + * the version the software has been compiled against + */ +#define LIBXML_TEST_VERSION xmlCheckVersion(20913); + +#ifndef VMS +#if 0 +/** + * WITH_TRIO: + * + * defined if the trio support need to be configured in + */ +#define WITH_TRIO +#else +/** + * WITHOUT_TRIO: + * + * defined if the trio support should not be configured in + */ +#define WITHOUT_TRIO +#endif +#else /* VMS */ +/** + * WITH_TRIO: + * + * defined if the trio support need to be configured in + */ +#define WITH_TRIO 1 +#endif /* VMS */ + +/** + * LIBXML_THREAD_ENABLED: + * + * Whether the thread support is configured in + */ +#if 1 +#define LIBXML_THREAD_ENABLED +#endif + +/** + * LIBXML_THREAD_ALLOC_ENABLED: + * + * Whether the allocation hooks are per-thread + */ +#if 0 +#define LIBXML_THREAD_ALLOC_ENABLED +#endif + +/** + * LIBXML_TREE_ENABLED: + * + * Whether the DOM like tree manipulation API support is configured in + */ +#if 1 +#define LIBXML_TREE_ENABLED +#endif + +/** + * LIBXML_OUTPUT_ENABLED: + * + * Whether the serialization/saving support is configured in + */ +#if 1 +#define LIBXML_OUTPUT_ENABLED +#endif + +/** + * LIBXML_PUSH_ENABLED: + * + * Whether the push parsing interfaces are configured in + */ +#if 1 +#define LIBXML_PUSH_ENABLED +#endif + +/** + * LIBXML_READER_ENABLED: + * + * Whether the xmlReader parsing interface is configured in + */ +#if 1 +#define LIBXML_READER_ENABLED +#endif + +/** + * LIBXML_PATTERN_ENABLED: + * + * Whether the xmlPattern node selection interface is configured in + */ +#if 1 +#define LIBXML_PATTERN_ENABLED +#endif + +/** + * LIBXML_WRITER_ENABLED: + * + * Whether the xmlWriter saving interface is configured in + */ +#if 1 +#define LIBXML_WRITER_ENABLED +#endif + +/** + * LIBXML_SAX1_ENABLED: + * + * Whether the older SAX1 interface is configured in + */ +#if 1 +#define LIBXML_SAX1_ENABLED +#endif + +/** + * LIBXML_FTP_ENABLED: + * + * Whether the FTP support is configured in + */ +#if 1 +#define LIBXML_FTP_ENABLED +#endif + +/** + * LIBXML_HTTP_ENABLED: + * + * Whether the HTTP support is configured in + */ +#if 1 +#define LIBXML_HTTP_ENABLED +#endif + +/** + * LIBXML_VALID_ENABLED: + * + * Whether the DTD validation support is configured in + */ +#if 1 +#define LIBXML_VALID_ENABLED +#endif + +/** + * LIBXML_HTML_ENABLED: + * + * Whether the HTML support is configured in + */ +#if 1 +#define LIBXML_HTML_ENABLED +#endif + +/** + * LIBXML_LEGACY_ENABLED: + * + * Whether the deprecated APIs are compiled in for compatibility + */ +#if 1 +#define LIBXML_LEGACY_ENABLED +#endif + +/** + * LIBXML_C14N_ENABLED: + * + * Whether the Canonicalization support is configured in + */ +#if 1 +#define LIBXML_C14N_ENABLED +#endif + +/** + * LIBXML_CATALOG_ENABLED: + * + * Whether the Catalog support is configured in + */ +#if 1 +#define LIBXML_CATALOG_ENABLED +#endif + +/** + * LIBXML_DOCB_ENABLED: + * + * Whether the SGML Docbook support is configured in + */ +#if 1 +#define LIBXML_DOCB_ENABLED +#endif + +/** + * LIBXML_XPATH_ENABLED: + * + * Whether XPath is configured in + */ +#if 1 +#define LIBXML_XPATH_ENABLED +#endif + +/** + * LIBXML_XPTR_ENABLED: + * + * Whether XPointer is configured in + */ +#if 1 +#define LIBXML_XPTR_ENABLED +#endif + +/** + * LIBXML_XPTR_LOCS_ENABLED: + * + * Whether support for XPointer locations is configured in + */ +#if 1 +#define LIBXML_XPTR_LOCS_ENABLED +#endif + +/** + * LIBXML_XINCLUDE_ENABLED: + * + * Whether XInclude is configured in + */ +#if 1 +#define LIBXML_XINCLUDE_ENABLED +#endif + +/** + * LIBXML_ICONV_ENABLED: + * + * Whether iconv support is available + */ +#if 0 +#define LIBXML_ICONV_ENABLED +#endif + +/** + * LIBXML_ICU_ENABLED: + * + * Whether icu support is available + */ +#if 1 +#define LIBXML_ICU_ENABLED +#endif + +/** + * LIBXML_ISO8859X_ENABLED: + * + * Whether ISO-8859-* support is made available in case iconv is not + */ +#if 1 +#define LIBXML_ISO8859X_ENABLED +#endif + +/** + * LIBXML_DEBUG_ENABLED: + * + * Whether Debugging module is configured in + */ +#if 1 +#define LIBXML_DEBUG_ENABLED +#endif + +/** + * DEBUG_MEMORY_LOCATION: + * + * Whether the memory debugging is configured in + */ +#if 0 +#define DEBUG_MEMORY_LOCATION +#endif + +/** + * LIBXML_DEBUG_RUNTIME: + * + * Whether the runtime debugging is configured in + */ +#if 0 +#define LIBXML_DEBUG_RUNTIME +#endif + +/** + * LIBXML_UNICODE_ENABLED: + * + * Whether the Unicode related interfaces are compiled in + */ +#if 1 +#define LIBXML_UNICODE_ENABLED +#endif + +/** + * LIBXML_REGEXP_ENABLED: + * + * Whether the regular expressions interfaces are compiled in + */ +#if 1 +#define LIBXML_REGEXP_ENABLED +#endif + +/** + * LIBXML_AUTOMATA_ENABLED: + * + * Whether the automata interfaces are compiled in + */ +#if 1 +#define LIBXML_AUTOMATA_ENABLED +#endif + +/** + * LIBXML_EXPR_ENABLED: + * + * Whether the formal expressions interfaces are compiled in + * + * This code is unused and disabled unconditionally for now. + */ +#if 0 +#define LIBXML_EXPR_ENABLED +#endif + +/** + * LIBXML_SCHEMAS_ENABLED: + * + * Whether the Schemas validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMAS_ENABLED +#endif + +/** + * LIBXML_SCHEMATRON_ENABLED: + * + * Whether the Schematron validation interfaces are compiled in + */ +#if 1 +#define LIBXML_SCHEMATRON_ENABLED +#endif + +/** + * LIBXML_MODULES_ENABLED: + * + * Whether the module interfaces are compiled in + */ +#if 1 +#define LIBXML_MODULES_ENABLED +/** + * LIBXML_MODULE_EXTENSION: + * + * the string suffix used by dynamic modules (usually shared libraries) + */ +#define LIBXML_MODULE_EXTENSION ".so" +#endif + +/** + * LIBXML_ZLIB_ENABLED: + * + * Whether the Zlib support is compiled in + */ +#if 1 +#define LIBXML_ZLIB_ENABLED +#endif + +/** + * LIBXML_LZMA_ENABLED: + * + * Whether the Lzma support is compiled in + */ +#if 0 +#define LIBXML_LZMA_ENABLED +#endif + +#ifdef __GNUC__ + +/** + * ATTRIBUTE_UNUSED: + * + * Macro used to signal to GCC unused function parameters + */ + +#ifndef ATTRIBUTE_UNUSED +# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7))) +# define ATTRIBUTE_UNUSED __attribute__((unused)) +# else +# define ATTRIBUTE_UNUSED +# endif +#endif + +/** + * LIBXML_ATTR_ALLOC_SIZE: + * + * Macro used to indicate to GCC this is an allocator function + */ + +#ifndef LIBXML_ATTR_ALLOC_SIZE +# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))) +# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# else +# define LIBXML_ATTR_ALLOC_SIZE(x) +# endif +#else +# undef LIBXML_ATTR_ALLOC_SIZE(x) +# define LIBXML_ATTR_ALLOC_SIZE(x) +#endif + +/** + * LIBXML_ATTR_FORMAT: + * + * Macro used to indicate to GCC the parameter are printf like + */ + +#ifndef LIBXML_ATTR_FORMAT +# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) +# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# else +# define LIBXML_ATTR_FORMAT(fmt,args) +# endif +#else +# undef LIBXML_ATTR_FORMAT(fmt,args) +# define LIBXML_ATTR_FORMAT(fmt,args) +#endif + +#ifndef XML_DEPRECATED +# ifdef IN_LIBXML +# define XML_DEPRECATED +# elif defined(__APPLE__) +/* Apple has its own deprecation macros that include OS versions. */ +# define XML_DEPRECATED +# else +/* Available since at least GCC 3.1 */ +# define XML_DEPRECATED __attribute__((deprecated)) +# endif +#endif + +#else /* ! __GNUC__ */ +/** + * ATTRIBUTE_UNUSED: + * + * Macro used to signal to GCC unused function parameters + */ +#define ATTRIBUTE_UNUSED +/** + * LIBXML_ATTR_ALLOC_SIZE: + * + * Macro used to indicate to GCC this is an allocator function + */ +#define LIBXML_ATTR_ALLOC_SIZE(x) +/** + * LIBXML_ATTR_FORMAT: + * + * Macro used to indicate to GCC the parameter are printf like + */ +#define LIBXML_ATTR_FORMAT(fmt,args) +/** + * XML_DEPRECATED: + * + * Macro used to indicate that a function, variable, type or struct member + * is deprecated. + */ +#ifndef XML_DEPRECATED +#define XML_DEPRECATED +#endif +#endif /* __GNUC__ */ + +/** + * LIBXML_API_AVAILABLE_MACOS13_IOS16_WATCHOS9_TVOS16: + * LIBXML_HAS_XPATH_RESOURCE_LIMITS: + * + * Macros used for binary compatibility between Apple's v2.9.4 and v2.9.12+. + */ + +#ifdef __APPLE__ +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000 \ + || defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000 \ + || defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED >= 160000 \ + || defined(__WATCH_OS_VERSION_MIN_REQUIRED) && __WATCH_OS_VERSION_MIN_REQUIRED >= 90000 +#define LIBXML_API_AVAILABLE_MACOS13_IOS16_WATCHOS9_TVOS16 \ + __IOS_AVAILABLE(16.0) __OSX_AVAILABLE(13.0) __TVOS_AVAILABLE(16.0) __WATCHOS_AVAILABLE(9.0) +#define LIBXML_API_DEPRECATED_MACOS13_IOS16_WATCHOS9_TVOS16(libxml2_version) \ + __OSX_DEPRECATED(10.4, 13.0, "Also deprecated in libxml2 " # libxml2_version) \ + __IOS_DEPRECATED(2.0, 16.0, "Also deprecated in libxml2 " # libxml2_version) \ + __TVOS_DEPRECATED(9.0, 16.0, "Also deprecated in libxml2 " # libxml2_version) \ + __WATCHOS_DEPRECATED(1.0, 9.0, "Also deprecated in libxml2 " # libxml2_version) +#define LIBXML_HAS_ICU_PIVOT_BUFFER +#define LIBXML_HAS_XPATH_RESOURCE_LIMITS +#else +#define LIBXML_API_AVAILABLE_MACOS13_IOS16_WATCHOS9_TVOS16 +#define LIBXML_API_DEPRECATED_MACOS13_IOS16_WATCHOS9_TVOS16(libxml2_version) +#undef LIBXML_HAS_ICU_PIVOT_BUFFER +#undef LIBXML_HAS_XPATH_RESOURCE_LIMITS +#endif +#else +#define LIBXML_API_AVAILABLE_MACOS13_IOS16_WATCHOS9_TVOS16 +#define LIBXML_API_DEPRECATED_MACOS13_IOS16_WATCHOS9_TVOS16(libxml2_version) +#define LIBXML_HAS_ICU_PIVOT_BUFFER +#define LIBXML_HAS_XPATH_RESOURCE_LIMITS +#endif /* __APPLE__ */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif + + From f5a51fa7e4ec8e8448dfb1c8b742de501b59eafe Mon Sep 17 00:00:00 2001 From: Agisight Date: Tue, 16 May 2023 13:57:36 -0500 Subject: [PATCH 2/2] iOS minimum deployment version for Xcode14 --- Libxml2Module.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libxml2Module.podspec b/Libxml2Module.podspec index a064819..7132fea 100644 --- a/Libxml2Module.podspec +++ b/Libxml2Module.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.license = 'MIT' s.author = { "gtarasov" => "gleb34@gmail.com" } s.source = { git: 'https://github.com/ctsf/Libxml2Module.git', tag: "0.0.5" } - s.platform = :ios, '8.0' + s.platform = :ios, '11.0' s.libraries = 'xml2' s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/Libxml2Module/headers' }