summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libgta-test.c20
-rw-r--r--src/libgta.mk36
2 files changed, 56 insertions, 0 deletions
diff --git a/src/libgta-test.c b/src/libgta-test.c
new file mode 100644
index 0000000..4838fcb
--- /dev/null
+++ b/src/libgta-test.c
@@ -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;
+}
diff --git a/src/libgta.mk b/src/libgta.mk
new file mode 100644
index 0000000..1857355
--- /dev/null
+++ b/src/libgta.mk
@@ -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