浏览代码

use cmake-host

Waldemar Brodkorb 11 年之前
父节点
当前提交
2e7d502c63
共有 5 个文件被更改,包括 20 次插入23 次删除
  1. 1 0
      mk/host-bottom.mk
  2. 3 2
      package/bcm2835-vc/Makefile
  3. 14 8
      package/cmake/Makefile
  4. 2 1
      package/yajl/Makefile
  5. 0 12
      scripts/scan-pkgs.sh

+ 1 - 0
mk/host-bottom.mk

@@ -56,6 +56,7 @@ else
 	    ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
 endif
 endif
+	${MAKE} host-configure $(MAKE_TRACE)
 	touch $@
 
 host-build:

+ 3 - 2
package/bcm2835-vc/Makefile

@@ -6,11 +6,12 @@ include ${TOPDIR}/rules.mk
 PKG_NAME:=		bcm2835-vc
 # actually f65a4eef05ee436976f9be219d3db841d3d6b8ec from 05.10.2013
 PKG_VERSION:=		0.3
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		027d42d1ba803fabdc6bc4ec78d52e67
 PKG_DESCR:=		vc tools for raspberry pi (bcm2835)
 PKG_SECTION:=		base
 PKG_DEPENDS:=		libpthread
+PKG_BUILDDEP:=		cmake-host
 PKG_SITES:=		http://openadk.org/distfiles/
 
 PKG_SYSTEM_DEPENDS:=	raspberry-pi
@@ -22,7 +23,7 @@ $(eval $(call PKG_template,BCM2835_VC,bcm2835-vc,${PKG_VERSION}-${PKG_RELEASE},$
 CONFIG_STYLE:=          manual
 
 do-configure:
-	(cd $(WRKBUILD) && cmake -DCMAKE_SYSTEM_NAME=Linux .)
+	(cd $(WRKBUILD) && PATH='${TARGET_PATH}' cmake -DCMAKE_SYSTEM_NAME=Linux .)
 
 bcm2835-vc-install:
 	$(INSTALL_DIR) ${IDIR_BCM2835_VC}/opt/vc/{bin,lib}

+ 14 - 8
package/cmake/Makefile

@@ -4,32 +4,38 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		cmake
-PKG_VERSION:=		2.8.4
+PKG_VERSION:=		2.8.12
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		209b7d1d04b2e00986538d74ba764fcf
+PKG_MD5SUM:=		105bc6d21cc2e9b6aff901e43c53afea
 PKG_DESCR:=		cmake utility
 PKG_SECTION:=		lang
 PKG_URL:=		http://www.cmake.org/
 PKG_SITES:=		http://www.cmake.org/files/v2.8/
 
-PKG_SYSTEM_DEPENDS:=	native
-
+include $(TOPDIR)/mk/host.mk
 include $(TOPDIR)/mk/package.mk
 
-$(eval $(call PKG_template,CMAKE,cmake,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call HOST_template,CMAKE,cmake,$(PKG_VERSION)-${PKG_RELEASE}))
+#$(eval $(call PKG_template,CMAKE,cmake,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+HOST_STYLE:=		manual
 CONFIG_STYLE:=		manual
 XAKE_FLAGS+=		GCC_HONOUR_COPTS=s
 
-pre-configure:
-	(cd $(WRKBUILD); ./configure -prefix=/usr)
+host-configure:
+	(cd $(WRKBUILD); ./configure --prefix=/usr)
+
+cmake-hostinstall:
+	$(INSTALL_BIN) $(WRKBUILD)/bin/cmake \
+		$(STAGING_HOST_DIR)/usr/bin
 
 do-configure:
-	
+	(cd $(WRKBUILD); ./configure --prefix=/usr)
 
 cmake-install:
 	$(INSTALL_DIR) $(IDIR_CMAKE)/usr/bin
 	$(INSTALL_BIN) $(WRKINST)/usr/bin/cmake \
 		$(IDIR_CMAKE)/usr/bin
 
+include ${TOPDIR}/mk/host-bottom.mk
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 2 - 1
package/yajl/Makefile

@@ -9,6 +9,7 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		c953a53344c0e20a892fc042bbe69744
 PKG_DESCR:=		a small event-driven JSON parser written in ANSI C
 PKG_SECTION:=		libs
+PKG_BUILDDEP:=		cmake-host
 PKG_URL:=		http://lloyd.github.com/yajl/
 PKG_SITES:=		http://openadk.org/distfiles/
 PKG_OPTS:=		dev
@@ -20,7 +21,7 @@ $(eval $(call PKG_template,YAJL,yajl,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS
 CONFIG_STYLE:=		manual
 
 do-configure:
-	(cd ${WRKBUILD} && ./configure --prefix /usr)
+	(cd ${WRKBUILD} && PATH='${TARGET_PATH}' ./configure --prefix /usr)
 
 yajl-install:
 	$(INSTALL_DIR) $(IDIR_YAJL)/usr/lib

+ 0 - 12
scripts/scan-pkgs.sh

@@ -166,13 +166,8 @@ if [[ -n $ADK_PACKAGE_GLIB ]]; then
 	NEED_GETTEXT="$NEED_GETTEXT glib"
 fi
 
-if [[ -n $ADK_PACKAGE_BCM2835_VC ]]; then
-	NEED_CMAKE="$NEED_CMAKE bcm2835-vc"
-fi
-
 if [[ -n $ADK_PACKAGE_YAJL ]]; then
 	NEED_RUBY="$NEED_RUBY yajl"
-	NEED_CMAKE="$NEED_CMAKE yajl"
 fi
 
 if [[ -n $ADK_PACKAGE_XBMC ]]; then
@@ -347,13 +342,6 @@ if [[ -n $NEED_BISON ]]; then
 	fi
 fi
 
-if [[ -n $NEED_CMAKE ]]; then
-	if ! which cmake >/dev/null 2>&1; then
-		echo >&2 You need cmake to build $NEED_CMAKE
-		out=1
-	fi
-fi
-
 if [[ -n $NEED_ZIP ]]; then
 	if ! which zip >/dev/null 2>&1; then
 		echo >&2 You need zip to build $NEED_ZIP