composer: platform independent + fix shebang
PHARs do not like to be edited after compilation, so shebang has to be fixed before it was created.
This commit is contained in:
parent
eefc5ed680
commit
6de7b2d141
@ -2,10 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://getcomposer.org/
|
||||
TERMUX_PKG_DESCRIPTION="Dependency Manager for PHP"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_VERSION=2.0.8
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_SRCURL=https://github.com/composer/composer.git
|
||||
TERMUX_PKG_DEPENDS="php"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
|
||||
termux_step_make_install() {
|
||||
composer install
|
||||
|
13
packages/composer/fix-shebang.patch
Normal file
13
packages/composer/fix-shebang.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php
|
||||
index a31aff946..8398862a1 100644
|
||||
--- a/src/Composer/Compiler.php
|
||||
+++ b/src/Composer/Compiler.php
|
||||
@@ -260,7 +260,7 @@ private function stripWhitespace($source)
|
||||
private function getStub()
|
||||
{
|
||||
$stub = <<<'EOF'
|
||||
-#!/usr/bin/env php
|
||||
+#!@TERMUX_PREFIX@/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Composer.
|
Loading…
Reference in New Issue
Block a user