Date: Tue, 20 Jan 2004 11:45:47 -0500 From: Joe Marcus Clarke <marcus@FreeBSD.org> To: Oliver Eikemeier <eikemeier@fillmore-labs.com> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: HEADS UP: New bsd.*.mk changes Message-ID: <1074617147.757.16.camel@gyros> In-Reply-To: <400D2939.5090203@fillmore-labs.com> References: <1074590694.85583.20.camel@shumai.marcuscom.com> <400D2939.5090203@fillmore-labs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-WWUKpuI69H7f2K+pjq9x Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2004-01-20 at 08:12, Oliver Eikemeier wrote: > Joe Marcus Clarke wrote: >=20 > > Type: FEATURE > >=20 > > Title: Add per-port persistent build options with a menu-driven > > front-end > >=20 > > Affects: bsd.port.mk > >=20 > > Description: Probably one of the most anticipated new features for the > > ports system is the ability to have persistent per-port build options. > > This new feature adds that functionality as well as a new menu-driven > > interface for setting those per-port options. Porters will need to set > > the OPTIONS macro in their port's Makefile to a list of WITH_ options > > supported by that port. The format is <option> "<description>" > > [on|off]. For example: FLEXRESP "Flexible response to events" off. > > This says that this port supports a WITH_FLEXRESP option that is not > > defined by default. This option's description is, "Flexible response > > to events." Multiple options should be chained into the one OPTIONS > > macro. NOTE: For OPTIONS to work, you must define OPTIONS before > > bsd.port.pre.mk. In order to configure these options, use the > > ``config'' target. Doing ``make config'' will pop up a curses-based > > dialog which lists all the available options for the given port. > > Changes are saved in a per-port directory under PORTS_DBDIR (default: > > /var/db/ports). To view configurable options for a port, use the > > ``showconfig'' target. To set all port options back to the defaults, > > use the ``rmconfig'' target. > >=20 > > PR: > >=20 > > Submitted by: eivind >=20 > Sorry for stepping up so late, but this saves options under > ${PORT_DBDIR}/${PORTNAME}/options >=20 > Lots of ports have the same PORTNAME (ie 'openldap' for > net/openldap2[012]-(client|server), 'apache' for russian/apache13, > www/apache(13|13-fp|2|21)). Some conflict, but -client/-server don't. > Either each port has to set OPTIONSFILE to ${PORT_DBDIR}/${PORTNAME}/some= thing, > or we may use LATEST_LINK instead of PORTNAME: What's the general consensus on this (is there one)? What about ports that set NO_LATEST_LINK? In any event, the patch below would need to be tested on bento again (uggghh). Since OPTIONSFILE is currently overrideable, couldn't porters that have conflicting PORTNAMEs, set this file to a unique name. For example: OPTIONSFILE=3D ${PORT_DBDIR}/${PORTNAME}/options.mozilla-devel Wouldn't that satisfy most people? Perhaps we could shorten the public OPTIONSFILE to just specify the filename, and do all the grunt work in bsd.port.mk...? Joe >=20 > Index: /usr/ports/Mk/bsd.port.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v > retrieving revision 1.475 > diff -u -r1.475 bsd.port.mk > --- /usr/ports/Mk/bsd.port.mk 20 Jan 2004 09:14:09 -0000 1.475 > +++ /usr/ports/Mk/bsd.port.mk 20 Jan 2004 12:59:22 -0000 > @@ -1014,17 +1014,6 @@ > USE_SUBMAKE=3D yes > .endif > =20 > -# where 'make config' records user configuration options > -PORT_DBDIR?=3D /var/db/ports > - > -OPTIONSFILE?=3D${PORT_DBDIR}/${PORTNAME}/options > -.if exists(${OPTIONSFILE}) > -.include "${OPTIONSFILE}" > -.endif > -.if exists(${OPTIONSFILE}.local) > -.include "${OPTIONSFILE}.local" > -.endif > - > # check for old, crufty, makefile types, part 1: > .if !defined(PORTNAME) || !defined(PORTVERSION) || defined(PKGNAME) > check-makefile:: > @@ -1085,6 +1074,31 @@ > PACKAGES?=3D ${PORTSDIR}/packages > TEMPLATES?=3D ${PORTSDIR}/Templates > =20 > +PKGREPOSITORYSUBDIR?=3D All > +PKGREPOSITORY?=3D ${PACKAGES}/${PKGREPOSITORYSUBDIR} > +.if exists(${PACKAGES}) > +PKGFILE?=3D ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} > +.else > +PKGFILE?=3D ${.CURDIR}/${PKGNAME}${PKG_SUFX} > +.endif > + > +# The "latest version" link -- ${PKGNAME} minus everthing after the last= '-' > +PKGLATESTREPOSITORY?=3D ${PACKAGES}/Latest > +PKGBASE?=3D ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} > +LATEST_LINK?=3D ${PKGBASE} > +PKGLATESTFILE=3D ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX} > + > +# where 'make config' records user configuration options > +PORT_DBDIR?=3D /var/db/ports > + > +OPTIONSFILE?=3D${PORT_DBDIR}/${LATEST_LINK}/options > +.if exists(${OPTIONSFILE}) > +.include "${OPTIONSFILE}" > +.endif > +.if exists(${OPTIONSFILE}.local) > +.include "${OPTIONSFILE}.local" > +.endif > + > .if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \ > (!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5)) > check-makefile:: > @@ -2522,20 +2537,6 @@ > @${DO_NADA} > .endif > =20 > -PKGREPOSITORYSUBDIR?=3D All > -PKGREPOSITORY?=3D ${PACKAGES}/${PKGREPOSITORYSUBDIR} > -.if exists(${PACKAGES}) > -PKGFILE?=3D ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} > -.else > -PKGFILE?=3D ${.CURDIR}/${PKGNAME}${PKG_SUFX} > -.endif > - > -# The "latest version" link -- ${PKGNAME} minus everthing after the last= '-' > -PKGLATESTREPOSITORY?=3D ${PACKAGES}/Latest > -PKGBASE?=3D ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} > -LATEST_LINK?=3D ${PKGBASE} > -PKGLATESTFILE=3D ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX} > - > .if defined(PERL_CONFIGURE) > CONFIGURE_ARGS+=3D CC=3D"${CC}" CCFLAGS=3D"${CFLAGS}" PREFIX=3D"${PREFIX= }" \ > INSTALLPRIVLIB=3D"${PREFIX}/lib" INSTALLARCHLIB=3D"${PREFIX}/lib" > @@ -4894,8 +4895,8 @@ > .if !defined(OPTIONS) > @${ECHO_MSG} "=3D=3D=3D> No options to configure" > .else > - @(${MKDIR} ${PORT_DBDIR}/${PORTNAME} 2> /dev/null) || \ > - (${ECHO_MSG} "=3D=3D=3D> Cannot create ${PORT_DBDIR}/${PORTNAME}, chec= k permissions"; exit 1) > + @(${MKDIR} ${PORT_DBDIR}/${LATEST_LINK} 2> /dev/null) || \ > + (${ECHO_MSG} "=3D=3D=3D> Cannot create ${PORT_DBDIR}/${LATEST_LINK}, c= heck permissions"; exit 1) > -@if [ -e ${OPTIONSFILE} ]; then \ > . ${OPTIONSFILE}; \ > fi; \ > @@ -4907,7 +4908,6 @@ > withoutvar=3DWITHOUT_$$1; \ > withval=3D$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \ > withoutval=3D$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \ > - ${ECHO_CMD} $${withval}; \ > if [ ! -z "$${withval}" ]; then \ > val=3Don; \ > elif [ ! -z "$${withoutval}" ]; then \ > @@ -4917,7 +4917,7 @@ > fi; \ > DEFOPTIONS=3D"$${DEFOPTIONS} $$1 \"$$2\" $${val}"; \ > shift 3; \ > - done > /dev/null; \ > + done; \ > TMPOPTIONSFILE=3D$$(mktemp -t portoptions); \ > trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ > ${SH} -c "${DIALOG} --checklist \"Options for ${PORTNAME} ${PORTVERSION= }\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \ > @@ -4964,7 +4964,7 @@ > .if exists(${OPTIONSFILE}) > -@${ECHO_MSG} "=3D=3D=3D> Removing user-configured options for ${PORTNA= ME}"; \ > ${RM} -f ${OPTIONSFILE}; \ > - ${RMDIR} ${PORT_DBDIR}/${PORTNAME} > + ${RMDIR} ${PORT_DBDIR}/${LATEST_LINK} > .else > @${ECHO_MSG} "=3D=3D=3D> No user-specified options configured for ${POR= TNAME}" > .endif --=20 Joe Marcus Clarke FreeBSD GNOME Team :: marcus@FreeBSD.org gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-WWUKpuI69H7f2K+pjq9x Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBADVs7b2iPiv4Uz4cRAmRXAJ9D+dZo8BrGO81/C06ZpIraH9qP8ACfbNEW auBceVC/7XDlR3ZYALbkpUA= =XHYF -----END PGP SIGNATURE----- --=-WWUKpuI69H7f2K+pjq9x--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1074617147.757.16.camel>