]> git.openpandora.org Git - openembedded.git/commitdiff
coreutils: don't patch the autotools files in the native recipes
authorChris Larson <clarson@mvista.com>
Thu, 21 May 2009 23:32:41 +0000 (16:32 -0700)
committerChris Larson <clarson@mvista.com>
Wed, 16 Dec 2009 18:18:36 +0000 (11:18 -0700)
If we patch autotools files in the native recipes and build them, the make
results in the make rules trying to rerun autoconf, automake, aclocal, etc,
and those don't yet exist when coreutils-native is built.  So we split out the
common target (not native) specific bits so that native recipes aren't
including the target recipes, so we can avoid applying those patches for
native.  This also avoids some duplication of target bits between the
versions.

Signed-off-by: Chris Larson <clarson@mvista.com>
recipes/coreutils/coreutils-6.0.inc [new file with mode: 0644]
recipes/coreutils/coreutils-7.1.inc [new file with mode: 0644]
recipes/coreutils/coreutils-7.2.inc [new file with mode: 0644]
recipes/coreutils/coreutils-native_6.0.bb
recipes/coreutils/coreutils-native_7.1.bb
recipes/coreutils/coreutils-native_7.2.bb
recipes/coreutils/coreutils-target.inc [new file with mode: 0644]
recipes/coreutils/coreutils_6.0.bb
recipes/coreutils/coreutils_7.1.bb
recipes/coreutils/coreutils_7.2.bb

diff --git a/recipes/coreutils/coreutils-6.0.inc b/recipes/coreutils/coreutils-6.0.inc
new file mode 100644 (file)
index 0000000..0dd2512
--- /dev/null
@@ -0,0 +1,7 @@
+require coreutils.inc
+
+SRC_URI = "\
+  ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
+  file://futimens.patch;patch=1 \
+  file://coreutils-install-use-STRIP.patch;patch=1 \
+"
diff --git a/recipes/coreutils/coreutils-7.1.inc b/recipes/coreutils/coreutils-7.1.inc
new file mode 100644 (file)
index 0000000..7f77b9b
--- /dev/null
@@ -0,0 +1,6 @@
+require coreutils.inc
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/coreutils/coreutils-${PV}.tar.gz"
+
+# not thoroughly tested yet
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/coreutils/coreutils-7.2.inc b/recipes/coreutils/coreutils-7.2.inc
new file mode 100644 (file)
index 0000000..7ab4221
--- /dev/null
@@ -0,0 +1,4 @@
+require coreutils.inc
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/coreutils/coreutils-${PV}.tar.gz \
+           file://coreutils-7.2-fix-sort-segfault.patch;patch=1"
index a3754df123ef874c980fc9a4e82d7a4b7035d45a..800aacc56896b9484f81cd082e13e6fcfccc893d 100644 (file)
@@ -1,5 +1,4 @@
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}"
-S = "${WORKDIR}/coreutils-${PV}"
-
-require coreutils_${PV}.bb
+require coreutils-${PV}.inc
 require coreutils-native.inc
+
+PR = "r4"
index a3754df123ef874c980fc9a4e82d7a4b7035d45a..6370c04ef7169ab4aff6928280f49eb91b56af42 100644 (file)
@@ -1,5 +1,4 @@
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}"
-S = "${WORKDIR}/coreutils-${PV}"
-
-require coreutils_${PV}.bb
+require coreutils-${PV}.inc
 require coreutils-native.inc
+
+PR = "r1"
index a3754df123ef874c980fc9a4e82d7a4b7035d45a..6370c04ef7169ab4aff6928280f49eb91b56af42 100644 (file)
@@ -1,5 +1,4 @@
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}"
-S = "${WORKDIR}/coreutils-${PV}"
-
-require coreutils_${PV}.bb
+require coreutils-${PV}.inc
 require coreutils-native.inc
