summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/010-svn-fix-perl5.10-build.patch136
-rw-r--r--debian/patches/series1
3 files changed, 140 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 58b6832..0c56b6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ libapache2-mod-perl2 (2.0.3-3) UNRELEASED; urgency=low
to allow parallel building. Fixes a misbuild with dpkg-buildpackage -j
found by Daniel Schepler.
+ [ Damyan Ivanov ]
+ * add 010-svn-fix-perl5.10-build.patch. Closes: #462994
+
-- Frank Lichtenheld <djpig@debian.org> Tue, 30 Oct 2007 09:57:01 +0100
libapache2-mod-perl2 (2.0.3-2) unstable; urgency=low
diff --git a/debian/patches/010-svn-fix-perl5.10-build.patch b/debian/patches/010-svn-fix-perl5.10-build.patch
new file mode 100644
index 0000000..5a0a853
--- /dev/null
+++ b/debian/patches/010-svn-fix-perl5.10-build.patch
@@ -0,0 +1,136 @@
+# Stolen from upstream SVN revision 615751
+# changes the way modperl stores its data within apache
+# fixes FTBFS with perl 5.10
+# http://bugs.debian.org/462994
+Index: libapache2-mod-perl2/src/modules/perl/mod_perl.h
+===================================================================
+--- libapache2-mod-perl2.orig/src/modules/perl/mod_perl.h 2008-01-31 11:23:20.000000000 +0200
++++ libapache2-mod-perl2/src/modules/perl/mod_perl.h 2008-01-31 11:30:03.000000000 +0200
+@@ -138,11 +138,6 @@
+ int modperl_response_handler(request_rec *r);
+ int modperl_response_handler_cgi(request_rec *r);
+
+-/* betting on Perl*Handlers not using CvXSUBANY
+- * mod_perl reuses this field for handler attributes
+- */
+-#define MP_CODE_ATTRS(cv) (CvXSUBANY((CV*)cv).any_i32)
+-
+ #define MgTypeExt(mg) (mg->mg_type == '~')
+
+ typedef void MP_FUNC_NONSTD_T(modperl_var_modify_t) (apr_table_t *,
+Index: libapache2-mod-perl2/src/modules/perl/modperl_mgv.c
+===================================================================
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_mgv.c 2008-01-31 11:23:20.000000000 +0200
++++ libapache2-mod-perl2/src/modules/perl/modperl_mgv.c 2008-01-31 11:30:03.000000000 +0200
+@@ -271,7 +271,7 @@
+ }
+ else {
+ if ((cv = get_cv(name, FALSE))) {
+- handler->attrs = (U32)MP_CODE_ATTRS(cv);
++ handler->attrs = *modperl_code_attrs(aTHX_ cv);
+ handler->mgv_cv =
+ modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(CvGV(cv))));
+ modperl_mgv_append(aTHX_ p, handler->mgv_cv, GvNAME(CvGV(cv)));
+@@ -334,7 +334,7 @@
+ modperl_mgv_new_name(handler->mgv_obj, p, name);
+ }
+
+- handler->attrs = (U32)MP_CODE_ATTRS(cv);
++ handler->attrs = *modperl_code_attrs(aTHX_ cv);
+ /* note: this is the real function after @ISA lookup */
+ handler->mgv_cv = modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(gv)));
+ modperl_mgv_append(aTHX_ p, handler->mgv_cv, handler_name);
+Index: libapache2-mod-perl2/src/modules/perl/modperl_types.h
+===================================================================
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_types.h 2008-01-31 11:23:19.000000000 +0200
++++ libapache2-mod-perl2/src/modules/perl/modperl_types.h 2008-01-31 11:30:03.000000000 +0200
+@@ -196,7 +196,7 @@
+ const char *name;
+ CV *cv;
+ U8 flags;
+- U32 attrs;
++ U16 attrs;
+ modperl_handler_t *next;
+ };
+
+Index: libapache2-mod-perl2/src/modules/perl/modperl_util.c
+===================================================================
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_util.c 2008-01-31 11:23:20.000000000 +0200
++++ libapache2-mod-perl2/src/modules/perl/modperl_util.c 2008-01-31 11:31:22.000000000 +0200
+@@ -902,4 +902,14 @@
+
+ return retval ? SvREFCNT_inc(retval) : &PL_sv_undef;
+ }
+-
++
++U16 *modperl_code_attrs(pTHX_ CV *cv) {
++ MAGIC *mg;
++
++ if (!SvMAGICAL(cv)) {
++ sv_magic((SV*)cv, Nullsv, PERL_MAGIC_ext, NULL, -1);
++ }
++
++ mg = mg_find((SV*)cv, PERL_MAGIC_ext);
++ return &(mg->mg_private);
++}
+Index: libapache2-mod-perl2/src/modules/perl/modperl_util.h
+===================================================================
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_util.h 2008-01-31 11:23:20.000000000 +0200
++++ libapache2-mod-perl2/src/modules/perl/modperl_util.h 2008-01-31 11:30:03.000000000 +0200
+@@ -149,4 +149,6 @@
+ SV *modperl_pnotes(pTHX_ HV **pnotes, SV *key, SV *val,
+ request_rec *r, conn_rec *c);
+
++U16 *modperl_code_attrs(pTHX_ CV *cv);
++
+ #endif /* MODPERL_UTIL_H */
+Index: libapache2-mod-perl2/xs/Apache2/Filter/Apache2__Filter.h
+===================================================================
+--- libapache2-mod-perl2.orig/xs/Apache2/Filter/Apache2__Filter.h 2008-01-31 11:23:19.000000000 +0200
++++ libapache2-mod-perl2/xs/Apache2/Filter/Apache2__Filter.h 2008-01-31 11:30:03.000000000 +0200
+@@ -86,9 +86,9 @@
+ return len;
+ }
+
+-static MP_INLINE U32 *modperl_filter_attributes(SV *package, SV *cvrv)
++static MP_INLINE U16 *modperl_filter_attributes(pTHX_ SV *package, SV *cvrv)
+ {
+- return (U32 *)&MP_CODE_ATTRS(SvRV(cvrv));
++ return modperl_code_attrs(aTHX_ (CV*)SvRV(cvrv));
+ }
+
+ #ifdef MP_TRACE
+@@ -118,7 +118,7 @@
+ MP_STATIC XS(MPXS_modperl_filter_attributes)
+ {
+ dXSARGS;
+- U32 *attrs = modperl_filter_attributes(ST(0), ST(1));
++ U16 *attrs = modperl_filter_attributes(aTHX_ ST(0), ST(1));
+ I32 i;
+ #ifdef MP_TRACE
+ HV *stash = gv_stashsv(ST(0), TRUE);
+Index: libapache2-mod-perl2/xs/tables/current/ModPerl/FunctionTable.pm
+===================================================================
+--- libapache2-mod-perl2.orig/xs/tables/current/ModPerl/FunctionTable.pm 2007-08-21 13:16:33.000000000 +0300
++++ libapache2-mod-perl2/xs/tables/current/ModPerl/FunctionTable.pm 2008-01-31 11:30:03.000000000 +0200
+@@ -1239,6 +1239,20 @@
+ ]
+ },
+ {
++ 'return_type' => 'U16 *',
++ 'name' => 'modperl_code_attrs',
++ 'args' => [
++ {
++ 'type' => 'PerlInterpreter *',
++ 'name' => 'my_perl'
++ },
++ {
++ 'type' => 'CV *',
++ 'name' => 'cv'
++ }
++ ]
++ },
++ {
+ 'return_type' => 'int',
+ 'name' => 'modperl_config_apply_PerlModule',
+ 'args' => [
diff --git a/debian/patches/series b/debian/patches/series
index 68ab091..4a3595a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
006_man_section_and_build_warnings.patch
008_fix_version_check_in_t_response_TestAPI_server_const_pm.patch
009-allow-parallel-build.patch
+010-svn-fix-perl5.10-build.patch