aboutsummaryrefslogtreecommitdiff
path: root/utils/mg
diff options
context:
space:
mode:
authorHirokazu MORIKAWA <morikw2@gmail.com>2020-12-10 09:13:35 +0900
committerHirokazu MORIKAWA <morikw2@gmail.com>2020-12-10 12:22:19 +0900
commit0f05a0712b2536862552d74b8155bfd1b73a5c9b (patch)
tree3485e185c1614499a594a45561a2364acff4791b /utils/mg
parentaca1ee1b67132098276c73810137416b89d08fc6 (diff)
mg: update to 6.8.1
update to 6.8.1 Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'utils/mg')
-rw-r--r--utils/mg/Makefile4
-rw-r--r--utils/mg/patches/001-cross_compile_openwrt.patch101
2 files changed, 63 insertions, 42 deletions
diff --git a/utils/mg/Makefile b/utils/mg/Makefile
index 4841d4bbc..b9172dc01 100644
--- a/utils/mg/Makefile
+++ b/utils/mg/Makefile
@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mg
-PKG_VERSION:=6.7
+PKG_VERSION:=6.8.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
-PKG_HASH:=899681ddd93525e0341b8e9239911c1a93c1185f61372625463c116ff43e920b
+PKG_HASH:=d14c6f3a945d9f5241f20aea8553914ec28d93218e0b091161c122937c56d3e4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
diff --git a/utils/mg/patches/001-cross_compile_openwrt.patch b/utils/mg/patches/001-cross_compile_openwrt.patch
index 3a75a15bd..3789bef29 100644
--- a/utils/mg/patches/001-cross_compile_openwrt.patch
+++ b/utils/mg/patches/001-cross_compile_openwrt.patch
@@ -1,7 +1,6 @@
-diff -urN a/configure b/configure
---- a/configure 2019-03-03 22:17:03.000000000 +0900
-+++ b/configure 2019-06-04 13:08:41.418919319 +0900
-@@ -3,52 +3,7 @@
+--- a/configure
++++ b/configure
+@@ -3,66 +3,7 @@
# This configure script written by Brian Callahan <bcallah@openbsd.org>
# and released into the Public Domain.
@@ -51,39 +50,46 @@ diff -urN a/configure b/configure
- done
- return 1
-}
+-
+-defaultcflagscheck() {
+- cat << EOF > conftest.c
+-int main(void){return 0;}
+-EOF
+- $cc $cflags -g -O2 -o conftest.o -c conftest.c > /dev/null 2>&1
+- if [ $? -eq 0 ] ; then
+- rm -f conftest conftest.o conftest.c
+- return 1
+- else
+- rm -f conftest conftest.o conftest.c
+- return 0
+- fi
+-}
+cc="$CC"
fparselncheck() {
cat << EOF > conftest.c
-@@ -214,18 +184,19 @@
+@@ -229,20 +170,6 @@
fi
}
-wflagcheck() {
-+futimenscheck() {
- cat << EOF > conftest.c
+- cat << EOF > conftest.c
-int main(void){return 0;}
-+#include <sys/stat.h>
-+#include <stddef.h>
-+int main(void){futimens(0, NULL);return 0;}
- EOF
-- $cc -w -o conftest conftest.c > /dev/null 2> conftest.err
-- grep ':' conftest.err > /dev/null 2>&1
-+ $cc $tflags -o conftest conftest.c > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
-- rm -f conftest conftest.err conftest.c
+-EOF
+- $cc $cflags -w -o conftest conftest.c > /dev/null 2>&1
+- if [ $? -eq 0 ] ; then
+- rm -f conftest conftest.o conftest.c
- return 1
- else
-- rm -f conftest conftest.err conftest.c
-+ rm -f conftest conftest.c
- return 0
-+ else
-+ rm -f conftest conftest.c
-+ return 1
- fi
- }
-
-@@ -303,54 +274,9 @@
+- rm -f conftest conftest.o conftest.c
+- return 0
+- fi
+-}
+-
+ # Option variables
+ if [ ! -z "$PREFIX" ] ; then
+ prefix="$PREFIX"
+@@ -327,79 +254,9 @@
ldflags="${ldflags}-static"
fi
@@ -97,9 +103,20 @@ diff -urN a/configure b/configure
- echo "$cc"
-fi
-
+-if [ "x$cflags" = "x-DREGEX" ] ; then
+- printf "checking if the compiler accepts -g -O2... "
+- defaultcflagscheck
+- if [ $? -eq 0 ] ; then
+- echo "no"
+- else
+- cflags="-g -O2 $cflags"
+- echo "yes"
+- fi
+-fi
+-
-printf "checking for -w compiler flag... "
-wflagcheck
--if [ $? -ne 0 ] ; then
+-if [ $? -eq 0 ] ; then
- echo "no"
-else
- cflags="$cflags -w"
@@ -107,7 +124,13 @@ diff -urN a/configure b/configure
-fi
-
-printf "checking for OS... "
--libs='-lncursesw'
+-
+-if [ $terminfo -eq 0 ] ; then
+- libs="-lncursesw"
+-else
+- libs=""
+-fi
+-
-os=`uname -s`
-echo "$os"
-
@@ -117,7 +140,11 @@ diff -urN a/configure b/configure
- ;;
- "xDarwin")
- cflags="$cflags -DMSG_NOSIGNAL=SO_NOSIGPIPE -DLOGIN_NAME_MAX=MAXLOGNAME"
-- libs="-lncurses -lutil"
+- if [ $terminfo -eq 0 ] ; then
+- libs="-lncurses -lutil"
+- else
+- libs="-lutil"
+- fi
- ;;
- "xFreeBSD")
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
@@ -128,7 +155,11 @@ diff -urN a/configure b/configure
- ;;
- "xNetBSD")
- cflags="$cflags -D_OPENBSD_SOURCE"
-- libs="-lcurses -lutil"
+- if [ $terminfo -eq 0 ] ; then
+- libs="-lcurses -lutil"
+- else
+- libs="-lutil"
+- fi
- ;;
- "xDragonFly")
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
@@ -141,13 +172,3 @@ diff -urN a/configure b/configure
cat << EOF > config.h
/* This file generated automatically by configure. */
---- a/linux.h 2019-03-03 22:17:03.000000000 +0900
-+++ b/linux.h 2019-06-04 13:45:21.787063324 +0900
-@@ -7,6 +7,7 @@
- #endif
- #include <sys/types.h>
-
-+#include <sys/stat.h>
- #include <stdio.h>
-
- /* Defines */