[packages/mksh] up to 56
atler
atler at pld-linux.org
Sat Aug 12 23:41:10 CEST 2017
commit 7438aa93496e4d6fb14548d322fe9985159c5d2b
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Aug 12 23:34:47 2017 +0200
up to 56
- added lto bcond (disabled by default - tests fail with gcc >= 6.3)
- adapted circumflex patch
mksh-circumflex.patch | 75 ++++++++++++++++++++++++++-------------------------
mksh.spec | 9 ++++---
2 files changed, 43 insertions(+), 41 deletions(-)
---
diff --git a/mksh.spec b/mksh.spec
index 2e5e4e9..540240e 100644
--- a/mksh.spec
+++ b/mksh.spec
@@ -1,17 +1,18 @@
#
# Conditional build:
+%bcond_with lto # enable link time optimisations (breaks tests)
%bcond_without static # static version of mksh
%bcond_without tests # rtchecks and test.sh checks
Summary: MirBSD Korn Shell
Summary(pl.UTF-8): Powłoka Korna z MirBSD
Name: mksh
-Version: 54
+Version: 56
Release: 1
License: BSD
Group: Applications/Shells
Source0: https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
-# Source0-md5: be0a6fb93b4a5f927bcc1893bb6692f8
+# Source0-md5: fedd42b11d2bda84921afcc8de3912e3
Source1: %{name}-mkshrc
Source2: get-source.sh
Patch0: %{name}-mkshrc_support.patch
@@ -135,7 +136,7 @@ CC="%{__cc}" \
CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \
LDFLAGS="%{rpmldflags}" \
CPPFLAGS="%{rpmcppflags}" \
-sh ./Build.sh -Q -r -j -c lto
+sh ./Build.sh -Q -r -j %{?with_lto:-c lto}
# skip some tests if not on terminal
if ! tty -s; then
@@ -158,7 +159,7 @@ CC="%{__cc}" \
CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \
LDFLAGS="%{rpmldflags} -static" \
CPPFLAGS="%{rpmcppflags}" \
-sh ./Build.sh -Q -r -j -c lto
+sh ./Build.sh -Q -r -j %{?with_lto:-c lto}
%if %{with tests}
./test.sh -v $skip_tests
diff --git a/mksh-circumflex.patch b/mksh-circumflex.patch
index f52bbed..3b13f27 100644
--- a/mksh-circumflex.patch
+++ b/mksh-circumflex.patch
@@ -1,45 +1,46 @@
-diff -ur mksh-40.org//eval.c mksh-40/eval.c
---- mksh-40.org//eval.c 2011-06-12 16:45:57.000000000 +0200
-+++ mksh-40/eval.c 2011-07-07 18:27:58.891492090 +0200
-@@ -887,6 +887,7 @@
- switch (c) {
- case '[':
- case '!':
-+ case NOT2:
- case '-':
- case ']':
+diff -ur mksh-56.orig/eval.c mksh-56/eval.c
+--- mksh-56.orig/eval.c 2017-08-12 22:10:26.321676398 +0200
++++ mksh-56/eval.c 2017-08-12 22:40:32.672676143 +0200
+@@ -1005,6 +1005,7 @@
+ switch (ord(c)) {
+ case ord('['):
+ case ord('!'):
++ case ord(NOT2):
+ case ord('-'):
+ case ord(']'):
/*
-diff -ur mksh-40.org//misc.c mksh-40/misc.c
---- mksh-40.org//misc.c 2011-06-12 16:45:58.000000000 +0200
-+++ mksh-40/misc.c 2011-07-07 18:28:39.015826686 +0200
-@@ -843,7 +843,7 @@
- bool notp, found = false;
- const unsigned char *orig_p = p;
+diff -ur mksh-56.orig/misc.c mksh-56/misc.c
+--- mksh-56.orig/misc.c 2017-08-12 22:10:26.321676398 +0200
++++ mksh-56/misc.c 2017-08-12 22:40:32.672676143 +0200
+@@ -966,7 +966,7 @@
+ char *subp;
-- if ((notp = tobool(ISMAGIC(*p) && *++p == '!')))
-+ if ((notp = tobool(ISMAGIC(*p) && (*++p == '!' || *p == NOT2))))
- p++;
- do {
- c = *p++;
-diff -ur mksh-40.org//sh.h mksh-40/sh.h
---- mksh-40.org//sh.h 2011-06-12 16:59:09.000000000 +0200
-+++ mksh-40/sh.h 2011-07-07 18:29:16.346761511 +0200
-@@ -380,5 +380,6 @@
- #define MAGIC (7) /* prefix for *?[!{,} during expand */
- #define ISMAGIC(c) ((unsigned char)(c) == MAGIC)
+ /* check for negation */
+- if (ISMAGIC(p[0]) && ord(p[1]) == ord('!')) {
++ if (ISMAGIC(p[0]) && (ord(p[1]) == ord('!') || ord(p[1]) == ord(NOT2))) {
+ p += 2;
+ negated = true;
+ }
+diff -ur mksh-56.orig/sh.h mksh-56/sh.h
+--- mksh-56.orig/sh.h 2017-08-12 22:10:26.325009789 +0200
++++ mksh-56/sh.h 2017-08-12 22:40:32.696009488 +0200
+@@ -550,6 +550,7 @@
+ */
+ #define MAGIC KSH_BEL /* prefix for *?[!{,} during expand */
+ #define ISMAGIC(c) (ord(c) == ord(MAGIC))
+#define NOT2 '^'
- #define LINE 4096 /* input line size */
+ EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */
-diff -urN mksh.org/check.t mksh/check.t
---- mksh.org/check.t 2014-01-11 19:10:02.000000000 +0100
-+++ mksh/check.t 2014-01-20 14:12:37.924222697 +0100
-@@ -2085,7 +2085,7 @@
- cbc
- -bc cbc
+diff -ur mksh-56.orig/check.t mksh-56/check.t
+--- mksh-56.orig/check.t 2017-08-12 22:10:26.321676398 +0200
++++ mksh-56/check.t 2017-08-12 22:41:46.886083258 +0200
+@@ -2438,7 +2438,7 @@
+ !bc +bc ,bc 0bc 1bc ^bc cbc
+ !bc +bc ,bc -bc 0bc 1bc ^bc cbc
abc bbc
- ^bc abc bbc
-+ !bc -bc ^bc cbc
- !bc -bc ^bc cbc
++ !bc +bc ,bc -bc 0bc 1bc ^bc cbc
+ +bc ,bc -bc
+ -bc 0bc 1bc
---
- name: glob-range-2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mksh.git/commitdiff/7438aa93496e4d6fb14548d322fe9985159c5d2b
More information about the pld-cvs-commit
mailing list