php74 をマルチスレッドに対応させたため、同一バージョンのソフトが必要になったので、portsからリビルドする事にしました。
また、リビルドした時の内容をメモ書きする事にしました。
設定①
make コマンドを使用してオプションの情報を確認する。
①.php74-extensions の格納先まで移動する。
cd /usr/ports/lang/php74-extensions
②.make コマンドを実行する。
make config
③.以下のように変更後のオプションに設定する。
■変更前
[ ] BCMATH bc style precision math functions
[ ] BZ2 bzip2 library support
[ ] CALENDAR calendar conversion support
[x] CTYPE ctype functions
[ ] CURL CURL support
[ ] DBA dba support
[x] DOM DOM support
[ ] ENCHANT Enchant spelling support
[ ] EXIF EXIF support
[ ] FILEINFO fileinfo support
[x] FILTER input filter support
[ ] FTP FTP support
[x] GD GD library support
[ ] GETTEXT gettext library support
[ ] GMP GNU MP support
[x] ICONV iconv support
[ ] IMAP IMAP support
[ ] INTL Internationalization(ICU)
[x] JSON JavaScript Object Serialization support
[ ] LDAP OpenLDAP support
[ ] MBSTRING multibyte string support
[ ] MYSQLI MySQLi database support
[ ] ODBC ODBC support
[x] OPCACHE OPcache support
[ ] OPENSSL OpenSSL support
[ ] PCNTL pcntl support (CLI only)
[ ] PDF PDFlib support (implies GD)
[x] PDO PHP Data Objects Interface (PDO)
[ ] PDO_DBLIB PDO DBLIB-DB driver
[ ] PDO_FIREBIRD PDO Firebird driver
[ ] PDO_MYSQL PDO MySQL driver
[ ] PDO_ODBC PDO ODBC driver
[ ] PDO_PGSQL PDO PostgreSQL driver
[x] PDO_SQLITE PDO sqlite driver
[ ] PGSQL PostgreSQL database support
[x] PHAR phar support
[x] POSIX POSIX-like functions
[ ] PSPELL pspell support
[ ] READLINE readline support (CLI only)
[x] SESSION session support
[ ] SHMOP shmop support
[x] SIMPLEXML simplexml support
[ ] SNMP SNMP support
[ ] SOAP SOAP support
[ ] SOCKETS sockets support
[ ] SODIUM Sodium encryption support
[x] SQLITE3 sqlite3 support
[ ] SYSVMSG System V message support
[ ] SYSVSEM System V semaphore support
[ ] SYSVSHM System V shared memory support
[ ] TIDY TIDY support
[x] TOKENIZER tokenizer support
[x] XML XML support
[x] XMLREADER XMLReader support
[ ] XMLRPC XMLRPC-EPI support
[x] XMLWRITER XMLWriter support
[ ] XSL XSL support (Implies DOM)
[ ] ZIP ZIP support
[ ] ZLIB ZLIB support
■変更後
[x] BCMATH bc style precision math functions
[x] BZ2 bzip2 library support
[x] CALENDAR calendar conversion support
[x] CTYPE ctype functions
[x] CURL CURL support
[x] DBA dba support
[x] DOM DOM support
[ ] ENCHANT Enchant spelling support
[x] EXIF EXIF support
[x] FILEINFO fileinfo support
[x] FILTER input filter support
[x] FTP FTP support
[x] GD GD library support
[x] GETTEXT gettext library support
[x] GMP GNU MP support
[x] ICONV iconv support
[x] IMAP IMAP support
[x] INTL Internationalization(ICU)
[x] JSON JavaScript Object Serialization support
[ ] LDAP OpenLDAP support
[x] MBSTRING multibyte string support
[x] MYSQLI MySQLi database support
[x] ODBC ODBC support
[x] OPCACHE OPcache support
[x] OPENSSL OpenSSL support
[x] PCNTL pcntl support (CLI only)
[ ] PDF PDFlib support (implies GD)
[x] PDO PHP Data Objects Interface (PDO)
[ ] PDO_DBLIB PDO DBLIB-DB driver
[ ] PDO_FIREBIRD PDO Firebird driver
[x] PDO_MYSQL PDO MySQL driver
[x] PDO_ODBC PDO ODBC driver
[ ] PDO_PGSQL PDO PostgreSQL driver
[x] PDO_SQLITE PDO sqlite driver
[ ] PGSQL PostgreSQL database support
[x] PHAR phar support
[x] POSIX POSIX-like functions
[ ] PSPELL pspell support
[x] READLINE readline support (CLI only)
[x] SESSION session support
[x] SHMOP shmop support
[x] SIMPLEXML simplexml support
[ ] SNMP SNMP support
[x] SOAP SOAP support
[x] SOCKETS sockets support
[ ] SODIUM Sodium encryption support
[x] SQLITE3 sqlite3 support
[x] SYSVMSG System V message support
[x] SYSVSEM System V semaphore support
[x] SYSVSHM System V shared memory support
[ ] TIDY TIDY support
[x] TOKENIZER tokenizer support
[x] XML XML support
[x] XMLREADER XMLReader support
[x] XMLRPC XMLRPC-EPI support
[x] XMLWRITER XMLWriter support
[x] XSL XSL support (Implies DOM)
[x] ZIP ZIP support
[x] ZLIB ZLIB support
④.リビルドを実行する。
make install clean
いくつか確認画面が表示するけど、全て「OK」を選択する。
リビルド後に、一時的に使用したソフトも削除できるように、clean を付与している。
⑤.以下のように、インストールが完了した事を確認する。
----------------------------------------------------------------------
Libraries have been installed in:
/usr/ports/archivers/php74-zlib/work/php-7.4.5/ext/zlib/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
===> Staging for php74-zlib-7.4.5
===> php74-zlib-7.4.5 depends on file: /usr/local/include/php/main/php.h - found
===> Generating temporary packing list
====> Compressing man pages (compress-man)
===> Installing for php74-zlib-7.4.5
===> Checking if php74-zlib is already installed
===> Registering installation for php74-zlib-7.4.5 as automatic
Installing php74-zlib-7.4.5...
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-20-zlib.ini
===> php74-extensions-1.0 depends on file: /usr/local/lib/php/20190902/zlib.so - found
===> Returning to build of php74-extensions-1.0
===> Generating temporary packing list
====> Compressing man pages (compress-man)
===> Installing for php74-extensions-1.0
===> Checking if php74-extensions is already installed
===> Registering installation for php74-extensions-1.0
Installing php74-extensions-1.0...
⑥.自動的にアップデートされないようにロックする。
pkg lock -g *php74-*
⑦.以下のように表示するので、ロック対象にYを選択する。
php74-xsl-7.4.5: lock this package? [y/N]:
php74-zip-7.4.5: lock this package? [y/N]:
php74-zlib-7.4.5: lock this package? [y/N]:
⑧.ロックされている場合は、以下のように表示する。
mod_php74-7.4.5: already locked
php74-7.4.5: already locked
php74-bcmath-7.4.5: already locked
php74-bz2-7.4.5: already locked
php74-calendar-7.4.5: already locked
php74-ctype-7.4.5: already locked
php74-curl-7.4.5: already locked
php74-dba-7.4.5: already locked
php74-dom-7.4.5: already locked
php74-exif-7.4.5: already locked
php74-extensions-1.0: already locked
php74-fileinfo-7.4.5: already locked
php74-filter-7.4.5: already locked
php74-ftp-7.4.5: already locked
php74-gd-7.4.5: already locked
php74-gettext-7.4.5: already locked
php74-gmp-7.4.5: already locked
php74-iconv-7.4.5: already locked
php74-imap-7.4.5: already locked
php74-intl-7.4.5_1: already locked
php74-json-7.4.5: already locked
php74-mbstring-7.4.5: already locked
php74-mysqli-7.4.5: already locked
php74-odbc-7.4.5: already locked
php74-opcache-7.4.5: already locked
php74-openssl-7.4.5: already locked
php74-pcntl-7.4.5: already locked
php74-pdo-7.4.5: already locked
php74-pdo_mysql-7.4.5: already locked
php74-pdo_odbc-7.4.5: already locked
php74-pdo_sqlite-7.4.5: already locked
php74-phar-7.4.5: already locked
php74-posix-7.4.5: already locked
php74-readline-7.4.5: already locked
php74-session-7.4.5: already locked
php74-shmop-7.4.5: already locked
php74-simplexml-7.4.5: already locked
php74-soap-7.4.5: already locked
php74-sockets-7.4.5: already locked
php74-sqlite3-7.4.5: already locked
php74-sysvmsg-7.4.5: already locked
php74-sysvsem-7.4.5: already locked
php74-sysvshm-7.4.5: already locked
php74-tokenizer-7.4.5: already locked
php74-xml-7.4.5: already locked
php74-xmlreader-7.4.5: already locked
php74-xmlrpc-7.4.5: already locked
php74-xmlwriter-7.4.5: already locked
php74-xsl-7.4.5: already locked
php74-zip-7.4.5: already locked
php74-zlib-7.4.5: already locked
筆者の環境では、php74に該当する内容をリビルドしているのでロックしてます。
設定②
次回から同じオプション情報でリビルドする。
①.オプション情報を確認する。
cat /usr/ports/lang/php74-extensions/Makefile
②.オプションの情報です。
BCMATH_DESC= bc style precision math functions
BZ2_DESC= bzip2 library support
CALENDAR_DESC= calendar conversion support
CTYPE_DESC= ctype functions
CURL_DESC= CURL support
DBA_DESC= dba support
DOM_DESC= DOM support
ENCHANT_DESC= Enchant spelling support
EXIF_DESC= EXIF support
FILEINFO_DESC= fileinfo support
FILTER_DESC= input filter support
FTP_DESC= FTP support
GD_DESC= GD library support
GETTEXT_DESC= gettext library support
GMP_DESC= GNU MP support
ICONV_DESC= iconv support
IMAP_DESC= IMAP support
INTL_DESC= Internationalization(ICU)
JSON_DESC= JavaScript Object Serialization support
LDAP_DESC= OpenLDAP support
MBSTRING_DESC= multibyte string support
MYSQLI_DESC= MySQLi database support
ODBC_DESC= ODBC support
OPCACHE_DESC= OPcache support
OPENSSL_DESC= OpenSSL support
PCNTL_DESC= pcntl support (CLI only)
PDF_DESC= PDFlib support (implies GD)
PDO_DESC= PHP Data Objects Interface (PDO)
PDO_DBLIB_DESC= PDO DBLIB-DB driver
PDO_FIREBIRD_DESC= PDO Firebird driver
PDO_MYSQL_DESC= PDO MySQL driver
PDO_ODBC_DESC= PDO ODBC driver
PDO_PGSQL_DESC= PDO PostgreSQL driver
PDO_SQLITE_DESC= PDO sqlite driver
PGSQL_DESC= PostgreSQL database support
PHAR_DESC= phar support
POSIX_DESC= POSIX-like functions
PSPELL_DESC= pspell support
READLINE_DESC= readline support (CLI only)
SESSION_DESC= session support
SHMOP_DESC= shmop support
SIMPLEXML_DESC= simplexml support
SNMP_DESC= SNMP support
SOAP_DESC= SOAP support
SOCKETS_DESC= sockets support
SODIUM_DESC= Sodium encryption support
SQLITE3_DESC= sqlite3 support
SYSVMSG_DESC= System V message support
SYSVSEM_DESC= System V semaphore support
SYSVSHM_DESC= System V shared memory support
TIDY_DESC= TIDY support
TOKENIZER_DESC= tokenizer support
XML_DESC= XML support
XMLREADER_DESC= XMLReader support
XMLRPC_DESC= XMLRPC-EPI support
XMLWRITER_DESC= XMLWriter support
XSL_DESC= XSL support (Implies DOM)
ZIP_DESC= ZIP support
ZLIB_DESC= ZLIB support
③.pkgtools.conf を修正する。
vi /usr/local/etc/pkgtools.conf
④.MAKE_ARGS の部分に以下の内容を記入する。
'lang/php74-extensions' => [
'CTYPE_DESC=yes',
'BCMATH_DESC=yes',
'BZ2_DESC=yes',
'CALENDAR_DESC=yes',
'CTYPE_DESC=yes',
'CURL_DESC=yes',
'DBA_DESC=yes',
'DOM_DESC=yes',
'EXIF_DESC=yes',
'FILEINFO_DESC=yes',
'FILTER_DESC=yes',
'FTP_DESC=yes',
'GD_DESC=yes',
'GETTEXT_DESC=yes',
'GMP_DESC=yes',
'ICONV_DESC=yes',
'IMAP_DESC=yes',
'INTL_DESC=yes',
'JSON_DESC=yes',
'MBSTRING_DESC=yes',
'MYSQLI_DESC=yes',
'ODBC_DESC=yes',
'OPCACHE_DESC=yes',
'OPENSSL_DESC=yes',
'PCNTL_DESC=yes',
'PDO_DESC=yes',
'PDO_MYSQL_DESC=yes',
'PDO_ODBC_DESC=yes',
'PDO_SQLITE_DESC=yes',
'PHAR_DESC=yes',
'POSIX_DESC=yes',
'READLINE_DESC=yes',
'SESSION_DESC=yes',
'SHMOP_DESC=yes',
'SIMPLEXML_DESC=yes',
'SOAP_DESC=yes',
'SOCKETS_DESC=yes',
'SQLITE3_DESC=yes',
'SYSVMSG_DESC=yes',
'SYSVSEM_DESC=yes',
'SYSVSHM_DESC=yes',
'TOKENIZER_DESC=yes',
'XML_DESC=yes',
'XMLREADER_DESC=yes',
'XMLRPC_DESC=yes',
'XMLWRITER_DESC=yes',
'XSL_DESC=yes',
'ZIP_DESC=yes',
'ZLIB_DESC=yes',
],
⑤.リビルドを実行する。
portinstall php74-extensions
補足情報
①.ロックを解除する方法
pkg unlock ソフト名
②.make オプションを初期化する方法
make rmconfig
③.make からインストールしたソフトを削除する方法
cd /usr/ports/lang/php74-extensions/
make deinstall
pkg autoremove