From 7541841b565be0b1ad2238b851b7ac736e48d762 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 5 Nov 2009 17:37:52 +0000 Subject: libxml2: Convert to BBCLASSEXTEND (and drop unneeded custom staging function Signed-off-by: Richard Purdie --- meta/packages/libxml/files/libxml-64bit.patch | 20 ----------------- meta/packages/libxml/files/libxml-nanohttp.patch | 13 ----------- meta/packages/libxml/libxml2-native_2.6.29.bb | 13 ----------- meta/packages/libxml/libxml2.inc | 18 ++++++++++++++++ meta/packages/libxml/libxml2/libxml-64bit.patch | 20 +++++++++++++++++ meta/packages/libxml/libxml2/libxml-nanohttp.patch | 13 +++++++++++ meta/packages/libxml/libxml2_2.6.29.bb | 25 +--------------------- 7 files changed, 52 insertions(+), 70 deletions(-) delete mode 100644 meta/packages/libxml/files/libxml-64bit.patch delete mode 100644 meta/packages/libxml/files/libxml-nanohttp.patch delete mode 100644 meta/packages/libxml/libxml2-native_2.6.29.bb create mode 100644 meta/packages/libxml/libxml2/libxml-64bit.patch create mode 100644 meta/packages/libxml/libxml2/libxml-nanohttp.patch (limited to 'meta') diff --git a/meta/packages/libxml/files/libxml-64bit.patch b/meta/packages/libxml/files/libxml-64bit.patch deleted file mode 100644 index fcb7d34fa7..0000000000 --- a/meta/packages/libxml/files/libxml-64bit.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- - libxml.h | 3 +++ - 1 file changed, 3 insertions(+) - ---- libxml2-2.6.29.orig/libxml.h -+++ libxml2-2.6.29/libxml.h -@@ -11,10 +11,13 @@ - - #ifndef NO_LARGEFILE_SOURCE - #ifndef _LARGEFILE_SOURCE - #define _LARGEFILE_SOURCE - #endif -+#ifndef _LARGEFILE64_SOURCE -+#define _LARGEFILE64_SOURCE -+#endif - #ifndef _FILE_OFFSET_BITS - #define _FILE_OFFSET_BITS 64 - #endif - #endif - diff --git a/meta/packages/libxml/files/libxml-nanohttp.patch b/meta/packages/libxml/files/libxml-nanohttp.patch deleted file mode 100644 index 550e036db3..0000000000 --- a/meta/packages/libxml/files/libxml-nanohttp.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libxml2-2.6.29/nanohttp.c -=================================================================== ---- libxml2-2.6.29.orig/nanohttp.c 2008-10-30 10:12:11.000000000 +0800 -+++ libxml2-2.6.29/nanohttp.c 2008-10-30 10:12:30.000000000 +0800 -@@ -1585,7 +1585,7 @@ - if (!strcmp(filename, "-")) - fd = 0; - else { -- fd = open(filename, O_CREAT | O_WRONLY); -+ fd = open(filename, O_CREAT | O_WRONLY, 0644); - if (fd < 0) { - xmlNanoHTTPClose(ctxt); - return(-1); diff --git a/meta/packages/libxml/libxml2-native_2.6.29.bb b/meta/packages/libxml/libxml2-native_2.6.29.bb deleted file mode 100644 index 75169f2bce..0000000000 --- a/meta/packages/libxml/libxml2-native_2.6.29.bb +++ /dev/null @@ -1,13 +0,0 @@ -require libxml2.inc - -PR = "r8" - -DEPENDS += "python-native" - -EXTRA_OECONF = "--with-python=${STAGING_DIR_NATIVE}/${prefix} --without-debug --without-legacy --with-catalog --without-docbook --with-c14n" - -inherit native - -do_stage () { - oe_runmake install -} diff --git a/meta/packages/libxml/libxml2.inc b/meta/packages/libxml/libxml2.inc index e8b03cf02d..1aa7132ceb 100644 --- a/meta/packages/libxml/libxml2.inc +++ b/meta/packages/libxml/libxml2.inc @@ -7,6 +7,24 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz \ file://libxml-64bit.patch;patch=1 \ file://libxml-nanohttp.patch;patch=1" +DEPENDS_virtclass-native = "python-native" + inherit autotools pkgconfig binconfig EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n" +EXTRA_OECONF_virtclass-native = "--with-python=${STAGING_DIR_NATIVE}/${prefix} --without-debug --without-legacy --with-catalog --without-docbook --with-c14n" + +export LDFLAGS += "-ldl" + +python populate_packages_prepend () { + # autonamer would call this libxml2-2, but we don't want that + if bb.data.getVar('DEBIAN_NAMES', d, 1): + bb.data.setVar('PKG_libxml2', 'libxml2', d) +} + +PACKAGES = "${PN}-dbg ${PN}-dev ${PN}-utils ${PN} ${PN}-doc ${PN}-locale" + +FILES_${PN}-dev += "${bindir}/*-config" +FILES_${PN}-utils += "${bindir}/*" + +BBCLASSEXTEND = "native" diff --git a/meta/packages/libxml/libxml2/libxml-64bit.patch b/meta/packages/libxml/libxml2/libxml-64bit.patch new file mode 100644 index 0000000000..fcb7d34fa7 --- /dev/null +++ b/meta/packages/libxml/libxml2/libxml-64bit.patch @@ -0,0 +1,20 @@ +--- + libxml.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- libxml2-2.6.29.orig/libxml.h ++++ libxml2-2.6.29/libxml.h +@@ -11,10 +11,13 @@ + + #ifndef NO_LARGEFILE_SOURCE + #ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE + #endif ++#ifndef _LARGEFILE64_SOURCE ++#define _LARGEFILE64_SOURCE ++#endif + #ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 + #endif + #endif + diff --git a/meta/packages/libxml/libxml2/libxml-nanohttp.patch b/meta/packages/libxml/libxml2/libxml-nanohttp.patch new file mode 100644 index 0000000000..550e036db3 --- /dev/null +++ b/meta/packages/libxml/libxml2/libxml-nanohttp.patch @@ -0,0 +1,13 @@ +Index: libxml2-2.6.29/nanohttp.c +=================================================================== +--- libxml2-2.6.29.orig/nanohttp.c 2008-10-30 10:12:11.000000000 +0800 ++++ libxml2-2.6.29/nanohttp.c 2008-10-30 10:12:30.000000000 +0800 +@@ -1585,7 +1585,7 @@ + if (!strcmp(filename, "-")) + fd = 0; + else { +- fd = open(filename, O_CREAT | O_WRONLY); ++ fd = open(filename, O_CREAT | O_WRONLY, 0644); + if (fd < 0) { + xmlNanoHTTPClose(ctxt); + return(-1); diff --git a/meta/packages/libxml/libxml2_2.6.29.bb b/meta/packages/libxml/libxml2_2.6.29.bb index 2f583c2c30..42253dd475 100644 --- a/meta/packages/libxml/libxml2_2.6.29.bb +++ b/meta/packages/libxml/libxml2_2.6.29.bb @@ -1,26 +1,3 @@ require libxml2.inc -PR = "r7" - -export LDFLAGS += "-ldl" - -do_stage() { - autotools_stage_all - install -d ${STAGING_DATADIR}/aclocal/ - install -d ${STAGING_BINDIR_CROSS} - - install -m 0644 libxml.m4 ${STAGING_DATADIR}/aclocal/ - #this is need it by php during its install - install -m 0755 xml2-config ${STAGING_BINDIR_CROSS} -} - -python populate_packages_prepend () { - # autonamer would call this libxml2-2, but we don't want that - if bb.data.getVar('DEBIAN_NAMES', d, 1): - bb.data.setVar('PKG_libxml2', 'libxml2', d) -} - -PACKAGES = "${PN}-dbg ${PN}-dev ${PN}-utils ${PN} ${PN}-doc ${PN}-locale" - -FILES_${PN}-dev += "${bindir}/*-config" -FILES_${PN}-utils += "${bindir}/*" +PR = "r8" -- cgit v1.2.3-54-g00ecf