1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
# $Id$
# Original: Maintainer: Pierre Schmitz <pierre@archlinux.de>
# Maintainer of forked PHP package: Marc Cousin <cousinmarc@gmail.com>
pkgname='php-32bits-fixes'
pkgver=7.2.6
pkgrel=1
arch=('x86' 'armv7h')
license=('PHP')
url='http://www.php.net'
makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt' 'libzip' 'net-snmp'
'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'postfix' 'freetds' 'pcre' 'libnsl')
checkdepends=('procps-ng')
source=("https://php.net/distributions/php-${pkgver}.tar.xz"{,.asc}
'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
'enchant-2.patch' 'freetype.patch')
sha512sums=('da86b1ff2df3b9e2d46e59a80296b940d81132975b621bdec9602f8b4c8d91a3fdcd4ffd7cb982d63d3ec974b3a12a7854e42a73b7f2cc8eefade14335aa7c71'
'SKIP'
'bb9abfc51c41e1de180ef09244691c909ee64feebd9749978e1ecb7f576466a37232d9c6e97c1a01a96b8413a33c4818a91dc79f63078dc1946f56dad516bb05'
'eccbe1a0c7b2757ab3c982c871cc591a66ad70f085aaa0d44f93cacacedc7b8fd21b8d0c66471327ff070db1bab1ab83a802f6fa190f33bdd74c134975e3910e'
'c5d57a4d06d33856082a461a6796975ec42b655e81abe14bc896692d44b5c28e9b344111e64d13af486168b3dc927d908705e543095f34052f72198f257b4c34'
'824e9a0d10063283357d49a81ab49bf834afd24f098482bdbaa9ab60bbad2b0dea6f5879259b73717d437626b02fb4f2d3ef68b7bcbb26bee274a7b61144720f'
'85000bcb4f5674bfcbac7f32aeb28c523904a23da716e7fd982ac225845843e0acb33c0b8552107c234b1dd106337ad0a6792253f200980b88a6f6239ec982d0'
'06b49fb044fe8cdeef5109aa7bb6858906396e3f3643827cdb241264029579c71b0a7661d24b78b16573c54832505491c4b2a1fd77ae7c313cb082731c2efd9e'
'97ca469d5234f5cc71af38bb99a60130fdab5f849ad1f49f112101779c7659ca4d6700aef72e0294c85bdcb18e487fc0cdda855cc51084b9e8cacb02ec0fb1eb')
validpgpkeys=('B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
'1729F83938DA44E27BA0F4D3DBDB397470D12172')
pkgdesc='A general-purpose scripting language that is especially suited to web development, patched version to not error on large files on 32 bits system'
depends=('libxml2' 'curl' 'libzip' 'pcre' 'argon2')
replaces=('php' 'php-ldap')
conflicts=('php' 'php-ldap')
provides=("php=${pkgver}" "php-ldap=${pkgver}")
backup=('etc/php/php.ini')
prepare() {
cd ${srcdir}/php-${pkgver}
patch -p0 -i ${srcdir}/apache.patch
patch -p0 -i ${srcdir}/php-fpm.patch
patch -p0 -i ${srcdir}/php.ini.patch
patch -p1 -i ${srcdir}/enchant-2.patch
patch -p1 -i ${srcdir}/freetype.patch
autoconf
rm tests/output/stream_isatty_*.phpt
}
build() {
# http://site.icu-project.org/download/61#TOC-Migration-Issues
CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
CFLAGS+=' -D_FILE_OFFSET_BITS=64'
local _phpconfig="--srcdir=../php-${pkgver} \
--config-cache \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc/php \
--localstatedir=/var \
--with-layout=GNU \
--with-config-file-path=/etc/php \
--with-config-file-scan-dir=/etc/php/conf.d \
--disable-rpath \
--mandir=/usr/share/man \
--without-pear \
"
local _phpextensions="\
--enable-bcmath=shared \
--enable-calendar=shared \
--enable-dba=shared \
--enable-exif=shared \
--enable-ftp=shared \
--enable-intl=shared \
--enable-mbstring \
--enable-shmop=shared \
--enable-soap=shared \
--enable-sockets=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-zip=shared \
--with-bz2=shared \
--with-curl=shared \
--with-db4=/usr \
--with-enchant=shared,/usr \
--with-freetype-dir=/usr \
--with-gd=shared,/usr \
--with-gdbm \
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
--with-imap-ssl \
--with-imap=shared \
--with-kerberos=/usr \
--with-ldap=shared \
--with-ldap-sasl \
--with-libzip \
--with-mhash \
--with-mysql-sock=/run/mysqld/mysqld.sock \
--with-mysqli=shared,mysqlnd \
--with-openssl \
--with-password-argon2 \
--with-pcre-regex=/usr \
--with-pdo-dblib=shared,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-pgsql=shared \
--with-pdo-sqlite=shared,/usr \
--with-pgsql=shared \
--with-pspell=shared \
--with-readline \
--with-snmp=shared \
--with-sodium=shared \
--with-sqlite3=shared,/usr \
--with-tidy=shared \
--with-unixODBC=shared,/usr \
--with-xmlrpc=shared \
--with-xsl=shared \
--with-zlib \
--enable-pcntl \
"
EXTENSION_DIR=/usr/lib/php/modules
export EXTENSION_DIR
mkdir ${srcdir}/build
cd ${srcdir}/build
ln -s ../php-${pkgver}/configure
./configure ${_phpconfig} \
--enable-cgi \
--enable-fpm \
--with-fpm-systemd \
--with-fpm-acl \
--with-fpm-user=http \
--with-fpm-group=http \
--enable-embed=shared \
${_phpextensions}
make
# apache
# reuse the previous run; this will save us a lot of time
cp -a ${srcdir}/build ${srcdir}/build-apache
cd ${srcdir}/build-apache
./configure ${_phpconfig} \
--with-apxs2 \
${_phpextensions}
make
# phpdbg
cp -a ${srcdir}/build ${srcdir}/build-phpdbg
cd ${srcdir}/build-phpdbg
./configure ${_phpconfig} \
--enable-phpdbg \
${_phpextensions}
make
}
check() {
cd ${srcdir}/php-${pkgver}
# Check if sendmail was configured correctly (FS#47600)
${srcdir}/build/sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
export REPORT_EXIT_STATUS=1
export NO_INTERACTION=1
export SKIP_ONLINE_TESTS=1
export SKIP_SLOW_TESTS=1
# Test don't pass on my armv7h... if ever someone finds the cause, keep
# it to be able to reactivate it quickly
#${srcdir}/build/sapi/cli/php -n run-tests.php -n -P {tests,Zend}
echo 1
}
package() {
cd ${srcdir}/build
make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd}
install -D -m644 ${srcdir}/php-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini
install -d -m755 ${pkgdir}/etc/php/conf.d/
# remove static modules
rm -f ${pkgdir}/usr/lib/php/modules/*.a
# remove modules provided by sub packages
rm -f ${pkgdir}/usr/lib/php/modules/{enchant,gd,imap,intl,sodium,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
# remove empty directory
rmdir ${pkgdir}/usr/include/php/include
}
|