Prechádzať zdrojové kódy

use gnu find on darwin

Waldemar Brodkorb 10 rokov pred
rodič
commit
77dd9c4669
5 zmenil súbory, kde vykonal 12 pridanie a 25 odobranie
  1. 1 1
      mk/image.mk
  2. 1 0
      package/findutils/Makefile
  3. 0 9
      scripts/find
  4. 10 6
      scripts/scan-tools.sh
  5. 0 9
      scripts/xargs

+ 1 - 1
mk/image.mk

@@ -149,7 +149,7 @@ ${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}
 		${STAGING_HOST_DIR}/usr/bin/cpio -o -Hustar -P | gzip -n9 >$@
 
 ${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}
-	$(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \
+	env PATH='${HOST_PATH}' $(BASH) ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \
 		${TARGET_DIR}/ >$@
 
 ${FW_DIR}/${INITRAMFS}: ${STAGING_TARGET_DIR}/${INITRAMFS}_list

+ 1 - 0
package/findutils/Makefile

@@ -11,6 +11,7 @@ PKG_DESCR:=		utilities for finding files
 PKG_SECTION:=		utils
 PKG_DEPENDS:=		libpthread
 PKG_BUILDDEP:=		autotool
+HOST_BUILDDEP:=		autotool
 PKG_URL:=		http://www.gnu.org/software/findutils/
 PKG_SITES:=		http://ftp.gnu.org/pub/gnu/findutils/
 

+ 0 - 9
scripts/find

@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gfind 2>/dev/null)" ];then
-	/usr/bin/find "$@"
-else
-	gfind "$@"
-fi

+ 10 - 6
scripts/scan-tools.sh

@@ -247,16 +247,20 @@ fi
 
 host_build_findutils=0
 if ! which gxargs >/dev/null 2>&1; then
-	if ! which xargs >/dev/null 2>&1; then
-		echo "No xargs found, will build one."
-		host_build_findutils=1
+	if which xargs >/dev/null 2>&1; then
+		if ! xargs --version 2>/dev/null|grep GNU >/dev/null;then
+			echo "No GNU xargs found, will build one."
+			host_build_findutils=1
+		fi
 	fi
 fi
 
 if ! which gfind >/dev/null 2>&1; then
-	if ! which find >/dev/null 2>&1; then
-		echo "No find found, will build one."
-		host_build_findutils=1
+	if which find >/dev/null 2>&1; then
+		if ! find --version 2>/dev/null|grep GNU >/dev/null;then
+			echo "No GNU find found, will build one."
+			host_build_findutils=1
+		fi
 	fi
 fi
 

+ 0 - 9
scripts/xargs

@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gxargs 2>/dev/null)" ];then
-	/usr/bin/xargs "$@"
-else
-	gxargs "$@"
-fi