changeset 487:5616a3d38d8e

[mq]: cross-ports
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 02 Nov 2012 15:36:00 +0200
parents 7b87676ff72d
children 263e93d36656
files ports/www/zhttpd/distinfo profiles/SMALL_/profile.mk share/mk/zrouter.ports.mk tools/install.sh
diffstat 3 files changed, 17 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/ports/www/zhttpd/distinfo	Tue Oct 16 13:30:51 2012 +0300
+++ b/ports/www/zhttpd/distinfo	Fri Nov 02 15:36:00 2012 +0200
@@ -1,3 +1,2 @@
-MD5 (zhttpd-release-11.tgz) = 67ade21161d38db9e98fe1b5abc41f8d
-SHA256 (zhttpd-release-11.tgz) = 9f2bdaf3945286e39a5b8434b5214d8d709e8d89acc79ee89593787abe849bd8
-SIZE (zhttpd-release-11.tgz) = 26204
+SHA256 (zhttpd-release-11.tgz) = ac8150424cd62b88e8e6dd02ecccce3b36f649b16b991eaa146d966c12910435
+SIZE (zhttpd-release-11.tgz) = 26198
--- a/profiles/SMALL_/profile.mk	Tue Oct 16 13:30:51 2012 +0300
+++ b/profiles/SMALL_/profile.mk	Fri Nov 02 15:36:00 2012 +0200
@@ -125,6 +125,7 @@
 passwd \
 sed \
 sockstat \
+sort \
 tail \
 tar \
 tee \
@@ -135,9 +136,6 @@
 wc \
 xargs
 
-WORLD_SUBDIRS_GNU_USR_BIN+= \
-sort
-
 WORLD_SUBDIRS_GNU_LIB+= \
 csu \
 libgcc \
--- a/share/mk/zrouter.ports.mk	Tue Oct 16 13:30:51 2012 +0300
+++ b/share/mk/zrouter.ports.mk	Fri Nov 02 15:36:00 2012 +0200
@@ -2,8 +2,8 @@
 
 # that may used for any platform
 # we need only say cross-build to configure
-PORTS_CONFIGURE_TARGET=--build=i386-portbld-freebsd8.2 --host=mipsel-portbld-freebsd8.2
-
+TARGET_ARCH=mips
+CFLAGS="-std=c99 -I${WORLDDESTDIR}/include"
 
 _TARGET_DEFS = \
 	TARGET_VENDOR=${TARGET_VENDOR} \
@@ -14,14 +14,11 @@
 
 
 _TARGET_CROSS_DEFS = \
-	PATH=${FREEBSD_BUILD_ENV_PATH}:/usr/local/bin:/usr/local/sbin \
-	PREFIX=${WORLDDESTDIR} \
-	LOCALBASE=${WORLDDESTDIR} \
-	CC="${CC} -L${WORLDDESTDIR}/lib -L${WORLDDESTDIR}/usr/lib" \
+	PATH=/usr/mips-freebsd/usr/bin:${PATH} \
 	PKG_CONFIG_PATH=${WORLDDESTDIR}/libdata/pkgconfig/ \
 	DISTDIR=${ZROUTER_OBJ}/distfiles/ \
-	GNU_CONFIGURE_PREFIX=${WORLDDESTDIR} \
-	GLOBAL_CONFIGURE_ARGS="${PORTS_CONFIGURE_TARGET}" \
+	PKG_DBDIR=${WORLDDESTDIR}/libdata/var/db/pkg \
+	TARGET_ARCH=mips \
 	NO_INSTALL_MANPAGES=yes \
 	WITHOUT_CHECK=yes \
 	NO_PKG_REGISTER=yes \
@@ -30,13 +27,13 @@
 	BINOWN=ray \
 	BINGRP=wheel \
 	NOPORTEXAMPLES=yes \
-	INSTALL_AS_USER=yes \
-	INSTALL="sh ${FREEBSD_SRC_TREE}/tools/install.sh" \
+	INSTALL=${ZROUTER_ROOT}/tools/install.sh \
 	ac_cv_func_malloc_0_nonnull=yes \
 	ac_cv_func_realloc_0_nonnull=yes \
-	AUTOTOOLS_LOCALBASE=/usr/local
-
-#	LDADD="-L${WORLDDESTDIR}/lib"
+	AUTOTOOLS_LOCALBASE=/usr/local \
+	LIBDIR+=${WORLDDESTDIR}/lib \
+	LDADD+="-L${WORLDDESTDIR}/lib" \
+	CXXFLAGS="-I${WORLDDESTDIR}/include -I${WORLDDESTDIR}/include/json"
 #	LIBTOOL=/usr/local/bin/libtool \
 #	-ELIBTOOL
 
@@ -48,6 +45,7 @@
 	@echo "----> Start building ports dependencies ..."
 .for dir in ${WORLD_SUBDIRS_PORTS}
 	@echo "Start ${dir} port building..."
+	mkdir -p ${WORLDDESTDIR}/libdata/var/db/pkg
 	cd ${ZROUTER_ROOT} ;${MAKE} ${_TARGET_DEFS} PORT_BUILD_DEPEND_CROSS=${dir} port-build-depend-cross
 .endfor
 	@echo "----> Ports dependencies build done ..."
@@ -101,8 +99,8 @@
 	    if [ $${PORT_STATUS} -lt 50 ] ; then \
 		    echo "$${PORT_STATUS}% of files matched, do install" ; \
 		    rm -f ${ZROUTER_OBJ}/ports/${dir}/.install* ; \
-		    echo cd ${dir} ; echo ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install ; \
-		    cd ${dir} ; PATH=${FREEBSD_BUILD_ENV_PATH} ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install || \
+		    echo cd ${dir} ; echo ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install CHROOTED=no DESTDIR=${WORLDDESTDIR} PREFIX=/; \
+		    cd ${dir} ; PATH=${FREEBSD_BUILD_ENV_PATH} ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install CHROOTED=no DESTDIR=${WORLDDESTDIR} PREFIX=/ || \
 			    ( ${MAKE} WRKDIR=${ZROUTER_OBJ}/ports/${dir} clean && \
 			    echo ${MAKE} WRKDIR=${ZROUTER_OBJ}/ports/${dir} configure && \
 			    ${MAKE} WRKDIR=${ZROUTER_OBJ}/ports/${dir} configure && \
@@ -111,7 +109,7 @@
 			    mv `${MAKE} WRKDIR=${ZROUTER_OBJ}/ports/${dir} -VCONFIGURE_COOKIE` `${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} -VCONFIGURE_COOKIE` && \
 			    echo ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} all && \
 			    ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} all && \
-			    echo ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install && \
+			    echo ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install CHROOTED=no DESTDIR=${WORLDDESTDIR} PREFIX=/ && \
 			    ${MAKE} ${_TARGET_CROSS_DEFS} WRKDIR=${ZROUTER_OBJ}/ports/${dir} install ) ; \
 	    fi
 .endfor