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:
Leonid Pliushch 2020-12-10 22:57:24 +02:00
parent eefc5ed680
commit 6de7b2d141
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 15 additions and 0 deletions

View File

@ -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

View 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.