summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2012-09-03 20:56:49 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-04 23:50:25 -0500
commitc36043820b20dbc601aeed91b4ebee0c3fb18a0b (patch)
tree0d96b0318f5eb5ff5a5f3462066890cfbcd58e15 /development
parent61e6de614c8d27fcb91177d381e0e02b81f1f93b (diff)
downloadslackbuilds-c36043820b20dbc601aeed91b4ebee0c3fb18a0b.tar.gz
development/ming: Fix building perl extension.
Also partially fixed building the php extension. It builds fine with a "normal" php 5.4 now, but still fails with a zts enabled one like shipped in Slackware. Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/ming/0001-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch43
-rw-r--r--development/ming/README5
-rw-r--r--development/ming/ming.SlackBuild25
-rw-r--r--development/ming/patch-ming.c.diff22
4 files changed, 83 insertions, 12 deletions
diff --git a/development/ming/0001-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch b/development/ming/0001-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch
new file mode 100644
index 0000000000..e34eb0f6f5
--- /dev/null
+++ b/development/ming/0001-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch
@@ -0,0 +1,43 @@
+From a0ea1cc47330a3ab316713d720892b6272401890 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Sun, 10 Jul 2011 21:46:09 +0300
+Subject: [PATCH] GvCV() isn't an lvalue since Perl 5.13.10
+
+GvCV() can't be assigned to anymore with recent perls, so use the new
+GvCV_set() macro when available or implement it the old way if it isn't.
+---
+ perl_ext/Exports.c | 2 +-
+ perl_ext/perl_swf.h | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/perl_ext/Exports.c b/perl_ext/Exports.c
+index 65f8912..5529728 100644
+--- a/perl_ext/Exports.c
++++ b/perl_ext/Exports.c
+@@ -190,7 +190,7 @@ void export_cv(SV *class, SV *caller, char *sub)
+ SvPVX(caller), sub, SvPVX(class), sub);
+ #endif
+ gv = gv_fetchpv(form("%s::%s",SvPVX( caller), sub), TRUE, SVt_PVCV);
+- GvCV(gv) = perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE);
++ GvCV_set(gv, perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE));
+ GvIMPORTED_CV_on(gv);
+ GvMULTI_on(gv);
+ }
+diff --git a/perl_ext/perl_swf.h b/perl_ext/perl_swf.h
+index b960229..1a3656e 100644
+--- a/perl_ext/perl_swf.h
++++ b/perl_ext/perl_swf.h
+@@ -58,6 +58,10 @@ typedef SWFFontCollection SWF__FontCollection;
+ #define aTHXo_
+ #endif
+
++#ifndef GvCV_set
++# define GvCV_set(G, C) (GvCV(G) = (C))
++#endif
++
+ #ifndef S_DEBUG
+ #define swf_debug 0 /* Should we get this from, say, $SWF::debug? */
+ #define S_DEBUG(level,code) if (swf_debug >= level) { code; }
+--
+1.7.5.4
+
diff --git a/development/ming/README b/development/ming/README
index 9daf66ce43..02b3eb5f17 100644
--- a/development/ming/README
+++ b/development/ming/README
@@ -6,7 +6,4 @@ morphs), text, sprites (aka movie clips), buttons, and actions
in flash movies, plus more. The goal for Ming is to abstract
away all of the mundane specifics of the SWF file format.
-This builds the c++, perl, python, php and tcl-plugin.
-To enable the php extension, go to /etc/php/ming.ini
-and uncomment the line:
- ; extension=ming.so
+This builds the c++, perl, python and tcl-plugin.
diff --git a/development/ming/ming.SlackBuild b/development/ming/ming.SlackBuild
index 09007f7acd..7cc39896be 100644
--- a/development/ming/ming.SlackBuild
+++ b/development/ming/ming.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for ming
-# Copyright 2008-2011 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2012 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=ming
VERSION=0.4.4
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -65,6 +65,12 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# Fix PHP 5.4 compatibility
+patch -p0 -d php_ext -i $CWD/patch-ming.c.diff
+
+# Fix building against perl 5.16
+patch -p1 -i $CWD/0001-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch
+
# static library is activated because the perl extension needs it
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -81,9 +87,15 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-cd php_ext
- make install DESTDIR=$PKG
-cd -
+# Building the php extension against a zts enabled php fails currently.
+# Feel free to uncomment this in case you have a normal php. -HW
+
+#cd php_ext
+# make install DESTDIR=$PKG
+#cd -
+
+# Install config file for PHP.
+#install -D -m 644 $CWD/ming.ini $PKG/etc/php/ming.ini.new
cd py_ext
python setup.py install --root=$PKG
@@ -95,9 +107,6 @@ cd perl_ext
make install DESTDIR=$PKG
cd -
-# Install config file for PHP.
-install -D -m 644 $CWD/ming.ini $PKG/etc/php/ming.ini.new
-
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/development/ming/patch-ming.c.diff b/development/ming/patch-ming.c.diff
new file mode 100644
index 0000000000..9465b56281
--- /dev/null
+++ b/development/ming/patch-ming.c.diff
@@ -0,0 +1,22 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662620
+--- ming.c.orig 2011-10-26 01:33:18.000000000 -0500
++++ ming.c 2012-05-14 17:06:09.000000000 -0500
+@@ -87,10 +87,17 @@
+ static SWFMatrix getMatrix(zval *id TSRMLS_DC);
+ #endif
+
++#if PHP_API_VERSION < 20100412
+ #define PHP_MING_FILE_CHK(file) \
+ if ((PG(safe_mode) && !php_checkuid((file), NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir((file) TSRMLS_CC)) { \
+ RETURN_FALSE; \
+- } \
++ }
++#else
++#define PHP_MING_FILE_CHK(file) \
++ if (php_check_open_basedir((file) TSRMLS_CC)) { \
++ RETURN_FALSE; \
++ }
++#endif
+
+ /* {{{ proto void ming_setcubicthreshold (int threshold)
+ Set cubic threshold (?) */