From c688c1004bf3c6df2147bdceb9da5d9a52ba3f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 26 May 2016 12:16:42 +0000 Subject: Adds mksh vR52c (via Redfoxmoon) and tcsh v6.19.00. --- 371.mksh.build | 1 + 371.mksh.vars | 33 ++++++++++ 372.tcsh.build | 1 + build.vars | 14 ++++- pkg.build | 22 ++++--- tcsh-6.19.00.local.patch | 159 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 219 insertions(+), 11 deletions(-) create mode 120000 371.mksh.build create mode 100644 371.mksh.vars create mode 120000 372.tcsh.build create mode 100644 tcsh-6.19.00.local.patch diff --git a/371.mksh.build b/371.mksh.build new file mode 120000 index 00000000..52bb82e5 --- /dev/null +++ b/371.mksh.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/371.mksh.vars b/371.mksh.vars new file mode 100644 index 00000000..b7b4582f --- /dev/null +++ b/371.mksh.vars @@ -0,0 +1,33 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_mksh_build() { + env CC="${PKG_CC_BUILD}" \ + CFLAGS="${PKG_CFLAGS_CONFIGURE} ${PKG_CFLAGS_BUILD}" \ + sh Build.sh; +}; + +pkg_mksh_install() { + tar -cpf - mksh |\ + tar -C ${PREFIX_LVL}/bin -xpf -; + if [ ! -f ${PREFIX_LVL}/etc/shells ]; then + mkdir -p ${PREFIX_LVL}/etc; + touch ${PREFIX_LVL}/etc/shells; + fi; + if ! grep -xq "/bin/mksh" ${PREFIX_LVL}/etc/shells; then + echo /bin/mksh >> ${PREFIX_LVL}/etc/shells; + fi; + if [ ! -d ${PREFIX_LVL}/share/doc/mksh/examples ]; then + mkdir -p ${PREFIX_LVL}/share/doc/mksh/examples; + fi; + tar -cpf - dot.mkshrc |\ + tar -C ${PREFIX_LVL}/share/doc/mksh/examples -xpf -; + if [ ! -d ${PREFIX_LVL}/share/man/man1 ]; then + mkdir -p ${PREFIX_LVL}/share/man/man1; + fi; + tar -cpf - mksh.1 |\ + tar -C ${PREFIX_LVL}/share/man/man1 -xpf -; +}; + +# vim:filetype=sh diff --git a/372.tcsh.build b/372.tcsh.build new file mode 120000 index 00000000..52bb82e5 --- /dev/null +++ b/372.tcsh.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/build.vars b/build.vars index 14a2e3c2..98c52538 100644 --- a/build.vars +++ b/build.vars @@ -42,7 +42,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${WGET_ARGS:="-N --no-check-certificate"}; : ${WORKDIR:=${PREFIX}/tmp}; -: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed tar util_linux which xz zsh"}; +: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mksh mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed tar tcsh util_linux which xz zsh"}; : ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE AUTOGEN BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA FNAME GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBFILES_FIX LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_INSTALL SHA256SUM SUBDIR URL URL_FNAME URL_TYPE VERSION"}; : ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0}; : ${PKG_LVL0_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; @@ -220,6 +220,13 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_MAKE_VERSION:=3.81}; : ${PKG_MAKE_SHA256SUM:=f3e69023771e23908f5d5592954d8271d3d6af09693cecfd29cee6fde8550dc8}; : ${PKG_MAKE_URL:=https://ftp.gnu.org/gnu/make/make-${PKG_MAKE_VERSION}.tar.bz2}; +: ${PKG_MKSH_VERSION:=R52c}; +: ${PKG_MKSH_SHA256SUM:=c6341acea725103f782c14e994d6e12dabaee69e60fe1bc78603a41258d43ba6}; +: ${PKG_MKSH_URL:=http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-${PKG_MKSH_VERSION}.tgz}; +: ${PKG_MKSH_CC_BUILD:=${HOST_NATIVE}-gcc}; +: ${PKG_MKSH_CFLAGS_BUILD_EXTRA:=-DMKSH_NOPROSPECTOFWORK}; +: ${PKG_MKSH_BUILD_DIR:=mksh}; +: ${PKG_MKSH_SUBDIR:=mksh}; : ${PKG_MPC_VERSION:=1.0.1}; : ${PKG_MPC_SHA256SUM:=ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff}; : ${PKG_MPC_URL:=ftp://ftp.gnu.org/gnu/mpc/mpc-${PKG_MPC_VERSION}.tar.gz}; @@ -293,6 +300,9 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_TAR_VERSION:=1.28}; : ${PKG_TAR_SHA256SUM:=6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de}; : ${PKG_TAR_URL:=https://ftp.gnu.org/gnu/tar/tar-${PKG_TAR_VERSION}.tar.gz}; +: ${PKG_TCSH_VERSION:=6.19.00}; +: ${PKG_TCSH_SHA256SUM:=12e271e0b89e4259d9d6e8d525322e77340e7244cfbd199a591e5f8146285c49}; +: ${PKG_TCSH_URL:=http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/tcsh-${PKG_TCSH_VERSION}.tar.gz}; : ${PKG_SED_VERSION:=4.2.2}; : ${PKG_SED_SHA256SUM:=f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7}; : ${PKG_SED_URL:=https://ftp.gnu.org/gnu/sed/sed-${PKG_SED_VERSION}.tar.bz2}; @@ -323,4 +333,4 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PSXSTUB_URL_TYPE:=git}; : ${PKG_PSXTYPES_URL:=${GITROOT_HEAD}/psxtypes}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/pkg.build b/pkg.build index 222ec4df..975c183c 100644 --- a/pkg.build +++ b/pkg.build @@ -87,15 +87,19 @@ if [ ${PKG_NO_CLEAN:-0} -eq 0 ]\ set_build_script_done clean -build; fi; if ! is_build_script_done build; then - run_cmd_unsplit make \ - ${PKG_MAKEFLAGS_BUILD} \ - ${PKG_MAKEFLAGS_BUILD_EXTRA} \ - "${PKG_AR_BUILD:+AR=${PKG_AR_BUILD}}" \ - "${PKG_CC_BUILD:+CC=${PKG_CC_BUILD}}" \ - "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}"\ - "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}"\ - "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}"\ - "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"; + if test_cmd pkg_${PKG_NAME}_build; then + pkg_${PKG_NAME}_build; + else + run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_BUILD} \ + ${PKG_MAKEFLAGS_BUILD_EXTRA} \ + "${PKG_AR_BUILD:+AR=${PKG_AR_BUILD}}" \ + "${PKG_CC_BUILD:+CC=${PKG_CC_BUILD}}" \ + "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}"\ + "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}"\ + "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}"\ + "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"; + fi; set_build_script_done build -install; fi; if ! is_build_script_done install; then diff --git a/tcsh-6.19.00.local.patch b/tcsh-6.19.00.local.patch new file mode 100644 index 00000000..721b6144 --- /dev/null +++ b/tcsh-6.19.00.local.patch @@ -0,0 +1,159 @@ +--- tcsh-6.19.00/config.sub.orig 2014-07-20 09:14:34.000000000 +0000 ++++ tcsh-6.19.00/config.sub 2016-05-26 11:49:50.223735101 +0000 +@@ -789,6 +789,10 @@ + microblaze*) + basic_machine=microblaze-xilinx + ;; ++ midipix) ++ basic_machine=x86_64-pc ++ os=-midipix ++ ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 +@@ -1365,7 +1369,7 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ +--- tcsh-6.19.00/configure.orig 2015-05-21 21:41:48.000000000 +0000 ++++ tcsh-6.19.00/configure 2016-05-26 11:51:44.823732557 +0000 +@@ -2975,6 +2975,11 @@ + tcsh_config_file=qnx6 + ;; + ++ ## midipix ++ *-midipix*) ++ tcsh_config_file=midipix ++ ;; ++ + * ) + as_fn_error $? "Tcsh can't guess the configuration file name + for \`${host}' systems. +--- tcsh-6.19.00/config/midipix.orig 2016-05-26 11:54:37.763728719 +0000 ++++ tcsh-6.19.00/config/midipix 2016-05-26 11:56:37.751726056 +0000 +@@ -0,0 +1,90 @@ ++/* ++ * config.h -- configure various defines for tcsh ++ * ++ * All source files should #include this FIRST. ++ * ++ * This is the config file for midipix systems ++ */ ++ ++#ifndef _h_config ++#define _h_config ++/****************** System dependant compilation flags ****************/ ++/* ++ * POSIX This system supports IEEE Std 1003.1-1988 (POSIX). ++ */ ++#define POSIX ++ ++/* ++ * POSIXJOBS This system supports the optional IEEE Std 1003.1-1988 (POSIX) ++ * job control facilities. ++ */ ++#define POSIXJOBS ++ ++/* ++ * VFORK This machine has a vfork(). ++ * It used to be that for job control to work, this define ++ * was mandatory. This is not the case any more. ++ * If you think you still need it, but you don't have vfork, ++ * define this anyway and then do #define vfork fork. ++ * I do this anyway on a Sun because of yellow pages brain damage, ++ * [should not be needed under 4.1] ++ * and on the iris4d cause SGI's fork is sufficiently "virtual" ++ * that vfork isn't necessary. (Besides, SGI's vfork is weird). ++ * Note that some machines eg. rs6000 have a vfork, but not ++ * with the berkeley semantics, so we cannot use it there either. ++ */ ++#undef VFORK ++ ++/* ++ * BSDJOBS You have BSD-style job control (both process groups and ++ * a tty that deals correctly ++ */ ++#define BSDJOBS ++ ++/* ++ * BSDTIMES You have BSD-style process time stuff (like rusage) ++ * This may or may not be true. For example, Apple Unix ++ * (OREO) has BSDJOBS but not BSDTIMES. ++ */ ++#undef BSDTIMES ++ ++/* ++ * BSDLIMIT You have BSD-style resource limit stuff (getrlimit/setrlimit) ++ */ ++#define BSDLIMIT ++ ++/* ++ * TERMIO You have struct termio instead of struct sgttyb. ++ * This is usually the case for SVID systems, where ++ * BSD uses sgttyb. POSIX systems should define this ++ * anyway, even though they use struct termios. ++ */ ++#define TERMIO ++ ++/* ++ * SYSVREL Your machine is SYSV based (HPUX, A/UX) ++ * NOTE: don't do this if you are on a Pyramid -- tcsh is ++ * built in a BSD universe. ++ * Set SYSVREL to 1, 2, 3, or 4, depending the version of System V ++ * you are running. Or set it to 0 if you are not SYSV based ++ * ++ * Note: Linux should work with any SYSVREL < 3. ++ */ ++#define SYSVREL 0 ++ ++/* ++ * YPBUGS Work around Sun YP bugs that cause expansion of ~username ++ * to send command output to /dev/null ++ */ ++#undef YPBUGS ++ ++/****************** local defines *********************/ ++#ifndef _PATH_TCSHELL ++#define _PATH_TCSHELL "/bin/tcsh" ++#endif ++#define ECHO_STYLE BOTH_ECHO ++ ++/* midipix allows paths prepended with double slashes (network paths). */ ++#define HAVE_SLASHSLASH 1 ++ ++#endif /* _h_config */ +--- tcsh-6.19.00/sh.h.orig 2015-05-10 13:29:28.000000000 +0000 ++++ tcsh-6.19.00/sh.h 2016-05-26 12:16:19.303699832 +0000 +@@ -333,7 +333,7 @@ + #endif /* POSIX && !WINNT_NATIVE */ + #include + +-#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) ++#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(__midipix__) + # if !defined(pyr) && !defined(stellar) + # include + # ifdef _MINIX +--- tcsh-6.19.00/Makefile.in.orig 2014-07-24 22:52:13.000000000 +0000 ++++ tcsh-6.19.00/Makefile.in 2016-05-26 12:43:28.099663682 +0000 +@@ -24,6 +24,7 @@ + CF=-c + + CPPFLAGS=-I. -I$(srcdir) ++CPPFLAGS_FOR_GETHOST=-I. -I$(srcdir) + + LFLAGS= + # hpux lint +@@ -449,7 +450,7 @@ + + gethost: gethost.c sh.err.h tc.const.h sh.h + rm -f gethost +- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} $(srcdir)/gethost.c ++ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS_FOR_GETHOST} ${CFLAGS_FOR_GETHOST} $(srcdir)/gethost.c + + tc.defs.c: gethost host.defs + @rm -f $@.tmp -- cgit v1.2.3