blob: 3f37a8d69b29fc63ee3567372b68292a01fa7bd8 (
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
43
44
45
46
47
48
49
50
51
52
|
# This file is part of MXE.
# See index.html for further information.
PKG := vmime
$(PKG)_IGNORE :=
$(PKG)_VERSION := 07ae82f
$(PKG)_CHECKSUM := 18ca3b50fd712a2dd78fa98625720e86cb825fbb
$(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 gnutls libgsasl pthreads zlib
$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, kisli/vmime, master)
define $(PKG)_BUILD
# The following hint is probably needed for ICU:
# -DICU_LIBRARIES="`'$(TARGET)-pkg-config' --libs-only-l icu-i18n`"
cd '$(1)' && cmake \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DCMAKE_AR='$(PREFIX)/bin/$(TARGET)-ar' \
-DCMAKE_RANLIB='$(PREFIX)/bin/$(TARGET)-ranlib' \
-DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL=False \
-DVMIME_HAVE_MLANG_H=False \
-DCMAKE_CXX_FLAGS='-DWINVER=0x0501 -DAI_ADDRCONFIG=0x0400 -DIPV6_V6ONLY=27' \
-DVMIME_BUILD_STATIC_LIBRARY=$(if $(BUILD_STATIC),ON,OFF) \
-DVMIME_BUILD_SHARED_LIBRARY=$(if $(BUILD_SHARED),ON,OFF) \
-DVMIME_BUILD_SAMPLES=OFF \
-DVMIME_BUILD_DOCUMENTATION=OFF \
-DCMAKE_MODULE_PATH='$(1)/cmake' \
-DVMIME_CHARSETCONV_LIB_IS_ICONV=OFF \
-DVMIME_CHARSETCONV_LIB_IS_ICU=OFF \
-DVMIME_CHARSETCONV_LIB_IS_WIN=ON \
-DVMIME_TLS_SUPPORT_LIB_IS_GNUTLS=ON \
-DVMIME_TLS_SUPPORT_LIB_IS_OPENSSL=OFF \
-DVMIME_SHARED_PTR_USE_CXX=ON \
-DCXX11_COMPILER_FLAGS=ON \
-C../../src/vmime-TryRunResults.cmake \
.
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(SED) -i 's,^\(Libs.private:.* \)$(PREFIX)/$(TARGET)/lib/libiconv\.a,\1-liconv,g' $(1)/vmime.pc
$(if $(BUILD_STATIC),$(SED) -i 's/^\(Cflags:.* \)/\1 -DVMIME_STATIC/g' $(1)/vmime.pc)
$(MAKE) -C '$(1)' install
$(if $(BUILD_SHARED),$(INSTALL) -m644 '$(1)/build/bin/libvmime.dll' '$(PREFIX)/$(TARGET)/bin/')
$(SED) -i 's/posix/windows/g;' '$(1)/examples/example6.cpp'
$(TARGET)-g++ -s -std=c++0x -o '$(1)/examples/test-vmime.exe' \
'$(1)/examples/example6.cpp' \
`'$(TARGET)-pkg-config' vmime --cflags --libs`
$(INSTALL) -m755 '$(1)/examples/test-vmime.exe' '$(PREFIX)/$(TARGET)/bin/'
endef
|