mg: update to 6.8.1 14189/head
authorHirokazu MORIKAWA <morikw2@gmail.com>
Thu, 10 Dec 2020 00:13:35 +0000 (09:13 +0900)
committerHirokazu MORIKAWA <morikw2@gmail.com>
Thu, 10 Dec 2020 03:22:19 +0000 (12:22 +0900)
update to 6.8.1

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
utils/mg/Makefile
utils/mg/patches/001-cross_compile_openwrt.patch

index 4841d4bbc5fdd5a4c1af1abc5e3617afb95d13b6..b9172dc014447e0ae639964864a5bf4ff69c412a 100644 (file)
@@ -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>
index 3a75a15bdc6cf600f04e2ef3e57b9b467358b497..3789bef29aea63d1eb6b7b4f599ef0dc0774b2f1 100644 (file)
@@ -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 */