diff options
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | archlinux.ini | 5 | ||||
-rw-r--r-- | uwsgi_fix_rpath.patch | 66 | ||||
-rw-r--r-- | uwsgi_trick_chroot.patch | 16 |
5 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a1f91536e37c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +# Generated by mksrcinfo v8 +# Sun Jul 15 12:06:09 UTC 2018 +pkgbase = uwsgi-plugin-php56 + pkgdesc = Plugin for PHP 5.6 support + pkgver = 2.0.17.1 + pkgrel = 1 + url = http://projects.unbit.it/uwsgi + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = python2 + depends = php56-embed + depends = libyaml + depends = jansson + depends = uwsgi + source = http://projects.unbit.it/downloads/uwsgi-2.0.17.1.tar.gz + source = archlinux.ini + source = uwsgi_fix_rpath.patch + source = uwsgi_trick_chroot.patch + md5sums = 0b1d89f62d0a291ba837c57b2f5dae39 + md5sums = 9aced0faffc5fc04afccf946e8a2a886 + md5sums = 1a4516d5cdcf5b95b036f4eae2d0c152 + md5sums = a49705b98c28dee890b2f88cbaa58be3 + +pkgname = uwsgi-plugin-php56 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b322bf60602b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Felix Yan <felixonmars@archlinux.org> +# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> +# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> +# Contributor: Valentin Hăloiu <vially.ichb+aur@gmail.com> +# Contributor: Angel Velasquez <angvp@archlinux.org> +# Contributor: Kevin Zuber <uKev@knet.eu> +# Contributor: Vsevolod Balashov <vsevolod@balashov.name> +# Contributor: David Runge <dave@sleepmap.de> + +pkgname=uwsgi-plugin-php56 +pkgdesc="Plugin for PHP 5.6 support" +pkgver=2.0.17.1 +pkgrel=1 +arch=(i686 x86_64) +url="http://projects.unbit.it/uwsgi" +license=(GPL2) +depends=('php56-embed' 'libyaml' 'jansson' 'uwsgi') +makedepends=('python2') +source=(http://projects.unbit.it/downloads/uwsgi-$pkgver.tar.gz + archlinux.ini + uwsgi_fix_rpath.patch + uwsgi_trick_chroot.patch) + +md5sums=('0b1d89f62d0a291ba837c57b2f5dae39' + '9aced0faffc5fc04afccf946e8a2a886' + '1a4516d5cdcf5b95b036f4eae2d0c152' + 'a49705b98c28dee890b2f88cbaa58be3') + +prepare(){ + cd $srcdir/uwsgi-$pkgver + cp $srcdir/archlinux.ini buildconf/archlinux.ini + #sed -i 's/LIBS .*-lphp5.*/LIBS = []/' plugins/php/uwsgiplugin.py + for patch in uwsgi_trick_chroot.patch; do + patch -Np1 -i $srcdir/$patch + done +} + +build() { + pushd $srcdir/uwsgi-$pkgver + + UWSGICONFIG_PHPPATH=/usr/bin/php-config56 python2 uwsgiconfig.py --plugin plugins/php archlinux php56 +} + +package(){ + install -dm755 $pkgdir/usr/bin + install -Dm755 uwsgi-$pkgver/php56_plugin.so $pkgdir/usr/lib/uwsgi/php56_plugin.so + ln -s uwsgi $pkgdir/usr/bin/uwsgi_${pkgname#uwsgi-plugin-} +} diff --git a/archlinux.ini b/archlinux.ini new file mode 100644 index 000000000000..e145c48a6b5d --- /dev/null +++ b/archlinux.ini @@ -0,0 +1,5 @@ +[uwsgi] +plugin_dir = /usr/lib/uwsgi +plugins = rack, rbthreads, fiber, psgi, lua, php, jvm, mono, cgi, webdav +main_plugin = systemd_logger,pam +inherit = base diff --git a/uwsgi_fix_rpath.patch b/uwsgi_fix_rpath.patch new file mode 100644 index 000000000000..3de66a7712bb --- /dev/null +++ b/uwsgi_fix_rpath.patch @@ -0,0 +1,66 @@ +diff --git a/plugins/jvm/uwsgiplugin.py b/plugins/jvm/uwsgiplugin.py +index ac7eb3e..0911288 100644 +--- a/plugins/jvm/uwsgiplugin.py ++++ b/plugins/jvm/uwsgiplugin.py +@@ -59,11 +59,6 @@ if "-framework JavaVM" in JVM_LIBPATH: + + GCC_LIST = ['jvm_plugin'] + +-if 'LD_RUN_PATH' in os.environ: +- os.environ['LD_RUN_PATH'] += ':' + JVM_LIBPATH[0][2:] +-else: +- os.environ['LD_RUN_PATH'] = JVM_LIBPATH[0][2:] +- + def post_build(config): + if os.system("javac %s/plugins/jvm/uwsgi.java" % os.getcwd()) != 0: + os._exit(1) +diff --git a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py +index fb9e5bb..fd12c91 100644 +--- a/plugins/php/uwsgiplugin.py ++++ b/plugins/php/uwsgiplugin.py +@@ -22,7 +22,6 @@ CFLAGS = [os.popen(PHPPATH + ' --includes').read().rstrip(), '-Wno-error=sign-co + LDFLAGS = os.popen(PHPPATH + ' --ldflags').read().rstrip().split() + if ld_run_path: + LDFLAGS.append('-L%s' % ld_run_path) +- os.environ['LD_RUN_PATH'] = ld_run_path + + LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp5'] + +diff --git a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py +index c4f03e1..8d4b2e0 100644 +--- a/plugins/python/uwsgiplugin.py ++++ b/plugins/python/uwsgiplugin.py +@@ -45,10 +45,8 @@ if not 'UWSGI_PYTHON_NOLIB' in os.environ: + else: + try: + LDFLAGS.append("-L%s" % sysconfig.get_config_var('LIBDIR')) +- os.environ['LD_RUN_PATH'] = "%s" % (sysconfig.get_config_var('LIBDIR')) + except: + LDFLAGS.append("-L%s/lib" % sysconfig.PREFIX) +- os.environ['LD_RUN_PATH'] = "%s/lib" % sysconfig.PREFIX + + LIBS.append('-lpython%s' % get_python_version()) + else: +diff --git a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py +index 8dee214..2375bc9 100644 +--- a/plugins/rack/uwsgiplugin.py ++++ b/plugins/rack/uwsgiplugin.py +@@ -44,7 +44,6 @@ LIBS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LIBS']\"" + + if has_shared == 'yes': + LDFLAGS.append('-L' + libpath ) +- os.environ['LD_RUN_PATH'] = libpath + LIBS.append(os.popen(RUBYPATH + " -e \"require 'rbconfig';print '-l' + %s::CONFIG['RUBY_SO_NAME']\"" % rbconfig).read().rstrip()) + else: + GCC_LIST.append("%s/%s" % (libpath, os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LIBRUBY_A']\"" % rbconfig).read().rstrip())) +diff --git a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py +index ecea48d..4f35984 100644 +--- a/plugins/ruby19/uwsgiplugin.py ++++ b/plugins/ruby19/uwsgiplugin.py +@@ -40,6 +40,5 @@ LDFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['LDFLAG + + libpath = os.popen(RUBYPATH + " -e \"require 'rbconfig';print %s::CONFIG['libdir']\"" % rbconfig).read().rstrip() + LDFLAGS.append('-L' + libpath ) +-os.environ['LD_RUN_PATH'] = libpath + LIBS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print '-l' + %s::CONFIG['RUBY_SO_NAME']\"" % rbconfig).read().rstrip().split() + diff --git a/uwsgi_trick_chroot.patch b/uwsgi_trick_chroot.patch new file mode 100644 index 000000000000..663bba76b82d --- /dev/null +++ b/uwsgi_trick_chroot.patch @@ -0,0 +1,16 @@ +diff --git a/uwsgiconfig.py b/uwsgiconfig.py +index e447123..4d55f2c 100644 +--- a/uwsgiconfig.py ++++ b/uwsgiconfig.py +@@ -1129,10 +1129,7 @@ def build_plugin(path, uc, cflags, ldflags, libs, name = None): + except: + pass + +- if uc: +- plugin_dest = uc.get('plugin_build_dir', uc.get('plugin_dir')) + '/' + name + '_plugin' +- else: +- plugin_dest = name + '_plugin' ++ plugin_dest = name + '_plugin' + + shared_flag = '-shared' + |