package gtkimageview: suppress -Werror and add test program

This commit is contained in:
Tony Theodore 2013-03-24 03:16:27 +11:00
parent 513f5264dc
commit 4d65b7bb3c
2 changed files with 26 additions and 0 deletions

20
src/gtkimageview-test.c Normal file
View File

@ -0,0 +1,20 @@
/*
* This file is part of MXE.
* See index.html for further information.
*/
#include <gtkimageview/gtkimageview.h>
int main (int argc, char *argv[])
{
gtk_init (&argc, &argv);
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
GtkWidget *view = gtk_image_view_new ();
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file ("tests/gnome_logo.jpg", NULL);
gtk_image_view_set_pixbuf (GTK_IMAGE_VIEW (view), pixbuf, TRUE);
gtk_container_add (GTK_CONTAINER (window), view);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}

View File

@ -13,6 +13,7 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
$(SED) -i 's,-Werror,,g' $(1)/configure
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
@ -22,4 +23,9 @@ define $(PKG)_BUILD
GLIB_MKENUMS='$(PREFIX)/$(TARGET)/bin/glib-mkenums'
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtkimageview.exe' \
`'$(TARGET)-pkg-config' gtkimageview --cflags --libs`
endef