summaryrefslogtreecommitdiffstats
path: root/main/xcb-util-image
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-11 13:16:23 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-11 13:29:28 +0000
commitb5a32f28587a8590a6358784dd85fcb3f9d77ee2 (patch)
tree85f67bd976b49ecab68d57865dfaec815a75cb1e /main/xcb-util-image
parent6af44456f6c387081472f68f8f9d2950376161bd (diff)
downloadaports-b5a32f28587a8590a6358784dd85fcb3f9d77ee2.tar.bz2
aports-b5a32f28587a8590a6358784dd85fcb3f9d77ee2.tar.xz
main/xcb-util-image: fix compilation with new gcc
Diffstat (limited to 'main/xcb-util-image')
-rw-r--r--main/xcb-util-image/APKBUILD22
-rw-r--r--main/xcb-util-image/fix-c90-warnings-2.patch28
-rw-r--r--main/xcb-util-image/fix-c90-warnings.patch33
-rw-r--r--main/xcb-util-image/fix-return.patch46
4 files changed, 126 insertions, 3 deletions
diff --git a/main/xcb-util-image/APKBUILD b/main/xcb-util-image/APKBUILD
index 46d28782a..e8f0d5a81 100644
--- a/main/xcb-util-image/APKBUILD
+++ b/main/xcb-util-image/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xcb-util-image
pkgver=0.3.9
-pkgrel=0
+pkgrel=1
pkgdesc="Utility libraries for XC Binding - image"
url="http://xcb.freedesktop.org/"
arch="all"
@@ -13,7 +13,11 @@ makedepends="$depends_dev m4"
install=""
replaces="xcb-util"
subpackages="$pkgname-dev"
-source="http://xcb.freedesktop.org/dist/xcb-util-image-$pkgver.tar.gz"
+source="http://xcb.freedesktop.org/dist/xcb-util-image-$pkgver.tar.gz
+ fix-return.patch
+ fix-c90-warnings.patch
+ fix-c90-warnings-2.patch
+ "
_builddir="$srcdir"/xcb-util-image-$pkgver
prepare() {
@@ -29,6 +33,7 @@ prepare() {
build() {
cd "$_builddir"
+ export CFLAGS="$CFLAGS -std=gnu99"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -47,4 +52,15 @@ package() {
rm "$pkgdir"/usr/lib/*.la
}
-md5sums="0bdfcea4ce0666b45d2d64c1f1e25801 xcb-util-image-0.3.9.tar.gz"
+md5sums="0bdfcea4ce0666b45d2d64c1f1e25801 xcb-util-image-0.3.9.tar.gz
+92a43b07efef0450bf65838a65793580 fix-return.patch
+268dde6f747d697f80c2daa351f40633 fix-c90-warnings.patch
+8a934c04a513efdbfeaadd65229ccc7f fix-c90-warnings-2.patch"
+sha256sums="ac7fa09eddc9ecda6fd872d32b6dc23d451a1c6c201873dfe7cac8362c87acf3 xcb-util-image-0.3.9.tar.gz
+05a16fb3ae61bd1e02cc3c55f24ab677865ab514c0935151af63e58b647ac515 fix-return.patch
+aa0413a24bdb4954e01a68ba235199c64e38f6ba18ac8440f25f28bb265fd10c fix-c90-warnings.patch
+55c9d781997eaec1b0c10819b8211321a6e15ea472af7687e9cb93988f4aa12c fix-c90-warnings-2.patch"
+sha512sums="f4b6a8c39dcb63273627655dd5b99fcf6d9d5d1cd32ec57589e8fa3ac04c043548c615f60a2d9673d38e9ce0e1b56cf51a17c55669c7b37e48d9054474ae4090 xcb-util-image-0.3.9.tar.gz
+12c9d36375e42c127fd0e50363b5289cfa86ec238f94af9914e1a5375e55180fe37645a7cc473ff19c286c84dfdee74b6bdb7c3aa6ae1f3d0f0608e482d4c76c fix-return.patch
+1df9fd7fd6e8c0802635f8034b43a77766dddf7b7fb868c5788caf3073798e3ded8c1b6e1baace88fe742d0ea86e1da71f8c77b069242e15d5bf13c1bd82768f fix-c90-warnings.patch
+d9406550a1da9de117a77284888464e6de88908de386b2e0c24b6e33c30cc1d0b975665d10b67e75b464d88878c0d794682f0e10ab160271f8b2a5cad735293e fix-c90-warnings-2.patch"
diff --git a/main/xcb-util-image/fix-c90-warnings-2.patch b/main/xcb-util-image/fix-c90-warnings-2.patch
new file mode 100644
index 000000000..dfce49668
--- /dev/null
+++ b/main/xcb-util-image/fix-c90-warnings-2.patch
@@ -0,0 +1,28 @@
+--- xcb-util-image-0.3.9.orig/image/xcb_image.c
++++ xcb-util-image-0.3.9/image/xcb_image.c
+@@ -324,6 +324,11 @@
+ case XCB_IMAGE_FORMAT_XY_PIXMAP:
+ plane_mask &= xcb_mask(imrep->depth);
+ if (plane_mask != xcb_mask(imrep->depth)) {
++ int i;
++ uint32_t rpm = plane_mask;
++ uint8_t * src_plane = image->data;
++ uint8_t * dst_plane;
++ uint32_t size = image->height * image->stride;
+ xcb_image_t * tmp_image =
+ xcb_image_create_native(conn, width, height, format,
+ imrep->depth, 0, 0, 0);
+@@ -333,12 +338,7 @@
+ return 0;
+ }
+
+- int i;
+- uint32_t rpm = plane_mask;
+- uint8_t * src_plane = image->data;
+- uint8_t * dst_plane = tmp_image->data;
+- uint32_t size = image->height * image->stride;
+-
++ dst_plane = tmp_image->data;
+ if (tmp_image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST)
+ rpm = xcb_bit_reverse(plane_mask, imrep->depth);
+ for (i = 0; i < imrep->depth; i++) {
diff --git a/main/xcb-util-image/fix-c90-warnings.patch b/main/xcb-util-image/fix-c90-warnings.patch
new file mode 100644
index 000000000..f9cfa85b6
--- /dev/null
+++ b/main/xcb-util-image/fix-c90-warnings.patch
@@ -0,0 +1,33 @@
+From 7c2c36a1472941353a700bbac7dc351a92f42258 Mon Sep 17 00:00:00 2001
+From: Bart Massey <bart@cs.pdx.edu>
+Date: Fri, 23 Aug 2013 23:45:36 +0000
+Subject: fixed some compiler C90 warnings
+
+---
+diff --git a/image/test_xcb_image_shm.c b/image/test_xcb_image_shm.c
+index 76f7f71..3162a6e 100644
+--- a/image/test_xcb_image_shm.c
++++ b/image/test_xcb_image_shm.c
+@@ -58,6 +58,9 @@ main (int argc, char *argv[])
+ int screen_nbr;
+ xcb_generic_event_t *e;
+ uint8_t format;
++ xcb_image_t *img;
++ xcb_shm_query_version_reply_t *rep;
++ xcb_shm_segment_info_t shminfo;
+
+ /* Open the connexion to the X server and get the first screen */
+ c = xcb_connect (NULL, &screen_nbr);
+@@ -81,10 +84,6 @@ main (int argc, char *argv[])
+
+ /* Shm test */
+ printf ("shm test begin\n");
+- xcb_image_t *img = 0;
+- xcb_shm_query_version_reply_t *rep;
+- xcb_shm_segment_info_t shminfo;
+-
+ rep = xcb_shm_query_version_reply (c,
+ xcb_shm_query_version (c),
+ NULL);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/main/xcb-util-image/fix-return.patch b/main/xcb-util-image/fix-return.patch
new file mode 100644
index 000000000..d1ebc397a
--- /dev/null
+++ b/main/xcb-util-image/fix-return.patch
@@ -0,0 +1,46 @@
+From 3577db110e03985d4486cae6caf3ceb5696c45e9 Mon Sep 17 00:00:00 2001
+From: Jon TURNEY <jon.turney@dronecode.org.uk>
+Date: Thu, 20 Dec 2012 22:56:28 +0000
+Subject: Fix compilation when NDEBUG is defined
+
+XORG_DEFAULT_OPTIONS enables -Werror=return-type
+
+xcb_image_get_pixel() and xcb_image_create_native() assume assert(0) is
+noreturn, and don't return a value in that case. But assert(0) isn't noreturn
+if NDEBUG is defined.
+
+Fix this by returning a suitable value.
+
+(Also, on the MinGW target, assert(0) is non-standard and may return even in the
+!NDEBUG case, as the C runtime may ask the user if they want to abort or not...)
+
+/jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c: In function 'xcb_image_get_pixel':
+/jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c:754:1: error: control reaches end of non-void function [-Wreturn-type]
+/jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c: In function 'xcb_image_create_native':
+/jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c:190:1: error: control reaches end of non-void function [-Wreturn-type]
+
+Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+Signed-off-by: Peter Harris <pharris@opentext.com>
+---
+diff --git a/image/xcb_image.c b/image/xcb_image.c
+index e426cbd..101aa4f 100644
+--- a/image/xcb_image.c
++++ b/image/xcb_image.c
+@@ -187,6 +187,7 @@ xcb_image_create_native (xcb_connection_t * c,
+ assert(0);
+ }
+ assert(0);
++ return NULL;
+ }
+
+
+@@ -751,6 +752,7 @@ xcb_image_get_pixel (xcb_image_t *image,
+ default:
+ assert(0);
+ }
++ return 0;
+ }
+
+
+--
+cgit v0.9.0.2-2-gbebe