From 007546b2b71dadc66ea478e6d672fdfb806ec2e5 Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Wed, 7 Feb 2024 14:40:27 +0900 Subject: [PATCH] Bump to 2.12.5 Signed-off-by: TizenOpenSource --- .gitignore | 66 ------------------ packaging/Add_pie_compile_option.patch | 18 +++++ packaging/baselibs.conf | 3 + packaging/libxml2.manifest | 5 ++ packaging/libxml2.spec | 123 +++++++++++++++++++++++++++++++++ 5 files changed, 149 insertions(+), 66 deletions(-) delete mode 100644 .gitignore create mode 100644 packaging/Add_pie_compile_option.patch create mode 100644 packaging/baselibs.conf create mode 100644 packaging/libxml2.manifest create mode 100644 packaging/libxml2.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1ec700f..0000000 --- a/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -*.exe -*.o -*.la -*.lo -*.pyc - -# Executables -/example/gjobread -/xmlcatalog -/xmllint - -# Test executables -/runsuite -/runtest -/runxmlconf -/testModule -/testThreads -/testapi -/testchar -/testdict -/testlimits -/testparser -/testrecurse - -# Tests -/dba100000.xml -/missing.lst -/runsuite.log -/runxmlconf.log -/test.out -/xmlconf - -# Generated by build system -/config.h -/include/libxml/xmlversion.h -/libxml-2.0-uninstalled.pc -/libxml-2.0.pc -/libxml2-config.cmake -/xml2-config - -# Autotools -.deps -.libs -Makefile -Makefile.in -/INSTALL -/aclocal.m4 -/autom4te.cache -/compile -/config.guess -/config.h.in -/config.h.in~ -/config.log -/config.status -/config.sub -/configure -/configure~ -/depcomp -/install-sh -/libtool -/ltmain.sh -/missing -/m4/libtool.m4 -/m4/lt*.m4 -/py-compile -/stamp-h1 diff --git a/packaging/Add_pie_compile_option.patch b/packaging/Add_pie_compile_option.patch new file mode 100644 index 0000000..3a169d4 --- /dev/null +++ b/packaging/Add_pie_compile_option.patch @@ -0,0 +1,18 @@ +diff --git a/Makefile.am b/Makefile.am +index 0a49d37..57f842b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -153,11 +153,13 @@ xmllint_SOURCES=xmllint.c + xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS) + xmllint_DEPENDENCIES = $(DEPS) + xmllint_LDADD= $(RDL_LIBS) $(LDADDS) ++xmllint_LDFLAGS = -pie + + xmlcatalog_SOURCES=xmlcatalog.c + xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS) + xmlcatalog_DEPENDENCIES = $(DEPS) + xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) ++xmlcatalog_LDFLAGS = -pie + + testThreads_SOURCES = testThreads.c + testThreads_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..b3d6bf8 --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1,3 @@ +libxml2 +libxml2-devel + requires "libxml2- = " diff --git a/packaging/libxml2.manifest b/packaging/libxml2.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/libxml2.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/libxml2.spec b/packaging/libxml2.spec new file mode 100644 index 0000000..a09301e --- /dev/null +++ b/packaging/libxml2.spec @@ -0,0 +1,123 @@ +Name: libxml2 +Version: 2.12.5 +Release: 0 +Summary: A Library to Manipulate XML Files +License: MIT +Group: System/Libraries +Url: http://xmlsoft.org +# Source ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz changes every day +Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz +Source2: baselibs.conf +Source3: Add_pie_compile_option.patch +Source1001: libxml2.manifest +BuildRequires: pkg-config +BuildRequires: readline-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel + +%description +The XML C library was initially developed for the GNOME project. It is +now used by many programs to load and save extensible data structures +or manipulate any kind of XML files. + +This library implements a number of existing standards related to +markup languages, including the XML standard, name spaces in XML, XML +Base, RFC 2396, XPath, XPointer, HTML4, XInclude, SGML catalogs, and +XML catalogs. In most cases, libxml tries to implement the +specification in a rather strict way. To some extent, it provides +support for the following specifications, but does not claim to +implement them: DOM, FTP client, HTTP client, and SAX. + +The library also supports RelaxNG. Support for W3C XML Schemas is in +progress. + + +%package tools +Summary: Tools using libxml +Group: System/Libraries + +%description tools +This package contains xmllint, a very useful tool proving libxml's power. + +%package devel +Summary: Include Files and Libraries mandatory for Development +Group: Development/Libraries +Requires: %{name} = %{version} +Requires: %{name}-tools = %{version} +Requires: glibc-devel +Requires: readline-devel +Requires: xz-devel +Requires: zlib-devel + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + +%prep +%setup -q +cp %{SOURCE1001} . +%{__patch} -p1 < %{SOURCE3} + +%build +export CFLAGS+=" -fPIC" +chmod +x autogen.sh +%autogen +%configure --disable-static \ + --docdir=%_docdir/%name \ + --with-html-dir=%_docdir/%name/html \ + --with-fexceptions \ + --with-history \ + --without-python \ + --enable-ipv6 \ + --with-sax1 \ + --with-regexps \ + --with-threads \ + --with-reader \ + --with-http + +make %{?_smp_mflags} BASE_DIR="%_docdir" DOC_MODULE="%name" + +%check +rm -f /tmp/%{name}_test +%__make runtests + + +%install +make install DESTDIR="%buildroot" BASE_DIR="%_docdir" DOC_MODULE="%name" +ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml + +%remove_docs + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%defattr(-, root, root) +%license Copyright +%{_libdir}/lib*.so.* + +%files tools +%manifest %{name}.manifest +%defattr(-, root, root) +%license Copyright +%{_bindir}/xmllint +%{_bindir}/xmlcatalog + +%files devel +%manifest %{name}.manifest +%defattr(-, root, root) +%license Copyright +%{_bindir}/xml2-config +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/libxml.m4 +%{_includedir}/libxml +%{_includedir}/libxml2 +%{_libdir}/lib*.so +# libxml2.la is needed for the python-libxml2 build. Deleting it breaks build of python-libxml2. +%{_libdir}/libxml2.la +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/libxml2/libxml2-config.cmake + +%changelog -- 2.7.4