+
+PR = "r1"
diff --git a/recipes/coreutils/coreutils-target.inc b/recipes/coreutils/coreutils-target.inc
new file mode 100644 (file)
index 0000000..1dd1d36
--- /dev/null
@@ -0,0 +1,82 @@
+EXTRA_AUTORECONF += "-I ${S}/m4"
+SRC_URI += "file://onceonly.m4"
+
+# [ gets a special treatment and is not included in this
+bindir_progs = "basename cksum comm csplit cut df dir dircolors dirname du \
+               env expand expr factor fmt fold groups head hostid id install \
+               join link logname md5sum mkfifo nice nl nohup od paste pathchk \
+               pinky pr printenv printf ptx readlink seq sha1sum shred sort \
+               split stat sum tac tail tee test tr tsort tty unexpand uniq \
+               unlink users vdir wc who whoami yes \
+               "
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
+                    ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
+                    true uname \
+                    "
+
+sbindir_progs= "chroot"
+
+do_configure_prepend() {
+       install -m 0644 ${WORKDIR}/onceonly.m4 ${S}/m4
+}
+
+do_install () {
+       autotools_do_install
+
+       # Renaming the utilities that should go in /usr/bin
+       for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
+
+       # Renaming and moving the utilities that should go in /bin (FHS)
+       install -d ${D}${base_bindir}
+       for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
+
+       # Renaming and moving the utilities that should go in /usr/sbin (FHS)
+       install -d ${D}${sbindir}
+       for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
+
+       # [ requires special handling because [.coreutils will cause the sed stuff
+       # in update-alternatives to fail, therefore use lbracket - the name used
+       # for the actual source file.
+       mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
+       # hostname and uptime separated. busybox's versions are preferred
+       if [ -e ${D}${bindir}/hostname ]; then
+               mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
+       fi
+       if [ -e ${D}${bindir}/uptime ]; then
+               mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
+       fi
+}
+
+pkg_postinst_${PN} () {
+       # The utilities in /usr/bin
+       for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
+
+       # The utilities in /bin
+       for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
+
+       # The utilities in /usr/sbin
+       for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
+
+       # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
+       update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
+       update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
+       update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
+}
+
+pkg_prerm_${PN} () {
+       # The utilities in /usr/bin
+       for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+       # The utilities in /bin
+       for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+       # The utilities in /usr/sbin
+       for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+       # The special cases
+       update-alternatives --remove hostname hostname.${PN}
+       update-alternatives --remove uptime uptime.${PN}
+       update-alternatives --remove '[' 'lbracket.${PN}'
+}
index d0d082bc63484bcd0b9201d7037dec6acdf91d86..009dad34cfc0741b157c4766cbb081e5ecc131ee 100644 (file)
@@ -1,89 +1,9 @@
-require coreutils.inc
+require coreutils-${PV}.inc
+require coreutils-target.inc
 
 PR = "r3"
 
-SRC_URI = "\
-  ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
+SRC_URI += "\
   file://man.patch;patch=1 \
   file://oe-old-tools.patch;patch=1 \
-  file://futimens.patch;patch=1 \
-  file://coreutils-install-use-STRIP.patch;patch=1 \
-  file://onceonly.m4 \
 "
-
-# [ gets a special treatment and is not included in this
-bindir_progs = "basename cksum comm csplit cut df dir dircolors dirname du \
-               env expand expr factor fmt fold groups head hostid id install \
-               join link logname md5sum mkfifo nice nl nohup od paste pathchk \
-               pinky pr printenv printf ptx readlink seq sha1sum shred sort \
-               split stat sum tac tail tee test tr tsort tty unexpand uniq \
-               unlink users vdir wc who whoami yes \
-               "
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
-                    ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
-                    true uname \
-                    "
-
-sbindir_progs= "chroot"
-
-do_configure_prepend() {
-       install -m 0644 ${WORKDIR}/onceonly.m4 ${S}/m4
-}
-
-do_install () {
-       autotools_do_install
-
-       # Renaming the utilities that should go in /usr/bin
-       for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /bin (FHS)
-       install -d ${D}${base_bindir}
-       for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /usr/sbin (FHS)
-       install -d ${D}${sbindir}
-       for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
-
-       # [ requires special handling because [.coreutils will cause the sed stuff
-       # in update-alternatives to fail, therefore use lbracket - the name used
-       # for the actual source file.
-       mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
-       # hostname and uptime separated. busybox's versions are preferred
-       mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
-       mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
-
-}
-
-pkg_postinst_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
-
-       # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
-       update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
-       update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
-       update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
-}
-
-pkg_prerm_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The special cases
-       update-alternatives --remove hostname hostname.${PN}
-       update-alternatives --remove uptime uptime.${PN}
-       update-alternatives --remove '[' 'lbracket.${PN}'
-}
index 6488e11a79e1936106b49f9543d4c02e927e3e0b..18ee4e36e11e78d3dfe53cda5b699172e308c1a1 100644 (file)
@@ -1,92 +1,7 @@
-require coreutils.inc
-PR = "r0"
+require coreutils-${PV}.inc
+require coreutils-target.inc
 
-# not thoroughly testes yet
-DEFAULT_PREFERENCE = "-1"
+PR = "r0.1"
 
