public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
Date: Wed, 29 Jul 2020 20:55:45 +0000 (UTC)	[thread overview]
Message-ID: <1596056119.239dd8d12a0181dc4a9b162a96deef14aa7889b7.mattst88@gentoo> (raw)

commit:     239dd8d12a0181dc4a9b162a96deef14aa7889b7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 27 08:34:22 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Jul 29 20:55:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=239dd8d1

dev-libs/libxslt: security bump to 1.1.34

Note that we need the new dev-libs/libxml-2.9.10:2 in order for tests to
build successfully.

Let's require it in general because upstream may have written their code
expecting other properties which didn't show up during testing.

Bug: https://bugs.gentoo.org/700386
Closes: https://bugs.gentoo.org/703274
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-libs/libxslt/Manifest                          |   1 +
 .../files/libxslt-1.1.34-simplify-python.patch     | 239 +++++++++++++++++++++
 dev-libs/libxslt/libxslt-1.1.34.ebuild             | 125 +++++++++++
 3 files changed, 365 insertions(+)

diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index 83895cac52e..c2c9495a149 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1,2 +1,3 @@
 DIST libxslt-1.1.33-CVE-2019-11068.patch 3965 BLAKE2B eb3a0741ac9f464e31e8edd276fec4d837c63676a56a446ad42a0e251508bacb0129cbe18783de305336eaa32b189ffc23e95e03cfd5f940d4dee376f1fa0f8c SHA512 9a97c5038809aaf64cb4eb7d67b95acc4b62236d7613a5f753e2a0f4c9e707c22cd07bda2e518d3f36a40b9ed5aa93496b743998c7adadb84ca147e045e35948
 DIST libxslt-1.1.33.tar.gz 3444093 BLAKE2B 3457e5b62328ccbc48fbc5f71bf8a54c195c0059dd18afa38e6916e74c57e72601970446210c7584d5410b956e3bbb8cd4b852ec71e0a13c4441e6de095d86d1 SHA512 ebbe438a38bf6355950167d3b580edc22baa46a77068c18c42445c1c9c716d42bed3b30c5cd5bec359ab32d03843224dae458e9e32dc61693e7cf4bab23536e0
+DIST libxslt-1.1.34.tar.gz 3552258 BLAKE2B f043a0357e0705ab68041adf4031a6b3e0b5c3d396691c988a34963a0ee0ebe3bede2d1d7a0c5f0c42c046183653c94f4b51e10e35980a039c8cad446e84ad86 SHA512 1516a11ad608b04740674060d2c5d733b88889de5e413b9a4e8bf8d1a90d712149df6d2b1345b615f529d7c7d3fa6dae12e544da828b39c7d415e54c0ee0776b

