libxerces-c: switch to CMake 12728/head
authorRosen Penev <rosenp@gmail.com>
Sat, 4 Jul 2020 20:53:18 +0000 (13:53 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 7 Jul 2020 22:58:04 +0000 (15:58 -0700)
Allows simplifying the Makefile. Also faster compilation.

Removed autotools patch as a result.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libxerces-c/Makefile
libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch [deleted file]

index ff86685d1bb799c554e9647701516d2fa2d704f7..0f19cc577a32f7908560b5e17539d1a81b30f982 100644 (file)
@@ -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 (file)
index 3383270..0000000
+++ /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;