summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-09-12 08:58:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-10-05 09:46:02 +0200
commit7683a8b7a9e8f4be61a5dee67667db54646d80d3 (patch)
tree39fcc139d34e56be03f2045b21a05e2d6d290c5b
parent7a9ad23a9ec80a37308ab75c23c67da57287dd80 (diff)
Release version 3.2.4+2HEADv3.2.4+2master
- Don't insist on LIBXERCES_C_{SHARED,STATIC} for non-Windows platforms. - Don't link winsock if network support is disabled. - Add binary distribution package build configurations.
-rw-r--r--libxerces-c/manifest83
-rw-r--r--libxerces-c/xercesc/buildfile6
-rw-r--r--libxerces-c/xercesc/util/Xerces_autoconf_config.hpp11
3 files changed, 94 insertions, 6 deletions
diff --git a/libxerces-c/manifest b/libxerces-c/manifest
index 164f4bf..28a3cb0 100644
--- a/libxerces-c/manifest
+++ b/libxerces-c/manifest
@@ -3,7 +3,7 @@ name: libxerces-c
# Note: remember to update doc-url below!
#
-version: 3.2.4+1
+version: 3.2.4+2
language: c++
project: xerces-c
@@ -30,3 +30,84 @@ config.libxerces_c.transcoder_icu=true
;
Test with ICU transcoder on Mac OS and Windows.
\
+
+# Binary distribution packages. Overall notes:
+#
+# - Build as C++11 for maximum compatibility (this is a C++98 codebase).
+
+# On RHEL the Xerces-C++ package is only available from EPEL and usually of
+# an outdated version. So we build one ourselves.
+#
+bindist-rhel-builds: bindist
+bindist-rhel-build-include: linux_rhel*-**
+bindist-rhel-build-exclude: **
+bindist-rhel-build-config:
+\
++bpkg.bindist.fedora:
++bbot.bindist.upload:
+b.create:config.cxx.std=c++11
+?sys:libicuuc
+?sys:libicui18n
+\
+
+# On Ubuntu the Xerces-C++ package is only available from the `universe`
+# section (unsupported community packages, but enabled by default unlike
+# EPEL) and usually of an outdated version. So we build one ourselves.
+#
+bindist-ubuntu-builds: bindist
+bindist-ubuntu-build-include: linux_ubuntu*-**
+bindist-ubuntu-build-exclude: **
+bindist-ubuntu-build-config:
+\
++bpkg.bindist.debian:
++bbot.bindist.upload:
+b.create:config.cxx.std=c++11
+?sys:libicuuc
+?sys:libicui18n
+\
+
+# Windows binary distribution archives (debug and release).
+#
+# - For Debug we only produce the shared library (if we wanted to also do
+# static, then would need to use /Z7).
+#
+bindist-windows-release-builds: bindist
+bindist-windows-release-build-include: windows*-**
+bindist-windows-release-build-exclude: **
+bindist-windows-release-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:config.install.relocatable=true
+b.create:config.cc.coptions="/W2 /O2"
+b.create:config.cxx.std=c++11
+\
+
+bindist-windows-debug-builds: bindist
+bindist-windows-debug-build-include: windows*-**
+bindist-windows-debug-build-exclude: **
+bindist-windows-debug-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:config.install.relocatable=true
+bpkg.bindist.archive:--archive-build-meta=+debug
+bpkg.create:config.bin.lib=shared
+b.create:config.cc.coptions="/W2 /Zi /MDd"
+b.create:config.cc.loptions="/DEBUG:FULL"
+b.create:config.cxx.std=c++11
+\
+
+# Mac OS binary distribution archives.
+#
+bindist-macos-builds: bindist
+bindist-macos-build-include: macos*-**
+bindist-macos-build-exclude: **
+bindist-macos-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:config.install.relocatable=true
+b.create:config.cc.coptions="-Wall -O3"
+b.create:config.cxx.std=c++11
+\
diff --git a/libxerces-c/xercesc/buildfile b/libxerces-c/xercesc/buildfile
index 15f61b1..88cf9b1 100644
--- a/libxerces-c/xercesc/buildfile
+++ b/libxerces-c/xercesc/buildfile
@@ -126,7 +126,8 @@ switch $tclass, $tsys
#
cxx.loptions += -Wl,--no-undefined
- cxx.libs += -lws2_32
+ if $network
+ cxx.libs += -lws2_32
}
case 'windows'
{
@@ -137,7 +138,8 @@ switch $tclass, $tsys
if! $transcoder_icu
cxx.libs += advapi32.lib
- cxx.libs += ws2_32.lib
+ if $network
+ cxx.libs += ws2_32.lib
}
case 'linux'
{
diff --git a/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp b/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp
index 2b088cf..e88b063 100644
--- a/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp
+++ b/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp
@@ -135,10 +135,15 @@
* type. Note that falling back to defining the XERCES_PLATFORM_IMPORT macro
* as empty would work for both the static and shared libraries (being
* sub-optimal for the later) but only for functions. Xerces-C++, however,
- * also exports data symbols, which cannot be imported this way. Thus we,
- * just issue an error.
+ * also exports data symbols, which cannot be imported this way. Thus,
+ * where matters (Windows), we just issue an error.
*/
-# error define LIBXERCES_C_STATIC or LIBXERCES_C_SHARED preprocessor macro to signal Xerces-C++ library type being linked
+# ifdef _WIN32
+# error define LIBXERCES_C_STATIC or LIBXERCES_C_SHARED preprocessor macro to signal Xerces-C++ library type being linked
+# else
+# define XERCES_PLATFORM_IMPORT
+# define XERCES_PLATFORM_DECEXPORT
+# endif
#endif
#ifdef XERCES_DLL_EXPORT