Last active
August 29, 2015 13:57
-
-
Save AndrewRose/9620678 to your computer and use it in GitHub Desktop.
PKGBUILD for ZTS wxPHP (includes wxWidgets, pthreads, event and runkit)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=wxphp | |
true && pkgname=( | |
'wxphp' | |
'wxphp-wxwidgets' | |
'wxphp-pecl-wxwidgets' | |
'wxphp-pecl-event' | |
'wxphp-pecl-runkit' | |
'wxphp-pecl-pthreads' | |
) | |
pkgdesc='HTML-embedded scripting language' | |
pkgbase=wxphp | |
pkgver=5.5.10 | |
pkgrel=1 | |
php_pkgver=$pkgver | |
wxwidgets_pkgver=3.0.0 | |
event_pkgver=1.9.0 | |
pthreads_pkgver=2.0.2 | |
arch=('x86_64' 'i686') | |
license=('PHP') | |
url='http://www.php.net' | |
makedepends=('sqlite' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds' | |
'libmcrypt' 'tidyhtml' 'aspell' 'libltdl' 'libpng' 'libjpeg' 'icu' | |
'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp' 'freetype2' 'systemd') | |
source=( | |
"http://www.php.net/distributions/php-${pkgver}.tar.bz2" | |
"http://pecl.php.net/get/event-${event_pkgver}.tgz" | |
"git+https://github.com/zenovich/runkit.git" | |
"http://downloads.sourceforge.net/wxwindows/wxWidgets-${wxwidgets_pkgver}.tar.bz2" | |
"git+https://github.com/wxphp/wxphp.git" | |
"http://pecl.php.net/get/pthreads-${pthreads_pkgver}.tgz" | |
) | |
md5sums=( | |
'd608230c7890b6a0cc5b92e66e866226' | |
'f88c6e55cb532d02fc51d4988e7fe4bf' | |
'SKIP' | |
'241998efc12205172ed24c18788ea2cd' | |
'SKIP' | |
'58e35ed736fba5b4b93b65e2e5e27e31' | |
) | |
depends=('pcre' 'libxml2' 'bzip2' 'curl' 'libxslt' 'tidyhtml' 'sqlite' 'net-snmp' | |
'aspell' 'postgresql-libs' 'unixodbc' 'freetds' 'libmcrypt' 'libltdl' 'libldap' 'icu' | |
'libpng' 'libjpeg' 'freetype2' 'libvpx' 'enchant' 'icu' 'libwebp' 'libxcb') | |
backup=('etc/wxphp/php.ini' 'etc/wxphp/pear.conf') | |
phpconfig="--srcdir=../php-${pkgver} \ | |
--config-cache \ | |
--prefix=/usr \ | |
--bindir=/usr/bin/wxphp \ | |
--includedir=/usr/include/wxphp \ | |
--libdir=/usr/lib/wxphp \ | |
--sysconfdir=/etc/wxphp \ | |
--localstatedir=/var \ | |
--with-layout=GNU \ | |
--with-config-file-path=/etc/wxphp \ | |
--with-config-file-scan-dir=/etc/wxphp/conf.d \ | |
--disable-rpath \ | |
--mandir=/usr/share/man \ | |
--without-pear \ | |
--enable-maintainer-zts \ | |
--enable-inline-optimization | |
" | |
peclconfig="--prefix=/usr \ | |
--bindir=/usr/bin/wxphp \ | |
--libdir=/usr/lib/wxphp \ | |
--sysconfdir=/etc/wxphp \ | |
--mandir=/usr/share/man \ | |
--with-php-config=/usr/bin/wxphp/php-config | |
" | |
build() { | |
return 0 | |
} | |
package_wxphp() { | |
phpextensions="--enable-bcmath=shared \ | |
--enable-calendar=shared \ | |
--enable-dba=shared \ | |
--enable-exif=shared \ | |
--enable-ftp=shared \ | |
--enable-gd-native-ttf \ | |
--enable-intl=shared \ | |
--enable-mbstring \ | |
--enable-phar=shared \ | |
--enable-posix=shared \ | |
--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 \ | |
--with-gdbm \ | |
--with-gettext=shared \ | |
--with-gmp=shared \ | |
--with-iconv=shared \ | |
--with-icu-dir=/usr \ | |
--with-imap-ssl \ | |
--with-imap=shared \ | |
--with-jpeg-dir=/usr \ | |
--with-vpx-dir=/usr \ | |
--with-ldap=shared \ | |
--with-ldap-sasl \ | |
--with-mcrypt=shared \ | |
--with-mhash \ | |
--with-mssql=shared \ | |
--with-mysql-sock=/var/run/mysqld/mysqld.sock \ | |
--with-mysql=shared,mysqlnd \ | |
--with-mysqli=shared,mysqlnd \ | |
--with-openssl=shared \ | |
--with-pcre-regex=/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-png-dir=/usr \ | |
--with-pspell=shared \ | |
--with-snmp=shared \ | |
--with-sqlite3=shared,/usr \ | |
--with-tidy=shared \ | |
--with-unixODBC=shared,/usr \ | |
--with-xmlrpc=shared \ | |
--with-xsl=shared \ | |
--with-zlib \ | |
" | |
EXTENSION_DIR=/usr/lib/wxphp/modules | |
export EXTENSION_DIR | |
PEAR_INSTALLDIR=/usr/share/pear-wxphp | |
export PEAR_INSTALLDIR | |
cd ${srcdir}/php-${pkgver} | |
# php | |
mkdir ${srcdir}/build-php | |
cd ${srcdir}/build-php | |
ln -s ../php-${pkgver}/configure | |
./configure ${phpconfig} \ | |
--disable-cgi \ | |
--with-readline \ | |
--enable-pcntl \ | |
${phpextensions} | |
make | |
make -j1 INSTALL_ROOT=${pkgdir} install | |
install -d -m755 ${pkgdir}/usr/share/pear-wxphp | |
# install php.ini | |
install -D -m644 ${srcdir}/php-${pkgver}/php.ini-production ${pkgdir}/etc/wxphp/php.ini | |
install -d -m755 ${pkgdir}/etc/wxphp/conf.d/ | |
mv ${pkgdir}/usr/share/man/man1/php.1 ${pkgdir}/usr/share/man/man1/wxphp.1.gz | |
mv ${pkgdir}/usr/share/man/man1/php-config.1 ${pkgdir}/usr/share/man/man1/wxphp-config.1.gz | |
mv ${pkgdir}/usr/share/man/man1/phpize.1 ${pkgdir}/usr/share/man/man1/wxphp-phpize.1.gz | |
mv ${pkgdir}/usr/share/man/man1/phar.1 ${pkgdir}/usr/share/man/man1/wxphp-har.1.gz | |
mv ${pkgdir}/usr/share/man/man1/phar.phar.1 ${pkgdir}/usr/share/man/man1/wxphp-phar_phar.1.gz | |
} | |
package_wxphp-wxwidgets() { | |
true && pkgname=wxphp-wxwidgets | |
true && pkgver=${wxwidgets_pkgver} | |
true && pkgdesc="wxWidgets library" | |
cd "${srcdir}/wxWidgets-${pkgver}" | |
./configure --prefix=/usr --with-{gtk=2,libjpeg=sys,libpng=sys,libtiff=sys,libxpm=sys,opengl,regex=builtin,sdl} \ | |
--enable-{aui,graphics_ctx,unicode} | |
make | |
make DESTDIR=${pkgdir} install | |
} | |
package_wxphp-pecl-wxwidgets() { | |
true && pkgname=wxphp-pecl-wxwidgets | |
true && pkgdesc="PHP Pecl wxWidgets extension" | |
rm -fr "${srcdir}/wxphp-build" | |
cp -R "${srcdir}/wxphp" "${srcdir}/wxphp-build" | |
cd "${srcdir}/wxphp-build" | |
cd "${srcdir}/wxphp-build" | |
export PATH="/usr/bin/wxphp:$PATH" | |
/usr/bin/wxphp/phpize || return 1 | |
php tools/reference_generator.php | |
# WX_LDFLAGS="-pthread -lwx_gtk2u-3.0 -lwx_gtk2u_gl-3.0 -lwxregexu-3.0 -lwxscintilla-3.0" | |
# OTHER_LDFLAGS=`pkg-config --libs gstreamer-0.10 gstreamer-interfaces-0.10 gtk+-2.0 libpng zlib` | |
# LDFLAGS="${WX_LDFLAGS} ${OTHER_LDFLAGS} -ljpeg" | |
#--enable-wxwidgets-monolithic | |
./configure --with-wxwidgets=/usr/lib --enable-maintainer-zts | |
make INSTALL_ROOT=${pkgdir} install | |
} | |
package_wxphp-pecl-event() { | |
true && pkgname=wxphp-pecl-event | |
true && pkgver=${event_pkgver} | |
true && pkgdesc="Provides interface to libevent library" | |
export PATH="/usr/bin/wxphp:$PATH" | |
cd ${srcdir}/event-${pkgver} || return 1 | |
/usr/bin/wxphp/phpize || return 1 | |
./configure ${peclconfig} || return 1 | |
make || return 1 | |
install -d -m755 ${pkgdir}/usr/lib/wxphp/modules/ | |
cp ${srcdir}/event-${pkgver}/modules/event.so ${pkgdir}/usr/lib/wxphp/modules/event.so | |
} | |
package_wxphp-pecl-runkit() { | |
true && pkgname=wxphp-pecl-runkit | |
true && pkgdesc="For all those things you.... probably shouldn't have been doing anyway" | |
export PATH="/usr/bin/wxphp:$PATH" | |
cd ${srcdir}/runkit || return 1 | |
/usr/bin/wxphp/phpize || return 1 | |
./configure ${peclconfig}|| return 1 | |
make || return 1 | |
install -d -m755 ${pkgdir}/usr/lib/wxphp/modules/ | |
cp ${srcdir}/runkit/modules/runkit.so ${pkgdir}/usr/lib/wxphp/modules/runkit.so | |
} | |
package_wxphp-pecl-pthreads() { | |
true && pkgname=wxphp-pecl-pthreads | |
true && pkgver=${pthreads_pkgver} | |
true && pkgdesc="Threading API" | |
export PATH="/usr/bin/wxphp:$PATH" | |
cd ${srcdir}/pthreads-${pkgver} || return 1 | |
/usr/bin/wxphp/phpize || return 1 | |
./configure --enable-pthreads --enable-maintainer-zts || return 1 | |
make INSTALL_ROOT=${pkgdir} install || return 1 | |
install -d -m755 ${pkgdir}/usr/lib/wxphp/modules/ | |
cp ${srcdir}/pthreads-${pkgver}/modules/pthreads.so ${pkgdir}/usr/lib/wxphp/modules/pthreads.so | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't use this as it needs to be broken down into individual PKGBUILDs for each package due to inter-dependencies.