mxe/src/ocaml-camlimages.mk

40 lines
1.3 KiB
Makefile
Raw Normal View History

2012-06-27 14:56:43 +01:00
# This file is part of MXE.
# See index.html for further information.
2012-12-14 09:07:48 +00:00
PKG := ocaml-camlimages
$(PKG)_IGNORE :=
2012-06-27 14:56:43 +01:00
$(PKG)_CHECKSUM := 3ff44142386970003d3cff1446ad351b36759a8e
2012-12-14 09:07:48 +00:00
$(PKG)_SUBDIR := camlspotter-camlimages-c803efa9d5d3
$(PKG)_FILE := v$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://bitbucket.org/camlspotter/camlimages/get/v$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc ocaml-findlib freetype libpng giflib tiff ocaml-lablgtk2
2012-06-27 14:56:43 +01:00
define $(PKG)_UPDATE
2012-12-15 06:14:00 +00:00
$(WGET) -q -O- 'https://bitbucket.org/camlspotter/camlimages/downloads' | \
$(SED) -n 's,.*get/v\([0-9][^>]*\)\.tar.*,\1,ip' | \
2012-12-14 09:00:58 +00:00
head -1
2012-06-27 14:56:43 +01:00
endef
define $(PKG)_BUILD
2012-12-14 09:00:58 +00:00
cd '$(1)' && cp -f doc/old/* doc/
cd '$(1)' && autoreconf -fi
cd '$(1)' && ./configure \
--prefix '$(PREFIX)/$(TARGET)' \
--build="`config.guess`" \
--with-lablgtk2=yes \
--host $(TARGET) \
--disable-bytecode-library \
--disable-shared
$(SED) -i 's,sed,$(SED),g' $(1)/Makefile
$(SED) -i 's,sed,$(SED),g' $(1)/src/Makefile
$(MAKE) -C '$(1)' -j 1 install
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 \
-package camlimages \
-o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
< '$(2).ml'
2012-06-27 14:56:43 +01:00
endef
$(PKG)_BUILD_x86_64-w64-mingw32 =