From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2127.outbound.protection.outlook.com [40.107.93.127]) by sourceware.org (Postfix) with ESMTPS id C7785388E839 for ; Tue, 21 Jul 2020 21:24:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C7785388E839 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pf9reas3Y6+M5GrZgGg34aCuH7L/lfKXMsUOHjsnnKgUH3pEFl+rMbvW6CtMdpLmhNn8QYZFnUUixLj3K2zvyt7UP+qGmX3n4+Wf42ED7FK50MJx7/l3gY24fE90QJ2VcJd39b/TKkXK6WmCbvn4KQQ02CVOGYTJS1FeiUlNPlH5EGcWMH9HKiVI8QVEjJEErWTFZxsQhbWzAHlZ4w5/Begt/gdlocsO2ypsxbiV6c4m1CdR+Rmu9rVR85/ksBwBOdoSgaHLY+0he+FuhyAOJURGrgBoufl526Qq6Dw1OXt+rX2H29pCW2/RTk6f8JvdjCYRY+eyt8AGj/Waym0Qqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e3DlHzfv7VeWTV5iajEqFWvKH0YhCT6HA4k6zoNuoD8=; b=QB43uFKakGYCBmCUU7m7d82UiFhLVtdSpikAm56H6ckdCtl1C+nsG7fQ4sLv5S7QO5IKCqYntIq5O23XbW6aoY7VP9G8pDxyz+yTZR5I0FLkz8QC3RdOuERnSnHjnxqsvXQx7UflyefCxEAmqpPR90NfaNxNQ9fMOxUhW+sEnagkcOrtd33FAiIAuXvFphRR1uYX8E3kuBxEytHTQJpmmN3gpQ0yzzG0yPNyWTcwBTjUrrkFI44m0B/YQn6f2tjvvH1mc2+pTjjrUQklhq1FaIP0xj9pubk5OePTX8MI+Di5Pf6aLFAi5Eb4eeC68BXRcpaKX3r73X530aEfDX65wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Received: from MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) by MN2PR04MB5934.namprd04.prod.outlook.com (2603:10b6:208:fd::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21; Tue, 21 Jul 2020 21:24:52 +0000 Received: from MN2PR04MB6176.namprd04.prod.outlook.com ([fe80::184d:a265:1d48:499a]) by MN2PR04MB6176.namprd04.prod.outlook.com ([fe80::184d:a265:1d48:499a%7]) with mapi id 15.20.3195.025; Tue, 21 Jul 2020 21:24:52 +0000 To: cygwin-apps Cc: km2z7kca0oge@opayq.com From: Ken Brown Subject: Fix for php Message-ID: Date: Tue, 21 Jul 2020 17:24:48 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Content-Type: multipart/mixed; boundary="------------E98964D9DB4CCBA9723E7AC2" Content-Language: en-US X-ClientProxiedBy: BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2604:6000:b407:7f00:ad12:1782:80ed:dfca] (2604:6000:b407:7f00:ad12:1782:80ed:dfca) by BL0PR0102CA0069.prod.exchangelabs.com (2603:10b6:208:25::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Tue, 21 Jul 2020 21:24:51 +0000 X-Originating-IP: [2604:6000:b407:7f00:ad12:1782:80ed:dfca] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67829297-8253-4e62-cb00-08d82dbc8117 X-MS-TrafficTypeDiagnostic: MN2PR04MB5934: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7i765XRIL5X0k2baxTy0e6RkPnEOPXqCEu44KmckmWcztL7KpJMdzCODJUVlDDpOWguEs0K1m+WSMz3jwZpu1GT7LlcmIm/ve5jTiMqo1FYuy158xy5OQ+qKoXyX4AkYvzECYGZfrNsxBUfPjZvSohPVCgJNGul4UafhtyWGcF/AsMkll4do8zPow7rMVEdwMPX3Rus7kNoEtr7TLTaFpruqGJjpcYmbSWadD24+Dmc5cemeKS9cYvTxhY49L3cI4UHGndBinDz7kz6V7YHJuV2m0cN3e8H1UCFasDIOHhd2lRFwFf9T7HRLB/5n70AQL35QeXY2i+eEeG7OQaqmK1FBS0CUnc5LprfHXsw9EMSsjjSB14oMNS2pEovdiVuX2cs0L0hZRCSSI8+GxmtxTXV8h9/xwOxZZt8YjX/UcVQkzSdUa262/F+iAuLsmIsNeO2WF1EjYeO0BmE601GCXw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(376002)(396003)(346002)(136003)(83380400001)(186003)(16526019)(966005)(3480700007)(478600001)(235185007)(52116002)(33964004)(786003)(316002)(2906002)(6486002)(6916009)(5660300002)(31686004)(86362001)(31696002)(75432002)(66556008)(66476007)(36756003)(66576008)(66946007)(4326008)(7116003)(6666004)(8936002)(8676002)(2616005)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: t0SYRUSb5Fwr040wOYwO4yboI+zM7G9UtNFaWyygwv1fFWOmzPnpn+f34z9Z6n2bZPr4QNUNvWKfUHof4kYsTtjWFLr2RKyn80oIo6fHcyiu5LDmJMHvdwIyqxSazhz7xPjoXB9u8vkk1f6Q1Vw721/i3Me71TsYvbrkjw2n44Pc7phEK6nuVdivnIILivpsPH/vTpdeYRsGtbIe7WLZYhmgp0tOi114Tyf0xaGh/WUkGAAbplH+UOKJVulG9zgnG7u5eiCvI9ejiF7q46Eg31+ZAgH5Gv6cjqOas3eNKmOS5cGqy186jRM2NOwMAvBBPMq0kzSKUqpG7YWoVOxf8Vj4dbk3UeluEbN5zmpY6ZktAYikGHq953QPUnWpgsgCN1/KFl9ZuQ55nguMkzsU7gLos9k0sp7YPXFYnSNKysTQA8x4uchPWasw5YDm5yI2w9g+HU+1ybFesQQe57nTG31pHKwMeSrjWpxzVrXucVHDz+pZZDFc9ztj2YCfxyqTajCu5kVEcomajOQRm+3osfhNWpJ8MD5CO7RV4/yM9EQ= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 67829297-8253-4e62-cb00-08d82dbc8117 X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2020 21:24:51.9454 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7m6NQ1jsGd1YaOEMO6oDCd3uIVn19q7Hq28Z59dhl4DGZJb6BZahIThXvzX+zQ7lSupBteYTgxgbB48csi4MwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5934 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, LIKELY_SPAM_BODY, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 21:24:57 -0000 --------------E98964D9DB4CCBA9723E7AC2 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit This is a follow-up to https://sourceware.org/pipermail/cygwin/2020-July/245623.html As I explained there, a patch applied to the Cygwin build causes php to often call mmap with MAP_FIXED, and some of these calls fail. Removing the relevant hunk of the patch fixes the reported problem, and I don't see any reason why that hunk should be needed. Obviously Yaakov had a reason for applying that hunk, and I'm guessing (hoping) that the reason is no longer applicable. Ideally, someone should ITA php and deal with this. That person will not be me. I don't use php and I know nothing about it. If no one steps forward, I would be willing to do a one-time non-maintainer upload. I'm attaching the revised patch and a revised cygport file. (It's Yaakov's cygport file, modified to account for the patch change, with a BUILD_REQUIRES added.) Ken --------------E98964D9DB4CCBA9723E7AC2 Content-Type: text/plain; charset=UTF-8; name="php.cygport" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="php.cygport" inherit httpd NAME="php" VERSION=7.3.7 RELEASE=2 CATEGORY="PHP" SUMMARY="PHP Hypertext Preprocessor" DESCRIPTION="PHP (recursive acronym for 'PHP: Hypertext Preprocessor') is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML." HOMEPAGE="http://www.php.net/" SRC_URI="http://www.php.net/distributions/php-${VERSION}.tar.xz" SRC_URI+=" template-builtin.reg template-ext.reg php-fpm.init" PATCH_URI=" fedora/php-7.2.0-includedir.patch fedora/php-5.3.0-recode.patch fedora/php-7.2.0-libdb.patch fedora/php-7.3.3-systzdata-v18.patch fedora/php-7.2.3-ldap_r.patch fedora/php-7.3.0-phpize.patch fedora/php-5.6.3-phpinfo.patch fedora/php-5.6.3-datetests.patch fedora/php-7.2.4-fixheader.patch 7.0.13-cygwin-build.patch 7.2.4-curl-ssl.patch 5.3.4-dba-gdbm_compat.patch 5.4.10-imap-cygwin.patch 7.2.5-intl-libstdc.patch 7.2.5-intl-icu61.patch 7.2.5-mbstring-onig.patch 5.3.4-pspell-libpspell.patch 5.3.10-sybase-cygwin.patch 7.3.3-posix-ttyname_r.patch 7.3.3-configure-implicit-decls.patch 5.4.20-libmbfl-implicit-decls.patch 5.6.6-fix-libtoolize.patch 5.6.9-apache2handler-zts.patch 7.0.17-pcre-jit-off.patch 7.3.7-malloc-cygwin.patch 7.2.4-zip-pcre.patch " # From https://sourceware.org/pipermail/cygwin/2017-May/232903.html, # with some additions/corrections. BUILD_REQUIRES=" \ httpd-devel \ libGL-devel \ libLASi-devel \ libapr1-devel \ libaprutil1-devel \ libargon2-devel \ libaspell-devel \ libattr-devel \ libc-client-devel \ libcroco0.6-devel \ libcurl-devel \ libedit-devel \ libenchant-devel \ libfam-devel \ libffi-devel \ libgd-devel \ libgdbm-devel \ libgnutls-devel \ libgs-devel \ libgtk2.0-devel \ libgts-devel \ libguile1.8-devel \ libguile2.0-devel \ libgvc-devel \ libhunspell-devel \ libicu-devel \ libidn2-devel \ libisl-devel \ libjasper-devel \ libkrb5-devel \ liblcms-devel \ liblmdb-devel \ libllvm-devel \ liblzo2-devel \ libmcrypt-devel \ libming-devel \ libmpc-devel \ libmpfr-devel \ libnghttp2-devel \ libnss-devel \ libonig-devel \ libopenjp2-devel \ libopenjpeg-devel \ libpcre2-devel \ libpng12-devel \ libpoppler-devel \ libpq-devel \ libpsl-devel \ libreadline-devel \ librsvg2-devel \ libsigsegv-devel \ libsodium-devel \ libsqlite3-devel \ libssh2-devel \ libsybdb-devel \ libthai-devel \ libtidy-devel \ libtxc_dxtn-devel \ libunistring-devel \ libvoikko-devel \ libwebp-devel \ libxslt-devel \ libzip-devel \ recode \ " DIFF_EXCLUDES="aclocal.m4 configure generated_lists libtool.m4 lt*.m4 ltmain.sh php_config.h.in php_version.h tests zend_ini_parser.*" # EXTENSIONS: # # The following modules are deps for others, and hence MUST be builtin: # date: intl # dom: xmlreader # filter, hash, spl: (mandatory built-in) # hash: phar, session # libxml: dom, simplexml, soap, xml, xmlreader, xsl # mysqlnd: mysqli, pdo_mysql (if configured to use mysqlnd) # openssl: phar # pcre: filter, opcache, spl, zip # pdo: pdo_* # readline: phpdbg # session: hash, soap, wddx, memcache (PECL) # xml: xmlrpc # location of php.ini files inidir=/etc/php.d # required for all configure runs common_args=" --cache-file=../config.cache --libdir=/usr/lib/php --datadir=/usr/share/php --disable-static --disable-rpath --with-config-file-path=/etc --with-config-file-scan-dir=${inidir} --with-layout=GNU --with-system-tzdata --enable-dom=yes --enable-filter=yes --enable-hash=yes --with-mhash --enable-libxml=yes --with-openssl=yes --with-system-ciphers --enable-pdo=yes --with-readline=no --with-libedit=yes --enable-session=yes --enable-xml=yes --with-password-argon2=/usr --with-libxml-dir=/usr --with-openssl-dir=/usr --with-pcre-dir=/usr --with-pcre-regex=/usr ac_cv_func_ttyname_r_works=yes " cli_args=" --without-pear --enable-bcmath=shared --with-bz2=shared,/usr --enable-calendar=shared --enable-ctype=shared --with-curl=shared,/usr --enable-dba=shared --with-gdbm=/usr --with-ndbm=/usr --with-db4=/usr --with-dbm=/usr --with-lmdb=/usr --with-cdb --enable-inifile --enable-flatfile --with-enchant=shared,/usr --enable-exif=shared --enable-fileinfo=shared --enable-ftp=shared --with-gd=shared,/usr --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-gettext=shared --with-gmp=shared,/usr --with-iconv=shared,/usr --with-imap=shared,/usr --with-kerberos=yes --with-imap-ssl=yes --with-interbase=no --enable-json=shared --with-ldap=shared,/usr --with-ldap-sasl=/usr --enable-intl=shared --with-icu-dir=/usr --enable-mbstring=shared --with-onig=/usr --enable-mbregex=yes --enable-mbregex_backtrack=yes --with-mysql-sock=/var/run/mysql.sock --with-mysqli=shared,mysqlnd --enable-embedded_mysqli=no --with-oci8=no --with-adabas=no --with-sapdb=no --with-solid=no --with-ibm-db2=no --with-ODBCRouter=no --with-empress=no --with-empress-bcs=no --with-birdstep=no --with-custom-odbc=no --with-iodbc=shared,/usr --with-esoob=no --with-unixODBC=no --with-dbmaker=no --enable-opcache=shared --enable-pcntl=no --with-pdo-dblib=shared,/usr --with-pdo-firebird=no --with-pdo-mysql=shared,mysqlnd --with-pdo-oci=no --with-pdo-odbc=shared,iodbc,/usr --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr --with-pgsql=shared,/usr --enable-phar=shared --enable-posix=shared --with-pspell=shared,/usr --with-recode=shared,/usr --with-mm=no --enable-shmop=shared --enable-simplexml=shared --with-snmp=no --enable-soap=shared --with-sodium=shared,/usr --with-sqlite3=shared,/usr --enable-sockets=shared --enable-sysvmsg=shared --enable-sysvsem=shared --enable-sysvshm=shared --with-tidy=shared,/usr --enable-tokenizer=shared --enable-wddx=shared --enable-xmlreader=shared --with-xmlrpc=shared --with-iconv-dir=/usr --enable-xmlwriter=shared --with-xsl=shared,/usr --enable-zip=shared --with-libzip=/usr --with-zlib=shared " # packaging # PKG_NAMES="${NAME} ${NAME}-devel httpd-mod_php${VERSION%%.*}" php_CATEGORY="Interpreters PHP" # previously shared extensions moved into core, or obsolete php_OBSOLETES="php-mcrypt php-readline php-session" php_CONTENTS=" --exclude=${inidir#/}/*.ini etc/defaults${HTTPD_SYSCONFDIR}/php7.conf etc/defaults/etc/php* ${inidir#/} etc/p*/php.sh etc/rc.d/init.d/php-fpm usr/bin/cygphp7-*.dll usr/bin/php.exe usr/bin/php-cgi.exe usr/bin/phpdbg.exe usr/sbin/php-fpm.exe usr/share/doc/php/ usr/share/man/man1/php.1* usr/share/man/man1/php-cgi.1* usr/share/man/man1/phpdbg.1* usr/share/man/man8/php-fpm.8* usr/share/php/ usr/share/doc/pear/filter/CREDITS usr/share/doc/pear/hash/CREDITS usr/share/doc/pear/pdo/CREDITS usr/share/doc/pear/readline/CREDITS usr/share/doc/pear/session/CREDITS var/lib/pear/.registry/.channel.*/filter.reg var/lib/pear/.registry/.channel.*/hash.reg var/lib/pear/.registry/.channel.*/pdo.reg var/lib/pear/.registry/.channel.*/readline.reg var/lib/pear/.registry/.channel.*/session.reg var/lib/rebase/dynpath.d/php " php_devel_CATEGORY=${php_CATEGORY} php_devel_REQUIRES="autoconf gcc-core make" php_devel_CONTENTS=" usr/bin/php-config usr/bin/phpize usr/include/php/ usr/lib/libphp7.dll.a usr/lib/php/build/ usr/share/man/man1/php-config.* usr/share/man/man1/phpize.* " httpd_mod_php7_OBSOLETES="httpd-mod_php5" httpd_mod_php7_CONTENTS="${HTTPD_SYSCONFMODULESDIR#/} ${HTTPD_LIBEXECDIR#/}" httpd_mod_php7_SUMMARY="Embedded PHP for Apache HTTP Server" # This method provides 50+ modules, so better automate this: for ext in $(echo ${cli_args} | sed -e 's# #\n#g' | grep shared \ | sed -e 's#^--[a-z]*-##g' -e 's#=.*##g' -e 's#-#_#g' -e 's#[a-z]*odbc#odbc#') do PKG_NAMES+=" php-${ext}" declare php_${ext}_CONTENTS="${inidir#/}/${ext}.ini usr/lib/php/*/${ext}.dll usr/share/doc/pear/${ext}/ var/lib/pear/.registry/.channel.*/${ext}.reg" declare php_${ext}_SUMMARY="PHP ${ext} extension" done unset ext php_phar_CONTENTS+=" usr/bin/phar* usr/share/man/man1/phar*" # obsoleted by php7 php_debuginfo_OBSOLETES="php-jsonc-debuginfo" php_json_OBSOLETES="php-jsonc" php_mysqli_OBSOLETES="php-mysql" php_pdo_dblib_OBSOLETES="php-mssql php-sybase_ct" src_compile() { cd ${S} # # autotoolize # rm -f build/libtool.m4 libtoolize --copy --force || error "libtoolize failed" cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/lt{options,sugar,version,~obsolete}.m4 > build/libtool.m4 cygmake -j1 -B -f build/build.mk ZENDDIR="Zend" # these are shipped and used by phpize gnuconfigize . # Hack to work around configure adding to hard-coded include_path # only when bundled PEAR is enabled (we package it separately) export PEAR_INSTALLDIR=/usr/share/pear # # build runtime and executable SAPIs (CLI, CGI, FPM) # mkdir -p ${B}/embed cd ${B}/embed CYGCONF_SOURCE="${S}" cygconf ${common_args} ${cli_args} \ --enable-cgi --enable-cli \ --enable-fpm --with-fpm-acl \ --enable-embed --enable-phpdbg sed -e '/^LTCFLAGS=/d' -i libtool sed -e 's/ -lphp7 / libphp7.la /g' -i Makefile # first make the common sources library # enabling zip with system libzip somehow clobbers -lpcre cygmake libphp${VERSION%%.*}.la \ EXTRA_LDFLAGS="-release ${VERSION%.*} -avoid-version -module -no-undefined -lpcre2-8" sed -e 's#link=yes#link=no#' -i libphp${VERSION%%.*}.la # then make everything else # c-client is static only so we need to circumvent libtool to link cygmake -j1 \ IMAP_SHARED_LIBADD='-Wl,-lc-client,-lssl,-lcrypto,-lgssapi_krb5,-lkrb5' \ PHP_GLOBAL_OBJS='' \ ZEND_EXTRA_LIBS="${B}/embed/libphp${VERSION%%.*}.la" # # Apache2 mod_php7 SAPI # mkdir -p ${B}/apache2 cd ${B}/apache2 CYGCONF_SOURCE="${S}" cygconf \ --disable-all --disable-cli --with-apxs2=${HTTPD_APXS} ${common_args} # the -a flag adds the module to httpd.conf sed -e 's#-prefer-non-pic -static##g' \ -e 's#-prefer-pic##g' \ -e 's#-i -a -n#-i -n#g' \ -i Makefile # HTTPD expects mods to have .so suffix on all platforms cygmake libphp${VERSION%%.*}.la \ PHP_GLOBAL_OBJS='' \ ZEND_EXTRA_LIBS="${B}/embed/libphp${VERSION%%.*}.la" } src_test() { export PATH="${B}/embed/.libs:$PATH" cd ${B}/embed cygmake -j1 test } src_install() { local n sapi x xdir # install the Apache SAPI cd ${B}/apache2 cygmake -j1 install-sapi INSTALL_ROOT=${D} PHP_GLOBAL_OBJS='' # install the other SAPIs, build environment, and everything else cd ${B}/embed cygmake -j1 install INSTALL_ROOT=${D} INSTALL_IT= # install the shared lib (normally done by INSTALL_IT) dobin libs/cygphp7-*.dll dolib libs/libphp7.dll.a # install the real executables, not the libtool stubs cd ${B} dobin embed/sapi/[cp]*/*.exe dosbin embed/sapi/fpm/php-fpm.exe # sanitize php-config sed -e "s#^libs=.*#libs=\"-lphp${VERSION%%.*}\"#" \ -e 's#^php_sapis=.*#php_sapis="cli cgi embed fpm apache2handler"#' \ -i ${D}/usr/bin/php-config # provide default php.ini insinto /etc newins ${S}/php.ini-production php.ini make_etc_defaults /etc/php.ini mv ${D}/etc/php-fpm.conf{.default,} mv ${D}/etc/php-fpm.d/www.conf{.default,} make_etc_defaults /etc/php-fpm.{conf,d} exeinto /etc/rc.d/init.d newexe ${S}/php-fpm.init php-fpm # add .ini files for each extension, so that it's loaded once installed local date=$(date +%F) local time=$(date +%T) local timestamp=$(date +%s) local regdir=/var/lib/pear/.registry/.channel.pecl.php.net local xdir=$(${D}/usr/bin/php-config --extension-dir) local dll ext docdir path_len summary_len p keepdir ${inidir} dodir ${regdir} for x in ${D}${xdir}/*.dll do dll=${x##*/} ext=${dll%.dll} docdir=/usr/share/doc/pear/${ext} doc_len=$((${#docdir} + 8)) # /CREDITS path_len=$((${#xdir} + ${#dll} + 1)) summary_len=$((${#ext} + 14)) # PHP ___ extension # create .ini file for automatic extension loading if $(${OBJDUMP} -p ${x} | grep -q zend_startup_module) then echo "zend_extension = ${xdir}/${dll}" >> ${D}${inidir}/${ext}.ini else echo "extension = ${dll}" >> ${D}${inidir}/${ext}.ini fi # register extension with pecl to prevent accidental # installation of obsolete versions insinto ${docdir} touch ${S}/ext/${ext}/CREDITS doins ${S}/ext/${ext}/CREDITS sed -e "s,@DATE@,${date},g; s,@DOCDIR@,${docdir},g; s,@DOC_LEN@,${doc_len},g; s,@DLL@,${dll},g; s,@DLL_LEN@,${#dll},g; s,@EXT@,${ext},g; s,@EXT_LEN@,${#ext},g; s,@PATH@,${xdir}/${dll},g; s,@PATH_LEN@,${path_len},g; s,@SUMMARY_LEN@,${summary_len},g; s,@TIME@,${time},g; s,@VERSION@,${VERSION},g; s,@VERSION_LEN@,${#VERSION},g; s,@TIMESTAMP@,${timestamp}," \ ${S}/template-ext.reg > ${D}${regdir}/${ext}.reg done # builtin extensions # when adding, be sure to update php_CONTENTS for ext in filter hash pdo readline session do docdir=/usr/share/doc/pear/${ext} doc_len=$((${#docdir} + 8)) # /CREDITS summary_len=$((${#ext} + 22)) # PHP ___ builtin extension # register extension with pecl to prevent accidental # installation of obsolete versions insinto ${docdir} doins ${S}/ext/${ext}/CREDITS sed -e "s,@DATE@,${date},g; s,@DOCDIR@,${docdir},g; s,@DOC_LEN@,${doc_len},g; s,@EXT@,${ext},g; s,@EXT_LEN@,${#ext},g; s,@SUMMARY_LEN@,${summary_len},g; s,@TIME@,${time},g; s,@VERSION@,${VERSION},g; s,@VERSION_LEN@,${#VERSION},g; s,@TIMESTAMP@,${timestamp}," \ ${S}/template-builtin.reg > ${D}${regdir}/${ext}.reg done dodir ${HTTPD_SYSCONFMODULESDIR} cat > ${D}${HTTPD_SYSCONFMODULESDIR}/mod_php7.conf <<_EOF # mod_php7 is not thread-safe LoadModule php7_module modules/libphp7.so _EOF # Add httpd.conf snippet dodir ${HTTPD_SYSCONFDIR} cat > ${D}${HTTPD_SYSCONFDIR}/php7.conf <<_EOF AddType text/html .php DirectoryIndex index.php SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source # if using a thread-safe MPM, or mod_php7 is not installed, use php-fpm instead # requires: mod_proxy, mod_proxy_fcgi # value depends on /etc/php-fpm.conf:listen=; this is the default SetHandler "proxy:fcgi://localhost:9000" _EOF make_etc_defaults ${HTTPD_SYSCONFDIR}/php7.conf dodir /var/lib/rebase/dynpath.d echo $(${D}/usr/bin/php-config --extension-dir) > ${D}/var/lib/rebase/dynpath.d/php } --------------E98964D9DB4CCBA9723E7AC2 Content-Type: text/plain; charset=UTF-8; name="7.3.7-malloc-cygwin.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="7.3.7-malloc-cygwin.patch" https://cygwin.com/ml/cygwin/2017-05/msg00350.html --- origsrc/php-7.1.13/Zend/zend_stream.c 2018-01-02 20:32:22.000000000 -0600 +++ src/php-7.1.13/Zend/zend_stream.c 2018-01-09 01:42:30.871472500 -0600 @@ -29,7 +29,9 @@ #if HAVE_MMAP # if HAVE_UNISTD_H # include -# if defined(_SC_PAGESIZE) +# if defined(__CYGWIN__) +# define REAL_PAGE_SIZE 4096 +# elif defined(_SC_PAGESIZE) # define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE); # elif defined(_SC_PAGE_SIZE) # define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE); --- origsrc/php-7.1.13/main/main.c 2018-01-02 20:32:22.000000000 -0600 +++ src/php-7.1.13/main/main.c 2018-01-09 01:42:57.670125500 -0600 @@ -97,7 +97,9 @@ #if HAVE_MMAP || defined(PHP_WIN32) # if HAVE_UNISTD_H # include -# if defined(_SC_PAGESIZE) +# if defined(__CYGWIN__) +# define REAL_PAGE_SIZE 4096 +# elif defined(_SC_PAGESIZE) # define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE); # elif defined(_SC_PAGE_SIZE) # define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE); --------------E98964D9DB4CCBA9723E7AC2--