aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-07-07 16:01:42 -0700
committerGitHub <noreply@github.com>2020-07-07 16:01:42 -0700
commitb0a535a2cc23f1f4e07e7cb17eceb40d7578f223 (patch)
tree92e841db041f803a596c0cd78fbbf23af39084e0
parent5be4b5141436de7b7e37d515b5c0d6d7c68c8a22 (diff)
parentbedc137571191e74cb9c15895e847e9009c4f331 (diff)
Merge pull request #12728 from neheb/xer2
libxerces-c: switch to CMake
-rw-r--r--libs/libxerces-c/Makefile26
-rw-r--r--libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch20
2 files changed, 12 insertions, 34 deletions
diff --git a/libs/libxerces-c/Makefile b/libs/libxerces-c/Makefile
index ff86685d1..0f19cc577 100644
--- a/libs/libxerces-c/Makefile
+++ b/libs/libxerces-c/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xerces-c
PKG_VERSION:=3.2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
@@ -19,12 +19,11 @@ PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libxerces-c/Default
SECTION:=libs
@@ -60,21 +59,20 @@ define Package/libxerces-c-samples/description
Validating XML parser library for C++ (samples)
endef
-CONFIGURE_ARGS += \
- --disable-rpath \
- --enable-msgloader-inmemory \
- --enable-netaccessor-socket \
- --enable-transcoder-iconv \
- --with-pic
-
-TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+CMAKE_OPTIONS += \
+ -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON \
+ -Dmessage-loader=inmemory \
+ -Dnetwork-accessor=socket \
+ -Dtranscoder=iconv
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/xercesc/
+ $(INSTALL_DIR) $(1)/usr/include/xercesc
$(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/{*.a,*.so} $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/cmake/XercesC
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/XercesC/* $(1)/usr/lib/cmake/XercesC
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc
endef
diff --git a/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch b/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch
deleted file mode 100644
index 338327014..000000000
--- a/libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -228,7 +228,7 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#
- ]
- )
- AC_MSG_CHECKING([for wcsrtombs])
--AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
-+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
- #include <string.h>]],
- [[
- mbstate_t st;
-@@ -250,7 +250,7 @@ else
- ]
- )
- AC_MSG_CHECKING([for mbsrtowcs])
--AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
-+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>
- #include <string.h>]],
- [[
- mbstate_t st;