From 30e09bf1ccb64a22bbc6568ac6e2b92ff8e1dd91 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Jun 15 2016 18:53:01 +0000 Subject: Adds nc (netcat) v110 and ${PKG_SUBDIR_CREATE} (create and untar(1) into ${PKG_SUBDIR}.) Fix libpsxscl.log pathname in midipix.sh (via Elieux.) --- diff --git a/373.netcat.build b/373.netcat.build new file mode 120000 index 0000000..52bb82e --- /dev/null +++ b/373.netcat.build @@ -0,0 +1 @@ +pkg.build \ No newline at end of file diff --git a/373.netcat.vars b/373.netcat.vars new file mode 100644 index 0000000..e9bd7e1 --- /dev/null +++ b/373.netcat.vars @@ -0,0 +1,10 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_netcat_install() { + tar -cpf - nc |\ + tar -C ${PREFIX_LVL}/bin -xpf -; +}; + +# vim:filetype=sh diff --git a/build.vars b/build.vars index 5c0a04a..0744d71 100644 --- a/build.vars +++ b/build.vars @@ -52,8 +52,8 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${WGET_ARGS:="--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 mksh mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed slibtool 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 SLIBTOOL SUBDIR URL URL_FNAME URL_TYPE VERSION"}; +: ${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 netcat ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed slibtool 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 SLIBTOOL SUBDIR SUBDIR_CREATE URL URL_FNAME URL_TYPE VERSION"}; : ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0}; : ${PKG_LVL0_CONFIGURE_ARGS:="-C --disable-nls --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; : ${PKG_LVL0_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}}; @@ -281,6 +281,13 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_NCURSESW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared}; : ${PKG_NCURSESW_LIBFILES_FIX:=1}; : ${PKG_NCURSESW_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; +: ${PKG_NETCAT_VERSION:=110}; +: ${PKG_NETCAT_SHA256SUM:=5b3fda14e972d908896a605293f4634a72e2968278117410e12d8b3faf9a3976}; +: ${PKG_NETCAT_URL:=https://dl.packetstormsecurity.net/UNIX/netcat/nc110.tgz}; +: ${PKG_NETCAT_BUILD_DIR:=nc110}; +: ${PKG_NETCAT_MAKEFLAGS_BUILD_EXTRA:="midipix CC=${TARGET}-gcc"}; +: ${PKG_NETCAT_SUBDIR:=${PKG_NETCAT_BUILD_DIR}}; +: ${PKG_NETCAT_SUBDIR_CREATE:=1}; : ${PKG_OPENSSH_VERSION:=7.1p2}; : ${PKG_OPENSSH_SHA256SUM:=dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd}; : ${PKG_OPENSSH_URL:=http://artfiles.org/openbsd/OpenSSH/portable/openssh-${PKG_OPENSSH_VERSION}.tar.gz}; diff --git a/midipix.sh b/midipix.sh index e4879b9..735373e 100755 --- a/midipix.sh +++ b/midipix.sh @@ -33,10 +33,10 @@ if [ ! -d /proc/cygdrive${MIDIPIX_PATH} ]; then echo "Error: Midipix path non-existent or invalid (\`${MIDIPIX_PATH}'.)"; exit 4; else - if [ -f /proc/cygdrive${MIDIPIX_PATH}/bin/libpsxscl.log ]; then - echo Found libpsxscl.log, copying to /proc/cygdrive${MIDIPIX_PATH}/bin/libpsxscl.last. - cp /proc/cygdrive${MIDIPIX_PATH}/bin/libpsxscl.log \ - /proc/cygdrive${MIDIPIX_PATH}/bin/libpsxscl.last || exit 5; + if [ -f /proc/cygdrive${MIDIPIX_PATH}/native/bin/libpsxscl.log ]; then + echo Found libpsxscl.log, copying to /proc/cygdrive${MIDIPIX_PATH}/native/bin/libpsxscl.last. + cp /proc/cygdrive${MIDIPIX_PATH}/native/bin/libpsxscl.log \ + /proc/cygdrive${MIDIPIX_PATH}/native/bin/libpsxscl.last || exit 5; fi; echo "Midipix drive letter.....: ${MIDIPIX_DRIVE}"; echo "Midipix pathname.........: ${MIDIPIX_PNAME}"; diff --git a/nc110.local.patch b/nc110.local.patch new file mode 100644 index 0000000..92976f9 --- /dev/null +++ b/nc110.local.patch @@ -0,0 +1,30 @@ +--- nc110/Makefile.orig 1996-03-20 03:16:06.000000000 +0000 ++++ nc110/Makefile 2016-06-15 18:44:05.819382228 +0000 +@@ -109,6 +109,10 @@ + next: + make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic + ++# midipix ++midipix: ++ make -e $(ALL) $(MFLAGS) XFLAGS='-DLINUX' STATIC=-static ++ + # start with this for a new architecture, and see what breaks. + generic: + make -e $(ALL) $(MFLAGS) XFLAGS='-DGENERIC' STATIC= +--- nc110/generic.h.orig 1996-02-18 01:36:43.000000000 +0000 ++++ nc110/generic.h 2016-06-15 18:44:06.379382216 +0000 +@@ -360,6 +360,14 @@ + #undef HAVE_SELECT_X + #endif /* NeXTSTEP 3.2 motorola */ + ++/* midipix */ ++#ifdef MIDIPIX ++#undef UTMPX ++#undef HAVE_SYSINFO ++#undef HAVE_SELECT_H ++#undef HAVE_TTYENT_H ++#endif /* midipix */ ++ + /* Make some "generic" assumptions if all else fails */ + #ifdef GENERIC + #undef HAVE_FLOCK diff --git a/pkg.build b/pkg.build index 3cb38e5..15e1eeb 100644 --- a/pkg.build +++ b/pkg.build @@ -20,20 +20,23 @@ if test_cmd pkg_${PKG_NAME}_finish; then elif [ "${PKG_URL_TYPE:-wget}" = wget ] &&\ ! is_build_script_done extract; then rm_if_exists ${PKG_SUBDIR}; + if [ ${PKG_SUBDIR_CREATE:-0} -eq 1 ]; then + mkdir ${PKG_SUBDIR}; + fi; if [ "${PKG_FNAME##*.tar.}" = "bz2" ]; then - bunzip2 -d < ${PKG_FNAME} | tar -xf -; + bunzip2 -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; elif [ "${PKG_FNAME##*.tar.}" = "gz" ]; then - gunzip -d < ${PKG_FNAME} | tar -xf -; + gunzip -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; elif [ "${PKG_FNAME##*.tar.}" = "xz" ]; then - xz -d < ${PKG_FNAME} | tar -xf -; + xz -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; elif [ "${PKG_FNAME##*.t}" = "bz2" ]; then - bunzip2 -d < ${PKG_FNAME} | tar -xf -; + bunzip2 -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; elif [ "${PKG_FNAME##*.t}" = "gz" ]; then - gunzip -d < ${PKG_FNAME} | tar -xf -; + gunzip -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; elif [ "${PKG_FNAME##*.t}" = "xz" ]; then - xz -d < ${PKG_FNAME} | tar -xf -; + xz -d < ${PKG_FNAME} | tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf -; else - tar -xf ${PKG_FNAME}; + tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf ${PKG_FNAME}; fi; if test_cmd pkg_${PKG_NAME}_extract_post; then pkg_${PKG_NAME}_extract_post;