comparison src/vmime.mk @ 995:ca1299bb06e3

fix use of pthreads in package vmime The configure option "-without-pthread" seems not to work even if it is listed as a configure option. As long as pthreads is available, it is detected. This meant that the configuration of vmime dependend on whether pthreads had already been installed, even though pthreads was not listed as a dependency. The solution seems to be to add the missing #include <pthread.h> and allow pthreads to be used. Also now build one of the examples as test-vmime.exe.
author Mark Brand <mabrand@mabrand.nl>
date Thu, 20 May 2010 23:23:33 +0200
parents 4c802d4d71ca
children 1b1c09973721
comparison
equal deleted inserted replaced
994:07e346dfcd76 995:ca1299bb06e3
8 $(PKG)_CHECKSUM := 02215e1d8ea758f486c32e7bff63a04f71a9b736 8 $(PKG)_CHECKSUM := 02215e1d8ea758f486c32e7bff63a04f71a9b736
9 $(PKG)_SUBDIR := libvmime-$($(PKG)_VERSION) 9 $(PKG)_SUBDIR := libvmime-$($(PKG)_VERSION)
10 $(PKG)_FILE := libvmime-$($(PKG)_VERSION).tar.bz2 10 $(PKG)_FILE := libvmime-$($(PKG)_VERSION).tar.bz2
11 $(PKG)_WEBSITE := http://vmime.sourceforge.net/ 11 $(PKG)_WEBSITE := http://vmime.sourceforge.net/
12 $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/vmime/vmime/0.9/$($(PKG)_FILE) 12 $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/vmime/vmime/0.9/$($(PKG)_FILE)
13 $(PKG)_DEPS := gcc libiconv gnutls libgsasl 13 $(PKG)_DEPS := gcc libiconv gnutls libgsasl pthreads
14 14
15 define $(PKG)_UPDATE 15 define $(PKG)_UPDATE
16 $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/vmime/files/vmime/) | \ 16 $(call SOURCEFORGE_FILES,http://sourceforge.net/projects/vmime/files/vmime/) | \
17 $(SED) -n 's,.*vmime-\([0-9][^>]*\)\.tar\.bz2.*,\1,p' | \ 17 $(SED) -n 's,.*vmime-\([0-9][^>]*\)\.tar\.bz2.*,\1,p' | \
18 tail -1 18 tail -1
37 --prefix='$(PREFIX)/$(TARGET)' \ 37 --prefix='$(PREFIX)/$(TARGET)' \
38 --host='$(TARGET)' \ 38 --host='$(TARGET)' \
39 --disable-shared \ 39 --disable-shared \
40 --enable-platform-windows \ 40 --enable-platform-windows \
41 --disable-rpath \ 41 --disable-rpath \
42 --disable-dependency-tracking \ 42 --disable-dependency-tracking
43 --without-pthread
44 43
45 # Disable VMIME_HAVE_MLANG_H 44 # Disable VMIME_HAVE_MLANG_H
46 # We have the header, but there is no implementation for IMultiLanguage in MinGW 45 # We have the header, but there is no implementation for IMultiLanguage in MinGW
47 $(SED) -i 's,^#define VMIME_HAVE_MLANG_H 1$$,,' '$(1)/vmime/config.hpp' 46 $(SED) -i 's,^#define VMIME_HAVE_MLANG_H 1$$,,' '$(1)/vmime/config.hpp'
48 47
49 $(MAKE) -C '$(1)' -j '$(JOBS)' 48 $(MAKE) -C '$(1)' -j '$(JOBS)'
50 $(MAKE) -C '$(1)' install 49 $(MAKE) -C '$(1)' install
50
51 $(SED) -i 's/posix/windows/g;' '$(1)/examples/example6.cpp'
52 i686-pc-mingw32-g++ -s -o '$(1)/examples/test-vmime.exe' \
53 -I'$(PREFIX)/$(TARGET)/include' \
54 '$(1)/examples/example6.cpp' \
55 -L'$(PREFIX)/$(TARGET)/lib' \
56 -lvmime -lgnutls -lgsasl -lntlm -lgcrypt -lgpg-error -liconv -lidn -lz -lpthread -lws2_32
57 $(INSTALL) -m755 '$(1)/examples/test-vmime.exe' '$(PREFIX)/$(TARGET)/bin/'
51 endef 58 endef