changeset 2268:eef35508866d

Add package libgta. --- src/libgta-test.c | 20 ++++++++++++++++++++ src/libgta.mk | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/libgta-test.c create mode 100644 src/libgta.mk
author Martin Lambers <marlam@marlam.de>
date Wed, 07 Mar 2012 21:50:40 +0100
parents 6eed977b3bc4
children e34b54a07244
files src/libgta-test.c src/libgta.mk
diffstat 2 files changed, 56 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libgta-test.c	Wed Mar 07 21:50:40 2012 +0100
@@ -0,0 +1,20 @@
+/* This file is part of mingw-cross-env.       */
+/* See doc/index.html for further information. */
+
+#include <gta/gta.h>
+
+int main(int argc, char *argv[])
+{
+    gta_header_t *header;
+    gta_result_t r;
+
+    (void)argc;
+    (void)argv;
+
+    r = gta_create_header(&header);
+    if (r == GTA_OK) {
+        gta_destroy_header(header);
+    }
+
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libgta.mk	Wed Mar 07 21:50:40 2012 +0100
@@ -0,0 +1,36 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# libgta
+PKG             := libgta
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 1.0.2
+$(PKG)_CHECKSUM := 9020944bcd40bd986a879d454d21920a1eb48db7
+$(PKG)_SUBDIR   := libgta-$($(PKG)_VERSION)
+$(PKG)_FILE     := libgta-$($(PKG)_VERSION).tar.xz
+$(PKG)_WEBSITE  := http://gta.nongnu.org/
+$(PKG)_URL      := http://download.savannah.gnu.org/releases/gta/$($(PKG)_FILE)
+$(PKG)_DEPS     := gcc zlib bzip2 xz
+
+define $(PKG)_UPDATE
+    wget -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gta.git;a=tags' | \
+    grep '<a class="list subject"' | \
+    $(SED) -n 's,.*<a[^>]*>libgta-\([0-9.]*\)<.*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --build="`config.guess`" \
+        --disable-shared \
+        --disable-reference \
+        --prefix='$(PREFIX)/$(TARGET)'
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    $(MAKE) -C '$(1)' -j 1 install dist_doc_DATA=
+
+    '$(TARGET)-gcc' \
+        -W -Wall -Werror -ansi -pedantic \
+        '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libgta.exe' \
+        `'$(TARGET)-pkg-config' gta --cflags --libs`
+endef