From owner-svn-ports-head@FreeBSD.ORG Thu May 14 23:07:19 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20E4054A; Thu, 14 May 2015 23:07:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01A0F1024; Thu, 14 May 2015 23:07:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EN7IXV013284; Thu, 14 May 2015 23:07:18 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EN7IZ4013281; Thu, 14 May 2015 23:07:18 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201505142307.t4EN7IZ4013281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 14 May 2015 23:07:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r386368 - in head/editors: openoffice-4 openoffice-devel X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 23:07:19 -0000 Author: truckman Date: Thu May 14 23:07:17 2015 New Revision: 386368 URL: https://svnweb.freebsd.org/changeset/ports/386368 Log: Do not attempt to override the intent of DISABLE_MAKE_JOBS, which does not succeed in any case. The do-build target does not need to use bash, or even an extra level of shell. There are two levels of parallelism in the openoffice build framework. Split MAKE_JOBS_NUMBER between the two levels instead of potentially running MAKE_JOBS_NUMBER^2 compilations in parallel. PR: 199930 Approved by: mat (mentor, implicit) Modified: head/editors/openoffice-4/Makefile head/editors/openoffice-devel/Makefile Modified: head/editors/openoffice-4/Makefile ============================================================================== --- head/editors/openoffice-4/Makefile Thu May 14 22:40:44 2015 (r386367) +++ head/editors/openoffice-4/Makefile Thu May 14 23:07:17 2015 (r386368) @@ -178,14 +178,9 @@ CONFIGURE_ENV+= CC="${OOOCC}" CXX="${OOO GNU_CONFIGURE= yes WRKSUBDIR= ${WRKDIR}/aoo-${AOOVERSION} WRKSRC?= ${WRKSUBDIR}/main -BASH?= ${PREFIX}/bin/bash SUB_FILES= pkg-message SUB_LIST= EXECBASE=${EXECBASE} AOOTAG=${AOOTAG} AOOUDIR=${AOOUDIR} -.if defined(DISABLE_MAKE_JOBS) -MAKE_JOBS_NUMBER= 4 -.endif - CONFIGURE_ARGS+= \ --with-system-apache-commons=yes \ --with-commons-codec-jar=${JAVALIBDIR}/commons-codec.jar \ @@ -300,7 +295,42 @@ do-build: cd ${WRKSUBDIR} ; ${PRINTF} "main=active\n" >> source_config cd ${WRKSUBDIR} ; ${PRINTF} "extras=active\n" >> source_config cd ${WRKSRC} ; ./bootstrap - cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C" FBSD_LDFLAGS="${LDFLAGS}" ${BASH} -c "source ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; build.pl --all -P${MAKE_JOBS_NUMBER} -- -P${MAKE_JOBS_NUMBER}" + # + # numproc controls the number of parallel makes. + # + # dmproc is passed to dmake and controls parallelization at that + # level. + # + # dmproc > numproc seems to give shorter build times than + # numproc > dmproc. + # + # Select values for numproc and dmproc such that: + # * numproc*dmproc >= MAKE_JOBS_NUMBER + # * minimize numproc*dmproc-MAKE_JOBS_NUMBER + # * dmproc >= numproc + # * dmproc <= 2*numproc if MAKE_JOBS_NUMBER <= 3 + # + cd ${WRKSRC} ; . ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; \ + export LANG=C LC_ALL=C FBSD_LDFLAGS="${LDFLAGS}" ; \ + if [ ${MAKE_JOBS_NUMBER} -le 3 ] ; then \ + numproc=1 ; dmproc=${MAKE_JOBS_NUMBER} ; \ + else \ + a=1 ; \ + while [ $$(( 2 * $${a} * $${a} )) -lt ${MAKE_JOBS_NUMBER} ]; do \ + a=$$(( $${a} + 1 )) ; \ + done ; \ + b=$$(( $${a} + 1 )) ; \ + ad=$$(( ( ${MAKE_JOBS_NUMBER} + $${a} - 1 ) / $${a} )) ; \ + ap=$$(( $${a} * $${ad} )) ; \ + bd=$$(( ( ${MAKE_JOBS_NUMBER} + $${b} - 1 ) / $${b} )) ; \ + bp=$$(( $${b} * $${bd} )) ; \ + if [ $${ap} -le $${bp} ]; then \ + numproc=$${a} ; dmproc=$${ad} ; \ + else \ + numproc=$${b} ; dmproc=$${bd} ; \ + fi ; \ + fi ; \ + build.pl --all -P$${numproc} -- -P$${dmproc} do-install: cd ${WRKSRC}/instsetoo_native/unxfbsd?.pro/Apache_OpenOffice/archive/install/${LOCALIZED_LANG}/ ; ${LS} *.tar.?z > ${WRKDIR}/INSTALLFILES Modified: head/editors/openoffice-devel/Makefile ============================================================================== --- head/editors/openoffice-devel/Makefile Thu May 14 22:40:44 2015 (r386367) +++ head/editors/openoffice-devel/Makefile Thu May 14 23:07:17 2015 (r386368) @@ -192,14 +192,9 @@ CONFIGURE_ENV+= CC="${OOOCC}" CXX="${OOO GNU_CONFIGURE= yes WRKSUBDIR= ${WRKDIR}/aoo-${AOOVERSION} WRKSRC?= ${WRKSUBDIR}/main -BASH?= ${PREFIX}/bin/bash SUB_FILES= pkg-message SUB_LIST= EXECBASE=${EXECBASE} AOOTAG=${AOOTAG} AOOUDIR=${AOOUDIR} -.if defined(DISABLE_MAKE_JOBS) -MAKE_JOBS_NUMBER= 4 -.endif - CONFIGURE_ARGS+= \ --with-system-apache-commons=yes \ --with-commons-codec-jar=${JAVALIBDIR}/commons-codec.jar \ @@ -312,7 +307,42 @@ do-build: cd ${WRKSUBDIR} ; ${PRINTF} "main=active\n" >> source_config cd ${WRKSUBDIR} ; ${PRINTF} "extras=active\n" >> source_config cd ${WRKSRC} ; ./bootstrap - cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C" FBSD_LDFLAGS="${LDFLAGS}" ${BASH} -c "source ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; build.pl --all -P${MAKE_JOBS_NUMBER} -- -P${MAKE_JOBS_NUMBER}" + # + # numproc controls the number of parallel makes. + # + # dmproc is passed to dmake and controls parallelization at that + # level. + # + # dmproc > numproc seems to give shorter build times than + # numproc > dmproc. + # + # Select values for numproc and dmproc such that: + # * numproc*dmproc >= MAKE_JOBS_NUMBER + # * minimize numproc*dmproc-MAKE_JOBS_NUMBER + # * dmproc >= numproc + # * dmproc <= 2*numproc if MAKE_JOBS_NUMBER <= 3 + # + cd ${WRKSRC} ; . ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; \ + export LANG=C LC_ALL=C FBSD_LDFLAGS="${LDFLAGS}" ; \ + if [ ${MAKE_JOBS_NUMBER} -le 3 ] ; then \ + numproc=1 ; dmproc=${MAKE_JOBS_NUMBER} ; \ + else \ + a=1 ; \ + while [ $$(( 2 * $${a} * $${a} )) -lt ${MAKE_JOBS_NUMBER} ]; do \ + a=$$(( $${a} + 1 )) ; \ + done ; \ + b=$$(( $${a} + 1 )) ; \ + ad=$$(( ( ${MAKE_JOBS_NUMBER} + $${a} - 1 ) / $${a} )) ; \ + ap=$$(( $${a} * $${ad} )) ; \ + bd=$$(( ( ${MAKE_JOBS_NUMBER} + $${b} - 1 ) / $${b} )) ; \ + bp=$$(( $${b} * $${bd} )) ; \ + if [ $${ap} -le $${bp} ]; then \ + numproc=$${a} ; dmproc=$${ad} ; \ + else \ + numproc=$${b} ; dmproc=$${bd} ; \ + fi ; \ + fi ; \ + build.pl --all -P$${numproc} -- -P$${dmproc} do-install: cd ${WRKSRC}/instsetoo_native/unxfbsd?.pro/Apache_OpenOffice/archive/install/${LOCALIZED_LANG}/ ; ${LS} *.tar.?z > ${WRKDIR}/INSTALLFILES