Skip to content

Commit

Permalink
expat -> 2.3.0 (step 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Apr 2, 2021
1 parent 3e9c14a commit 1c243ef
Show file tree
Hide file tree
Showing 59 changed files with 5,422 additions and 6,492 deletions.
12 changes: 6 additions & 6 deletions HostSupport/expat-2.2.10/CMake.README
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.

Assuming ~/expat-2.2.10 is the source directory of expat, add a subdirectory
Assuming ~/expat-2.3.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.2.10$ mkdir build && cd build
~/expat-2.2.10/build$
~/expat-2.3.0$ mkdir build && cd build
~/expat-2.3.0/build$

From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.2.10/build$ cmake ..
~/expat-2.3.0/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick/expat-2.2.10/build
-- Build files have been written to: /home/patrick/expat-2.3.0/build

If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.

~/expat-2.2.10/build$ make && make test && make install
~/expat-2.3.0/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
Expand Down
27 changes: 17 additions & 10 deletions HostSupport/expat-2.2.10/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif()

project(expat
VERSION
2.2.10
2.3.0
LANGUAGES
C
)
Expand All @@ -47,11 +47,6 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}")
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

#
# Detect use by means of add_subdirectory
#
get_directory_property(_EXPAT_PARENT_DIRECTORY PARENT_DIRECTORY)

#
# Configuration defaults
#
Expand Down Expand Up @@ -117,6 +112,11 @@ if(MSVC OR _EXPAT_HELP)
set(EXPAT_MSVC_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
endif()

if(EXPAT_BUILD_TESTS)
# We have to call enable_language() before modifying any CMAKE_CXX_* variables
enable_language(CXX)
endif()

#
# Environment checks
#
Expand All @@ -129,6 +129,14 @@ if(EXPAT_WITH_LIBBSD)
endif()
endif()

if(MSVC)
# Minimum supported MSVC version is 1910 = Visual Studio 15.0/2017
# See also https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
if(MSVC_VERSION VERSION_LESS 1910)
message(SEND_ERROR "MSVC_VERSION ${MSVC_VERSION} is not a supported Visual Studio compiler version. Please use Visual Studio 15.0/2017 or any later version.")
endif()
endif()

macro(_expat_copy_bool_int source_ref dest_ref)
if(${source_ref})
set(${dest_ref} 1)
Expand Down Expand Up @@ -327,9 +335,9 @@ if(EXPAT_WITH_LIBBSD)
target_link_libraries(expat ${LIB_BSD})
endif()

set(LIBCURRENT 7) # sync
set(LIBREVISION 12) # with
set(LIBAGE 6) # configure.ac!
set(LIBCURRENT 8) # sync
set(LIBREVISION 0) # with
set(LIBAGE 7) # configure.ac!
math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")

set_property(TARGET expat PROPERTY OUTPUT_NAME "${_EXPAT_OUTPUT_NAME}")
Expand Down Expand Up @@ -423,7 +431,6 @@ endif()
#
if(EXPAT_BUILD_TESTS)
## these are unittests that can be run on any platform
enable_language(CXX)
enable_testing()

set(test_SRCS
Expand Down
51 changes: 50 additions & 1 deletion HostSupport/expat-2.2.10/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,55 @@ NOTE: We are looking for help with a few things:
https://github.com/libexpat/libexpat/labels/help%20wanted
If you can help, please get in touch. Thanks!

Release 2.3.0 Thu March 25 2021
Bug fixes:
#438 When calling XML_ParseBuffer without a prior successful call to
XML_GetBuffer as a user, no longer trigger undefined behavior
(by adding an integer to a NULL pointer) but rather return
XML_STATUS_ERROR and set the error code to (new) code
XML_ERROR_NO_BUFFER. Found by UBSan (UndefinedBehaviorSanitizer)
of Clang 11 (but not Clang 9).
#444 xmlwf: Exit status 2 was used for both:
- malformed input files (documented) and
- invalid command-line arguments (undocumented).
The case of invalid command-line arguments now
has its own exit status 4, resolving the ambiguity.

Other changes:
#439 xmlwf: Add argument -k to allow continuing after
non-fatal errors
#439 xmlwf: Add section about exit status to the -h help output
#422 #426 #447 Windows: Drop support for Visual Studio <=14.0/2015
#434 Windows: CMake: Detect unsupported Visual Studio at
configure time (rather than at compile time)
#382 #428 testrunner: Make verbose mode (argument "-v") report
about passed tests, and make default mode report about
failures, as well.
#442 CMake: Call "enable_language(CXX)" prior to tinkering
with CMAKE_CXX_* variables
#448 Document use of libexpat from a CMake-based project
#451 Autotools: Install CMake files as generated by CMake 3.19.6
so that users with "find_package(expat [..] CONFIG [..])"
are served on distributions that are *not* using the CMake
build system inside for libexpat packaging
#436 #437 Autotools: Drop obsolescent macro AC_HEADER_STDC
#450 #452 Autotools: Resolve use of obsolete macro AC_CONFIG_HEADER
#441 Address compiler warnings
#443 Version info bumped from 7:12:6 to 8:0:7
due to addition of error code XML_ERROR_NO_BUFFER
(see https://verbump.de/ for what these numbers do)

Infrastructure:
#435 #446 Replace Travis CI by GitHub Actions

Special thanks to:
Alexander Richardson
Oleksandr Popovych
Thomas Beutlich
Tim Bray
and
Clang LeakSan, Clang 11 UBSan and the Clang team

Release 2.2.10 Sat October 3 2020
Bug fixes:
#390 #395 #398 Fix undefined behavior during parsing caused by
Expand Down Expand Up @@ -46,7 +95,7 @@ Release 2.2.10 Sat October 3 2020
#354 #355 ..
#356 #412 Address compiler warnings
#368 #369 Address pngcheck warnings with doc/*.png images
Version info bumped from 7:11:6 to 7:12:6
#425 Version info bumped from 7:11:6 to 7:12:6

Special thanks to:
asavah
Expand Down
13 changes: 12 additions & 1 deletion HostSupport/expat-2.2.10/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,19 @@ pkgconfig_DATA = expat.pc
pkgconfigdir = $(libdir)/pkgconfig


dist_cmake_DATA = \
cmake/autotools/expat.cmake

nodist_cmake_DATA = \
cmake/autotools/expat-config-version.cmake \
cmake/autotools/expat-noconfig.cmake \
cmake/expat-config.cmake

cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@


_EXTRA_DIST_CMAKE = \
cmake/expat-config.cmake.in \
cmake/autotools/expat-package-init.cmake \
cmake/mingw-toolchain.cmake \
\
CMakeLists.txt \
Expand Down
Loading

0 comments on commit 1c243ef

Please sign in to comment.