From owner-freebsd-bugs Mon Jun 22 14:12:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA22068 for freebsd-bugs-outgoing; Mon, 22 Jun 1998 14:12:26 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21943 for ; Mon, 22 Jun 1998 14:11:45 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id OAA28741; Mon, 22 Jun 1998 14:10:01 -0700 (PDT) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA20141 for ; Mon, 22 Jun 1998 14:04:31 -0700 (PDT) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id XAA24932 for FreeBSD-gnats-submit@freebsd.org; Mon, 22 Jun 1998 23:00:26 +0200 (MET DST) Received: (from seggers@localhost) by semyam.dinoco.de (8.8.8/8.8.8) id WAA05390; Mon, 22 Jun 1998 22:58:36 +0200 (CEST) (envelope-from seggers) Message-Id: <199806222058.WAA05390@semyam.dinoco.de> Date: Mon, 22 Jun 1998 22:58:36 +0200 (CEST) From: Stefan Eggers Reply-To: seggers@semyam.dinoco.de To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: seggers@semyam.dinoco.de X-Send-Pr-Version: 3.2 Subject: bin/7023: bsd.port.(%|subdir.).mk patches for size support Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7023 >Category: bin >Synopsis: bsd.port.(%|subdir.).mk patches for size support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jun 22 14:10:01 PDT 1998 >Last-Modified: >Originator: Stefan Eggers >Organization: none >Release: FreeBSD 2.2.6-STABLE i386 >Environment: Changes to accompany PR bin/7021 and bin/7022. >Description: With "make sizetable" in a subdirectory one can create a size table in either /usr/ports or /usr/ports/packages/All - it depends on where the packages go. This sizetable is intended for sysinstall so that it is able to estimate the package size requirements. It somehow shall go on the CD when sysinstall knows how to use it at least partially. >How-To-Repeat: Just try it. :-) >Fix: Two patches. One for bsd.port.mk, the other intended for bsd.port.subdir.mk. bsd.port.mk.WITH_SIZE is the version with the size extention mentioned in the other PR. *** bsd.port.mk.WITH_SIZE Mon Jun 22 16:49:37 1998 --- bsd.port.mk Mon Jun 22 22:50:03 1998 *************** *** 253,265 **** # the same file. # checksum - Use files/md5 to ensure that your distfiles are valid. # makesum - Generate files/md5 (only do this for your own ports!). # # Default sequence for "all" is: fetch checksum extract patch configure build # # Please read the comments in the targets section below, you # should be able to use the pre-* or post-* targets/scripts ! # (which are available for every stage except checksum) or ! # override the do-* targets to do pretty much anything you want. # # NEVER override the "regular" targets unless you want to open # a major can of worms. --- 253,269 ---- # the same file. # checksum - Use files/md5 to ensure that your distfiles are valid. # makesum - Generate files/md5 (only do this for your own ports!). + # do-sizetable - Creates the size table from the size files accompanying the + # packages. It gets used internally by makesizetable in the + # file bsd.port.subdir.mk # # Default sequence for "all" is: fetch checksum extract patch configure build # # Please read the comments in the targets section below, you # should be able to use the pre-* or post-* targets/scripts ! # (which are available for every stage except checksum and ! # makesizetable) or override the do-* targets to do pretty ! # much anything you want. # # NEVER override the "regular" targets unless you want to open # a major can of worms. *************** *** 680,688 **** --- 684,695 ---- PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} .if exists(${PACKAGES}) PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} + PKGSIZETABLE?= ${PKGREPOSITORY}/SIZES .else PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} + PKGSIZETABLE?= ${PORTSDIR}/SIZES .endif + PKGSIZEFILE?= ${PKGFILE}+SIZE # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' PKGLATESTREPOSITORY?= ${PACKAGES}/Latest *************** *** 1109,1115 **** fi; \ fi; \ fi; \ ! if ${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; then \ if [ -d ${PACKAGES} ]; then \ ${MAKE} ${.MAKEFLAGS} package-links; \ fi; \ --- 1116,1122 ---- fi; \ fi; \ fi; \ ! if ${PKG_CMD} ${PKG_ARGS} -S ${PKGSIZEFILE} ${PKGFILE}; then \ if [ -d ${PACKAGES} ]; then \ ${MAKE} ${.MAKEFLAGS} package-links; \ fi; \ *************** *** 1811,1814 **** --- 1818,1827 ---- # Same goes for tags .if !target(tags) tags: + .endif + + # size table support + do-sizetable: + .if exists(${PKGSIZEFILE}) + echo >>${PKGSIZETABLE} ${PKGNAME}:`cat ${PKGSIZEFILE}` .endif Now to patch #2: *** bsd.port.subdir.mk.ORIG Sat Jun 20 22:21:00 1998 --- bsd.port.subdir.mk Mon Jun 22 22:48:09 1998 *************** *** 29,35 **** # # afterinstall, all, beforeinstall, build, checksum, clean, # configure, depend, describe, extract, fetch, fetch-list, ! # install, package, readmes, realinstall, reinstall, tags # --- 29,36 ---- # # afterinstall, all, beforeinstall, build, checksum, clean, # configure, depend, describe, extract, fetch, fetch-list, ! # install, package, readmes, realinstall, reinstall, ! # sizetable, tags # *************** *** 147,152 **** --- 148,164 ---- README= ${TEMPLATES}/README.category .endif + PACKAGES?= ${PORTSDIR}/packages + # Note this has to start with a capital letter (or more accurately, it + # shouldn't match "[a-z]*"), see the target "delete-package-links" below. + PKGREPOSITORYSUBDIR?= All + PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} + .if exists(${PACKAGES}) + PKGSIZETABLE?= ${PKGREPOSITORY}/SIZES + .else + PKGSIZETABLE?= ${PORTSDIR}/SIZES + .endif + HTMLIFY= sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/ $@ @rm -f $@.tmp $@.tmp2 $@.tmp3 + + # size table support + sizetable: + .if exists(${PKGSIZETABLE}) + @rm -f ${PKGSIZETABLE} + .endif + @touch ${PKGSIZETABLE} + ${MAKE} do-sizetable + + do-sizetable: + .for entry in ${SUBDIR} + cd ${.CURDIR}/${entry}; \ + ${MAKE} do-sizetable; \ + cd .. + .endfor >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message