[Android-tools-devel] Bug#810477: android-platform-frameworks-base: diff for NMU version 21-2.1

Tobias Frost tobi at debian.org
Fri Jan 8 19:55:09 UTC 2016


Package: android-platform-frameworks-base
Version: 21-2
Severity: normal
Tags: patch pending

Dear maintainer,

I've prepared an NMU for android-platform-frameworks-base (versioned as 21-2.1). The diff
is attached to this message.

Regards.
diff -Nru android-platform-frameworks-base-21/debian/changelog android-platform-frameworks-base-21/debian/changelog
--- android-platform-frameworks-base-21/debian/changelog	2014-12-02 14:43:13.000000000 +0100
+++ android-platform-frameworks-base-21/debian/changelog	2016-01-08 20:26:33.000000000 +0100
@@ -1,3 +1,12 @@
+android-platform-frameworks-base (21-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Update BD to libpng-dev (Closes: #810166)
+  * Rebuild against android-libhost, with versioned depend to ensure that the
+    GCC-5 rebuilt version is used. (Closes: #808899)
+
+ -- Tobias Frost <tobi at debian.org>  Fri, 08 Jan 2016 16:42:36 +0100
+
 android-platform-frameworks-base (21-2) unstable; urgency=low
 
   * add versions to shlibs so dh can do dep detection
diff -Nru android-platform-frameworks-base-21/debian/control android-platform-frameworks-base-21/debian/control
--- android-platform-frameworks-base-21/debian/control	2014-11-26 15:20:33.000000000 +0100
+++ android-platform-frameworks-base-21/debian/control	2016-01-08 20:22:25.000000000 +0100
@@ -6,11 +6,11 @@
 Build-Depends: debhelper (>= 9.0.0~),
                android-system-dev,
                android-libcutils-dev (>= 21-5~),
-               android-libhost-dev,
+               android-libhost-dev (>= 21-4.1~),
                android-liblog-dev,
                android-libutils-dev,
                libexpat1-dev,
-               libpng12-dev,
+               libpng-dev,
                zlib1g-dev
 Standards-Version: 3.9.6
 Homepage: https://android.googlesource.com/platform/frameworks/base
diff -Nru android-platform-frameworks-base-21/debian/patches/libpng16.patch android-platform-frameworks-base-21/debian/patches/libpng16.patch
--- android-platform-frameworks-base-21/debian/patches/libpng16.patch	1970-01-01 01:00:00.000000000 +0100
+++ android-platform-frameworks-base-21/debian/patches/libpng16.patch	2016-01-08 20:48:28.000000000 +0100
@@ -0,0 +1,61 @@
+--- a/tools/aapt/Images.cpp
++++ b/tools/aapt/Images.cpp
+@@ -11,6 +11,7 @@
+ #include <androidfw/ResourceTypes.h>
+ #include <utils/ByteOrder.h>
+ 
++#include <zlib.h>
+ #include <png.h>
+ 
+ #define NOISY(x) //x
+@@ -18,7 +19,7 @@
+ static void
+ png_write_aapt_file(png_structp png_ptr, png_bytep data, png_size_t length)
+ {
+-    status_t err = ((AaptFile*)png_ptr->io_ptr)->writeData(data, length);
++    status_t err = ((AaptFile*)png_get_io_ptr(png_ptr))->writeData(data, length);
+     if (err != NO_ERROR) {
+         png_error(png_ptr, "Write Error");
+     }
+@@ -89,8 +90,13 @@
+     if (color_type == PNG_COLOR_TYPE_PALETTE)
+         png_set_palette_to_rgb(read_ptr);
+ 
+-    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
++    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_set_expand_gray_1_2_4_to_8(read_ptr);
++#else
+         png_set_gray_1_2_4_to_8(read_ptr);
++#endif
++}
+ 
+     if (png_get_valid(read_ptr, read_info, PNG_INFO_tRNS)) {
+         //printf("Has PNG_INFO_tRNS!\n");
+@@ -109,7 +115,7 @@
+     png_read_update_info(read_ptr, read_info);
+ 
+     outImageInfo->rows = (png_bytepp)malloc(
+-        outImageInfo->height * png_sizeof(png_bytep));
++        outImageInfo->height * sizeof(png_bytep));
+     outImageInfo->allocHeight = outImageInfo->height;
+     outImageInfo->allocRows = outImageInfo->rows;
+ 
+@@ -573,7 +579,7 @@
+                  image->info9Patch.paddingTop, image->info9Patch.paddingBottom));
+ 
+     // Remove frame from image.
+-    image->rows = (png_bytepp)malloc((H-2) * png_sizeof(png_bytep));
++    image->rows = (png_bytepp)malloc((H-2) * sizeof(png_bytep));
+     for (i=0; i<(H-2); i++) {
+         image->rows[i] = image->allocRows[i+1];
+         memmove(image->rows[i], image->rows[i]+4, (W-2)*4);
+@@ -984,7 +990,7 @@
+     unknowns[0].data = NULL;
+     unknowns[1].data = NULL;
+ 
+-    png_bytepp outRows = (png_bytepp) malloc((int) imageInfo.height * png_sizeof(png_bytep));
++    png_bytepp outRows = (png_bytepp) malloc((int) imageInfo.height * sizeof(png_bytep));
+     if (outRows == (png_bytepp) 0) {
+         printf("Can't allocate output buffer!\n");
+         exit(1);
diff -Nru android-platform-frameworks-base-21/debian/patches/series android-platform-frameworks-base-21/debian/patches/series
--- android-platform-frameworks-base-21/debian/patches/series	2014-10-02 00:52:34.000000000 +0200
+++ android-platform-frameworks-base-21/debian/patches/series	2016-01-08 20:32:41.000000000 +0100
@@ -2,3 +2,4 @@
 libs_androidfw_makefile.patch
 tools_aapt_makefile.patch
 fix_expat_header_path.patch
+libpng16.patch



More information about the Android-tools-devel mailing list