diff options
| author | Richard Leitner <richard.leitner@skidata.com> | 2018-06-04 13:06:34 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-06-05 18:17:21 -0700 |
| commit | b1d047c35a7dafb0e206475be371596cc9368715 (patch) | |
| tree | 076fe161403a7f086e99e97af16e3ad4ef9b2193 /meta-oe/recipes-support/libmxml | |
| parent | 268b4bd1dc4286f5b79e2a2d39c7cfdb12220fff (diff) | |
| download | meta-openembedded-b1d047c35a7dafb0e206475be371596cc9368715.tar.gz | |
libmxml: add recipe
Add version 2.11 of libmxml with the debian patches and a
fix for libmxml.a installation applied.
Upstreaming of these patches was requested by following pull-request:
https://github.com/michaelrsweet/mxml/pull/223
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'meta-oe/recipes-support/libmxml')
8 files changed, 295 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0001-remove-rpath-from-configure.in-and-configure.patch b/meta-oe/recipes-support/libmxml/libmxml/0001-remove-rpath-from-configure.in-and-configure.patch new file mode 100644 index 0000000000..cab203e7ff --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0001-remove-rpath-from-configure.in-and-configure.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From bcf5391c0c7edd85ee0c956be65cf4eeeea0a82a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Fathi Boudra <fboudra@free.fr> | ||
| 3 | Date: Fri, 1 Jun 2018 14:16:52 +0200 | ||
| 4 | Subject: [PATCH 1/7] remove rpath from configure.in and configure | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 01_remove_rpath.diff | ||
| 8 | --- | ||
| 9 | configure.ac | 11 ++++------- | ||
| 10 | 1 file changed, 4 insertions(+), 7 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index 47a0d41..6b3bbfa 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -184,8 +184,7 @@ if test x$enable_shared != xno; then | ||
| 17 | AC_MSG_RESULT(yes) | ||
| 18 | LIBMXML="libmxml.so.1.6" | ||
| 19 | DSO="\$(CC)" | ||
| 20 | - DSOFLAGS="$DSOFLAGS -Wl,-h,libmxml.so.1 -G -R\$(libdir) \$(OPTIM)" | ||
| 21 | - LDFLAGS="$LDFLAGS -R\$(libdir)" | ||
| 22 | + DSOFLAGS="$DSOFLAGS -Wl,-h,libmxml.so.1 -G \$(OPTIM)" | ||
| 23 | ;; | ||
| 24 | |||
| 25 | hp-ux) | ||
| 26 | @@ -200,23 +199,21 @@ if test x$enable_shared != xno; then | ||
| 27 | AC_MSG_RESULT(yes) | ||
| 28 | LIBMXML="libmxml.so.1.6" | ||
| 29 | DSO="\$(CC)" | ||
| 30 | - DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)" | ||
| 31 | + DSOFLAGS="$DSOFLAGS -Wl,-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)" | ||
| 32 | ;; | ||
| 33 | |||
| 34 | osf | linux* | gnu) | ||
| 35 | AC_MSG_RESULT(yes) | ||
| 36 | LIBMXML="libmxml.so.1.6" | ||
| 37 | DSO="\$(CC)" | ||
| 38 | - DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-rpath,\$(libdir) -shared \$(OPTIM)" | ||
| 39 | - LDFLAGS="$LDFLAGS -Wl,-rpath,\$(libdir)" | ||
| 40 | + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1 -shared \$(OPTIM)" | ||
| 41 | ;; | ||
| 42 | |||
| 43 | *bsd) | ||
| 44 | AC_MSG_RESULT(yes) | ||
| 45 | LIBMXML="libmxml.so.1.6" | ||
| 46 | DSO="\$(CC)" | ||
| 47 | - DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-R\$(libdir) -shared \$(OPTIM)" | ||
| 48 | - LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" | ||
| 49 | + DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1 -shared \$(OPTIM)" | ||
| 50 | ;; | ||
| 51 | |||
| 52 | darwin) | ||
| 53 | -- | ||
| 54 | 2.11.0 | ||
| 55 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0002-link-libmxml-with-pthread.patch b/meta-oe/recipes-support/libmxml/libmxml/0002-link-libmxml-with-pthread.patch new file mode 100644 index 0000000000..ec9d170bb4 --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0002-link-libmxml-with-pthread.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 5e415d207465f41ae821235eb64c94916b515260 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= <goneri@rulezlan.org> | ||
| 3 | Date: Fri, 1 Jun 2018 14:20:10 +0200 | ||
| 4 | Subject: [PATCH 2/7] link libmxml with pthread | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 02_link_with_pthread.diff | ||
| 8 | --- | ||
| 9 | Makefile.in | 2 +- | ||
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/Makefile.in b/Makefile.in | ||
| 13 | index eef14fe..70c322c 100644 | ||
| 14 | --- a/Makefile.in | ||
| 15 | +++ b/Makefile.in | ||
| 16 | @@ -271,7 +271,7 @@ mxml1.dll: $(LIBOBJS) | ||
| 17 | |||
| 18 | libmxml.so.1.6: $(LIBOBJS) | ||
| 19 | echo Creating $@... | ||
| 20 | - $(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS) | ||
| 21 | + $(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS) $(LIBS) | ||
| 22 | $(RM) libmxml.so libmxml.so.1 | ||
| 23 | $(LN) libmxml.so.1.6 libmxml.so | ||
| 24 | $(LN) libmxml.so.1.6 libmxml.so.1 | ||
| 25 | -- | ||
| 26 | 2.11.0 | ||
| 27 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0003-add-missing-LDFLAGS-to-Makefile.patch b/meta-oe/recipes-support/libmxml/libmxml/0003-add-missing-LDFLAGS-to-Makefile.patch new file mode 100644 index 0000000000..33b1d0893d --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0003-add-missing-LDFLAGS-to-Makefile.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 249c34c57ecd9bb49f8e3b420bde651c4bcad36d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Luis Uribe <acme@eviled.org> | ||
| 3 | Date: Fri, 1 Jun 2018 14:21:49 +0200 | ||
| 4 | Subject: [PATCH 3/7] add missing $(LDFLAGS) to Makefile | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 03_link_ldflags.diff | ||
| 8 | --- | ||
| 9 | Makefile.in | 2 +- | ||
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/Makefile.in b/Makefile.in | ||
| 13 | index 70c322c..fd48565 100644 | ||
| 14 | --- a/Makefile.in | ||
| 15 | +++ b/Makefile.in | ||
| 16 | @@ -271,7 +271,7 @@ mxml1.dll: $(LIBOBJS) | ||
| 17 | |||
| 18 | libmxml.so.1.6: $(LIBOBJS) | ||
| 19 | echo Creating $@... | ||
| 20 | - $(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS) $(LIBS) | ||
| 21 | + $(DSO) $(DSOFLAGS) -o libmxml.so.1.6 $(LIBOBJS) $(LIBS) $(LDFLAGS) | ||
| 22 | $(RM) libmxml.so libmxml.so.1 | ||
| 23 | $(LN) libmxml.so.1.6 libmxml.so | ||
| 24 | $(LN) libmxml.so.1.6 libmxml.so.1 | ||
| 25 | -- | ||
| 26 | 2.11.0 | ||
| 27 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0004-mxml-string-compile-headers.patch b/meta-oe/recipes-support/libmxml/libmxml/0004-mxml-string-compile-headers.patch new file mode 100644 index 0000000000..0fd5422a74 --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0004-mxml-string-compile-headers.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From e0c02526840d26758e4bcfd84dd5f7cda3cfbe1a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Fri, 1 Jun 2018 14:23:40 +0200 | ||
| 4 | Subject: [PATCH 4/7] mxml-string: compile headers | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 04_compile_headers.diff | ||
| 8 | --- | ||
| 9 | mxml-string.c | 3 ++- | ||
| 10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/mxml-string.c b/mxml-string.c | ||
| 13 | index 2495753..9bdb4c3 100644 | ||
| 14 | --- a/mxml-string.c | ||
| 15 | +++ b/mxml-string.c | ||
| 16 | @@ -17,7 +17,8 @@ | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include "config.h" | ||
| 20 | - | ||
| 21 | +#include <stdlib.h> | ||
| 22 | +#include <stdarg.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | * The va_copy macro is part of C99, but many compilers don't implement it. | ||
| 26 | -- | ||
| 27 | 2.11.0 | ||
| 28 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0005-several-autoheader-define-fixes.patch b/meta-oe/recipes-support/libmxml/libmxml/0005-several-autoheader-define-fixes.patch new file mode 100644 index 0000000000..ba65415033 --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0005-several-autoheader-define-fixes.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From f77da2043c0840412f1a5bc89d04a8f595cc2027 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Fri, 1 Jun 2018 14:26:15 +0200 | ||
| 4 | Subject: [PATCH 5/7] several autoheader define fixes | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 06_autoheader-fixes.patch | ||
| 8 | --- | ||
| 9 | configure.ac | 8 ++++---- | ||
| 10 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index 6b3bbfa..47063dc 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -28,7 +28,7 @@ AC_CONFIG_HEADER(config.h) | ||
| 17 | dnl Version number... | ||
| 18 | VERSION="AC_PACKAGE_VERSION" | ||
| 19 | AC_SUBST(VERSION) | ||
| 20 | -AC_DEFINE_UNQUOTED(MXML_VERSION, "Mini-XML v$VERSION") | ||
| 21 | +AC_DEFINE_UNQUOTED(MXML_VERSION, "Mini-XML v$VERSION", "MXML VERSION") | ||
| 22 | |||
| 23 | dnl Clear default debugging options and set normal optimization by | ||
| 24 | dnl default unless the user asks for debugging specifically. | ||
| 25 | @@ -113,7 +113,7 @@ AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, | ||
| 26 | fi]) | ||
| 27 | |||
| 28 | if test $ac_cv_c_long_long = yes; then | ||
| 29 | - AC_DEFINE(HAVE_LONG_LONG) | ||
| 30 | + AC_DEFINE(HAVE_LONG_LONG, 1, "long long int support") | ||
| 31 | fi | ||
| 32 | |||
| 33 | dnl EPUB support (via libz and zipc) | ||
| 34 | @@ -122,7 +122,7 @@ AC_SUBST(MXML_EPUB) | ||
| 35 | ZIPC="" | ||
| 36 | AC_SUBST(ZIPC) | ||
| 37 | AC_SEARCH_LIBS(gzgets,z,[ | ||
| 38 | - AC_DEFINE(HAVE_ZLIB_H) | ||
| 39 | + AC_DEFINE(HAVE_ZLIB_H, 1, "<zlib.h> present") | ||
| 40 | ZIPC="zipc.o" | ||
| 41 | MXML_EPUB="mxml.epub" | ||
| 42 | LIBS="-lz $LIBS"]) | ||
| 43 | @@ -135,7 +135,7 @@ PTHREAD_FLAGS="" | ||
| 44 | PTHREAD_LIBS="" | ||
| 45 | |||
| 46 | if test "x$enable_threads" != xno; then | ||
| 47 | - AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H)) | ||
| 48 | + AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H, 1, "pthreads headers available")) | ||
| 49 | |||
| 50 | if test x$ac_cv_header_pthread_h = xyes; then | ||
| 51 | dnl Check various threading options for the platforms we support | ||
| 52 | -- | ||
| 53 | 2.11.0 | ||
| 54 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0006-several-compile-fixes.patch b/meta-oe/recipes-support/libmxml/libmxml/0006-several-compile-fixes.patch new file mode 100644 index 0000000000..e6c3cba1ac --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0006-several-compile-fixes.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 2477dbea92d4111fb70beaf975bce0eeee9ac8e5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Fri, 1 Jun 2018 14:28:05 +0200 | ||
| 4 | Subject: [PATCH 6/7] several compile fixes | ||
| 5 | |||
| 6 | This patch was taken from Debian's libmxml 2.11-1 source: | ||
| 7 | 07_compile_fixes.patch | ||
| 8 | --- | ||
| 9 | mxml.h | 2 +- | ||
| 10 | mxmldoc.c | 10 +++++++++- | ||
| 11 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/mxml.h b/mxml.h | ||
| 14 | index 5ad96b8..e78b8e9 100644 | ||
| 15 | --- a/mxml.h | ||
| 16 | +++ b/mxml.h | ||
| 17 | @@ -28,7 +28,7 @@ | ||
| 18 | # include <string.h> | ||
| 19 | # include <ctype.h> | ||
| 20 | # include <errno.h> | ||
| 21 | - | ||
| 22 | +# include <stdarg.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Constants... | ||
| 26 | diff --git a/mxmldoc.c b/mxmldoc.c | ||
| 27 | index de5c8a7..bbdf758 100644 | ||
| 28 | --- a/mxmldoc.c | ||
| 29 | +++ b/mxmldoc.c | ||
| 30 | @@ -37,7 +37,15 @@ extern char **environ; | ||
| 31 | # include "zipc.h" | ||
| 32 | #endif /* HAVE_ZLIB_H */ | ||
| 33 | |||
| 34 | - | ||
| 35 | +# ifndef HAVE_STRLCPY | ||
| 36 | +extern size_t _mxml_strlcpy(char *, const char *, size_t); | ||
| 37 | +# define strlcpy _mxml_strlcpy | ||
| 38 | +# endif /* !HAVE_STRLCPY */ | ||
| 39 | + | ||
| 40 | +#ifndef HAVE_STRLCAT | ||
| 41 | +extern size_t _mxml_strlcat( char *, const char *, size_t); | ||
| 42 | +#define strlcat _mxml_strlcat | ||
| 43 | +#endif | ||
| 44 | /* | ||
| 45 | * This program scans source and header files and produces public API | ||
| 46 | * documentation for code that conforms to the CUPS Configuration | ||
| 47 | -- | ||
| 48 | 2.11.0 | ||
| 49 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml/0007-Makefile-require-libmxml.a-for-its-installation.patch b/meta-oe/recipes-support/libmxml/libmxml/0007-Makefile-require-libmxml.a-for-its-installation.patch new file mode 100644 index 0000000000..14c4ac0fae --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml/0007-Makefile-require-libmxml.a-for-its-installation.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From 5d58c984e1a1173def37a99267afd78757998642 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | Date: Mon, 4 Jun 2018 11:23:36 +0200 | ||
| 4 | Subject: [PATCH 7/7] Makefile: require libmxml.a for its installation | ||
| 5 | |||
| 6 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
| 7 | --- | ||
| 8 | Makefile.in | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/Makefile.in b/Makefile.in | ||
| 12 | index fd48565..155a17a 100644 | ||
| 13 | --- a/Makefile.in | ||
| 14 | +++ b/Makefile.in | ||
| 15 | @@ -162,7 +162,7 @@ install: $(TARGETS) install-$(LIBMXML) install-libmxml.a | ||
| 16 | $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 | ||
| 17 | $(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3 | ||
| 18 | |||
| 19 | -install-libmxml.a: | ||
| 20 | +install-libmxml.a: libmxml.a | ||
| 21 | echo Installing libmxml.a to $(BUILDROOT)$(libdir)... | ||
| 22 | $(INSTALL_DIR) $(BUILDROOT)$(libdir) | ||
| 23 | $(INSTALL_LIB) libmxml.a $(BUILDROOT)$(libdir) | ||
| 24 | -- | ||
| 25 | 2.11.0 | ||
| 26 | |||
diff --git a/meta-oe/recipes-support/libmxml/libmxml_2.11.bb b/meta-oe/recipes-support/libmxml/libmxml_2.11.bb new file mode 100644 index 0000000000..384e056d1d --- /dev/null +++ b/meta-oe/recipes-support/libmxml/libmxml_2.11.bb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | DESCRIPTION = "Tiny XML Library" | ||
| 2 | LICENSE = "Mini-XML-License" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6ba38606d63bb042c5d8cfee182e120" | ||
| 4 | HOMEPAGE = "https://www.msweet.org/mxml/" | ||
| 5 | BUGTRACKER = "https://github.com/michaelrsweet/mxml/issues" | ||
| 6 | |||
| 7 | SRC_URI = " \ | ||
| 8 | https://github.com/michaelrsweet/mxml/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ | ||
| 9 | file://0001-remove-rpath-from-configure.in-and-configure.patch \ | ||
| 10 | file://0002-link-libmxml-with-pthread.patch \ | ||
| 11 | file://0003-add-missing-LDFLAGS-to-Makefile.patch \ | ||
| 12 | file://0004-mxml-string-compile-headers.patch \ | ||
| 13 | file://0005-several-autoheader-define-fixes.patch \ | ||
| 14 | file://0006-several-compile-fixes.patch \ | ||
| 15 | file://0007-Makefile-require-libmxml.a-for-its-installation.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRC_URI[md5sum] = "b9b49af414a2f0a8b13636d9635c3b6a" | ||
| 19 | SRC_URI[sha256sum] = "7d3dfe661e50908fe41aef9b97ba6f7f158cab5208515c6be9f5bc9daf032329" | ||
| 20 | |||
| 21 | inherit autotools-brokensep gettext | ||
| 22 | |||
| 23 | S = "${WORKDIR}/mxml-${PV}" | ||
| 24 | |||
| 25 | EXTRA_OEMAKE = "DSTROOT=${D}" | ||
| 26 | |||
| 27 | PACKAGES += " ${PN}-bin " | ||
| 28 | FILES_${PN} = "${libdir}/*" | ||
| 29 | FILES_${PN}-bin = "${bindir}/*" | ||
