summaryrefslogtreecommitdiffstats
path: root/src/lensfun.mk
blob: e1021444cbc4ca212a5383227e18e0556f14864c (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
# This file is part of MXE. See LICENSE.md for licensing information.

PKG             := lensfun
$(PKG)_WEBSITE  := http://lensfun.sourceforge.net/
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 0.3.0
$(PKG)_CHECKSUM := c2c3c03873cb549d49d42f118fcb0ffa95d1e45b9ff395e19facb63bf699bec1
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/lensfun/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc glib libgnurx libpng

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://sourceforge.net/projects/lensfun/files/' | \
    $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
    $(SORT) -V | \
    tail -1
endef

define $(PKG)_BUILD
    mkdir '$(1)/building'
    cd '$(1)/building' && '$(TARGET)-cmake' .. \
        -DINSTALL_IN_TREE=NO
    $(MAKE) -C '$(1)/building' -j '$(JOBS)' install VERBOSE=1

    # Don't use `-ansi`, as lensfun uses C++-style `//` comments.
    '$(TARGET)-gcc' \
        -W -Wall -Werror \
        '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-lensfun.exe' \
        `'$(TARGET)-pkg-config' lensfun glib-2.0 --cflags --libs`
endef