summaryrefslogtreecommitdiffstats
path: root/src/devil.mk
blob: 645f6189e31ad26f0a3f43e9f5c0703b89525b80 (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
37
38
39
40
41
42
# This file is part of MXE.
# See index.html for further information.

PKG             := devil
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 1.7.8
$(PKG)_CHECKSUM := 682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd
$(PKG)_SUBDIR   := devil-$($(PKG)_VERSION)
$(PKG)_FILE     := DevIL-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/openil/DevIL/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc freeglut jasper jpeg lcms libmng libpng openexr sdl tiff zlib

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://sourceforge.net/p/openil/svn/HEAD/tree/tags/' | \
    grep '<a href="' | \
    $(SED) -n 's,.*<a href="release-\([0-9][^"]*\)".*,\1,p' | \
    tail -1
endef

define $(PKG)_BUILD
    # autotools files in tarball are ancient (2009) so regenerate
    $(if $(BUILD_STATIC), \
        $(SED) -i 's/__declspec(dllimport)//' '$(1)/include/IL/il.h', \
        cd '$(1)' && $(LIBTOOLIZE) && autoreconf -fi)
    cd '$(1)' && ./configure \
        $(MXE_CONFIGURE_OPTS) \
        --enable-ILU \
        --enable-ILUT \
        --disable-allegro \
        --disable-directx8 \
        --enable-directx9 \
        --enable-opengl \
        --enable-sdl \
        --disable-sdltest \
        --disable-wdp \
        --with-zlib \
        --without-squish \
        --without-nvtt \
        --without-x \
        --without-examples
    $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= INFO_DEPS=
endef