[oe-commits] Khem Raj : gnu-config: Add recipe for git version.

git version control git at git.openembedded.org
Tue Jun 15 20:55:25 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 473cd5f616190739550abd8bf71629a87036730b
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=473cd5f616190739550abd8bf71629a87036730b

Author: Khem Raj <raj.khem at gmail.com>
Date:   Tue Jun 15 13:52:40 2010 -0700

gnu-config: Add recipe for git version.

* Rename gnu-config to files folder.

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../gnu-config/{gnu-config => files}/avr32.patch   |    0 
 .../config-guess-uclibc.patch                      |    0 
 .../{gnu-config => files}/gnu-configize.in         |    0 
 .../config-guess-uclibc.patch                      |  148 +++++++++-----------
 recipes/gnu-config/gnu-config_git.bb               |   38 +++++
 5 files changed, 107 insertions(+), 79 deletions(-)

diff --git a/recipes/gnu-config/gnu-config/avr32.patch b/recipes/gnu-config/files/avr32.patch
similarity index 100%
rename from recipes/gnu-config/gnu-config/avr32.patch
rename to recipes/gnu-config/files/avr32.patch
diff --git a/recipes/gnu-config/gnu-config/config-guess-uclibc.patch b/recipes/gnu-config/files/config-guess-uclibc.patch
similarity index 100%
copy from recipes/gnu-config/gnu-config/config-guess-uclibc.patch
copy to recipes/gnu-config/files/config-guess-uclibc.patch
diff --git a/recipes/gnu-config/gnu-config/gnu-configize.in b/recipes/gnu-config/files/gnu-configize.in
similarity index 100%
rename from recipes/gnu-config/gnu-config/gnu-configize.in
rename to recipes/gnu-config/files/gnu-configize.in
diff --git a/recipes/gnu-config/gnu-config/config-guess-uclibc.patch b/recipes/gnu-config/gnu-config-git/config-guess-uclibc.patch
similarity index 53%
rename from recipes/gnu-config/gnu-config/config-guess-uclibc.patch
rename to recipes/gnu-config/gnu-config-git/config-guess-uclibc.patch
index b322157..e6bf6c3 100644
--- a/recipes/gnu-config/gnu-config/config-guess-uclibc.patch
+++ b/recipes/gnu-config/gnu-config-git/config-guess-uclibc.patch
@@ -1,20 +1,15 @@
-Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
-
-updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
-
-Index: config/config.guess
-===================================================================
---- config.guess.original	2005-05-16 13:43:19 +0200
-+++ config.guess	2005-05-16 13:45:26 +0200
-@@ -138,6 +138,19 @@
+diff --git a/config.guess b/config.guess
+index 115f944..cdd1367 100755
+--- a/config.guess
++++ b/config.guess
+@@ -140,6 +140,18 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  
 +# Detect uclibc systems.
 +
 +LIBC="gnu"
-+if [ -f /usr/include/bits/uClibc_config.h ]
-+then
++if [ -f /usr/include/bits/uClibc_config.h ]; then
 +	LIBC=uclibc
 +	if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
 +	then
@@ -26,21 +21,46 @@ Index: config/config.guess
  # Note: order is significant - the case branches are not exclusive.
  
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-@@ -847,7 +860,7 @@
- 	echo ${UNAME_MACHINE}-pc-minix
- 	exit ;;
-     arm*:Linux:*:*)
+@@ -877,22 +889,22 @@ EOF
+ 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ 	    | grep -q __ARM_EABI__
+ 	then
+-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
++	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ 	else
+-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ 	fi
+ 	exit ;;
+     avr32*:Linux:*:*)
 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  	exit ;;
      cris:Linux:*:*)
- 	echo cris-axis-linux-gnu
-@@ -856,16 +869,16 @@
- 	echo crisv32-axis-linux-gnu
+-	echo cris-axis-linux-gnu
++	echo cris-axis-linux-${LIBC}
+ 	exit ;;
+     crisv32:Linux:*:*)
+-	echo crisv32-axis-linux-gnu
++	echo crisv32-axis-linux-${LIBC}
  	exit ;;
      frv:Linux:*:*)
 -    	echo frv-unknown-linux-gnu
-+    	echo frv-unknown-linux-${LIBC}
++	echo frv-unknown-linux-${LIBC}
+ 	exit ;;
+     i*86:Linux:*:*)
+ 	LIBC=gnu
+@@ -902,17 +914,22 @@ EOF
+ 	LIBC=dietlibc
+ 	#endif
+ EOF
++        sed 's/^        //' << EOF >$dummy.c
++	#ifdef __UCLIBC__
++	LIBC=uclib
++	#endif
++EOF
+ 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ 	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  	exit ;;
      ia64:Linux:*:*)
 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -54,42 +74,26 @@ Index: config/config.guess
 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  	exit ;;
-     mips:Linux:*:*)
- 	eval $set_cc_for_build
-@@ -884,7 +897,7 @@
- 	#endif
- EOF
- 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
--	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
- 	;;
-     mips64:Linux:*:*)
+     mips:Linux:*:* | mips64:Linux:*:*)
  	eval $set_cc_for_build
