]> code.ossystems Code Review - openembedded-core.git/commitdiff
cmake: refactor recipe
authorOtavio Salvador <otavio@ossystems.com.br>
Fri, 8 Jul 2011 13:47:43 +0000 (13:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Jul 2011 15:14:55 +0000 (16:14 +0100)
 * use INC_PR;
 * show configure's failure on error;
 * gather major version from PV;

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/cmake/cmake-native_2.8.3.bb
meta/recipes-devtools/cmake/cmake.inc

index 29b3d87e8853d5c0a2b51d3045c9cda8c4413f90..a68a25f40651b75932c450f9eabb49ab18bacd41 100644 (file)
@@ -1,7 +1,7 @@
-CMAKE_MAJOR_VERSION="2.8"
 require cmake.inc
 inherit native
-PR = "r1"
+
+PR = "${INC_PR}.1"
 
 SRC_URI[md5sum] = "a76a44b93acf5e3badda9de111385921"
 SRC_URI[sha256sum] = "689ed02786b5cefa5515c7716784ee82a82e8ece6be5a3d629ac3cc0c05fc288"
index eed93460ed64801bf3861b7f3e60d5540b46b925..ec37a101a387e8d8113f4e715e6c46c640e9abed 100644 (file)
@@ -9,11 +9,15 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://Copyright.txt;md5=f372516292ff7c33337bf16a74a5f9a8 \
                     file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
 
+INC_PR = "r1"
+
+CMAKE_MAJOR_VERSION = "${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}"
+
 SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch"
 
 inherit autotools
 
 do_configure () {
-       ./configure --prefix=${prefix} || die "./bootstrap failed"
+       ./configure --prefix=${prefix}
 }