[oe-commits] Otavio Salvador : cmake: refactor recipe

git version control git at git.openembedded.org
Fri Jul 8 15:25:19 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: c9d1e68a137960b6cdc81b875c087a8c1031dcbc
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c9d1e68a137960b6cdc81b875c087a8c1031dcbc

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Fri Jul  8 13:47:43 2011 +0000

cmake: refactor recipe

 * use INC_PR;
 * show configure's failure on error;
 * gather major version from PV;

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/cmake/cmake-native_2.8.3.bb |    4 ++--
 meta/recipes-devtools/cmake/cmake.inc             |    6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.3.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.3.bb
index 29b3d87..a68a25f 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.3.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.3.bb
@@ -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"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index eed9346..ec37a10 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -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}
 }





More information about the Openembedded-commits mailing list