24f3b6d76b
This resolves https://github.com/jmesmon/meta-rust/issues/1. This change is only necessary for systems (like dizzy) that do not contain poky commit 60d504b431fa7cdc6ded141def7ae18edb1834e5. Without that commit or this change, do_compile for libgit2 would fail with the following error: CMAKE_AR-NOTFOUND cr libgit2.a ... Error running link command: No such file or directory Signed-off-by: Paul Osborne <osbpau@gmail.com>
37 lines
917 B
PHP
37 lines
917 B
PHP
SUMMARY = "the Git linkable library"
|
|
HOMEPAGE = "http://libgit2.github.com/"
|
|
LICENSE = "GPL-2.0-with-linking-exception"
|
|
|
|
LIC_FILES_CHKSUM = "\
|
|
file://COPYING;md5=29c24df0df4c2bab5efb8d5a33a73202 \
|
|
"
|
|
|
|
DEPENDS = "zlib"
|
|
|
|
inherit cmake
|
|
|
|
# CLAR = tests, needs python-native
|
|
EXTRA_OECMAKE = "\
|
|
-DTHREADSAFE=ON \
|
|
-DBUILD_CLAR=OFF \
|
|
-DSHA1_TYPE="builtin" \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
-DBUILD_EXAMPLES=OFF \
|
|
"
|
|
|
|
CFLAGS_append .= " -fPIC"
|
|
|
|
# Prior to poky commit 60d504b431fa7cdc6ded141def7ae18edb1834e5,
|
|
# the cmake class did not define CMAKE_AR in the generated toolchain
|
|
# file. This is needed to support building a static library.
|
|
# See https://github.com/jmesmon/meta-rust/issues/1
|
|
OECMAKE_AR ?= "${AR}"
|
|
cmake_do_generate_toolchain_file_append() {
|
|
cat >> ${WORKDIR}/toolchain.cmake <<EOF
|
|
set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
|
|
EOF
|
|
}
|
|
|
|
BBCLASSEXTEND = "native"
|