mxe/src/ocaml-cairo.mk

40 lines
1.3 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2012-10-04 13:36:21 +01:00
2012-12-14 09:07:48 +00:00
PKG := ocaml-cairo
2017-03-05 03:41:39 +00:00
$(PKG)_WEBSITE := https://cairographics.org/cairo-ocaml/
$(PKG)_DESCR := cairo-ocaml
2012-12-14 09:07:48 +00:00
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.2.0
$(PKG)_CHECKSUM := 4beae96acfc13dbb8b0a798a0664380429c6a94357e7dc5747d76599deabdfc7
2012-12-14 09:07:48 +00:00
$(PKG)_SUBDIR := cairo-ocaml-$($(PKG)_VERSION)
$(PKG)_FILE := cairo-ocaml_$($(PKG)_VERSION).orig.tar.gz
$(PKG)_URL := https://debian.inf.tu-dresden.de/debian/pool/main/c/cairo-ocaml/$($(PKG)_FILE)
$(PKG)_DEPS := cc ocaml-core ocaml-findlib ocaml-lablgtk2
2012-10-04 13:36:21 +01:00
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://debian.inf.tu-dresden.de/debian/pool/main/c/cairo-ocaml/?C=M;O=D' | \
2012-12-15 06:14:00 +00:00
$(SED) -n 's,.*cairo-ocaml_\([0-9][^>]*\)\.orig\.tar.*,\1,ip' | \
2012-12-14 09:00:58 +00:00
head -1
2012-10-04 13:36:21 +01:00
endef
define $(PKG)_BUILD
2012-12-14 09:00:58 +00:00
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/
2012-12-14 09:42:46 +00:00
2012-12-14 09:00:58 +00:00
# test
2012-12-14 09:42:46 +00:00
'$(TARGET)-ocamlfind' opt -linkpkg \
2012-12-14 09:00:58 +00:00
-package lablgtk2.auto-init \
-package cairo.lablgtk2 \
2012-12-14 09:42:46 +00:00
-o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
< '$(TEST_FILE)'
2012-10-04 13:36:21 +01:00
endef
$(PKG)_BUILD_x86_64-w64-mingw32 =
$(PKG)_BUILD_SHARED =