Skip to content

Commit

Permalink
mg: switch pcre to pcre2
Browse files Browse the repository at this point in the history
Switch pcre to pcre2
openwrt#22006

Signed-off-by: Hirokazu MORIKAWA <[email protected]>
  • Loading branch information
nxhack committed Sep 22, 2023
1 parent 41c9155 commit 9426b11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions utils/mg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion utils/mg/patches/001-cross_compile_openwrt.patch
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
- ;;
-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
Expand Down
2 changes: 1 addition & 1 deletion utils/mg/patches/901-use_pcre.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 9426b11

Please sign in to comment.