Browse Source

add findutils do host machinery

Waldemar Brodkorb 10 years ago
parent
commit
712a7998a6
4 changed files with 25 additions and 8 deletions
  1. 0 1
      README
  2. 5 1
      package/findutils/Makefile
  3. 16 6
      scripts/scan-tools.sh
  4. 4 0
      target/config/Config.in.tools

+ 0 - 1
README

@@ -11,7 +11,6 @@ Before you can start you need to install some tools:
 - GNU make
 - GNU awk
 - GNU sed
-- findutils (find, xargs)
 - tar
 - patch
 - gzip

+ 5 - 1
package/findutils/Makefile

@@ -7,7 +7,7 @@ PKG_NAME:=		findutils
 PKG_VERSION:=		4.4.2
 PKG_RELEASE:=		4
 PKG_MD5SUM:=		351cc4adb07d54877fa15f75fb77d39f
-PKG_DESCR:=		GNU utilities for finding files
+PKG_DESCR:=		utilities for finding files
 PKG_SECTION:=		utils
 PKG_DEPENDS:=		libpthread
 PKG_BUILDDEP:=		autotool
@@ -18,12 +18,15 @@ PKG_SUBPKGS:=		FIND XARGS LOCATE
 PKGSD_LOCATE:=		locate utility
 PKGSD_XARGS:=		xargs utility
 
+include $(TOPDIR)/mk/host.mk
 include $(TOPDIR)/mk/package.mk
 
+$(eval $(call HOST_template,FINDUTILS,findutils,$(PKG_VERSION)-${PKG_RELEASE}))
 $(eval $(call PKG_template,FIND,find,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 $(eval $(call PKG_template,XARGS,xargs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_XARGS},${PKG_SECTION}))
 $(eval $(call PKG_template,LOCATE,locate,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LOCATE},${PKG_SECTION}))
 
+HOST_STYLE:=		auto
 AUTOTOOL_STYLE:=	autoreconf
 CONFIGURE_ENV+=		gl_cv_func_wcwidth_works=yes \
 			ac_cv_func_working_mktime=yes
@@ -44,4 +47,5 @@ locate-install:
 	$(INSTALL_BIN) $(WRKINST)/usr/libexec/{bigram,code,frcode} \
 		$(IDIR_LOCATE)/usr/libexec
 
+include ${TOPDIR}/mk/host-bottom.mk
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 16 - 6
scripts/scan-tools.sh

@@ -196,12 +196,6 @@ if ! which perl >/dev/null 2>&1; then
 	out=1
 fi
 
-if ! which xargs >/dev/null 2>&1; then
-	echo  "You need xargs to continue."
-	echo
-	out=1
-fi
-
 if ! which g++ >/dev/null 2>&1; then
 	echo  "You need g++ (GNU C++ compiler) to continue."
 	echo
@@ -251,6 +245,21 @@ if ! which pkgconf >/dev/null 2>&1; then
 	host_build_pkgconf=1
 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
+	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
+	fi
+fi
+
 host_build_xz=0
 if ! which xz >/dev/null 2>&1; then
 	echo "No xz found, will build one."
@@ -288,6 +297,7 @@ if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE"
 if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi
 # optional
 if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi

+ 4 - 0
target/config/Config.in.tools

@@ -28,6 +28,10 @@ config ADK_HOST_BUILD_FILE
 	boolean
 	default n
 
+config ADK_HOST_BUILD_FINDUTILS
+	boolean
+	default n
+
 config ADK_HOST_BUILD_FLEX
 	boolean
 	default n