diff options
| author | Keith Holman <Keith.Holman@windriver.com> | 2014-08-20 16:46:11 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-08-22 14:42:55 -0400 |
| commit | d6ae4fc295e71245c995271f5e3f2c78e2883d8a (patch) | |
| tree | 7ebe4b1efc91955c583595be2def323cddecbad8 /recipes-containers | |
| parent | 3cdfb6aac12d2170465f7d39e659ad9c08888c44 (diff) | |
| download | meta-virtualization-d6ae4fc295e71245c995271f5e3f2c78e2883d8a.tar.gz | |
protobuf: add native package to solve self-dependency
The installation of Google Protocol Buffers python header files
requires the ability to run the "protoc" compiler on the host to
generate the Python header files. This fix adds a native package
that builds Google Protocol Buffers for the host machine to provide
the compiler that is used to cross-compile the package for the target
machine.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers')
| -rw-r--r-- | recipes-containers/criu/protobuf-native_2.5.0.bb | 21 | ||||
| -rw-r--r-- | recipes-containers/criu/protobuf_2.5.0.bb | 8 |
2 files changed, 26 insertions, 3 deletions
diff --git a/recipes-containers/criu/protobuf-native_2.5.0.bb b/recipes-containers/criu/protobuf-native_2.5.0.bb new file mode 100644 index 00000000..b3f00dd8 --- /dev/null +++ b/recipes-containers/criu/protobuf-native_2.5.0.bb | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | SUMMARY = "protobuf" | ||
| 2 | DESCRIPTION = "Protocol Buffers are a way of encoding structured data in \ | ||
| 3 | an efficient yet extensible format. Google uses Protocol Buffers for \ | ||
| 4 | almost all of its internal RPC protocols and file formats." | ||
| 5 | HOMEPAGE = "http://code.google.com/p/protobuf/" | ||
| 6 | SECTION = "console/tools" | ||
| 7 | LICENSE = "BSD-3-Clause" | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514" | ||
| 10 | |||
| 11 | PR = "r0" | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8" | ||
| 14 | SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e" | ||
| 15 | SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \ | ||
| 16 | " | ||
| 17 | |||
| 18 | EXTRA_OECONF += " --with-protoc=echo --disable-shared" | ||
| 19 | |||
| 20 | inherit native autotools | ||
| 21 | |||
diff --git a/recipes-containers/criu/protobuf_2.5.0.bb b/recipes-containers/criu/protobuf_2.5.0.bb index 851fbf06..5c7454b5 100644 --- a/recipes-containers/criu/protobuf_2.5.0.bb +++ b/recipes-containers/criu/protobuf_2.5.0.bb | |||
| @@ -16,10 +16,10 @@ SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \ | |||
| 16 | file://protobuf-allow-running-python-scripts-from-anywhere.patch \ | 16 | file://protobuf-allow-running-python-scripts-from-anywhere.patch \ |
| 17 | file://run-ptest" | 17 | file://run-ptest" |
| 18 | 18 | ||
| 19 | EXTRA_OECONF += " --with-protoc=echo" | 19 | EXTRA_OECONF += " --with-protoc=${STAGING_BINDIR_NATIVE}/protoc" |
| 20 | inherit autotools setuptools ptest | 20 | inherit autotools setuptools ptest |
| 21 | 21 | ||
| 22 | RDEPENDS_${PN}-ptest += "make" | 22 | DEPENDS += "protobuf-native" |
| 23 | 23 | ||
| 24 | PYTHON_SRC_DIR="python" | 24 | PYTHON_SRC_DIR="python" |
| 25 | TEST_SRC_DIR="examples" | 25 | TEST_SRC_DIR="examples" |
| @@ -64,6 +64,7 @@ do_install() { | |||
| 64 | autotools_do_install | 64 | autotools_do_install |
| 65 | 65 | ||
| 66 | # Install header files | 66 | # Install header files |
| 67 | export PROTOC="${STAGING_BINDIR_NATIVE}/protoc" | ||
| 67 | cd "${S}/${PYTHON_SRC_DIR}" | 68 | cd "${S}/${PYTHON_SRC_DIR}" |
| 68 | distutils_do_install | 69 | distutils_do_install |
| 69 | 70 | ||
| @@ -85,4 +86,5 @@ do_install_ptest() { | |||
| 85 | cd "$olddir" | 86 | cd "$olddir" |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | BBCLASSEXTEND = "native nativesdk" | 89 | BBCLASSEXTEND = "nativesdk" |
| 90 | |||
