Enable perl bindings and fix minor build issues

Keep following upstream patches until 2.4.0 release.
The latest patches fixed perl binding, rpmlint issues with FSF license
address, and other minor build glitches.

Unfortunately make check still fails for perl so we keep perl bindings still
disabled for now.
This commit is contained in:
Simo Sorce 2013-12-09 09:42:53 -05:00
parent 2e19147e46
commit 1e5980de7c
6 changed files with 12439 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
From 60d6858d148b3fa133abcaada130223603d2d184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Thu, 5 Dec 2013 17:51:32 +0100
Subject: [PATCH 1/4] build: replace python $libdir by our own
---
configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c04cd94a82b948b52d246f9ffee50126716a2fd5..7b2725328ae371cc5140a782aa165621e71091bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,7 +380,10 @@ if test "X$PYTHON_VERSION" != "X"; then
PY_MAKEFILE=`$PYTHON -c 'from distutils import sysconfig ; print sysconfig.get_makefile_filename()'`
PY_OTHER_LIBS=`$SED -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
- PY_SITE_PACKAGES="$PYTHON_LIB"
+ dnl this extracts the $libdir out of python lib directory,
+ dnl replacing it by our own.
+ PY_SUFFIX_LIB=`echo $PYTHON_LIB | $SED -e 's/.*python/python/'`
+ PY_SITE_PACKAGES="\${libdir}/$PY_SUFFIX_LIB"
AC_SUBST(PYTHON)
AC_SUBST(PY_LIB_LOC)
AC_SUBST(PY_CFLAGS)
--
1.8.4.2

View File

@ -0,0 +1,25 @@
From ff0b9ba8d40e77126f6b6edf337427eb98ccfaf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Thu, 5 Dec 2013 18:21:10 +0100
Subject: [PATCH 2/4] doc: remove reference to init.xml that is not created
anymore
---
docs/reference/lasso/lasso-docs.sgml | 1 -
1 file changed, 1 deletion(-)
diff --git a/docs/reference/lasso/lasso-docs.sgml b/docs/reference/lasso/lasso-docs.sgml
index b71fefcf2afbfdfcf3ec3803283f409db30545dd..21a44b8f739bc6809a4b7ffd991796176929b5e5 100644
--- a/docs/reference/lasso/lasso-docs.sgml
+++ b/docs/reference/lasso/lasso-docs.sgml
@@ -140,7 +140,6 @@ the <ulink url="http://lasso.entrouvert.org/license">GNU General Public License<
<xi:include href="xml/session.xml"/>
<xi:include href="xml/profile.xml"/>
<xi:include href="xml/errors.xml"/>
- <xi:include href="xml/init.xml"/>
<para><link linkend="lasso-LassoNode">LassoNode</link> is the base class for all Lasso classes, it gives XML serialization and deserialization support to all of them.</para>
<xi:include href="xml/node.xml"/>
<para>The <link linkend="lasso-LassoMiscTextNode">LassoMiscTextNode</link> allows to represent miscellenaous nodes for whose no mapping to a specific <link linkend="GObjectClass">GObjectClass</link> exists.</para>
--
1.8.4.2

View File

@ -0,0 +1,71 @@
From af05f9b3179c19d8dcba641b38d76309631985ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Fri, 6 Dec 2013 02:00:56 +0100
Subject: [PATCH 3/4] perl: make it compatible with recent libxml2
---
bindings/perl/glist_handling.c | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/bindings/perl/glist_handling.c b/bindings/perl/glist_handling.c
index e51cc6cb9302b11f4f0ef07c10dde228b8fa83d8..01deb2746941832a1bb2fd75c0e2ac748908f26b 100644
--- a/bindings/perl/glist_handling.c
+++ b/bindings/perl/glist_handling.c
@@ -28,6 +28,25 @@
#include <lasso/utils.h>
#include "../utils.c"
+static xmlBuffer*
+xmlnode_to_xmlbuffer(xmlNode *node)
+{
+ xmlOutputBufferPtr output_buffer;
+ xmlBuffer *buffer;
+
+ if (! node)
+ return NULL;
+
+ buffer = xmlBufferCreate();
+ output_buffer = xmlOutputBufferCreateBuffer(buffer, NULL);
+ xmlNodeDumpOutput(output_buffer, NULL, node, 0, 0, NULL);
+ xmlOutputBufferClose(output_buffer);
+ xmlBufferAdd(buffer, BAD_CAST "", 1);
+
+ return buffer;
+}
+
+
/**
* xmlnode_to_pv:
* @node: an xmlNode* object
@@ -38,25 +57,18 @@
static SV*
xmlnode_to_pv(xmlNode *node, gboolean do_free)
{
- xmlOutputBufferPtr buf;
+ xmlBuffer *buf;
SV *pestring = NULL;
if (node == NULL) {
return &PL_sv_undef;
}
- buf = xmlAllocOutputBuffer(NULL);
+ buf = xmlnode_to_xmlbuffer(node);
if (buf == NULL) {
pestring = &PL_sv_undef;
} else {
- xmlNodeDumpOutput(buf, NULL, node, 0, 1, NULL);
- xmlOutputBufferFlush(buf);
- if (buf->conv == NULL) {
- pestring = newSVpv((char*)buf->buffer->content, 0);
- } else {
- pestring = newSVpv((char*)buf->conv->content, 0);
- }
- xmlOutputBufferClose(buf);
+ pestring = newSVpv((char*)xmlBufferContent(buf), 0);
}
if (do_free) {
lasso_release_xml_node(node);
--
1.8.4.2

View File

@ -0,0 +1,25 @@
From b30e2463a73d3ace68957eb988b905b3c3b758a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Fri, 6 Dec 2013 02:13:03 +0100
Subject: [PATCH 4/4] doc: remove broken gtk-doc tests for now
---
docs/reference/lasso/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/reference/lasso/Makefile.am b/docs/reference/lasso/Makefile.am
index ac8c5118dd8002c3ae64fe6c82efbb32025b103a..4e067a7ec72d34fa3e0054ede157d0217cf9e4d9 100644
--- a/docs/reference/lasso/Makefile.am
+++ b/docs/reference/lasso/Makefile.am
@@ -115,7 +115,7 @@ endif
# Comment this out if you want your docs-status tested during 'make check'
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir)
-TESTS = $(GTKDOC_CHECK)
+#TESTS = $(GTKDOC_CHECK)
endif
-include $(top_srcdir)/git.mk
--
1.8.4.2

View File

@ -25,6 +25,11 @@ Url: http://lasso.entrouvert.org/
Patch00: jumbo-2.3.6-to-master.patch Patch00: jumbo-2.3.6-to-master.patch
Patch01: add-automake-14-support.patch Patch01: add-automake-14-support.patch
Patch02: 0001-Fix-license-boilerplates.patch
Patch03: 0001-build-replace-python-libdir-by-our-own.patch
Patch04: 0002-doc-remove-reference-to-init.xml-that-is-not-created.patch
Patch05: 0003-perl-make-it-compatible-with-recent-libxml2.patch
Patch06: 0004-doc-remove-broken-gtk-doc-tests-for-now.patch
%description %description
Lasso is a library that implements the Liberty Alliance Single Sign On Lasso is a library that implements the Liberty Alliance Single Sign On
@ -46,6 +51,7 @@ documentation for Lasso.
Summary: Liberty Alliance Single Sign On (lasso) Perl bindings Summary: Liberty Alliance Single Sign On (lasso) Perl bindings
Group: Development/Libraries Group: Development/Libraries
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -99,9 +105,14 @@ library.
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch00 -p1 %patch00 -p1
%patch01 -p1 %patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%patch06 -p1
# Temporary build fix, remove once 2.4.0 is released. # Temporary build fix, remove once 2.4.0 is released.
echo "2.3.6-g9c0848" > .tarball-version echo "2.3.6-b30e246" > .tarball-version
chmod +x tools/git-version-gen chmod +x tools/git-version-gen
%build %build
@ -144,10 +155,8 @@ find %{buildroot} -type f -name '*.a' -exec rm -f {} \;
%if %{with_perl} %if %{with_perl}
find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
find %{buildroot}/usr/lib/perl5 -type f -print | find %{buildroot}/usr/lib*/perl5 -type f -print |
sed "s@^%{buildroot}@@g" | sed "s@^%{buildroot}@@g" > %{name}-perl-filelist
grep -v perllocal.pod |
grep -v "\.packlist" > %{name}-perl-filelist
if [ "$(cat %{name}-perl-filelist)X" = "X" ] ; then if [ "$(cat %{name}-perl-filelist)X" = "X" ] ; then
echo "ERROR: EMPTY FILE LIST" echo "ERROR: EMPTY FILE LIST"
exit -1 exit -1
@ -207,6 +216,11 @@ rm -fr %{buildroot}%{_defaultdocdir}/%{name}
%endif %endif
%changelog %changelog
* Mon Dec 9 2013 Simo Sorce <simo@redhat.com> 2.3.6-0.20131125.5
- Add patches to fix rpmlint license issues
- Add upstream patches to fix some build issues
- Enale perl bindings
* Thu Dec 5 2013 Simo Sorce <simo@redhat.com> 2.3.6-0.20131125.4 * Thu Dec 5 2013 Simo Sorce <simo@redhat.com> 2.3.6-0.20131125.4
- Add patch to support automake-1.14 for rawhide - Add patch to support automake-1.14 for rawhide