Signed-off-by: Artur Wiebe <[email protected]>
---
 ...-do-not-use-libdirs-from-xslt-config.patch | 31 +++++++++++
 patches/lxml-4.2.4/series                     |  1 +
 rules/python3-lxml.in                         | 14 +++++
 rules/python3-lxml.make                       | 51 +++++++++++++++++++
 4 files changed, 97 insertions(+)
 create mode 100644 
patches/lxml-4.2.4/0001-do-not-use-libdirs-from-xslt-config.patch
 create mode 100644 patches/lxml-4.2.4/series
 create mode 100644 rules/python3-lxml.in
 create mode 100644 rules/python3-lxml.make

diff --git a/patches/lxml-4.2.4/0001-do-not-use-libdirs-from-xslt-config.patch 
b/patches/lxml-4.2.4/0001-do-not-use-libdirs-from-xslt-config.patch
new file mode 100644
index 000000000..c0cea0f16
--- /dev/null
+++ b/patches/lxml-4.2.4/0001-do-not-use-libdirs-from-xslt-config.patch
@@ -0,0 +1,31 @@
+From d20f79d5e0d04a243f8bda8ef49e59f8d3afaf9c Mon Sep 17 00:00:00 2001
+From: Artur Wiebe <[email protected]>
+Date: Thu, 30 Aug 2018 10:46:22 +0200
+Subject: [PATCH] do not use libdirs from xslt-config
+
+---
+ setupinfo.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/setupinfo.py b/setupinfo.py
+index bdac1d0..87feac7 100644
+--- a/setupinfo.py
++++ b/setupinfo.py
+@@ -292,10 +292,10 @@ def library_dirs(static_library_dirs):
+         return static_library_dirs
+     # filter them from xslt-config --libs
+     result = []
+-    possible_library_dirs = flags('libs')
+-    for possible_library_dir in possible_library_dirs:
+-        if possible_library_dir.startswith('-L'):
+-            result.append(possible_library_dir[2:])
++#    possible_library_dirs = flags('libs')
++#    for possible_library_dir in possible_library_dirs:
++#        if possible_library_dir.startswith('-L'):
++#            result.append(possible_library_dir[2:])
+     return result
+ 
+ def include_dirs(static_include_dirs):
+-- 
+2.18.0
+
diff --git a/patches/lxml-4.2.4/series b/patches/lxml-4.2.4/series
new file mode 100644
index 000000000..13f153f5b
--- /dev/null
+++ b/patches/lxml-4.2.4/series
@@ -0,0 +1 @@
+0001-do-not-use-libdirs-from-xslt-config.patch
diff --git a/rules/python3-lxml.in b/rules/python3-lxml.in
new file mode 100644
index 000000000..9206196f9
--- /dev/null
+++ b/rules/python3-lxml.in
@@ -0,0 +1,14 @@
+## SECTION=python3
+
+config PYTHON3_LXML
+       tristate
+       select PYTHON3
+       select HOST_PYTHON3_SETUPTOOLS
+       select LIBXSLT
+       prompt "lxml"
+       help
+         lxml is a Pythonic, mature binding for the libxml2 and libxslt 
libraries.
+         It provides safe and convenient access to these libraries
+         using the ElementTree API.
+         It extends the ElementTree API significantly to offer support for
+         XPath, RelaxNG, XML Schema, XSLT, C14N and much more.
diff --git a/rules/python3-lxml.make b/rules/python3-lxml.make
new file mode 100644
index 000000000..70fadc372
--- /dev/null
+++ b/rules/python3-lxml.make
@@ -0,0 +1,51 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Artur Wiebe <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_LXML) += python3-lxml
+
+PYTHON3_LXML_VERSION   := 4.2.4
+PYTHON3_LXML_MD5       := 31239400ca4e130b69993bb3c14204b3
+PYTHON3_LXML           := lxml-$(PYTHON3_LXML_VERSION)
+PYTHON3_LXML_SUFFIX    := tar.gz
+PYTHON3_LXML_URL       := 
https://pypi.python.org/packages/ca/63/139b710671c1655aed3b20c1e6776118c62e9f9311152f4c6031e12a0554/$(PYTHON3_LXML).$(PYTHON3_LXML_SUFFIX)\#md5=$(PYTHON3_LXML_MD5)
+PYTHON3_LXML_SOURCE    := $(SRCDIR)/$(PYTHON3_LXML).$(PYTHON3_LXML_SUFFIX)
+PYTHON3_LXML_DIR       := $(BUILDDIR)/$(PYTHON3_LXML)
+PYTHON3_LXML_LICENSE   := BSD
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_LXML_CONF_TOOL    := python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-lxml.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, python3-lxml)
+       @$(call install_fixup,python3-lxml,PRIORITY,optional)
+       @$(call install_fixup,python3-lxml,SECTION,base)
+       @$(call install_fixup,python3-lxml,AUTHOR,"Artur Wiebe 
<[email protected]>")
+       @$(call install_fixup,python3-lxml,DESCRIPTION,missing)
+
+       @$(call install_glob, python3-lxml, 0, 0, -, \
+               /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/lxml,, *.py)
+
+       @$(call install_finish,python3-lxml)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to