mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
libxml2: bump version
This commit is contained in:
@@ -10,18 +10,16 @@ available in other environments."
|
||||
HOMEPAGE="http://www.xmlsoft.org/"
|
||||
COPYRIGHT="1998-2013 Daniel Veillard. All Rights Reserved."
|
||||
LICENSE="MIT"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://download.gnome.org/sources/libxml2/2.9/libxml2-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://download.gnome.org/sources/libxml2/2.10/libxml2-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45"
|
||||
PATCHES="libxml2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
|
||||
# build the python module only for the primary architecture
|
||||
pythonModuleEnabled=false
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
if [ "$targetArchitecture" = x86_gcc2 ] && [ -n "$secondaryArchSuffix" ]; then
|
||||
pythonModuleEnabled=true
|
||||
fi
|
||||
|
||||
@@ -53,13 +51,18 @@ REQUIRES_devel="
|
||||
if $pythonModuleEnabled; then
|
||||
SUMMARY_python="The python module for libxml2"
|
||||
PROVIDES_python="
|
||||
libxml2_python = $portVersion
|
||||
libxml2${secondaryArchSuffix}_python = $portVersion
|
||||
"
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
PROVIDES_python+="
|
||||
libxml2_python = $portVersion
|
||||
"
|
||||
fi
|
||||
REQUIRES_python="
|
||||
libxml2 == $portVersion base
|
||||
libxml2$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
cmd:python
|
||||
cmd:python3.9
|
||||
"
|
||||
fi
|
||||
|
||||
@@ -69,10 +72,8 @@ BUILD_REQUIRES="
|
||||
"
|
||||
if $pythonModuleEnabled; then
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
python >= 2.7
|
||||
cmd:python3.9
|
||||
"
|
||||
# Note: We don't use "cmd:python" here to avoid issues with the
|
||||
# python search path.
|
||||
fi
|
||||
BUILD_PREREQUIRES="
|
||||
lib:libicudata$secondaryArchSuffix
|
||||
@@ -94,32 +95,23 @@ PATCH()
|
||||
doc/devhelp/Makefile.am
|
||||
sed -i "s,%{_datadir}/gtk-doc/html/libxml2,${developDocDir},g" \
|
||||
libxml.spec.in
|
||||
|
||||
# treat __GNUC__ as true only if >= 4 in some files
|
||||
sed -i "s/def __GNUC__/ defined\\(__GNUC__\\) \\&\\& __GNUC__ > 3/g" \
|
||||
timsort.h
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
automake --add-missing
|
||||
|
||||
withPython=
|
||||
if $pythonModuleEnabled; then
|
||||
# We symlink python's directories into our packaging directory and tell
|
||||
# configure that it can find python there. This way the correct
|
||||
# installation directory for the python module is determined.
|
||||
pythonDir="$portPackageLinksDir/python"
|
||||
pythonDir="$portPackageLinksDir/cmd~python3.9"
|
||||
ln -s $pythonDir/bin $pythonDir/develop $pythonDir/lib $prefix
|
||||
withPython="--with-python=$prefix"
|
||||
else
|
||||
withPython="--without-python"
|
||||
fi
|
||||
|
||||
runConfigure ./configure LDFLAGS="-lnetwork" \
|
||||
--with-html-dir=$docDir/html \
|
||||
--with-html-subdir="" \
|
||||
--disable-static \
|
||||
$withPython
|
||||
make $jobArgs
|
||||
@@ -145,14 +137,12 @@ INSTALL()
|
||||
# prepare develop/lib
|
||||
prepareInstalledDevelLibs libxml2
|
||||
fixPkgconfig
|
||||
mv $libDir/xml2Conf.sh $developLibDir/
|
||||
fixDevelopLibDirReferences $developLibDir/xml2Conf.sh $binDir/xml2-config
|
||||
fixDevelopLibDirReferences $binDir/xml2-config
|
||||
|
||||
# python package
|
||||
if $pythonModuleEnabled; then
|
||||
packageEntries python \
|
||||
$libDir/python* \
|
||||
${docDir}_python*
|
||||
$prefix/lib/python*
|
||||
fi
|
||||
|
||||
# devel package
|
||||
@@ -162,7 +152,6 @@ INSTALL()
|
||||
$developDir \
|
||||
$docDir \
|
||||
$manDir/man1/xml2-config.1 \
|
||||
$manDir/man3 \
|
||||
$libDir/cmake
|
||||
|
||||
# Remove stuff we don't need in the secondary architecture base package.
|
||||
132
dev-libs/libxml2/patches/libxml2-2.10.4.patchset
Normal file
132
dev-libs/libxml2/patches/libxml2-2.10.4.patchset
Normal file
@@ -0,0 +1,132 @@
|
||||
From 88c7b532d4f767284014f9c9cdd199a7470eae4a Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 1 Jan 2014 22:13:22 +0100
|
||||
Subject: Port patches from libxml2-2.8.0.
|
||||
|
||||
|
||||
diff --git a/xml2-config.in b/xml2-config.in
|
||||
index bda3221..df420f5 100644
|
||||
--- a/xml2-config.in
|
||||
+++ b/xml2-config.in
|
||||
@@ -40,8 +40,8 @@ while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
- includedir=$prefix/include
|
||||
- libdir=$prefix/lib
|
||||
+ includedir=$prefix/develop/headers
|
||||
+ libdir=$prefix/develop/lib
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
@@ -50,7 +50,7 @@ while test $# -gt 0; do
|
||||
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
- libdir=$exec_prefix/lib
|
||||
+ libdir=$exec_prefix/develop/lib
|
||||
;;
|
||||
|
||||
--exec-prefix)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 1943f113e77ec2fd7f180c0f09fc20b62ebaeada Mon Sep 17 00:00:00 2001
|
||||
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
||||
Date: Sat, 30 May 2015 11:38:15 +1200
|
||||
Subject: Haiku: search for catalogs in directories
|
||||
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index b7837e3..1334097 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -18,6 +18,9 @@
|
||||
#ifdef LIBXML_CATALOG_ENABLED
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#ifdef __HAIKU__
|
||||
+#include <ftw.h>
|
||||
+#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -68,10 +71,10 @@
|
||||
#define XML_URN_PUBID "urn:publicid:"
|
||||
#define XML_CATAL_BREAK ((xmlChar *) -1)
|
||||
#ifndef XML_XML_DEFAULT_CATALOG
|
||||
-#define XML_XML_DEFAULT_CATALOG "file://" SYSCONFDIR "/xml/catalog"
|
||||
+#define XML_XML_DEFAULT_CATALOG "/boot/system/data/xml/catalog"
|
||||
#endif
|
||||
#ifndef XML_SGML_DEFAULT_CATALOG
|
||||
-#define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR "/sgml/catalog"
|
||||
+#define XML_SGML_DEFAULT_CATALOG "/boot/system/data/sgml/catalog"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
@@ -3071,6 +3074,21 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) {
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+static xmlCatalogEntryPtr *__haikuNextEntry;
|
||||
+static int __haikuAddCatalog(const char* subpath, const struct stat* sb, int typeflag)
|
||||
+{
|
||||
+ if (typeflag == FTW_F) {
|
||||
+ *__haikuNextEntry = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
+ NULL, BAD_CAST subpath, xmlCatalogDefaultPrefer, NULL);
|
||||
+ if (*__haikuNextEntry != NULL)
|
||||
+ __haikuNextEntry = &((*__haikuNextEntry)->next);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* xmlInitializeCatalogData:
|
||||
*
|
||||
@@ -3163,10 +3181,16 @@ xmlInitializeCatalog(void) {
|
||||
cur++;
|
||||
path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths);
|
||||
if (path != NULL) {
|
||||
+#ifdef __HAIKU__
|
||||
+ __haikuNextEntry = nextent;
|
||||
+ ftw(path, __haikuAddCatalog, 3);
|
||||
+ nextent = __haikuNextEntry;
|
||||
+#else
|
||||
*nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL);
|
||||
if (*nextent != NULL)
|
||||
nextent = &((*nextent)->next);
|
||||
+#endif
|
||||
xmlFree(path);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 54f5ca74fdfbe329969182de9fff7837c747df6a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 3 Apr 2019 18:27:19 +0200
|
||||
Subject: Remove options unknown to gcc2
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 59763cf..abcf5c1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -718,7 +718,7 @@ else
|
||||
fi
|
||||
|
||||
# warnings we'd like to see
|
||||
- EXTRA_CFLAGS="${EXTRA_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -pedantic -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
# warnings we'd like to suppress
|
||||
EXTRA_CFLAGS="${EXTRA_CFLAGS} -Wno-long-long -Wno-format-extra-args"
|
||||
case "${host}" in
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
From 15b025f87e3186c1f7ba064c162cdf2bcacf535e Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 1 Jan 2014 22:13:22 +0100
|
||||
Subject: Port patches from libxml2-2.8.0.
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 46faa23..e281702 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -840,24 +840,19 @@ if test "$with_python" != "no" ; then
|
||||
fi
|
||||
if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
|
||||
then
|
||||
- if test -r $with_python/include/python$PYTHON_VERSION/Python.h
|
||||
+ if test -r $with_python/develop/headers/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
|
||||
+ PYTHON_INCLUDES=$with_python/develop/headers/python$PYTHON_VERSION
|
||||
else
|
||||
- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
+ if test -r $prefix/develop/headers/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
|
||||
+ PYTHON_INCLUDES=$prefix/develop/headers/python$PYTHON_VERSION
|
||||
else
|
||||
- if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
+ if test -r /boot/system/develop/headers/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
|
||||
- else
|
||||
- if test -r $with_python/include/Python.h
|
||||
- then
|
||||
- PYTHON_INCLUDES=$with_python/include
|
||||
- else
|
||||
- echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
|
||||
- fi
|
||||
+ PYTHON_INCLUDES=/boot/system/develop/headers/python$PYTHON_VERSION
|
||||
+ else
|
||||
+ echo could not find python$PYTHON_VERSION/Python.h or $with_python/develop/headers/Python.h
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -868,13 +863,13 @@ if test "$with_python" != "no" ; then
|
||||
fi
|
||||
if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
|
||||
then
|
||||
- if test -d $libdir/python$PYTHON_VERSION/site-packages
|
||||
+ if test -d $libdir/python$PYTHON_VERSION/vendor-packages
|
||||
then
|
||||
- PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
|
||||
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/vendor-packages
|
||||
else
|
||||
- if test -d $with_python/lib/site-packages
|
||||
+ if test -d $with_python/lib/vendor-packages
|
||||
then
|
||||
- PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
|
||||
+ PYTHON_SITE_PACKAGES=$with_python/lib/vendor-packages
|
||||
else
|
||||
PYTHON_SITE_PACKAGES=$($PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(True,False,"${exec_prefix}"))')
|
||||
fi
|
||||
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
|
||||
index 227e24d..06d137c 100644
|
||||
--- a/python/tests/Makefile.am
|
||||
+++ b/python/tests/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
|
||||
+exampledir = $(docdir)_python-$(LIBXML_VERSION)/examples
|
||||
dist_example_DATA = $(PYTESTS) $(XMLS)
|
||||
|
||||
PYTESTS= \
|
||||
diff --git a/xml2-config.in b/xml2-config.in
|
||||
index 5863ffa..fd460ff 100644
|
||||
--- a/xml2-config.in
|
||||
+++ b/xml2-config.in
|
||||
@@ -40,8 +40,8 @@ while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
- includedir=$prefix/include
|
||||
- libdir=$prefix/lib
|
||||
+ includedir=$prefix/develop/headers
|
||||
+ libdir=$prefix/develop/lib
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
@@ -50,7 +50,7 @@ while test $# -gt 0; do
|
||||
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
- libdir=$exec_prefix/lib
|
||||
+ libdir=$exec_prefix/develop/lib
|
||||
;;
|
||||
|
||||
--exec-prefix)
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 1d07f58593833b3a3df4c1374c37c1cb59802b87 Mon Sep 17 00:00:00 2001
|
||||
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
||||
Date: Sat, 30 May 2015 11:38:15 +1200
|
||||
Subject: Haiku: search for catalogs in directories
|
||||
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index e071b49..6ef5668 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
+#ifdef __HAIKU__
|
||||
+#include <ftw.h>
|
||||
+#endif
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/uri.h>
|
||||
@@ -70,10 +73,10 @@
|
||||
#define XML_URN_PUBID "urn:publicid:"
|
||||
#define XML_CATAL_BREAK ((xmlChar *) -1)
|
||||
#ifndef XML_XML_DEFAULT_CATALOG
|
||||
-#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
|
||||
+#define XML_XML_DEFAULT_CATALOG "/boot/system/data/xml/catalog"
|
||||
#endif
|
||||
#ifndef XML_SGML_DEFAULT_CATALOG
|
||||
-#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
|
||||
+#define XML_SGML_DEFAULT_CATALOG "/boot/system/data/sgml/catalog"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
@@ -3079,6 +3082,21 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) {
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+static xmlCatalogEntryPtr *__haikuNextEntry;
|
||||
+static int __haikuAddCatalog(const char* subpath, const struct stat* sb, int typeflag)
|
||||
+{
|
||||
+ if (typeflag == FTW_F) {
|
||||
+ *__haikuNextEntry = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
+ NULL, BAD_CAST subpath, xmlCatalogDefaultPrefer, NULL);
|
||||
+ if (*__haikuNextEntry != NULL)
|
||||
+ __haikuNextEntry = &((*__haikuNextEntry)->next);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* xmlInitializeCatalogData:
|
||||
*
|
||||
@@ -3171,10 +3189,16 @@ xmlInitializeCatalog(void) {
|
||||
cur++;
|
||||
path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths);
|
||||
if (path != NULL) {
|
||||
+#ifdef __HAIKU__
|
||||
+ __haikuNextEntry = nextent;
|
||||
+ ftw(path, __haikuAddCatalog, 3);
|
||||
+ nextent = __haikuNextEntry;
|
||||
+#else
|
||||
*nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL);
|
||||
if (*nextent != NULL)
|
||||
nextent = &((*nextent)->next);
|
||||
+#endif
|
||||
xmlFree(path);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From d5b81a0c013d0c6dfe20cbda44b0d2ff890d5f01 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 3 Apr 2019 18:27:19 +0200
|
||||
Subject: Remove options unknown to gcc2
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e281702..4162493 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -761,7 +761,7 @@ else
|
||||
fi
|
||||
|
||||
# warnings we'd like to see
|
||||
- EXTRA_CFLAGS="${EXTRA_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -pedantic -Wall -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
|
||||
# warnings we'd like to suppress
|
||||
EXTRA_CFLAGS="${EXTRA_CFLAGS} -Wno-long-long -Wno-format-extra-args"
|
||||
case "${host}" in
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user