-SRC_URI = "\
-  ftp://ftp.gnu.org/gnu/coreutils/coreutils-${PV}.tar.gz \
-  file://automake-version.patch;patch=1 \
-  file://man.patch;patch=1 \
-  file://onceonly.m4 \
-"
-
-# [ gets a special treatment and is not included in this
-bindir_progs = "basename cksum comm csplit cut df dir dircolors dirname du \
-               env expand expr factor fmt fold groups head hostid id install \
-               join link logname md5sum mkfifo nice nl nohup od paste pathchk \
-               pinky pr printenv printf ptx readlink seq sha1sum shred sort \
-               split stat sum tac tail tee test tr tsort tty unexpand uniq \
-               unlink users vdir wc who whoami yes \
-               "
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
-                    ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
-                    true uname \
-                    "
-
-sbindir_progs= "chroot"
-
-do_configure_prepend() {
-       install -m 0644 ${WORKDIR}/onceonly.m4 ${S}/m4
-}
-
-do_install () {
-       autotools_do_install
-
-       # Renaming the utilities that should go in /usr/bin
-       for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /bin (FHS)
-       install -d ${D}${base_bindir}
-       for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /usr/sbin (FHS)
-       install -d ${D}${sbindir}
-       for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
-
-       # [ requires special handling because [.coreutils will cause the sed stuff
-       # in update-alternatives to fail, therefore use lbracket - the name used
-       # for the actual source file.
-       mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
-       # hostname and uptime separated. busybox's versions are preferred
-       if [ -e ${D}${bindir}/hostname ]; then
-               mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
-       fi
-       if [ -e ${D}${bindir}/uptime ]; then
-               mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
-       fi
-}
-
-pkg_postinst_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
-
-       # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
-       update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
-       update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
-       update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
-}
-
-pkg_prerm_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The special cases
-       update-alternatives --remove hostname hostname.${PN}
-       update-alternatives --remove uptime uptime.${PN}
-       update-alternatives --remove '[' 'lbracket.${PN}'
-}
+SRC_URI += "file://automake-version.patch;patch=1 \
+            file://man.patch;patch=1"
index f80921a288f350b689b4a9bcd275e02a65f49cb6..46333be148d886e157cb025912906ee555982382 100644 (file)
@@ -1,89 +1,7 @@
-require coreutils.inc
+require coreutils-${PV}.inc
+require coreutils-target.inc
 
-SRC_URI = "\
-  ftp://ftp.gnu.org/gnu/coreutils/coreutils-${PV}.tar.gz \
-  file://automake-version.patch;patch=1 \
-  file://man.patch;patch=1 \
-  file://coreutils-7.2-fix-sort-segfault.patch;patch=1 \
-  file://onceonly.m4 \
-"
+PR = "r0"
 
-# [ gets a special treatment and is not included in this
-bindir_progs = "basename cksum comm csplit cut df dir dircolors dirname du \
-               env expand expr factor fmt fold groups head hostid id install \
-               join link logname md5sum mkfifo nice nl nohup od paste pathchk \
-               pinky pr printenv printf ptx readlink seq sha1sum shred sort \
-               split stat sum tac tail tee test tr tsort tty unexpand uniq \
-               unlink users vdir wc who whoami yes \
-               "
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
-                    ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
-                    true uname \
-                    "
-
-sbindir_progs= "chroot"
-
-do_configure_prepend() {
-       install -m 0644 ${WORKDIR}/onceonly.m4 ${S}/m4
-}
-
-do_install () {
-       autotools_do_install
-
-       # Renaming the utilities that should go in /usr/bin
-       for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /bin (FHS)
-       install -d ${D}${base_bindir}
-       for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
-
-       # Renaming and moving the utilities that should go in /usr/sbin (FHS)
-       install -d ${D}${sbindir}
-       for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
-
-       # [ requires special handling because [.coreutils will cause the sed stuff
-       # in update-alternatives to fail, therefore use lbracket - the name used
-       # for the actual source file.
-       mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
-       # hostname and uptime separated. busybox's versions are preferred
-       if [ -e ${D}${bindir}/hostname ]; then
-               mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
-       fi
-       if [ -e ${D}${bindir}/uptime ]; then
-               mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
-       fi
-}
-
-pkg_postinst_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
-
-       # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
-       update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
-       update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
-       update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
-}
-
-pkg_prerm_${PN} () {
-       # The utilities in /usr/bin
-       for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /bin
-       for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The utilities in /usr/sbin
-       for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
-
-       # The special cases
-       update-alternatives --remove hostname hostname.${PN}
-       update-alternatives --remove uptime uptime.${PN}
-       update-alternatives --remove '[' 'lbracket.${PN}'
-}
+SRC_URI += "file://automake-version.patch;patch=1 \
+            file://man.patch;patch=1"