summaryrefslogtreecommitdiff
path: root/utils/mg
diff options
context:
space:
mode:
authorHirokazu MORIKAWA <morikw2@gmail.com>2019-05-22 15:26:57 +0900
committerHirokazu MORIKAWA <morikw2@gmail.com>2019-05-22 15:26:57 +0900
commit08f616789a3ad28a0f015a22ce246a77bcd0c62e (patch)
treeca41c0795134d1035c96c2aa42603efc1a4dbf34 /utils/mg
parent35c93de1289d6c4f79799a70c3dbf74cc2c4bd82 (diff)
mg: fix arc build fail
fix arc (uClibc) build fail Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'utils/mg')
-rw-r--r--utils/mg/Makefile2
-rw-r--r--utils/mg/patches/001-cross_compile_openwrt.patch57
2 files changed, 41 insertions, 18 deletions
diff --git a/utils/mg/Makefile b/utils/mg/Makefile
index c7965271e..268c0e568 100644
--- a/utils/mg/Makefile
+++ b/utils/mg/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mg
PKG_VERSION:=20180927
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/ibara/mg/releases/download/mg-20180927
diff --git a/utils/mg/patches/001-cross_compile_openwrt.patch b/utils/mg/patches/001-cross_compile_openwrt.patch
index dc63ea598..cd33355a4 100644
--- a/utils/mg/patches/001-cross_compile_openwrt.patch
+++ b/utils/mg/patches/001-cross_compile_openwrt.patch
@@ -1,6 +1,7 @@
---- a/configure
-+++ b/configure
-@@ -3,53 +3,6 @@
+diff -urN a/configure b/configure
+--- a/configure 2018-09-28 01:38:31.000000000 +0900
++++ b/configure 2019-05-22 15:17:05.722101952 +0900
+@@ -3,52 +3,7 @@
# This configure script written by Brian Callahan <bcallah@openbsd.org>
# and released into the Public Domain.
@@ -50,33 +51,39 @@
- done
- return 1
-}
--
++cc="$CC"
+
fgetlncheck() {
cat << EOF > conftest.c
- #include <stdio.h>
-@@ -162,21 +115,6 @@
+@@ -162,18 +117,19 @@
fi
}
-wflagcheck() {
-- cat << EOF > conftest.c
++futimenscheck() {
+ cat << EOF > conftest.c
-int main(void){return 0;}
--EOF
++#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
-- if [ $? -eq 0 ] ; then
++ $cc $tflags -o conftest conftest.c > /dev/null 2>&1
+ if [ $? -eq 0 ] ; then
- rm -f conftest conftest.err conftest.c
- return 1
- else
- rm -f conftest conftest.err conftest.c
-- return 0
-- fi
--}
--
- # Option variables
- if [ ! -z "$PREFIX" ] ; then
- prefix="$PREFIX"
-@@ -241,53 +179,9 @@
++ rm -f conftest conftest.c
+ return 0
++ else
++ rm -f conftest conftest.c
++ return 1
+ fi
+ }
+
+@@ -241,53 +197,9 @@
ldflags="${ldflags}-static"
fi
@@ -133,3 +140,19 @@
cat << EOF > config.h
/* This file generated automatically by configure. */
+@@ -370,6 +282,15 @@
+ echo "no"
+ fi
+
++printf "checking for futimens... "
++futimenscheck
++if [ $? -eq 0 ] ; then
++ echo "#define HAVE_FUTIMENS" >> config.h
++ echo "yes"
++else
++ echo "no"
++fi
++
+ printf "creating Makefile... "
+ cat << EOF > Makefile
+ # This Makefile automatically generated by configure.