pkg(php-8.0.2): switch to new build system

This commit is contained in:
Thomas Hobson 2021-03-06 01:35:35 +13:00
parent a0e7d1b736
commit 083793ee43
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
7 changed files with 32 additions and 27 deletions

20
packages/php-8.0.2/build.sh vendored Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p build/tmp build/php
cd build
curl "https://www.php.net/distributions/php-8.0.2.tar.gz" -o php.tar.gz
tar xzf php.tar.gz --strip-components=1 -C php
cd php
./configure --prefix /piston/packages/php/8.0.2/php-8.0.2
make -j$(nproc)
INSTALL_ROOT=build/tmp make install -j$(nproc)
mv build/tmp/piston/packages/php/8.0.2/php-8.0.2 ../../output

1
packages/php-8.0.2/environment vendored Normal file
View File

@ -0,0 +1 @@
export PATH=$PWD/bin:$PATH

7
packages/php-8.0.2/metadata.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"language": "php",
"version": "8.0.2",
"author": "Martin Kos <martinkos007@gmail.com>",
"dependencies": {},
"aliases": ["php8","html"]
}

3
packages/php-8.0.2/run vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
php $*

1
packages/php-8.0.2/test.php vendored Normal file
View File

@ -0,0 +1 @@
OK

View File

@ -1,24 +0,0 @@
NAME=php
AUTHOR=Martin Kos <martinkos007@gmail.com>
DEPENDENCIES=
COMPILED=false
VERSIONS=7.4.15 8.0.2
include common.mk
${RUN_FILE}:
echo 'php $$*' > $@
${ENV_FILE}:
echo 'export PATH=$$PWD/bin:$$PATH' > $@
${BIN_DIR}: ${BUILD_DIR}php-${VERSION}-sources/
$(eval TMP_DIR=${PWD}/${BUILD_DIR}tmpout)
cd $< && ./configure --prefix ${PREFIX}
$(MAKE) -C $<
INSTALL_ROOT=${TMP_DIR}/ $(MAKE) -C $< install
mv ${TMP_DIR}${PREFIX} ${BIN_DIR} && rm -r ${TMP_DIR}
${BUILD_DIR}php-${VERSION}-sources.tar.gz:
curl "https://www.php.net/distributions/php-${VERSION}.tar.gz" -o $@

View File

@ -1,3 +0,0 @@
<?php
echo "OK";
?>