aboutsummaryrefslogtreecommitdiffstats
path: root/testing/racket/makefile-fix-bashism.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-15 02:01:54 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-15 02:02:35 +0100
commita243b98556b3e833b16a3019d23910d0cee86720 (patch)
treee906bb6f121af8beaf5f8e84902a7f00a6917a3a /testing/racket/makefile-fix-bashism.patch
parent400f7e2a41814ceddd45ccd354808a9971673296 (diff)
downloadaports-a243b98556b3e833b16a3019d23910d0cee86720.tar.bz2
aports-a243b98556b3e833b16a3019d23910d0cee86720.tar.xz
testing/racket: new aport
https://racket-lang.org/ A general purpose programming language in the Lisp-Scheme family
Diffstat (limited to 'testing/racket/makefile-fix-bashism.patch')
-rw-r--r--testing/racket/makefile-fix-bashism.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/racket/makefile-fix-bashism.patch b/testing/racket/makefile-fix-bashism.patch
new file mode 100644
index 0000000000..4f3ebbcfdd
--- /dev/null
+++ b/testing/racket/makefile-fix-bashism.patch
@@ -0,0 +1,38 @@
+From 2ad51be9ccb1f0717732875edbb1bb0b33caa2a2 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Thu, 15 Mar 2018 01:24:49 +0100
+Subject: [PATCH] Fix bashism in Makefile for better portability
+
+Syntax `[[ "foo" != /* ]]` is not defined by POSIX Shell Command
+Language. It's supported only by ksh, Bash and ZSH. Other POSIX
+shells, such as ash or dash, does not support it.
+
+This patch replaces this problematic syntax with simple case statement
+that is supported by all POSIX-sh compatible shells, including (but not
+limited to) ash, bash, dash, ZSH.
+
+Upstream-Issue: https://github.com/racket/racket/pull/1990
+---
+ racket/src/Makefile.in | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/racket/src/Makefile.in b/racket/src/Makefile.in
+index 76483c1793..24c2e5aeba 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -109,11 +109,10 @@ plain-install:
+ $(MAKE) plain-install-@MAIN_VARIANT@
+
+ install-common-first:
+- if [ "$(DESTDIR)" != "" ]; then \
+- if [[ "$(DESTDIR)" != /* ]]; then \
+- echo "expected an absolute path for DESTDIR; given: $(DESTDIR)"; exit 1; \
+- fi; \
+- fi
++ case "$(DESTDIR)" in \
++ "" | /*) ;; \
++ *) echo "expected an absolute path for DESTDIR; given: $(DESTDIR)"; exit 1;; \
++ esac
+ mkdir -p $(ALLDIRINFO)
+
+ install-common-middle: