Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 1998 22:58:36 +0200 (CEST)
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Cc:        seggers@semyam.dinoco.de
Subject:   bin/7023: bsd.port.(%|subdir.).mk patches for size support
Message-ID:  <199806222058.WAA05390@semyam.dinoco.de>

next in thread | raw e-mail | index | archive | help

>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/&/\&amp;/g' -e 's/>/\&gt;/g' -e 's/</\&lt;/g'
  
  README.html:
***************
*** 178,180 ****
--- 190,207 ----
  			-e '/%%SUBDIR%%/d' \
  		> $@
  	@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806222058.WAA05390>