summaryrefslogtreecommitdiffstats
path: root/src/libcaca.mk
blob: c09c9c5e7f6bbdd9a144b30665d7eb93d3c1b650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This file is part of MXE.
# See index.html for further information.

PKG             := libcaca
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 0.99.beta19
$(PKG)_CHECKSUM := 128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://caca.zoy.org/raw-attachment/wiki/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc freeglut ncurses zlib

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://caca.zoy.org/wiki/libcaca' | \
    $(SED) -n 's,.*/libcaca-\([0-9][^"]*\)\.tar.*,\1,p' | \
    $(SORT) -rV | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)' && autoreconf -fi
    $(if $(BUILD_STATIC),                                         \
        $(SED) -i 's/__declspec(dllimport)//' '$(1)/caca/caca.h'; \
        $(SED) -i 's/__declspec(dllimport)//' '$(1)/caca/caca0.h')
    cd '$(1)' && ./configure \
        $(MXE_CONFIGURE_OPTS) \
        --disable-csharp \
        --disable-java \
        --disable-python \
        --disable-ruby \
        --disable-doc
    $(MAKE) -C '$(1)' -j '$(JOBS)'
    $(MAKE) -C '$(1)' -j 1 install
    ln -sf '$(PREFIX)/$(TARGET)/bin/caca-config' '$(PREFIX)/bin/$(TARGET)-caca-config'
endef