From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../squirrelsh/files/squirrelsh-1.2.7-gcc6.patch | 217 +++++++++++++++++++++ .../files/squirrelsh-fix-in_LDFLAGS.patch | 12 ++ .../squirrelsh/files/squirrelsh-no-docs.patch | 25 +++ .../squirrelsh/files/squirrelsh-no-strip.patch | 19 ++ .../files/squirrelsh-remove-forced-abi.patch | 21 ++ .../files/squirrelsh-rename-LDFLAGS.patch | 140 +++++++++++++ 6 files changed, 434 insertions(+) create mode 100644 app-shells/squirrelsh/files/squirrelsh-1.2.7-gcc6.patch create mode 100644 app-shells/squirrelsh/files/squirrelsh-fix-in_LDFLAGS.patch create mode 100644 app-shells/squirrelsh/files/squirrelsh-no-docs.patch create mode 100644 app-shells/squirrelsh/files/squirrelsh-no-strip.patch create mode 100644 app-shells/squirrelsh/files/squirrelsh-remove-forced-abi.patch create mode 100644 app-shells/squirrelsh/files/squirrelsh-rename-LDFLAGS.patch (limited to 'app-shells/squirrelsh/files') diff --git a/app-shells/squirrelsh/files/squirrelsh-1.2.7-gcc6.patch b/app-shells/squirrelsh/files/squirrelsh-1.2.7-gcc6.patch new file mode 100644 index 000000000000..ea60d29dc3cb --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-1.2.7-gcc6.patch @@ -0,0 +1,217 @@ +diff --git a/shell/base.cpp b/shell/base.cpp +index 3a89b6d..33803c3 100644 +--- a/shell/base.cpp ++++ b/shell/base.cpp +@@ -1,5 +1,5 @@ + // Squirrel Shell +-// Copyright (c) 2006-2010, Constantin Makshin ++// Copyright (c) 2006-2017, Constantin Makshin + // + // This program is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by +@@ -15,6 +15,7 @@ + // along with this program. If not, see . + + #include "common.h" ++#include + #include + #include + +@@ -36,14 +37,6 @@ typedef HANDLE SysHandle; + typedef int SysHandle; + #endif + +-#if !defined(min) +-# define min(a, b) ((a) < (b) ? (a) : (b)) +-#endif +- +-#if !defined(max) +-# define max(a, b) ((a) > (b) ? (a) : (b)) +-#endif +- + // Maximum number of command line arguments passed to the child process + #define MAX_ARGS 130 + // Maximum number of environment variables passed to the child process +@@ -177,7 +170,7 @@ static bool ReadFromPipe (SysHandle pipe, void* buffer, size_t numBytesToRead, s + + if (!numBytesToRead || + !PeekNamedPipe(pipe, NULL, 0, NULL, &numBytesAvailable, NULL) || !numBytesAvailable || +- !ReadFile(pipe, buffer, min(numBytesToRead, numBytesAvailable), &nbr, NULL) || !nbr) ++ !ReadFile(pipe, buffer, std::min(numBytesToRead, numBytesAvailable), &nbr, NULL) || !nbr) + { + return false; + } +@@ -188,7 +181,7 @@ static bool ReadFromPipe (SysHandle pipe, void* buffer, size_t numBytesToRead, s + #else + int nbr = read(pipe, buffer, numBytesToRead); + if (numBytesRead) +- *numBytesRead = max(nbr, 0); ++ *numBytesRead = std::max(nbr, 0); + + return nbr > 0; + #endif +@@ -210,7 +203,7 @@ static bool WriteToPipe (SysHandle pipe, const void* buffer, size_t numBytesToWr + #else + int nbw = write(pipe, buffer, numBytesToWrite); + if (numBytesWritten) +- *numBytesWritten = max(nbw, 0); ++ *numBytesWritten = std::max(nbw, 0); + + return nbw > 0; + #endif +@@ -786,7 +779,7 @@ static SQInteger Run (HSQUIRRELVM) + // Pass data to/from child process' streams + std::basic_string output, + error; +- int nfds = max(newInput[1], max(newOutput[0], newError[0])) + 1; ++ int nfds = std::max(newInput[1], std::max(newOutput[0], newError[0])) + 1; + for (;;) + { + // Check if there's any data available for reading/writing +diff --git a/shell/common.h b/shell/common.h +index 7cb4d47..461410d 100644 +--- a/shell/common.h ++++ b/shell/common.h +@@ -1,5 +1,5 @@ + // Squirrel Shell +-// Copyright (c) 2006-2010, Constantin Makshin ++// Copyright (c) 2006-2017, Constantin Makshin + // + // This program is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by +@@ -47,6 +47,7 @@ + # define WIN32_LEAN_AND_MEAN + # define WIN64_LEAN_AND_MEAN + # define STRICT ++# define NOMINMAX + # include + #else + # include +@@ -88,14 +89,6 @@ + # define MAX_PATH 260 + #endif + +-#if !defined(min) +-# define min(a, b) ((a) < (b) ? (a) : (b)) +-#endif +- +-#if !defined(max) +-# define max(a, b) ((a) > (b) ? (a) : (b)) +-#endif +- + #define SQUIRREL_VERSION_SHORT "3.0.3" + + extern HSQUIRRELVM sqvm; // We aren't going to create more than one VM, so it's acceptable to make this global +diff --git a/shell/hash_adler32.cpp b/shell/hash_adler32.cpp +index c42f440..b250875 100644 +--- a/shell/hash_adler32.cpp ++++ b/shell/hash_adler32.cpp +@@ -8,6 +8,7 @@ + */ + + #include "hash.h" ++#include + + #define BASE 65521ul + #define NMAX 5552 +@@ -87,7 +88,7 @@ void Hash_Adler32 (FILE* file, unsigned char* block, unsigned char* hash, SQInte + unsigned adler = 1; + do + { +- size_t r = fread(block, 1, min(left, BLOCK_SIZE), file); ++ size_t r = fread(block, 1, size_t(std::min(left, BLOCK_SIZE)), file); + adler = adler32(adler, block, r); + left -= SQInteger(r); + } while (left); +diff --git a/shell/hash_crc32.cpp b/shell/hash_crc32.cpp +index d18a3aa..9bcb233 100644 +--- a/shell/hash_crc32.cpp ++++ b/shell/hash_crc32.cpp +@@ -8,6 +8,7 @@ + */ + + #include "hash.h" ++#include + + static unsigned crc_table[256]; + +@@ -63,7 +64,7 @@ void Hash_CRC32 (FILE* file, unsigned char* block, unsigned char* hash, SQIntege + unsigned crc = 0; + do + { +- size_t r = fread(block, 1, min(left, BLOCK_SIZE), file); ++ size_t r = fread(block, 1, size_t(std::min(left, BLOCK_SIZE)), file); + crc = crc32(crc, block, r); + left -= SQInteger(r); + } while (left); +diff --git a/shell/hash_md5.cpp b/shell/hash_md5.cpp +index b1a3c2a..a82d4c5 100644 +--- a/shell/hash_md5.cpp ++++ b/shell/hash_md5.cpp +@@ -20,6 +20,7 @@ + */ + + #include "hash.h" ++#include + + struct MD5Context + { +@@ -201,7 +202,7 @@ void Hash_MD5 (FILE* file, unsigned char* block, unsigned char* hash, SQInteger + MD5Init(&ctx); + do + { +- size_t r = fread(block, 1, min(left, BLOCK_SIZE), file); ++ size_t r = fread(block, 1, size_t(std::min(left, BLOCK_SIZE)), file); + MD5Update(&ctx, block, r); + left -= SQInteger(r); + } while (left); +diff --git a/shell/util.cpp b/shell/util.cpp +index 48983f6..6d0d199 100644 +--- a/shell/util.cpp ++++ b/shell/util.cpp +@@ -1,5 +1,5 @@ + // Squirrel Shell +-// Copyright (c) 2006-2009, Constantin Makshin ++// Copyright (c) 2006-2017, Constantin Makshin + // + // This program is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by +@@ -15,6 +15,7 @@ + // along with this program. If not, see . + + #include "common.h" ++#include + #include + #include + +@@ -123,8 +124,12 @@ SQInteger TimeToInt (unsigned year, unsigned month, unsigned day, unsigned hour, + --day; + + DateAndTime result; +- result.dt.time = (min(hour, 23) * 3600) + (min(minute, 59) * 60) + min(second, 59); +- result.dt.date = (min(year, NUM_YEARS) * 372) + (min(month, 11) * 31) + min(day, NumberOfDays(month, year) - 1); ++ result.dt.time = (std::min(hour, 23) * 3600) ++ + (std::min(minute, 59) * 60) ++ + std::min(second, 59); ++ result.dt.date = (std::min(year, NUM_YEARS) * 372) ++ + (std::min(month, 11) * 31) ++ + std::min(day, NumberOfDays(month, year) - 1); + return result.value; + } + +@@ -798,8 +803,13 @@ static SQInteger MkTime (HSQUIRRELVM) + sq_getinteger(sqvm, 5, &hour); + sq_getinteger(sqvm, 6, &minute); + sq_getinteger(sqvm, 7, &second); +- sq_pushinteger(sqvm, TimeToInt(unsigned(max(year, MIN_YEAR)), unsigned(max(month, 1)), unsigned(max(day, 1)), +- unsigned(max(hour, 0)), unsigned(max(minute, 0)), unsigned(max(second, 0)))); ++ sq_pushinteger(sqvm, ++ TimeToInt(unsigned(std::max(year, MIN_YEAR)), ++ unsigned(std::max(month, 1)), ++ unsigned(std::max(day, 1)), ++ unsigned(std::max(hour, 0)), ++ unsigned(std::max(minute, 0)), ++ unsigned(std::max(second, 0)))); + return 1; + } + diff --git a/app-shells/squirrelsh/files/squirrelsh-fix-in_LDFLAGS.patch b/app-shells/squirrelsh/files/squirrelsh-fix-in_LDFLAGS.patch new file mode 100644 index 000000000000..71319c0cc7f4 --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-fix-in_LDFLAGS.patch @@ -0,0 +1,12 @@ +diff -Naur squirrelsh-1.2.6.orig//configure squirrelsh-1.2.6/configure +--- squirrelsh-1.2.6.orig//configure 2012-03-12 21:45:25.000000000 -0400 ++++ squirrelsh-1.2.6/configure 2012-03-12 21:50:36.000000000 -0400 +@@ -1138,7 +1138,7 @@ + in_INSTALL_EXE="$installer -c -m 0755 \"\$(target)\" \"$bindir/\$(target_name)\"" + + if [ "$with_pcre" = "local" ] || [ "$with_squirrel" = "local" ]; then +- in_LDFLAGS="-L\"$source_dir/lib\"" ++ in_LDFLAGS="$in_LDFLAGS -L\"$source_dir/lib\"" + fi + + if [ -n "$pkgconfig" ]; then diff --git a/app-shells/squirrelsh/files/squirrelsh-no-docs.patch b/app-shells/squirrelsh/files/squirrelsh-no-docs.patch new file mode 100644 index 000000000000..2ed4d0160bf4 --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-no-docs.patch @@ -0,0 +1,25 @@ +diff -Naur squirrelsh-1.2.6.orig//Makefile.in squirrelsh-1.2.6/Makefile.in +--- squirrelsh-1.2.6.orig//Makefile.in 2011-12-16 13:25:08.000000000 -0500 ++++ squirrelsh-1.2.6/Makefile.in 2012-03-12 21:58:50.000000000 -0400 +@@ -19,14 +19,6 @@ + @MAKE_PCRE@ + @MAKE_SQUIRREL@ + @MAKE_SHELL@ +- @INSTALL@ -d -m 0755 "@DOCDIR@" +- @INSTALL@ -c -m 0644 COPYING "@DOCDIR@" +- @INSTALL@ -c -m 0644 COPYING-squirrel "@DOCDIR@" +- @INSTALL@ -c -m 0644 COPYING-zlib "@DOCDIR@" +- @INSTALL@ -c -m 0644 HISTORY "@DOCDIR@" +- @INSTALL@ -c -m 0644 README "@DOCDIR@" +- @INSTALL@ -c -m 0644 doc/squirrel3.pdf "@DOCDIR@" +- @INSTALL@ -c -m 0644 doc/squirrelsh.pdf "@DOCDIR@" + @INSTALL@ -d -m 0755 "@MANDIR@" + @INSTALL@ -c -m 0644 doc/squirrelsh.1 "@MANDIR@" + @INSTALL_MIME@ +@@ -35,6 +27,5 @@ + @MAKE_PCRE@ + @MAKE_SQUIRREL@ + @MAKE_SHELL@ +- @RMDIR@ "@DOCDIR@" + @RM@ "@MANDIR@/squirrelsh.1" + @UNINSTALL_MIME@ diff --git a/app-shells/squirrelsh/files/squirrelsh-no-strip.patch b/app-shells/squirrelsh/files/squirrelsh-no-strip.patch new file mode 100644 index 000000000000..cf0286c5c562 --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-no-strip.patch @@ -0,0 +1,19 @@ +diff -Naur squirrelsh-1.2.6.orig//configure squirrelsh-1.2.6/configure +--- squirrelsh-1.2.6.orig//configure 2012-03-12 20:19:01.000000000 -0400 ++++ squirrelsh-1.2.6/configure 2012-03-12 20:32:25.000000000 -0400 +@@ -1163,7 +1163,6 @@ + [ -z "$CFLAGS" ] && in_CFLAGS="$in_CFLAGS -fomit-frame-pointer" + [ -z "$CXXFLAGS" ] && in_CXXFLAGS="$in_CXXFLAGS -fomit-frame-pointer" + in_DEFINES="-DNDEBUG" +- [ -z "$LDFLAGS" ] && in_LDFLAGS="$in_LDFLAGS -s" + fi + + if [ "$with_pcre" = "local" ] && [ "$with_libraries" = "static" ]; then +@@ -1233,7 +1232,6 @@ + in_CXXFLAGS_LIB="$in_CXXFLAGS -fPIC" + in_MAKE_LIB="$linker -shared $in_LDFLAGS -o \"\$(target)\" \$(objects)" + in_INSTALL_LIB="$installer -c -m 0755 \"\$(target)\" \"$libdir\"" +- [ "$with_strip" ] && in_INSTALL_LIB="$in_INSTALL_LIB \\&\\& strip --strip-unneeded \"$libdir/\$(target_name)\"" + in_UNINSTALL_LIB="rm -f \"$libdir/\$(target_name)\"" + fi + diff --git a/app-shells/squirrelsh/files/squirrelsh-remove-forced-abi.patch b/app-shells/squirrelsh/files/squirrelsh-remove-forced-abi.patch new file mode 100644 index 000000000000..d9a5f0b34fe1 --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-remove-forced-abi.patch @@ -0,0 +1,21 @@ +diff -Naur squirrelsh-1.2.6.orig//configure squirrelsh-1.2.6/configure +--- squirrelsh-1.2.6.orig//configure 2012-03-12 22:02:40.000000000 -0400 ++++ squirrelsh-1.2.6/configure 2012-03-12 22:05:42.000000000 -0400 +@@ -1172,15 +1172,10 @@ + # ... CFLAGS, CXXFLAGS, DEFINES, LDFLAGS (machine-dependent) + case "$target" in + x86) +- in_CFLAGS="-m32 $in_CFLAGS" +- in_CXXFLAGS="-m32 $in_CXXFLAGS" +- in_LDFLAGS="-m32 $in_LDFLAGS";; ++ :;; + + x86_64) +- in_CFLAGS="-m64 $in_CFLAGS" +- in_CXXFLAGS="-m64 $in_CXXFLAGS" +- in_DEFINES="$in_DEFINES -D_SQ64" +- in_LDFLAGS="-m64 $in_LDFLAGS";; ++ in_DEFINES="$in_DEFINES -D_SQ64";; + + ia64) + in_DEFINES="$in_DEFINES -D_SQ64";; diff --git a/app-shells/squirrelsh/files/squirrelsh-rename-LDFLAGS.patch b/app-shells/squirrelsh/files/squirrelsh-rename-LDFLAGS.patch new file mode 100644 index 000000000000..0c36d7548623 --- /dev/null +++ b/app-shells/squirrelsh/files/squirrelsh-rename-LDFLAGS.patch @@ -0,0 +1,140 @@ +diff -Naur squirrelsh-1.2.6.orig//configure squirrelsh-1.2.6/configure +--- squirrelsh-1.2.6.orig//configure 2010-11-09 13:16:43.000000000 -0500 ++++ squirrelsh-1.2.6/configure 2012-03-12 20:19:01.000000000 -0400 +@@ -55,8 +55,8 @@ + with_ranlib="yes" # yes, no + linker="$cpp_compiler" + +-if [ -n "$LFLAGS" ]; then +- linker_flags="$LFLAGS" ++if [ -n "$LDFLAGS" ]; then ++ linker_flags="$LDFLAGS" + else + linker_flags="-Wl,-O1 -Wl,--as-needed" + fi +@@ -136,7 +136,7 @@ + CFLAGS C compiler options + CXX C++ compiler + CXXFLAGS C++ compiler options +- LFLAGS Linker options ++ LDFLAGS Linker options + __SHEOF__ + closescript + } +@@ -275,7 +275,7 @@ + return 1 + } + +-# getoutput CPPFLAGS LFLAGS ++# getoutput CPPFLAGS LDFLAGS + # Compile C++ code and run the compiled program + getoutput () + { +@@ -824,7 +824,7 @@ + checkforlinkeroption || msg_fail + + # Check for optional linker options +-if [ -z "$LFLAGS" ]; then ++if [ -z "$LDFLAGS" ]; then + checkforlinkeroption "-pipe" || msg_result "no" + checkforlinkeroption "-flto" y || msg_result "no" + fi +@@ -1131,27 +1131,27 @@ + #------ CREATE MAKEFILES -------------------------------------------------------------------------- + + # Define variables for substitution +-# ... CFLAGS, CXXFLAGS, DEFINES, LFLAGS, INSTALL_EXE (machine-independent) ++# ... CFLAGS, CXXFLAGS, DEFINES, LDFLAGS, INSTALL_EXE (machine-independent) + in_CFLAGS="-c $c_compiler_flags" + in_CXXFLAGS="-c $cpp_compiler_flags" +-in_LFLAGS="$linker_flags" ++in_LDFLAGS="$linker_flags" + in_INSTALL_EXE="$installer -c -m 0755 \"\$(target)\" \"$bindir/\$(target_name)\"" + + if [ "$with_pcre" = "local" ] || [ "$with_squirrel" = "local" ]; then +- in_LFLAGS="-L\"$source_dir/lib\"" ++ in_LDFLAGS="-L\"$source_dir/lib\"" + fi + + if [ -n "$pkgconfig" ]; then + if [ "$with_pcre" = "system" ]; then + in_CFLAGS="$in_CFLAGS `$pkgconfig --cflags-only-other libpcre`" + in_CXXFLAGS="$in_CXXFLAGS `$pkgconfig --cflags-only-other libpcre`" +- in_LFLAGS="$in_LFLAGS `$pkgconfig --libs-only-other --libs-only-L libpcre`" ++ in_LDFLAGS="$in_LDFLAGS `$pkgconfig --libs-only-other --libs-only-L libpcre`" + fi + + if [ "$with_squirrel" = "system" ]; then + in_CFLAGS="$in_CFLAGS `$pkgconfig --cflags-only-other libsquirrel`" + in_CXXFLAGS="$in_CXXFLAGS `$pkgconfig --cflags-only-other libsquirrel`" +- in_LFLAGS="$in_LFLAGS `$pkgconfig --libs-only-other --libs-only-L libsquirrel`" ++ in_LDFLAGS="$in_LDFLAGS `$pkgconfig --libs-only-other --libs-only-L libsquirrel`" + fi + fi + +@@ -1163,25 +1163,25 @@ + [ -z "$CFLAGS" ] && in_CFLAGS="$in_CFLAGS -fomit-frame-pointer" + [ -z "$CXXFLAGS" ] && in_CXXFLAGS="$in_CXXFLAGS -fomit-frame-pointer" + in_DEFINES="-DNDEBUG" +- [ -z "$LFLAGS" ] && in_LFLAGS="$in_LFLAGS -s" ++ [ -z "$LDFLAGS" ] && in_LDFLAGS="$in_LDFLAGS -s" + fi + + if [ "$with_pcre" = "local" ] && [ "$with_libraries" = "static" ]; then + in_DEFINES="$in_DEFINES -DPCRE_STATIC" + fi + +-# ... CFLAGS, CXXFLAGS, DEFINES, LFLAGS (machine-dependent) ++# ... CFLAGS, CXXFLAGS, DEFINES, LDFLAGS (machine-dependent) + case "$target" in + x86) + in_CFLAGS="-m32 $in_CFLAGS" + in_CXXFLAGS="-m32 $in_CXXFLAGS" +- in_LFLAGS="-m32 $in_LFLAGS";; ++ in_LDFLAGS="-m32 $in_LDFLAGS";; + + x86_64) + in_CFLAGS="-m64 $in_CFLAGS" + in_CXXFLAGS="-m64 $in_CXXFLAGS" + in_DEFINES="$in_DEFINES -D_SQ64" +- in_LFLAGS="-m64 $in_LFLAGS";; ++ in_LDFLAGS="-m64 $in_LDFLAGS";; + + ia64) + in_DEFINES="$in_DEFINES -D_SQ64";; +@@ -1223,7 +1223,7 @@ + + # Work around Apple's linker behavior ("-L../lib" linker option seems to be ignored) + if [ "$platform" = "macosx" ]; then +- #in_LFLAGS="$in_LFLAGS -search_paths_first" ++ #in_LDFLAGS="$in_LDFLAGS -search_paths_first" + [ "$with_pcre" = "local" ] && in_LIBS=`echo "$in_LIBS" | $sed -e "s@-lpcre@../lib/libpcre$lib_suffix@"` + [ "$with_squirrel" = "local" ] && in_LIBS=`echo "$in_LIBS" | $sed -e "s@-lsquirrel@../lib/libsquirrel$lib_suffix@"` + fi +@@ -1231,7 +1231,7 @@ + in_LIB_EXT="$dll_suffix" + in_CFLAGS_LIB="$in_CFLAGS -fPIC" + in_CXXFLAGS_LIB="$in_CXXFLAGS -fPIC" +- in_MAKE_LIB="$linker -shared $in_LFLAGS -o \"\$(target)\" \$(objects)" ++ in_MAKE_LIB="$linker -shared $in_LDFLAGS -o \"\$(target)\" \$(objects)" + in_INSTALL_LIB="$installer -c -m 0755 \"\$(target)\" \"$libdir\"" + [ "$with_strip" ] && in_INSTALL_LIB="$in_INSTALL_LIB \\&\\& strip --strip-unneeded \"$libdir/\$(target_name)\"" + in_UNINSTALL_LIB="rm -f \"$libdir/\$(target_name)\"" +@@ -1274,7 +1274,7 @@ + s#@LINK@#$linker# + s#@EXE_EXT@#$exe_suffix# + s#@LIB_EXT@#$in_LIB_EXT# +-s#@MAKE_EXE@#$linker $in_LFLAGS -o "\$(target)" \$(objects) $in_LIBS# ++s#@MAKE_EXE@#$linker $in_LDFLAGS -o "\$(target)" \$(objects) $in_LIBS# + s#@MAKE_LIB@#$in_MAKE_LIB# + s#@MAKE_PCRE@#$in_MAKE_PCRE# + s#@MAKE_SHELL@#@cd shell \&\& \$(MAKE) \$@# +@@ -1285,7 +1285,7 @@ + s#@CXXFLAGS_EXE@#$in_CXXFLAGS_EXE# + s#@CFLAGS_LIB@#$in_CFLAGS_LIB# + s#@CXXFLAGS_LIB@#$in_CXXFLAGS_LIB# +-s#@LFLAGS@#$in_LFLAGS# ++s#@LDFLAGS@#$in_LDFLAGS# + s#@DEFINES@#$in_DEFINES# + s#@INCLUDES@#$in_INCLUDES# + s#@LIBS@#$in_LIBS# -- cgit v1.2.3