diff --git a/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch b/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch
new file mode 100644
index 00000000000..ff7e263aca4
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch
@@ -0,0 +1,239 @@
+From aa0f7a8d59a9bbd646203d3f14e39e217961f725 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 11 Nov 2015 17:49:07 +0100
+Subject: [PATCH] Simplify python setup in autoconf
+
+AM_PATH_PYTHON does most of the job without using pkg-config as expected
+from the rest of the autoconf script.
+diff --git a/Makefile.am b/Makefile.am
+index 2c417d0..a65a2b7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,9 +2,14 @@ SUBDIRS = \
+ 	libxslt \
+ 	libexslt \
+ 	xsltproc \
+-	doc \
+-	$(PYTHON_SUBDIR) \
+-	tests
++	doc
++
++
++if WITH_PYTHON
++	SUBDIRS += python
++endif
++
++SUBDIRS += tests
+ 
+ DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests
+ 
+@@ -52,7 +57,9 @@ tests: dummy
+ 	@echo '## Running the regression test suite'
+ 	@(cd tests ; $(MAKE) -s tests)
+ 	@(cd xsltproc ; $(MAKE) -s tests)
+-	@(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; $(MAKE) -s tests ; fi)
++if WITH_PYTHON
++	@(cd python ; $(MAKE) -s tests)
++endif
+ 
+ valgrind:
+ 	@echo '## Running the regression tests under Valgrind'
+diff --git a/configure.ac b/configure.ac
+index 325a7be..ee1eabd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -227,90 +227,37 @@ dnl
+ dnl check for python
+ dnl
+ 
+-PYTHON_VERSION=
+-PYTHON_INCLUDES=
+-PYTHON_SITE_PACKAGES=
+-pythondir=
+-AC_ARG_WITH(python, [  --with-python[=DIR]    Build Python bindings if found])
+-if test "$with_python" != "no" ; then
+-    if test -x "$with_python/bin/python"
+-    then
+-        echo Found python in $with_python/bin/python
+-        PYTHON="$with_python/bin/python"
+-    else
+-	if test -x "$with_python"
+-	then
+-	    echo Found python in $with_python
+-	    PYTHON="$with_python"
+-	else
+-            if test -x "$PYTHON"
+-            then
+-                echo Found python in environment PYTHON=$PYTHON
+-                with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
+-	    else
+-	        AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
+-	    fi
+-	fi
+-    fi
+-    if test "$PYTHON" != ""
+-    then
+-        echo "PYTHON is pointing at $PYTHON"
+-        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
+-	echo Found Python version $PYTHON_VERSION
+-	LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
+-except: print 0"`
+-	if test "$LIBXML2_PYTHON" = "1"
+-	then
+-	    echo Found libxml2-python module
+-	else
+-	    echo Warning: Missing libxml2-python
+-	fi
+-    fi
+-    if test "$PYTHON_VERSION" != ""
+-    then
+-	if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
+-	   -d $with_python/lib/python$PYTHON_VERSION/site-packages
+-	then
+-	    PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
+-	    PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+-	else
+-	    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+-	    then
+-	        PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
+-		PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+-	    else
+-		if test -r /usr/include/python$PYTHON_VERSION/Python.h
+-		then
+-		    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
+-		    PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+-		else
+-		    echo could not find python$PYTHON_VERSION/Python.h
+-		fi
+-	    fi
+-	    if test ! -d "$PYTHON_SITE_PACKAGES"
+-	    then
+-		    PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
+-	    fi
+-	fi
+-        PYTHON_LIBS=`python$PYTHON_VERSION-config --libs`
+-    fi
+-    if test "$with_python" != ""
+-    then
+-        pythondir='$(PYTHON_SITE_PACKAGES)'
+-    else
+-        pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+-    fi
+-fi
+-AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
+-if test "$PYTHON_INCLUDES" != ""
+-then
+-    PYTHON_SUBDIR=python
+-else
+-    PYTHON_SUBDIR=
+-fi
+-AC_SUBST(pythondir)
+-AC_SUBST(PYTHON_SUBDIR)
+-AC_SUBST(PYTHON_LIBS)
++AC_ARG_WITH([python],
++    AS_HELP_STRING([--with-python], [Build Python bindings if found])
++)
++
++AS_IF([test "$with_python" = "yes"],
++      [AM_PATH_PYTHON
++       AC_PATH_TOOL([PYTHON_CONFIG], [python$PYTHON_VERSION-config], [no])
++       AS_IF([test "$PYTHON_CONFIG" = "no"],
++             [AC_PATH_TOOL([PYTHON_CONFIG], [python-config], [no])])
++       AS_IF([test "$PYTHON_CONFIG" != "no"],
++             [PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags`
++              PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
++              PYTHON_LIBS=`$PYTHON_CONFIG --libs`],
++             [AC_MSG_ERROR([Missing python development files.])])
++       AC_MSG_CHECKING([libxml2 module in $PYTHON])
++	   LIBXML2_PYTHON=`$PYTHON -c "import sys;
++try:
++    import libxml2
++    sys.stdout.write('1')
++except:
++    sys.stdout.write('0')"`
++       AS_IF([test "$LIBXML2_PYTHON" = "1"],
++             [AC_MSG_RESULT([yes])],
++             [AC_MSG_RESULT([no])
++              AC_MSG_WARN([libxml2 python module not found, expect runtime errors])])
++      ])
++
++AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
++AC_SUBST([PYTHON_CFLAGS])
++AC_SUBST([PYTHON_LDFLAGS])
++AC_SUBST([PYTHON_LIBS])
+ 
+ AC_ARG_WITH(crypto, [  --with-crypto           Add crypto support to exslt (on)])
+ WITH_CRYPTO=0
+@@ -634,10 +581,6 @@ AC_SUBST(PYTHONSODV)
+ AC_SUBST(XML_CONFIG)
+ AC_SUBST(LIBXML_LIBS)
+ AC_SUBST(LIBXML_CFLAGS)
+-AC_SUBST(PYTHON)
+-AC_SUBST(PYTHON_VERSION)
+-AC_SUBST(PYTHON_INCLUDES)
+-AC_SUBST(PYTHON_SITE_PACKAGES)
+ 
+ XSLT_LIBDIR='-L${libdir}'
+ XSLT_INCLUDEDIR='-I${includedir}'
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 17a0d17..1c57a63 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -5,7 +5,7 @@ SUBDIRS= . tests
+ 
+ AM_CFLAGS = $(LIBXML_CFLAGS)
+ 
+-DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
++docsdir = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
+ # libxsltclass.txt is generated
+ DOCS=
+ 
+@@ -16,10 +16,7 @@ EXTRA_DIST = 			\
+ 	libxml_wrap.h		\
+ 	libxslt_wrap.h		\
+ 	libxsl.py		\
+-	libxslt-python-api.xml	\
+-	$(DOCS)
+-
+-libxsltmod_la_LDFLAGS =  -module -avoid-version
++	libxslt-python-api.xml
+ 
+ if WITH_PYTHON
+ mylibs = \
+@@ -28,31 +25,22 @@ mylibs = \
+ 
+ all-local: libxslt.py
+ 
+-python_LTLIBRARIES = libxsltmod.la
++python_PYTHON = libxslt.py
++pyexec_LTLIBRARIES = libxsltmod.la
+ 
+ libxsltmod_la_CPPFLAGS = \
+-	-I$(PYTHON_INCLUDES) \
+ 	-I$(top_srcdir)/libxslt \
+ 	-I$(top_srcdir) \
+-	-I../libexslt
++	-I$(top_srcdir)/libexslt \
++	$(PYTHON_CFLAGS)
+ libxsltmod_la_SOURCES = libxslt.c types.c
+ nodist_libxsltmod_la_SOURCES = libxslt-py.c
+ libxsltmod_la_LIBADD = $(mylibs) $(PYTHON_LIBS)
++libxsltmod_la_LDFLAGS =  $(WIN32_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
+ 
+ libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
+ 	cat $(srcdir)/libxsl.py libxsltclass.py > $@
+ 
+-install-data-local:
+-	$(MKDIR_P) $(DESTDIR)$(pythondir)
+-	$(INSTALL) -m 0644 libxslt.py $(DESTDIR)$(pythondir)
+-	$(MKDIR_P) $(DESTDIR)$(DOCS_DIR)
+-	@(for doc in $(DOCS) ; \
+-	   do $(INSTALL) -m 0644 $(srcdir)/$$doc $(DESTDIR)$(DOCS_DIR) ; done)
+-
+-uninstall-local:
+-	rm -f $(DESTDIR)$(pythondir)/libxslt.py
+-	rm -rf $(DESTDIR)$(DOCS_DIR)
+-
+ GENERATE = generator.py
+ API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml
+ GENERATED= libxsltclass.py \

diff --git a/dev-libs/libxslt/libxslt-1.1.34.ebuild b/dev-libs/libxslt/libxslt-1.1.34.ebuild
new file mode 100644
index 00000000000..27eaf8ce921
--- /dev/null
+++ b/dev-libs/libxslt/libxslt-1.1.34.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit autotools multilib-minimal python-r1 toolchain-funcs
+
+DESCRIPTION="XSLT libraries and tools"
+HOMEPAGE="http://www.xmlsoft.org/"
+SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt debug examples python static-libs elibc_Darwin"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	>=dev-libs/libxml2-2.9.10:2[${MULTILIB_USEDEP}]
+	crypt?  ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		dev-libs/libxml2:2[python,${PYTHON_USEDEP}]
+	)
+"
+DEPEND="${RDEPEND}"
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/xslt-config
+)
+
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/libxslt/xsltconfig.h
+)
+
+src_prepare() {
+	default
+
+	DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
+
+	# Simplify python setup
+	# https://bugzilla.gnome.org/show_bug.cgi?id=758095
+	eapply "${FILESDIR}"/${PN}-1.1.34-simplify-python.patch
+	eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
+
+	eautoreconf
+	# If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
+	# and it is propably otherwise too if upstream generated with new
+	# autoconf
+#	epunt_cxx
+	# But Prefix always needs elibtoolize if not eautoreconf'd.
+#	elibtoolize
+}
+
+multilib_src_configure() {
+	libxslt_configure() {
+		ECONF_SOURCE="${S}" econf \
+			--with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
+			--with-html-subdir=html \
+			$(use_with crypt crypto) \
+			$(use_with debug) \
+			$(use_with debug mem-debug) \
+			$(use_enable static-libs static) \
+			"$@"
+	}
+
+	libxslt_py_configure() {
+		mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
+		run_in_build_dir libxslt_configure --with-python
+	}
+
+	libxslt_configure --without-python # build python bindings separately
+
+	if multilib_is_native_abi && use python; then
+		python_foreach_impl libxslt_py_configure
+	fi
+}
+
+multilib_src_compile() {
+	default
+	multilib_is_native_abi && use python && libxslt_foreach_py_emake all
+}
+
+multilib_src_test() {
+	default
+	multilib_is_native_abi && use python && libxslt_foreach_py_emake test
+}
+
+multilib_src_install() {
+	# "default" does not work here - docs are installed by multilib_src_install_all
+	emake DESTDIR="${D}" install
+
+	if multilib_is_native_abi && use python; then
+		libxslt_foreach_py_emake \
+			DESTDIR="${D}" \
+			docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+			EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
+			install
+		python_foreach_impl python_optimize
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	if ! use examples && use python; then
+		rm -r "${ED}"/usr/share/doc/${PF}/python/examples || die
+	fi
+
+	find "${ED}" -type f -name "*.la" -delete || die
+}
+
+libxslt_foreach_py_emake() {
+	libxslt_py_emake() {
+		pushd "${BUILD_DIR}/python" > /dev/null || die
+		emake "$@"
+		popd > /dev/null
+	}
+	local native_builddir=${BUILD_DIR}
+	python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
+}


             reply	other threads:[~2020-07-29 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 20:55 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-04  0:29 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/ Sam James
2022-04-17 16:44 Sam James
2020-07-29 20:55 Matt Turner
2018-03-02 17:07 Mart Raudsepp
2017-09-12 22:04 Gilles Dartiguelongue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1596056119.239dd8d12a0181dc4a9b162a96deef14aa7889b7.mattst88@gentoo \
    --to=mattst88@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox