summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]999.tarballs.build0
-rw-r--r--Create `Midipix mintty shell' shortcut.vbs22
-rw-r--r--build.vars6
-rw-r--r--irssi-0.8.18.local.patch47
-rwxr-xr-xmidipix.sh62
-rw-r--r--psxscl.local@lucio-vm.local.patch (renamed from psxscl.local.patch)13
6 files changed, 108 insertions, 42 deletions
diff --git a/999.tarballs.build b/999.tarballs.build
index 11b47e62..11b47e62 100755..100644
--- a/999.tarballs.build
+++ b/999.tarballs.build
diff --git a/Create `Midipix mintty shell' shortcut.vbs b/Create `Midipix mintty shell' shortcut.vbs
index ab0d3bbd..ce8e10d4 100644
--- a/Create `Midipix mintty shell' shortcut.vbs
+++ b/Create `Midipix mintty shell' shortcut.vbs
@@ -1,18 +1,14 @@
Set WshShell = CreateObject("WScript.Shell")
-LinkPath = WshShell.CurrentDirectory + "\Midipix mintty shell.lnk"
If WScript.Arguments.Count = 0 Then
- MinttyPath = "C:\cygwin64\bin\mintty.exe"
+ CygwinPath = "C:\cygwin64"
Else
- MinttyPath = WScript.Arguments(0)
+ CygwinPath = WScript.Arguments(0)
End If
-
Set fso = CreateObject("Scripting.FileSystemObject")
-If not (fso.FileExists(LinkPath)) Then
- Set oMyShortCut = WshShell.CreateShortcut(LinkPath)
- oMyShortCut.WindowStyle = 4
- oMyShortcut.IconLocation = MinttyPath
- oMyShortCut.TargetPath = MinttyPath
- oMyShortCut.Arguments = "-i /Cygwin-Terminal.ico -e sh midipix.sh"
- oMyShortCut.WorkingDirectory = WshShell.CurrentDirectory
- oMyShortCut.Save
-End If
+Set oMyShortCut = WshShell.CreateShortcut(WshShell.CurrentDirectory + "\Midipix shell.lnk")
+oMyShortCut.Arguments = "midipix.sh"
+oMyShortcut.IconLocation = CygwinPath + "\Cygwin-Terminal.ico"
+oMyShortCut.TargetPath = CygwinPath + "\bin\sh.exe"
+oMyShortCut.WindowStyle = 4
+oMyShortCut.WorkingDirectory = WshShell.CurrentDirectory
+oMyShortCut.Save
diff --git a/build.vars b/build.vars
index b2fcecd0..5c0a04ae 100644
--- a/build.vars
+++ b/build.vars
@@ -55,10 +55,10 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${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_LVL0_CFLAGS_CONFIGURE:=-O0};
-: ${PKG_LVL0_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
+: ${PKG_LVL0_CONFIGURE_ARGS:="-C --disable-nls --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
: ${PKG_LVL0_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}};
: ${PKG_LVL1_CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT}};
-: ${PKG_LVL1_CONFIGURE_ARGS:="--host=${HOST_NATIVE} --prefix=/ --target=${TARGET}"};
+: ${PKG_LVL1_CONFIGURE_ARGS:="--disable-nls --host=${HOST_NATIVE} --prefix=/ --target=${TARGET}"};
: ${PKG_LVL1_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}};
: ${PKG_LVL1_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_LVL1}};
: ${PKG_LVL2_BUILD_TYPE:=cross};
@@ -72,7 +72,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_LVL3_LDFLAGS_CONFIGURE:=--sysroot=${PREFIX_LVL3}};
: ${PKG_LVL3_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}};
: ${PKG_LVL3_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_LVL3}};
-: ${PKG_LVL3_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
+: ${PKG_LVL3_CONFIGURE_ARGS:="-C --disable-nls --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
: ${PKG_APK_TOOLS_VERSION:=2.6.6};
: ${PKG_APK_TOOLS_SHA256SUM:=7e5e86c856ce236c7fd54605ee0b1dbf59920398d3b33f9f6ff0e5f98e6828af};
diff --git a/irssi-0.8.18.local.patch b/irssi-0.8.18.local.patch
index f21ce2fe..a65fd02b 100644
--- a/irssi-0.8.18.local.patch
+++ b/irssi-0.8.18.local.patch
@@ -20,3 +20,50 @@
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+--- irssi-0.8.18/src/core/servers.c.orig 2016-01-20 22:08:07.000000000 +0000
++++ irssi-0.8.18/src/core/servers.c 2016-06-13 11:28:49.187797037 +0000
+@@ -407,6 +407,36 @@
+ /* connect with unix socket */
+ server_real_connect(server, NULL, server->connrec->address);
+ } else {
++ #ifdef __midipix__
++ IPADDR ip4, ip6, *ip;
++
++ connect_address = server->connrec->proxy != NULL ?
++ server->connrec->proxy : server->connrec->address;
++ if (net_gethostbyname(connect_address, &ip4, &ip6) == -1) {
++ g_warning("net_gethostbyname(): -1");
++ g_free(server->tag);
++ g_free(server->nick);
++ return FALSE;
++ } else if (server->connrec->family == 0) {
++ /* prefer IPv4 addresses */
++ ip = ip4.family != 0 ? &ip4 : &ip6;
++ } else if (server->connrec->family == AF_INET6) {
++ /* IPv6 address, use if possible */
++ if (ip6.family != 0) {
++ ip = &ip6;
++ } else {
++ ip = &ip4;
++ }
++ } else {
++ /* IPv4 address, use if possible */
++ if (ip4.family != 0) {
++ ip = &ip4;
++ } else {
++ ip = &ip6;
++ }
++ }
++ server_real_connect(server, ip, NULL);
++ #else
+ /* resolve host name */
+ if (pipe(fd) != 0) {
+ g_warning("server_connect(): pipe() failed.");
+@@ -433,6 +463,7 @@
+ lookup_servers = g_slist_append(lookup_servers, server);
+
+ signal_emit("server looking", 1, server);
++ #endif
+ }
+ return TRUE;
+ }
diff --git a/midipix.sh b/midipix.sh
index b6b84097..9a074174 100755
--- a/midipix.sh
+++ b/midipix.sh
@@ -1,45 +1,55 @@
#!/bin/sh
#
-MIDIPIX_PATH_DEFAULTS="/c/Midipix /z";
+prepend_path() {
+ local _pname _pname_prepend="${1}" IFS=":";
+ for _pname in ${PATH}; do
+ if [ "${_pname}" = "${_pname_prepend}" ]; then
+ return;
+ fi;
+ done; export PATH="${_pname_prepend}${PATH:+:${PATH}}";
+};
+
+prepend_path /bin;
if [ "${1}" = -h ]; then
- echo "usage: $0 [drive_letter [dirname]]";
- exit 1;
+ echo "usage: $0 [drive_letter [dirname]]"; exit 0;
elif [ ${#} -eq 0 ]; then
-for MIDIPIX_PATH in ${MIDIPIX_PATH_DEFAULTS}; do
- [ -d /cygdrive${MIDIPIX_PATH} ] || continue;
- MIDIPIX_DRIVE=${MIDIPIX_PATH#/};
- MIDIPIX_DRIVE=${MIDIPIX_DRIVE%%/*};
- MIDIPIX_PNAME=${MIDIPIX_PATH#/${MIDIPIX_DRIVE}};
- MIDIPIX_PNAME=${MIDIPIX_PNAME#/};
- break;
-done;
+ PWD_ABSOLUTE="$(cygpath -am .)" || exit 1;
+ MIDIPIX_DRIVE="${PWD_ABSOLUTE%:*}";
+ MIDIPIX_PNAME="${PWD_ABSOLUTE#${MIDIPIX_DRIVE}:}";
+ unset PWD_ABSOLUTE;
else
MIDIPIX_DRIVE="${1}"; MIDIPIX_PNAME="${2}";
- if [ "${MIDIPIX_DRIVE#*[ ]*}" != "${MIDIPIX_DRIVE}" ]\
- || [ "${MIDIPIX_PNAME#*[ ]*}" != "${MIDIPIX_PNAME}" ]; then
- echo "Error: drive_letter/dirname must not contain SP (\` ') or VT (\`\\\t') characters.";
- exit 1;
- fi;
fi;
-MIDIPIX_PATH=/${MIDIPIX_DRIVE}${MIDIPIX_PNAME:+/${MIDIPIX_PNAME}};
-if [ ! -d /cygdrive${MIDIPIX_PATH} ]; then
+UNAME_OS="$(uname -o)" || exit 2;
+if [ "${MIDIPIX_DRIVE#*[ ]*}" != "${MIDIPIX_DRIVE}" ]\
+|| [ "${MIDIPIX_PNAME#*[ ]*}" != "${MIDIPIX_PNAME}" ]; then
+ echo "Error: drive_letter/dirname must not contain SP (\` ') or VT (\`\\\t') characters.";
+ exit 3;
+fi;
+MIDIPIX_PATH=/${MIDIPIX_DRIVE}${MIDIPIX_PNAME:+/${MIDIPIX_PNAME#/}};
+MIDIPIX_PATH=${MIDIPIX_PATH%/};
+if [ ! -d /proc/cygdrive${MIDIPIX_PATH} ]; then
echo "Error: Midipix path non-existent or invalid (\`${MIDIPIX_PATH}'.)";
- exit 1;
+ exit 4;
else
- if [ -f /cygdrive${MIDIPIX_PATH}/bin/libpsxscl.log ]; then
- echo Found libpsxscl.log, copying to /cygdrive${MIDIPIX_PATH}/bin/libpsxscl.last.
- cp /cygdrive${MIDIPIX_PATH}/bin/libpsxscl.log \
- /cygdrive${MIDIPIX_PATH}/bin/libpsxscl.last;
+ 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;
fi;
+ OLD_CYGDRIVE_PREFIX="$(readlink /proc/cygdrive)" || exit 6;
echo "Midipix drive letter.....: ${MIDIPIX_DRIVE}";
echo "Midipix pathname.........: ${MIDIPIX_PNAME}";
echo "Absolute Midipix pathname: ${MIDIPIX_PATH}";
echo --------------------------------------------------------
echo WARNING: The cygdrive path prefix will be changed to /
echo whilst the Midipix shell window is running. It will be
- echo reset to its original value of /cygdrive after it exits.
+ echo reset to its previous value of ${OLD_CYGDRIVE_PREFIX} after it exits.
echo --------------------------------------------------------
+ if [ "${UNAME_OS}" = "Msys" ]; then
+ export MSYS2_ARG_CONV_EXCL="*";
+ fi;
mintty -h always -e /bin/sh -c "
set -o errexit; stty raw -echo;
mount --change-cygdrive-prefix /;
@@ -47,7 +57,7 @@ else
export PATH=${MIDIPIX_PATH}/native/bin:${MIDIPIX_PATH}/native/lib;
./ntctty.exe -e chroot //${MIDIPIX_PATH#/}/native /bin/bash";
echo --------------------------------------------------------
- echo Resetting cygdrive path prefix to /.
+ echo Resetting cygdrive path prefix to ${OLD_CYGDRIVE_PREFIX}.
echo --------------------------------------------------------
- mount --change-cygdrive-prefix /cygdrive;
+ mount --change-cygdrive-prefix "${OLD_CYGDRIVE_PREFIX}";
fi;
diff --git a/psxscl.local.patch b/psxscl.local@lucio-vm.local.patch
index f41d39c0..1b3b9c02 100644
--- a/psxscl.local.patch
+++ b/psxscl.local@lucio-vm.local.patch
@@ -122,3 +122,16 @@ index 2bd615c..705e646 100644
if ((status = __iovtbl[path_info->fdtypeat].close(path_info->hat)))
return status;
+diff --git a/src/process/_execve.c b/src/process/_execve.c
+index a623d2a..80dd4a9 100644
+--- a/src/process/_execve.c
++++ b/src/process/_execve.c
+@@ -232,7 +232,7 @@ intptr_t __sys_execve(const unsigned char * path, const char ** argv, const char
+ NT_SECTION_QUERY|NT_SECTION_MAP_EXECUTE,
+ &oa,&ssize,
+ NT_PAGE_EXECUTE,
+- NT_SEC_IMAGE,
++ NT_SEC_RESERVE,
+ image->info.hfile)))
+ return __execve_return(tlca,0,target,-ENOEXEC);
+