From a717961f6e0e016e447eeca5f5f5d3a81354c61c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 13 Jan 2010 22:06:05 +0000 Subject: opkg: Convert to use BBCLASSEXTEND Signed-off-by: Richard Purdie --- meta/packages/opkg/files/fix_prototype.patch | 39 ---------------- .../opkg/files/opkg-fix-gcc-warnings.patch | 53 ---------------------- meta/packages/opkg/files/opkg_unarchive.patch | 13 ------ meta/packages/opkg/files/sighandlerfix.patch | 14 ------ meta/packages/opkg/opkg-native_svn.bb | 12 ----- meta/packages/opkg/opkg-nativesdk_svn.bb | 8 ---- meta/packages/opkg/opkg.inc | 13 ++++++ meta/packages/opkg/opkg/fix_prototype.patch | 39 ++++++++++++++++ .../packages/opkg/opkg/opkg-fix-gcc-warnings.patch | 53 ++++++++++++++++++++++ meta/packages/opkg/opkg/opkg_unarchive.patch | 13 ++++++ meta/packages/opkg/opkg/sighandlerfix.patch | 14 ++++++ meta/packages/opkg/opkg_svn.bb | 2 +- 12 files changed, 133 insertions(+), 140 deletions(-) delete mode 100644 meta/packages/opkg/files/fix_prototype.patch delete mode 100644 meta/packages/opkg/files/opkg-fix-gcc-warnings.patch delete mode 100644 meta/packages/opkg/files/opkg_unarchive.patch delete mode 100644 meta/packages/opkg/files/sighandlerfix.patch delete mode 100644 meta/packages/opkg/opkg-native_svn.bb delete mode 100644 meta/packages/opkg/opkg-nativesdk_svn.bb create mode 100644 meta/packages/opkg/opkg/fix_prototype.patch create mode 100644 meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch create mode 100644 meta/packages/opkg/opkg/opkg_unarchive.patch create mode 100644 meta/packages/opkg/opkg/sighandlerfix.patch (limited to 'meta/packages/opkg') diff --git a/meta/packages/opkg/files/fix_prototype.patch b/meta/packages/opkg/files/fix_prototype.patch deleted file mode 100644 index 4be881aa7..000000000 --- a/meta/packages/opkg/files/fix_prototype.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: opkg/libopkg/opkg_utils.c -=================================================================== ---- opkg.orig/libopkg/opkg_utils.c 2008-10-23 09:36:52.000000000 +0100 -+++ opkg/libopkg/opkg_utils.c 2008-10-23 09:37:05.000000000 +0100 -@@ -165,7 +165,7 @@ - } - - --void free_error_list(){ -+void free_error_list(void){ - struct errlist *err_tmp_lst; - - err_tmp_lst = error_list; -Index: opkg/libopkg/opkg_utils.h -=================================================================== ---- opkg.orig/libopkg/opkg_utils.h 2008-10-23 09:36:50.000000000 +0100 -+++ opkg/libopkg/opkg_utils.h 2008-10-23 09:37:13.000000000 +0100 -@@ -23,7 +23,7 @@ - - void push_error_list(struct errlist **errors,char * msg); - void reverse_error_list(struct errlist **errors); --void free_error_list(); -+void free_error_list(void); - - int get_available_blocks(char * filesystem); - char **read_raw_pkgs_from_file(const char *file_name); -Index: opkg/libopkg/opkg_cmd.c -=================================================================== ---- opkg.orig/libopkg/opkg_cmd.c 2008-10-23 12:02:29.000000000 +0100 -+++ opkg/libopkg/opkg_cmd.c 2008-10-23 12:02:53.000000000 +0100 -@@ -151,7 +151,7 @@ - error_list = error_list->next; - - } -- free_error_list(&error_list); -+ free_error_list(); - } - - } diff --git a/meta/packages/opkg/files/opkg-fix-gcc-warnings.patch b/meta/packages/opkg/files/opkg-fix-gcc-warnings.patch deleted file mode 100644 index 149542ed6..000000000 --- a/meta/packages/opkg/files/opkg-fix-gcc-warnings.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -urN opkg.orig/libopkg/libopkg.c opkg/libopkg/libopkg.c ---- opkg.orig/libopkg/libopkg.c 2009-02-09 10:49:40.000000000 +0000 -+++ opkg/libopkg/libopkg.c 2009-02-09 10:50:23.000000000 +0000 -@@ -38,7 +38,7 @@ - if ( level == OPKG_ERROR ){ - push_error_list(&error_list, msg); - } else -- printf(msg); -+ printf("%s", msg); - } - return 0; - } -@@ -71,7 +71,7 @@ - char* default_opkg_response_callback(char *question) - { - char *response = NULL; -- printf(question); -+ printf("%s", question); - fflush(stdout); - do { - response = (char *)file_read_line_alloc(stdin); -diff -urN opkg.orig/libopkg/opkg_cmd.c opkg/libopkg/opkg_cmd.c ---- opkg.orig/libopkg/opkg_cmd.c 2009-02-09 10:49:40.000000000 +0000 -+++ opkg/libopkg/opkg_cmd.c 2009-02-09 10:50:23.000000000 +0000 -@@ -369,7 +369,7 @@ - perror (ctx->statedir); - - sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); -- system (cmd); -+ err = system (cmd); - free (cmd); - - free (ctx->statedir); -diff -urN opkg.orig/libopkg/pkg.c opkg/libopkg/pkg.c ---- opkg.orig/libopkg/pkg.c 2009-02-09 10:49:40.000000000 +0000 -+++ opkg/libopkg/pkg.c 2009-02-09 10:52:49.000000000 +0000 -@@ -1052,6 +1052,7 @@ - - void pkg_print_info(pkg_t *pkg, FILE *file) - { -+ int t = 0; - char * buff; - if (pkg == NULL) { - return; -@@ -1061,7 +1062,7 @@ - if ( buff == NULL ) - return; - if (strlen(buff)>2){ -- fwrite(buff, 1, strlen(buff), file); -+ t = fwrite(buff, 1, strlen(buff), file); /* TODO: check t */ - } - free(buff); - } diff --git a/meta/packages/opkg/files/opkg_unarchive.patch b/meta/packages/opkg/files/opkg_unarchive.patch deleted file mode 100644 index 9e5ccfb71..000000000 --- a/meta/packages/opkg/files/opkg_unarchive.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- trunk/libbb/unarchive.c.orig 2009-02-11 22:14:58.000000000 +0100 -+++ trunk/libbb/unarchive.c 2009-02-11 22:15:07.000000000 +0100 -@@ -606,6 +606,10 @@ - tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name); - } - -+ if (strlen(tar_entry->name) > 100) { -+ tar_entry->name[100] = 0; -+ } -+ - // tar_entry->name = xstrdup(tar.formated.name); - - /* diff --git a/meta/packages/opkg/files/sighandlerfix.patch b/meta/packages/opkg/files/sighandlerfix.patch deleted file mode 100644 index b60245f58..000000000 --- a/meta/packages/opkg/files/sighandlerfix.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: opkg/libopkg/opkg_install.c -=================================================================== ---- opkg.orig/libopkg/opkg_install.c 2009-05-23 00:20:04.000000000 +0100 -+++ opkg/libopkg/opkg_install.c 2009-05-23 00:20:09.000000000 +0100 -@@ -21,7 +21,9 @@ - #include - #include - #include -+#ifndef __USE_GNU - typedef void (*sighandler_t)(int); -+#endif - - #include "pkg.h" - #include "pkg_hash.h" diff --git a/meta/packages/opkg/opkg-native_svn.bb b/meta/packages/opkg/opkg-native_svn.bb deleted file mode 100644 index a385f0df2..000000000 --- a/meta/packages/opkg/opkg-native_svn.bb +++ /dev/null @@ -1,12 +0,0 @@ -require opkg.inc - -DEPENDS = "curl-native" -PROVIDES += "virtual/update-alternatives-native" -RPROVIDES_${PN} += "update-alternatives-native" -PR = "r5" - -target_libdir := "${libdir}" - -inherit native - -EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg" diff --git a/meta/packages/opkg/opkg-nativesdk_svn.bb b/meta/packages/opkg/opkg-nativesdk_svn.bb deleted file mode 100644 index 05f5e6f47..000000000 --- a/meta/packages/opkg/opkg-nativesdk_svn.bb +++ /dev/null @@ -1,8 +0,0 @@ -require opkg.inc - -DEPENDS = "curl-nativesdk" -PR = "r3" - -inherit nativesdk - -EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg" diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc index d82f6d53f..1d1cb5c26 100644 --- a/meta/packages/opkg/opkg.inc +++ b/meta/packages/opkg/opkg.inc @@ -4,6 +4,8 @@ DESCRIPTION_update-alternatives-cworth = "Update alternatives" SECTION = "base" LICENSE = "GPL" DEPENDS = "curl gpgme" +DEPENDS_virtclass-native = "curl-native" +DEPENDS_virtclass-nativesdk = "curl-nativesdk" PV = "0.0+svnr${SRCREV}" PE = "1" @@ -14,9 +16,20 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ S = "${WORKDIR}/trunk" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg" + # Werror gives all kinds bounds issuses with gcc 4.3.3 do_configure_prepend() { sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am } inherit autotools_stage pkgconfig + +target_libdir := "${libdir}" +EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg" +EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_libdir} --disable-gpg" + +#PROVIDES_append_virtclass-native = "virtual/update-alternatives-native" +#RPROVIDES_${PN} += "update-alternatives-native" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/packages/opkg/opkg/fix_prototype.patch b/meta/packages/opkg/opkg/fix_prototype.patch new file mode 100644 index 000000000..4be881aa7 --- /dev/null +++ b/meta/packages/opkg/opkg/fix_prototype.patch @@ -0,0 +1,39 @@ +Index: opkg/libopkg/opkg_utils.c +=================================================================== +--- opkg.orig/libopkg/opkg_utils.c 2008-10-23 09:36:52.000000000 +0100 ++++ opkg/libopkg/opkg_utils.c 2008-10-23 09:37:05.000000000 +0100 +@@ -165,7 +165,7 @@ + } + + +-void free_error_list(){ ++void free_error_list(void){ + struct errlist *err_tmp_lst; + + err_tmp_lst = error_list; +Index: opkg/libopkg/opkg_utils.h +=================================================================== +--- opkg.orig/libopkg/opkg_utils.h 2008-10-23 09:36:50.000000000 +0100 ++++ opkg/libopkg/opkg_utils.h 2008-10-23 09:37:13.000000000 +0100 +@@ -23,7 +23,7 @@ + + void push_error_list(struct errlist **errors,char * msg); + void reverse_error_list(struct errlist **errors); +-void free_error_list(); ++void free_error_list(void); + + int get_available_blocks(char * filesystem); + char **read_raw_pkgs_from_file(const char *file_name); +Index: opkg/libopkg/opkg_cmd.c +=================================================================== +--- opkg.orig/libopkg/opkg_cmd.c 2008-10-23 12:02:29.000000000 +0100 ++++ opkg/libopkg/opkg_cmd.c 2008-10-23 12:02:53.000000000 +0100 +@@ -151,7 +151,7 @@ + error_list = error_list->next; + + } +- free_error_list(&error_list); ++ free_error_list(); + } + + } diff --git a/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch b/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch new file mode 100644 index 000000000..149542ed6 --- /dev/null +++ b/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch @@ -0,0 +1,53 @@ +diff -urN opkg.orig/libopkg/libopkg.c opkg/libopkg/libopkg.c +--- opkg.orig/libopkg/libopkg.c 2009-02-09 10:49:40.000000000 +0000 ++++ opkg/libopkg/libopkg.c 2009-02-09 10:50:23.000000000 +0000 +@@ -38,7 +38,7 @@ + if ( level == OPKG_ERROR ){ + push_error_list(&error_list, msg); + } else +- printf(msg); ++ printf("%s", msg); + } + return 0; + } +@@ -71,7 +71,7 @@ + char* default_opkg_response_callback(char *question) + { + char *response = NULL; +- printf(question); ++ printf("%s", question); + fflush(stdout); + do { + response = (char *)file_read_line_alloc(stdin); +diff -urN opkg.orig/libopkg/opkg_cmd.c opkg/libopkg/opkg_cmd.c +--- opkg.orig/libopkg/opkg_cmd.c 2009-02-09 10:49:40.000000000 +0000 ++++ opkg/libopkg/opkg_cmd.c 2009-02-09 10:50:23.000000000 +0000 +@@ -369,7 +369,7 @@ + perror (ctx->statedir); + + sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); +- system (cmd); ++ err = system (cmd); + free (cmd); + + free (ctx->statedir); +diff -urN opkg.orig/libopkg/pkg.c opkg/libopkg/pkg.c +--- opkg.orig/libopkg/pkg.c 2009-02-09 10:49:40.000000000 +0000 ++++ opkg/libopkg/pkg.c 2009-02-09 10:52:49.000000000 +0000 +@@ -1052,6 +1052,7 @@ + + void pkg_print_info(pkg_t *pkg, FILE *file) + { ++ int t = 0; + char * buff; + if (pkg == NULL) { + return; +@@ -1061,7 +1062,7 @@ + if ( buff == NULL ) + return; + if (strlen(buff)>2){ +- fwrite(buff, 1, strlen(buff), file); ++ t = fwrite(buff, 1, strlen(buff), file); /* TODO: check t */ + } + free(buff); + } diff --git a/meta/packages/opkg/opkg/opkg_unarchive.patch b/meta/packages/opkg/opkg/opkg_unarchive.patch new file mode 100644 index 000000000..9e5ccfb71 --- /dev/null +++ b/meta/packages/opkg/opkg/opkg_unarchive.patch @@ -0,0 +1,13 @@ +--- trunk/libbb/unarchive.c.orig 2009-02-11 22:14:58.000000000 +0100 ++++ trunk/libbb/unarchive.c 2009-02-11 22:15:07.000000000 +0100 +@@ -606,6 +606,10 @@ + tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name); + } + ++ if (strlen(tar_entry->name) > 100) { ++ tar_entry->name[100] = 0; ++ } ++ + // tar_entry->name = xstrdup(tar.formated.name); + + /* diff --git a/meta/packages/opkg/opkg/sighandlerfix.patch b/meta/packages/opkg/opkg/sighandlerfix.patch new file mode 100644 index 000000000..b60245f58 --- /dev/null +++ b/meta/packages/opkg/opkg/sighandlerfix.patch @@ -0,0 +1,14 @@ +Index: opkg/libopkg/opkg_install.c +=================================================================== +--- opkg.orig/libopkg/opkg_install.c 2009-05-23 00:20:04.000000000 +0100 ++++ opkg/libopkg/opkg_install.c 2009-05-23 00:20:09.000000000 +0100 +@@ -21,7 +21,9 @@ + #include + #include + #include ++#ifndef __USE_GNU + typedef void (*sighandler_t)(int); ++#endif + + #include "pkg.h" + #include "pkg_hash.h" diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb index 0d6893934..b84f63d54 100644 --- a/meta/packages/opkg/opkg_svn.bb +++ b/meta/packages/opkg/opkg_svn.bb @@ -6,7 +6,7 @@ RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}" PACKAGE_ARCH_update-alternatives-cworth = "all" -PR = "r3" +PR = "r6" PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" -- cgit v1.2.3