oniguruma: build using autotools
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Tue, 16 Jun 2020 23:20:37 +0000 (20:20 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 18 Jun 2020 16:42:26 +0000 (13:42 -0300)
Cmake currently fails to compile properly.  While there's a fix
upstream, we can avoid carrying any patches here, and use the more
stable build system, despite being slower.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
libs/oniguruma/Makefile
libs/oniguruma/patches/0001-Add-SOVERSION-info-to-library-when-using-cmake.patch [deleted file]
libs/oniguruma/patches/0002-i_free_callout_name_entry.patch [deleted file]

index 93088f02fe54fad4d7ceced0b8f327e39e4dc8c9..62b325ee842c2c6629b858e749ba86b8c2d766da 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=oniguruma
 PKG_VERSION:=6.9.5_rev1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=onig-v$(subst _,-,$(PKG_VERSION)).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/kkos/oniguruma/tar.gz/v$(PKG_VERSION)?
@@ -21,10 +21,8 @@ PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
 
-CMAKE_INSTALL:=1
-CMAKE_OPTIONS += -DENABLE_POSIX_API:BOOL=ON
+CONFIGURE_ARGS += --enable-posix-api
 
 define Package/oniguruma
     SECTION:=libs
@@ -47,4 +45,11 @@ define Package/oniguruma/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libonig.so.$(ABI_VERSION) $(1)/usr/lib/
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/{include,lib}
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(SED) 's,/usr,$(STAGING_DIR)/usr,g' $(1)/usr/lib/pkgconfig/oniguruma.pc
+endef
+
 $(eval $(call BuildPackage,oniguruma))
diff --git a/libs/oniguruma/patches/0001-Add-SOVERSION-info-to-library-when-using-cmake.patch b/libs/oniguruma/patches/0001-Add-SOVERSION-info-to-library-when-using-cmake.patch
deleted file mode 100644 (file)
index 1978f41..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From afb2a1587a828bf7cd7ddd87b2e2609a9bb7fab0 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cotequeiroz@gmail.com>
-Date: Wed, 6 May 2020 08:59:54 -0300
-Subject: [PATCH] Add SOVERSION info to library when using cmake
-
-Currently the SOVERSION is different when building with cmake than the
-value used by autotools.
-This adds the version information from autotools to cmake.
-
-Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 29a1417..1c8a090 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -67,6 +67,19 @@ target_include_directories(onig PUBLIC
- target_compile_definitions(onig PUBLIC
-   $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:ONIG_STATIC>)
-+if(BUILD_SHARED_LIBS)
-+  # Parse SOVERSION information from LTVERSION in configure.ac
-+  file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" LTVERSION REGEX "^LTVERSION *= *\"?[0-9]+:[0-9]+:[0-9]+\"?")
-+  string(REGEX REPLACE "^LTVERSION *= *\"?([0-9]+:[0-9]+:[0-9]+)\"?.*$" "\\1" LTVERSION "${LTVERSION}")
-+  string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\\1" LTCURRENT ${LTVERSION})
-+  string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\\2" LTREVISION ${LTVERSION})
-+  string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\\3" LTAGE ${LTVERSION})
-+  math(EXPR ONIG_SOVERSION "${LTCURRENT} - ${LTAGE}")
-+  set_target_properties(onig PROPERTIES
-+      SOVERSION "${ONIG_SOVERSION}"
-+      VERSION "${ONIG_SOVERSION}.${LTAGE}.${LTREVISION}")
-+endif()
-+
- if(MSVC)
-   target_compile_options(onig PRIVATE
-       #/W4
diff --git a/libs/oniguruma/patches/0002-i_free_callout_name_entry.patch b/libs/oniguruma/patches/0002-i_free_callout_name_entry.patch
deleted file mode 100644 (file)
index f67a00c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/regparse.c   2020-04-26 09:20:56.000000000 +0200
-+++ b/src/regparse.c   2020-06-14 21:22:18.396966276 +0200
-@@ -1294,7 +1294,9 @@
- i_free_callout_name_entry(st_callout_name_key* key, CalloutNameEntry* e,
-                           void* arg ARG_UNUSED)
- {
--  xfree(e->name);
-+  if (IS_NOT_NULL(e)) {
-+    xfree(e->name);
-+  }
-   /*xfree(key->s); */ /* is same as e->name */
-   xfree(key);
-   xfree(e);