diff options
| author | Hirokazu MORIKAWA <morikw2@gmail.com> | 2019-05-17 13:23:37 +0900 |
|---|---|---|
| committer | Hirokazu MORIKAWA <morikw2@gmail.com> | 2019-05-18 21:32:37 +0900 |
| commit | 41b1b08115e7ef7ce92af005c490a43b4d75fe26 (patch) | |
| tree | a94f794730234f9edf4da20b633e3772e6724666 /utils/mg/patches | |
| parent | 211d3d1a3ee7e1e30ef2280214dfbc30b52885d7 (diff) | |
mg: add new package/microscopic emacs style editor
For Emacsian!
You can use "Dired", which is Emacsian's favorite.
You can also use "re-search".
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'utils/mg/patches')
| -rw-r--r-- | utils/mg/patches/001-cross_compile_openwrt.patch | 135 | ||||
| -rw-r--r-- | utils/mg/patches/900-musl_compatibility.patch | 13 | ||||
| -rw-r--r-- | utils/mg/patches/901-use_pcre.patch | 11 |
3 files changed, 159 insertions, 0 deletions
diff --git a/utils/mg/patches/001-cross_compile_openwrt.patch b/utils/mg/patches/001-cross_compile_openwrt.patch new file mode 100644 index 000000000..dc63ea598 --- /dev/null +++ b/utils/mg/patches/001-cross_compile_openwrt.patch @@ -0,0 +1,135 @@ +--- a/configure ++++ b/configure +@@ -3,53 +3,6 @@ + # This configure script written by Brian Callahan <bcallah@openbsd.org> + # and released into the Public Domain. + +-cccheck() { +- if [ ! -z "$CC" ] ; then +-cat << EOF > conftest.c +-int main(void){return 0;} +-EOF +- $CC -o conftest conftest.c > /dev/null 2>&1 +- if [ $? -eq 0 ] ; then +- ./conftest +- if [ $? -eq 0 ] ; then +- rm -f conftest conftest.c +- cc="$CC" +- return 0 +- else +- echo "could not build working executables" +- echo "Please ensure your C compiler is a native compiler" +- exit 1 +- fi +- else +- rm -f conftest conftest.c +- fi +- fi +- +- for compiler in cc clang pcc xlc gcc ; do +-cat << EOF > conftest.c +-int main(void){return 0;} +-EOF +- +- $compiler -o conftest conftest.c > /dev/null 2>&1 +- +- if [ $? -eq 0 ] ; then +- ./conftest +- if [ $? -eq 0 ] ; then +- rm -f conftest conftest.c +- cc="$compiler" +- return 0 +- else +- echo "could not build working executables" +- echo "Please ensure your C compiler is a native compiler" +- exit 1 +- fi +- else +- rm -f conftest conftest.c +- fi +- done +- return 1 +-} +- + fgetlncheck() { + cat << EOF > conftest.c + #include <stdio.h> +@@ -162,21 +115,6 @@ + fi + } + +-wflagcheck() { +- cat << EOF > conftest.c +-int main(void){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 +- 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 @@ + ldflags="${ldflags}-static" + fi + +-printf "checking for C compiler... " +-cccheck +-if [ $? -ne 0 ] ; then +- echo "not found" +- echo "Please install a C compiler and re-run configure." +- exit 1 +-else +- echo "$cc" +-fi +- +-printf "checking for -w compiler flag... " +-wflagcheck +-if [ $? -ne 0 ] ; then +- echo "no" +-else +- cflags="$cflags -w" +- echo "yes" +-fi +- +-printf "checking for OS... " +-libs='-lncurses' +-os=`uname -s` +-echo "$os" +- +-case "x$os" in +- "xLinux"|"xCYGWIN"*) +- cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim" +- ;; +- "xDarwin") +- cflags="$cflags -DMSG_NOSIGNAL=SO_NOSIGPIPE -DLOGIN_NAME_MAX=MAXLOGNAME" +- libs="$libs -lutil" +- ;; +- "xFreeBSD") +- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME" +- libs="$libs -lutil" +- ;; +- "xOpenBSD") +- libs="$libs -lutil" +- ;; +- "xNetBSD") +- libs="$libs -lutil" +- ;; +- "xDragonFly") +- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME" +- libs="$libs -lutil" +- ;; +-esac ++# OpenWrt ++libs='-lncurses -lpcre' ++cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim" + + cat << EOF > config.h + /* This file generated automatically by configure. */ diff --git a/utils/mg/patches/900-musl_compatibility.patch b/utils/mg/patches/900-musl_compatibility.patch new file mode 100644 index 000000000..26aaa980d --- /dev/null +++ b/utils/mg/patches/900-musl_compatibility.patch @@ -0,0 +1,13 @@ +--- a/fileio.c ++++ b/fileio.c +@@ -23,6 +23,10 @@ + #include <string.h> + #include <unistd.h> + ++#ifndef DEFFILEMODE ++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) ++#endif ++ + #include "def.h" + #include "kbd.h" + #include "pathnames.h" diff --git a/utils/mg/patches/901-use_pcre.patch b/utils/mg/patches/901-use_pcre.patch new file mode 100644 index 000000000..292f2eba7 --- /dev/null +++ b/utils/mg/patches/901-use_pcre.patch @@ -0,0 +1,11 @@ +--- a/re_search.c ++++ b/re_search.c +@@ -16,7 +16,7 @@ + #ifdef REGEX + #include <sys/queue.h> + #include <sys/types.h> +-#include <regex.h> ++#include <pcreposix.h> + #include <signal.h> + #include <stdio.h> + #include <string.h> |
