diff options
author | roy <roy@pkgsrc.org> | 2017-03-30 20:14:16 +0000 |
---|---|---|
committer | roy <roy@pkgsrc.org> | 2017-03-30 20:14:16 +0000 |
commit | 557a3ebc5c25ada7f4c300c699d8a2cf07bc9260 (patch) | |
tree | f0299ff4c39912849cc05bf5b448abf6c5cddaf1 /devel/arcanist | |
parent | c84149d1d4d06bec930c673e91598b36416760a8 (diff) | |
download | pkgsrc-557a3ebc5c25ada7f4c300c699d8a2cf07bc9260.tar.gz |
arcanist should not rely on bash.
Diffstat (limited to 'devel/arcanist')
-rw-r--r-- | devel/arcanist/Makefile | 12 | ||||
-rw-r--r-- | devel/arcanist/distinfo | 3 | ||||
-rw-r--r-- | devel/arcanist/patches/patch-bin_arc | 53 |
3 files changed, 62 insertions, 6 deletions
diff --git a/devel/arcanist/Makefile b/devel/arcanist/Makefile index 7f97cb5bf8a..5247838a218 100644 --- a/devel/arcanist/Makefile +++ b/devel/arcanist/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.6 2017/03/17 12:40:58 roy Exp $ +# $NetBSD: Makefile,v 1.7 2017/03/30 20:14:16 roy Exp $ DISTNAME= arcanist-20170225 +PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GITHUB:=phacility/} GITHUB_PROJECT= arcanist @@ -20,8 +21,6 @@ DEPENDS+= libphutil-[0-9]*:../../devel/libphutil CONFLICTS+= arc-[0-9]*:../../archivers/arc -REPLACE_BASH+= bin/arc - SUBST_CLASSES+= php SUBST_MESSAGE.php= Fixing PHP path SUBST_STAGE.php= post-configure @@ -40,8 +39,11 @@ ARCANISTDIR= share/arcanist INSTALLATION_DIRS+= ${ARCANISTDIR} bin do-install: - cd ${WRKSRC} && ${PAX} -rw * ${DESTDIR}${PREFIX}/${ARCANISTDIR} - ln -s ${PREFIX}/${ARCANISTDIR}/bin/arc ${DESTDIR}${PREFIX}/bin/arc + cd ${WRKSRC} && \ + ${PAX} -rw * -s',.*\.orig$$,,' \ + ${DESTDIR}${PREFIX}/${ARCANISTDIR} + ln -s ${PREFIX}/${ARCANISTDIR}/scripts/arcanist.php \ + ${DESTDIR}${PREFIX}/bin/arc .include "../../lang/python/application.mk" .include "../../lang/php/phpversion.mk" diff --git a/devel/arcanist/distinfo b/devel/arcanist/distinfo index 1daf2fdd35b..27aec0bd7c5 100644 --- a/devel/arcanist/distinfo +++ b/devel/arcanist/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.2 2017/03/17 12:40:58 roy Exp $ +$NetBSD: distinfo,v 1.3 2017/03/30 20:14:16 roy Exp $ SHA1 (arcanist-20170225-822bc53ca306e06314560d8a76f68771d732e8e0.tar.gz) = 34fb6fce4e5f9dc3b924274ddff0fa9c423fbb0c RMD160 (arcanist-20170225-822bc53ca306e06314560d8a76f68771d732e8e0.tar.gz) = 0e78dccc79c10a8f63caf2af4427d658c3ae48b0 SHA512 (arcanist-20170225-822bc53ca306e06314560d8a76f68771d732e8e0.tar.gz) = 1ae4d5585c434ef9c83df9b22b9a2d142f85d751251c8d5c225ea051516efab9e4aa307aa3079ac28c20cd68a0281d95fbc17025f0c7089c4b6e0ef3403ad786 Size (arcanist-20170225-822bc53ca306e06314560d8a76f68771d732e8e0.tar.gz) = 501506 bytes +SHA1 (patch-bin_arc) = 91c261f720efe6f6783e9a3e4044f50e74d4b425 diff --git a/devel/arcanist/patches/patch-bin_arc b/devel/arcanist/patches/patch-bin_arc new file mode 100644 index 00000000000..0e96eb1449b --- /dev/null +++ b/devel/arcanist/patches/patch-bin_arc @@ -0,0 +1,53 @@ +$NetBSD: patch-bin_arc,v 1.1 2017/03/30 20:14:16 roy Exp $ + +commit dcf167cba8294310d03c29b2eec82c2aea8aa9b4 +Author: Roy Marples <roy@marples.name> +Date: Thu Mar 30 12:20:19 2017 +0100 + + arcanist: arc should work with any POSIX shell + + Summary: + Currently arc requires bash for `$BASH_SOURCE[0]` and + substring range removal, both of which are bash specific features. + + This patch gets the same result with `$0` and string prefix removal, + both of are are POSIX features and as such all shells should support. + + Fixes T12477. + + Test Plan: + * Run `bin/arc` on systems with bash and other shells as `/bin/sh` + + Reviewers: #blessed_reviewers! + + Subscribers: epriestley + + Maniphest Tasks: T12477 + + Differential Revision: https://secure.phabricator.com/D17582 + +diff --git a/bin/arc b/bin/arc +index e125698b..96f321a3 100755 +--- bin/arc ++++ bin/arc +@@ -1,14 +1,16 @@ +-#!/usr/bin/env bash ++#!/bin/sh + + # NOTE: This file is a wrapper script instead of a symlink so it will work in + # the Git Bash environment in Windows. + +-# Do bash magic to resolve the real location of this script through aliases, ++# Do shell magic to resolve the real location of this script through aliases, + # symlinks, etc. +-SOURCE="${BASH_SOURCE[0]}"; ++SOURCE="$0"; + while [ -h "$SOURCE" ]; do + LINK="$(readlink "$SOURCE")"; +- if [ "${LINK:0:1}" == "/" ]; then ++ # Test if the first character of $LINK is / by removing it from the front ++ # and testing equality ++ if [ "${LINK#/}" != "$LINK" ]; then + # absolute symlink + SOURCE="$LINK" + else |