-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use DDEV_PHP_VERSION env variable instead of statically requiring php…
… 8.1
- Loading branch information
Showing
4 changed files
with
19 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
name: php-geos | ||
|
||
pre_install_actions: | ||
- | | ||
#ddev-nodisplay | ||
#ddev-description:Check php version | ||
if [ ${DDEV_PHP_VERSION} != "8.1" ]; then | ||
echo "Currently this add-on only supports PHP 8.1."; | ||
exit 1; | ||
fi | ||
project_files: | ||
- web-build/Dockerfile.php-geos | ||
- php/geos.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#ddev-generated | ||
[PHP] | ||
extension=geos.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
#ddev-generated | ||
# Build and install the GEOS PHP extension. | ||
# See https://git.osgeo.org/gitea/geos/php-geos | ||
RUN apt-get update && apt-get install -y php8.1-dev libgeos-dev \ | ||
&& git clone https://github.com/libgeos/php-geos \ | ||
&& ( \ | ||
cd php-geos \ | ||
RUN set -eux ;\ | ||
apt-get update ;\ | ||
apt-get install -y php${DDEV_PHP_VERSION}-dev libgeos-dev ;\ | ||
# Use github mirror for cloning. | ||
git clone https://github.com/libgeos/php-geos ;\ | ||
# Build the extension. | ||
( \ | ||
cd php-geos ;\ | ||
# Checkout latest commit with PHP 8 support. | ||
&& git checkout e77d5a16abbf89a59d947d1fe49381a944762c9d \ | ||
&& ./autogen.sh \ | ||
&& ./configure \ | ||
&& make \ | ||
&& make install \ | ||
) \ | ||
&& rm -r php-geos | ||
git checkout e77d5a16abbf89a59d947d1fe49381a944762c9d ;\ | ||
./autogen.sh ;\ | ||
./configure ;\ | ||
make ;\ | ||
make install ;\ | ||
) ;\ | ||
# Cleanup after build. | ||
rm -r php-geos ;\ | ||
apt-get purge -y php${DDEV_PHP_VERSION}-dev |