blob: 902d241aa10b0811f518566113ff895719c56694 (
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
|
# This file is part of MXE.
# See index.html for further information.
PKG := vmime
$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := 4082390977ca91bbbb4b5e5000bc09b3d67c8bd5
$(PKG)_SUBDIR := kisli-vmime-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/kisli/vmime/tarball/$($(PKG)_VERSION)/$(PKG)_FILE
$(PKG)_DEPS := gcc libiconv gnutls libgsasl pthreads zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://github.com/kisli/vmime/commits/master' | \
$(SED) -n 's#.*<span class="sha">\([^<]\{7\}\)[^<]\{3\}<.*#\1#p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && cmake \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DCMAKE_AR='$(PREFIX)/bin/$(TARGET)-ar' \
-DCMAKE_RANLIB='$(PREFIX)/bin/$(TARGET)-ranlib' \
.
# Disable VMIME_HAVE_MLANG_H
# We have the header, but there is no implementation for IMultiLanguage in MinGW
$(SED) -i 's,^#define VMIME_HAVE_MLANG_H 1$$,,' '$(1)/vmime/config.hpp'
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' install
$(INSTALL) -m644 '$(1)/vmime/config.hpp' '$(PREFIX)/$(TARGET)/include/vmime/'
$(SED) -i 's/posix/windows/g;' '$(1)/examples/example6.cpp'
$(TARGET)-g++ -s -o '$(1)/examples/test-vmime.exe' \
'$(1)/examples/example6.cpp' \
`'$(TARGET)-pkg-config' libvmime --cflags --libs`
$(INSTALL) -m755 '$(1)/examples/test-vmime.exe' '$(PREFIX)/$(TARGET)/bin/'
endef
|