# HG changeset patch # User Martin Lambers # Date 1331122647 -3600 # Node ID b48e2902abcfbd89fe2926c9b2f1e360353d9b0d # Parent 2ffae708ba5c17102206f88627df75d7dcefc394 Add package libgta. diff --git a/src/libgta-test.c b/src/libgta-test.c new file mode 100644 --- /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 + +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 --- /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 ']*>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