You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/ocaml-cairo.mk

34 lines
1.1 KiB

# This file is part of MXE.
# See index.html for further information.
PKG := ocaml-cairo
$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := d5835620bea005d5d5239f889b10a922fda2520b
$(PKG)_SUBDIR := cairo-ocaml-$($(PKG)_VERSION)
$(PKG)_FILE := cairo-ocaml_$($(PKG)_VERSION).orig.tar.gz
$(PKG)_URL := http://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml/$($(PKG)_FILE)
$(PKG)_DEPS := ocaml-core ocaml-findlib ocaml-lablgtk2
define $(PKG)_UPDATE
wget -q -O- 'http://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml' | \
$(SED) -n 's,.*cairo-ocaml-\([0-9][^>]*\)\.orig\.tar.*,\1,ip' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && autoreconf -fi -I support
cd '$(1)' && ./configure \
--host $(TARGET) \
--build="`config.guess`" \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1)' -j '$(JOBS)' install
cd '$(1)' && cp -f META $(PREFIX)/$(TARGET)/lib/ocaml/cairo/
# test
'$(TARGET)-ocamlfind' opt -linkpkg \
-package lablgtk2.auto-init \
-package cairo.lablgtk2 \
-o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
< '$(2).ml'
endef