Add php_source_install_gmp_path variable for better cross-distro/platform support.

This commit is contained in:
Jeff Geerling 2015-10-02 12:49:11 -05:00
parent 0ac0bb2b3b
commit 213914d5df
3 changed files with 6 additions and 2 deletions

View File

@ -137,8 +137,9 @@ The version of PHP to install from source (a git branch, tag, or commit hash).
php_source_clone_dir: "~/php-src" php_source_clone_dir: "~/php-src"
php_source_install_path: "/opt/php" php_source_install_path: "/opt/php"
php_source_install_gmp_path: "/usr/include/x86_64-linux-gnu/gmp.h"
Location where source will be cloned and installed, respectively. Location where source will be cloned and installed, and the location of the GMP header file (which can be platform/distribution specific).
php_source_make_command: "make" php_source_make_command: "make"

View File

@ -57,6 +57,7 @@ php_install_from_source: false
php_source_version: "master" php_source_version: "master"
php_source_clone_dir: "~/php-src" php_source_clone_dir: "~/php-src"
php_source_install_path: "/opt/php" php_source_install_path: "/opt/php"
php_source_install_gmp_path: "/usr/include/x86_64-linux-gnu/gmp.h"
# For faster compile time: "make --jobs=X" where X is # of cores present. # For faster compile time: "make --jobs=X" where X is # of cores present.
php_source_make_command: "make" php_source_make_command: "make"
php_source_configure_command: > php_source_configure_command: >

View File

@ -45,9 +45,11 @@
stat: path=/usr/include/gmp.h stat: path=/usr/include/gmp.h
register: gmp_file register: gmp_file
- name: Ensure gmp.h is symlinked into a location accessible to gcc. - name: Ensure gmp.h is symlinked into a location accessible to gcc.
file: file:
src: /usr/include/x86_64-linux-gnu/gmp.h src: "{{ php_source_install_gmp_path }}"
dest: /usr/include/gmp.h dest: /usr/include/gmp.h
state: link state: link
when: gmp_file.stat.exists == false when: gmp_file.stat.exists == false