mg: switch pcre to pcre2
authorHirokazu MORIKAWA <[email protected]>
Fri, 22 Sep 2023 01:36:43 +0000 (10:36 +0900)
committerJosef Schlehofer <[email protected]>
Fri, 6 Oct 2023 09:04:31 +0000 (11:04 +0200)
Switch pcre to pcre2
https://github.com/openwrt/packages/issues/22006

Signed-off-by: Hirokazu MORIKAWA <[email protected]>
(cherry picked from commit 3d11e5c197e250f0a32ca813ff07d480b59311d0)

utils/mg/Makefile
utils/mg/patches/001-cross_compile_openwrt.patch
utils/mg/patches/901-use_pcre.patch

index d310acff85d81f8f53b36fa0e207185ac5f76e86..5c8e18b819b2d5e4223de28a786d6bbfe4f0e39c 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mg
 PKG_VERSION:=7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/mg
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libncurses +libpcre
+  DEPENDS:=+libncurses +libpcre2
   TITLE:=microscopic EMACS style editor
   URL:=https://github.com/ibara/mg
   SUBMENU:=Editors
index 4216294a4c075ff3c2d172261c5885801c9f380f..3504eaac3bae431d8fccd6a6dd1930db5c7da0e9 100644 (file)
 -    ;;
 -esac
 +# OpenWrt
-+libs='-lncurses -lpcreposix -lutil'
++libs='-lncurses -lpcre2-posix -lutil'
 +cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim"
  
  cat << EOF > config.h
index 292f2eba7bd003279c345c95b2adccbf02e88140..4ae230a6bd97c005dd43d2a88d5284309ae5fb58 100644 (file)
@@ -5,7 +5,7 @@
  #include <sys/queue.h>
  #include <sys/types.h>
 -#include <regex.h>
-+#include <pcreposix.h>
++#include <pcre2posix.h>
  #include <signal.h>
  #include <stdio.h>
  #include <string.h>