summaryrefslogtreecommitdiff
path: root/recipes-support/thrift/thrift_0.9.2.bb
blob: db16d982fc0af8c30de86d7bac98f96efe650b32 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# The Apache Thrift software framework, for scalable cross-language services development,
# combines a software stack with a code generation engine to build services that work
# efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell,
# C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.

HOMEPAGE = "http://thrift.apache.org/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b6b281b97b28a39ba00bd2bc2df39244"

EXTRANATIVEPATH += "chrpath-native"

SRC_URI = " \
	https://github.com/apache/thrift/archive/0.9.2.zip \
	file://0001-remove-malloc-realloc-from-configure.ac.patch;patch=1 \
"
SRC_URI[md5sum] = "4733cbae15260f04db32640ee1156786"
SRC_URI[sha256sum] = "8f2dc372e3fd764772fdc35c8b67729e4611f45f0f16304b9864294d36436183"

PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-staticdev"

FILES_${PN} = " \
	/usr/lib/libthrift.la \
	/usr/lib/libthrift-0.9.2.so \
	/usr/lib/libthrift_c_glib.so.0 \
	/usr/lib/libthrift_c_glib.so.0.0.0 \
	/usr/lib/libthrift_c_glib.la \
"

FILES_${PN}-dev = " \
	/usr/bin/thrift \
	/usr/include/thrift/* \
	/usr/lib/pkgconfig/* \
	/usr/lib/libthrift.so \
	/usr/lib/libthrift_c_glib.so \
"

FILES_${PN}-staticdev = " \
	/usr/lib/libthrift.a \
	/usr/lib/libthrift_c_glib.a \
"


S = "${WORKDIR}/thrift-${PV}"

SUMMARY = "a remote procedure call (RPC) framework developed at Facebook for \"scalable cross-language services development\"."
SECTION = "libs"
DEPENDS = "boost openssl chrpath-replacement-native glibc"
do_configure() {
        ./bootstrap.sh
	./configure \
	--with-sysroot=${PKG_CONFIG_SYSROOT_DIR} \
	--prefix=/usr \
	--host=arm-poky-linux-gnueabi \
	--disable-tests \
	--disable-tutorial \
	--enable-boost=yes --with-cpp \
	--without-libevent --without-zlib --without-python --without-java \
	--without-qt4 --without-csharp --without-erlang --without-perl --without-php \
	--without-php_extension --without-ruby --without-haskell --without-go \
	--without-d
}

do_install() {

	DESTDIR=${D} make install
	
	# Fix RPATH in libraries (which contain yocto build path)
	chrpath -d ${D}${libdir}/libthrift.so
	chrpath -d ${D}${bindir}/thrift

	# Fix symlinks created by make install
	cd ${D}${libdir}
	rm -f libthrift.so libthrift_c_glib.so
	ln -s libthrift-0.9.2.so libthrift.so
	ln -s libthrift_c_glib.so.0.0.0 libthrift_c_glib.so
}