morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 05a5efbb7eacd24084a2be615d23e262cb5f1386
parent 0a85fbdac83140c24cfe317d92b6822df98c296e
Author: sin <sin@2f30.org>
Date:   Wed Mar  5 14:49:39 +0000

Convert mksh to an inline build

Diffstat:
pkgs/mksh | 70+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 69 insertions(+), 1 deletion(-)
diff --git a/pkgs/mksh b/pkgs/mksh @@ -2,8 +2,76 @@ v="R47" url="$mirror/mksh-$v.tar.gz" build: crossmusl + set -x cd src/mksh - CC=$CC sh Build.sh + cat > signames.inc << EOF + { "INT", 2 }, + { "SEGV", 11 }, + { "ABRT", 6 }, + { "KILL", 9 }, + { "ALRM", 14 }, + { "BUS", 7 }, + { "CHLD", 17 }, + { "CONT", 18 }, + { "FPE", 8 }, + { "HUP", 1 }, + { "ILL", 4 }, + { "IO", 29 }, + { "PIPE", 13 }, + { "PROF", 27 }, + { "PWR", 30 }, + { "QUIT", 3 }, + { "STOP", 19 }, + { "SYS", 31 }, + { "TERM", 15 }, + { "TRAP", 5 }, + { "TSTP", 20 }, + { "TTIN", 21 }, + { "TTOU", 22 }, + { "URG", 23 }, + { "USR1", 10 }, + { "USR2", 12 }, + { "VTALRM", 26 }, + { "WINCH", 28 }, + { "XCPU", 24 }, + { "XFSZ", 25 }, + { "STKFLT", 16 }, + EOF + LOCAL_CFLAGS="\ + -I. -DMKSH_BUILDSH -D_GNU_SOURCE -DSETUID_CAN_FAIL_WITH_EAGAIN -DHAVE_ATTRIBUTE_BOUNDED=0 \ + -DHAVE_ATTRIBUTE_FORMAT=1 -DHAVE_ATTRIBUTE_NORETURN=1 -DHAVE_ATTRIBUTE_UNUSED=1 -DHAVE_ATTRIBUTE_USED=1 \ + -DHAVE_SYS_TIME_H=1 -DHAVE_TIME_H=1 -DHAVE_BOTH_TIME_H=1 -DHAVE_SYS_BSDTYPES_H=0 -DHAVE_SYS_FILE_H=1 \ + -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_SELECT_H=1 \ + -DHAVE_SYS_SYSMACROS_H=1 -DHAVE_BSTRING_H=0 -DHAVE_GRP_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_LIBUTIL_H=0 \ + -DHAVE_PATHS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_ULIMIT_H=1 -DHAVE_VALUES_H=1 \ + -DHAVE_CAN_INTTYPES=1 -DHAVE_CAN_UCBINTS=1 -DHAVE_CAN_INT8TYPE=1 -DHAVE_CAN_UCBINT8=1 -DHAVE_RLIM_T=1 \ + -DHAVE_SIG_T=1 -DHAVE_SYS_ERRLIST=0 -DHAVE_SYS_SIGNAME=0 -DHAVE_SYS_SIGLIST=0 -DHAVE_FLOCK=1 \ + -DHAVE_LOCK_FCNTL=1 -DHAVE_GETRUSAGE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_KILLPG=1 -DHAVE_MEMMOVE=1 \ + -DHAVE_MKNOD=0 -DHAVE_MMAP=1 -DHAVE_NICE=1 -DHAVE_REVOKE=0 -DHAVE_SETLOCALE_CTYPE=1 \ + -DHAVE_LANGINFO_CODESET=1 -DHAVE_SELECT=1 -DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRERROR=1 \ + -DHAVE_STRSIGNAL=1 -DHAVE_STRLCPY=1 -DHAVE_FLOCK_DECL=1 -DHAVE_REVOKE_DECL=1 -DHAVE_SYS_ERRLIST_DECL=0 \ + -DHAVE_SYS_SIGLIST_DECL=0 -DHAVE_PERSISTENT_HISTORY=1 -DMKSH_BUILD_R=471" + SRC="\ + edit.c \ + eval.c \ + exec.c \ + expr.c \ + funcs.c \ + histrap.c \ + jobs.c \ + lalloc.c \ + lex.c \ + main.c \ + misc.c \ + shf.c \ + strlcpy.c \ + syn.c \ + tree.c \ + var.c" + for f in $SRC; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS $LOCAL_CFLAGS + done + $CC -o mksh *.o $LDFLAGS mkdir -p "$root/share/man/man1" cp mksh "$root/bin" cp mksh.1 "$root/share/man/man1/mksh.1"