-@@ -903,13 +916,13 @@
+@@ -931,51 +948,51 @@ EOF
  	#endif
  EOF
- 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 -	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  	;;
-     ppc:Linux:*:*)
--	echo powerpc-unknown-linux-gnu
-+	echo powerpc-unknown-linux-${LIBC}
+     or32:Linux:*:*)
+-	echo or32-unknown-linux-gnu
++	echo or32-unknown-linux-${LIBC}
  	exit ;;
-     ppc64:Linux:*:*)
--	echo powerpc64-unknown-linux-gnu
-+	echo powerpc64-unknown-linux-${LIBC}
+     padre:Linux:*:*)
+-	echo sparc-unknown-linux-gnu
++	echo sparc-unknown-linux-${LIBC}
  	exit ;;
-     alpha:Linux:*:*)
- 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-@@ -922,34 +935,34 @@
- 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-         esac
- 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
--	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
--	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
-+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+     parisc64:Linux:*:* | hppa64:Linux:*:*)
+-	echo hppa64-unknown-linux-gnu
++	echo hppa64-unknown-linux-${LIBC}
  	exit ;;
      parisc:Linux:*:* | hppa:Linux:*:*)
  	# Look for CPU level
@@ -102,16 +106,20 @@ Index: config/config.guess
 +	  *)    echo hppa-unknown-linux-${LIBC} ;;
  	esac
  	exit ;;
-     parisc64:Linux:*:* | hppa64:Linux:*:*)
--	echo hppa64-unknown-linux-gnu
-+	echo hppa64-unknown-linux-${LIBC}
+     ppc64:Linux:*:*)
+-	echo powerpc64-unknown-linux-gnu
++	echo powerpc64-unknown-linux-${LIBC}
+ 	exit ;;
+     ppc:Linux:*:*)
+-	echo powerpc-unknown-linux-gnu
++	echo powerpc-unknown-linux-${LIBC}
  	exit ;;
      s390:Linux:*:* | s390x:Linux:*:*)
  	echo ${UNAME_MACHINE}-ibm-linux
  	exit ;;
      sh64*:Linux:*:*)
 -    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+    	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  	exit ;;
      sh*:Linux:*:*)
 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -121,35 +129,17 @@ Index: config/config.guess
 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  	exit ;;
+     vax:Linux:*:*)
+-	echo ${UNAME_MACHINE}-dec-linux-gnu
++	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ 	exit ;;
      x86_64:Linux:*:*)
 -	echo x86_64-unknown-linux-gnu
 +	echo x86_64-unknown-linux-${LIBC}
  	exit ;;
-     i*86:Linux:*:*)
- 	# The BFD linker knows what the default object file format is, so
-@@ -964,20 +977,21 @@
- 				    p'`
-         case "$ld_supported_targets" in
- 	  elf32-i386)
--		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-+		TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
- 		;;
- 	  a.out-i386-linux)
--		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
- 		exit ;;
- 	  coff-i386)
--		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
- 		exit ;;
- 	  "")
- 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
- 		# one that does not give us useful --help.
--		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
- 		exit ;;
- 	esac
-+	if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit; fi
- 	# Determine whether the default compiler is a.out or elf
- 	eval $set_cc_for_build
- 	sed 's/^	//' << EOF >$dummy.c
+     xtensa*:Linux:*:*)
+-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ 	exit ;;
+     i*86:DYNIX/ptx:4*:*)
+ 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
diff --git a/recipes/gnu-config/gnu-config_git.bb b/recipes/gnu-config/gnu-config_git.bb
new file mode 100644
index 0000000..d275db3
--- /dev/null
+++ b/recipes/gnu-config/gnu-config_git.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "The GNU config.guess and config.sub scripts"
+SECTION = "base"
+LICENSE = "GPL"
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+PR = "r0"
+SRCREV="e35217687ee5f39b428119fe31c7e954f6de64f0"
+PR_append = "+gitr${SRCPV}"
+
+SRC_URI = "git://git.savannah.gnu.org/config.git;branch=master;protocol=git \
+	   file://config-guess-uclibc.patch \
+           file://gnu-configize.in"
+S = "${WORKDIR}/git"
+
+do_compile() {
+	:
+}
+
+do_install () {
+	install -d ${D}${datadir}/gnu-config \
+		   ${D}${bindir}
+	cat ${WORKDIR}/gnu-configize.in | \
+		sed -e 's, at gnu-configdir@,${datadir}/gnu-config,g' \
+		    -e 's, at autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize
+	# In the native case we want the system perl as perl-native can't have built yet
+	if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then
+		cat ${WORKDIR}/gnu-configize.in | \
+			sed -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize
+	fi
+	chmod 755 ${D}${bindir}/gnu-configize
+	install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
+}
+
+FILES_${PN} = "${bindir} ${datadir}/gnu-config"
+
+BBCLASSEXTEND = "native"
+NATIVE_INSTALL_WORKS = "1"





More information about the Openembedded-commits mailing list