Skip to content

Commit

Permalink
Merge pull request #89 from devilbox/release-0.69
Browse files Browse the repository at this point in the history
Add FFI (Foreign Function Interface) to PHP 7.4
  • Loading branch information
cytopia authored Jan 11, 2019
2 parents 6cd2ef4 + b1d4c97 commit eefda31
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Dockerfiles/mods/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ENV BUILD_DEPS \
libenchant-dev \
libevent-dev \
libfbclient2 \
libffi-dev \
libfreetype6-dev \
libgmp-dev \
libhiredis-dev \
Expand Down Expand Up @@ -65,6 +66,7 @@ ENV RUN_DEPS \
libc-client2007e \
libenchant1c2a \
libfbclient2 \
libffi6 \
libfreetype6 \
libhiredis0.13 \
libicu57 \
Expand Down Expand Up @@ -126,6 +128,20 @@ RUN set -x \
&& (rm -rf /usr/local/lib/php/test/exif || true) \
&& (rm -rf /usr/local/lib/php/doc/exif || true) \
\
# ---- Installing PHP Extension: ffi ----
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \
&& cd /tmp/ffi \
&& curl -sS -O https://github.com/fpoirotte/php-ffi/commit/734630fe3d2e3efd343d3f3636b58446abd9c941.diff \
&& git apply 734630fe3d2e3efd343d3f3636b58446abd9c941.diff \
&& phpize \
&& ./configure --with-ffi \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
&& docker-php-ext-enable ffi \
&& (rm -rf /usr/local/lib/php/test/ffi || true) \
&& (rm -rf /usr/local/lib/php/doc/ffi || true) \
\
# ---- Installing PHP Extension: gd ----
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \
Expand Down Expand Up @@ -444,6 +460,8 @@ RUN set -x \
&& php-fpm -m | grep -oiE '^enchant$' \
&& php -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^ffi$' \
&& php-fpm -m | grep -oiE '^ffi$' \
&& php -m | grep -oiE '^fileinfo$' \
&& php-fpm -m | grep -oiE '^fileinfo$' \
&& php -m | grep -oiE '^filter$' \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>7.4</th>
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
</tbody>
</table>
Expand Down
15 changes: 15 additions & 0 deletions build/ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ extensions_enabled:
- dom
- enchant
- exif
- ffi
- fileinfo
- filter
- ftp
Expand Down Expand Up @@ -896,6 +897,20 @@ extensions_available:
exif:
all:
type: builtin
ffi:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3]
all:
type: git
git_url: https://github.com/dstogov/php-ffi
command: |
curl -sS -O https://github.com/fpoirotte/php-ffi/commit/734630fe3d2e3efd343d3f3636b58446abd9c941.diff \
&& git apply 734630fe3d2e3efd343d3f3636b58446abd9c941.diff \
&& phpize \
&& ./configure --with-ffi \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
build_dep: [libffi-dev]
run_dep: [libffi6]
fileinfo:
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
5.2:
Expand Down

0 comments on commit eefda31

Please sign in to comment.