Portupgrade and pkgtools.conf file
Matthew Seaman
m.seaman at infracaninophile.co.uk
Wed Apr 30 00:31:16 PDT 2003
On Wed, Apr 30, 2003 at 12:24:39AM -0500, Eduardo Viruena Silva wrote:
> On Tue, 29 Apr 2003, E. J. Cerejo wrote:
>
> > I'm trying to tell portupgrade to install mplayer with these options:
> >
> > 'multimedia/mplayer' => 'WITH_OPTIMIZED_CFLAGS', 'multimedia/mplayer'
> > => 'WITHOUT_RUNTIME_CPUDETECTION', 'multimedia/mplayer' =>
> > 'WITH_GUI', 'multimedia/mplayer' => 'WITH_FREETYPE',
> > 'multimedia/mplayer' => 'WITH_DVD=', 'multimedia/mplayer' =>
> > 'WITH_LIBDVDREAD', 'multimedia/mplayer' => 'WITH_LIBDVDNAV',
> > 'multimedia/mplayer' => 'WITH_ARTS', 'multimedia/mplayer' =>
> > 'WITH_LIBDV', 'multimedia/mplayer' => 'WITH_MAD',
> > 'multimedia/mplayer' => 'WITH_SVGALIB', 'multimedia/mplayer' =>
> > 'WITH_AALIB', 'multimedia/mplayer' => 'WITH_SDL',
> > 'multimedia/mplayer' => 'WITH_ESOUND', 'multimedia/mplayer' =>
> > 'WITH_VORBIS','multimedia/mplayer' => 'WITH_XANIM',
> > 'multimedia/mplayer' => 'WITH_LIVEMEDIA', 'multimedia/mplayer' =>
> > 'WITH_XVID', 'multimedia/mplayer' => 'WITH_FAAD'
> >
> > I got them all on the same line separated by commons under make args,
> > and portupgrade gives me this:
> >
> > I've tried without the commons but still doesn't work, I added the
> > "=yes" in each argument but still the same error, does anyone know the
> > correct format for this?
>
> the proper way of doing this is:
>
> make OPTION1=yes OPTION2=yes ... OPTIONn=yes
>
> or
>
> make -DOPTION1 -DOPTION2 ... -DOPIONn
>
>
> in your case:
>
> make WITH_OPTIMIZED_CFLAGS=yes WITHOUT_RUNTIME_CPUDETECTION=yes \
> WITH_GUI=yes WITH_FREETYPE=yes WITH_LIBDVDREAD=yes WITH_ARTS=yes \
> WITH_LIBDV=yes WITH_MAD=yes WITH_SVGALIB=yes WITH_AALIB=yes WITH_SDL=yes \
> WITH_ESOUND=yes WITH_XANIM=yes WITH_XVID=yes WITH_FAAD=yes
>
True, but that isn't the answer to the question asked. The entry in
the pkgtools.conf MAKE_ARGS hash should look like:
'multimedia/mplayer' => 'WITH_OPTIMIZED_CFLAGS=yes WITHOUT_RUNTIME_CPUDETECTION=yes WITH_GUI=yes WITH_FREETYPE=yes WITH_LIBDVDREAD=yes WITH_ARTS=yes WITH_LIBDV=yes WITH_MAD=yes WITH_SVGALIB=yes WITH_AALIB=yes WITH_SDL=yes WITH_ESOUND=yes WITH_XANIM=yes WITH_XVID=yes WITH_FAAD=yes',
That is, all of the various make options on one line separated by
spaces, keyed onto the port name on the left hand side of the '=>'.
Because of the way hash tables work, you can't keep repeating the
'key' part with a different 'value' part and have things work the way
you expect. A later entry with the same key will just overwrite the
previous one. Even though the rubric just above the MAKE_ARGS
definition in pkgtools.conf says:
# arguments to pass to make(1). You can use wildcards ("ports glob"
# or "package glob"). If a port/package matches multiple entries,
# all the arguments are joined using the space as separator.
which might lead you to think you can repeat a key on the left hand
side with a different value on the right hand side -- you can't. All
that means is that if you have several *different* wildcard entries
that each happen to match the port in question, their values will all
be applied.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030430/a84d39de/attachment.bin
More information about the freebsd-questions
mailing list