alternative options for ports

Ulrich Spoerlein q at uni.de
Thu Oct 14 08:24:18 PDT 2004


On Thu, 14.10.2004 at 00:54:11 +0200, Sebastian Schulze Struchtrup wrote:
> >  Regarding package building, there is an option (with the vim port) 
> >for PACKAGE_BUILDING which builds with the most common options. I'm 
> >not exactly sure what kind of answer you were looking for, but just my 
> >little input on the subject :)
> 
> I thought of a way to specify configurations to build several packages 
> of the same port (of course with a diff. suffix) [called port variations 
> by David]
> E.g. build the vim port three times,
> First, with default options and WITH_GTK2 resulting in a package vim-gtk2
> Then with default options and WITH_KDE resulting in vim-kde
> And then with default options and WITH_ATHENA resulting in vim-athena.

I could imagine this working like this:
- Set VARIANTS in the port's Makefile
  VARIANTS=     gtk2 kde lite
  VARIANTS_gtk2=        WITH_GTK2=yes \
                        PKGNAMESUFFIX=-gtk2
  VARIANTS_lite=        WITHOUT_X11=yes \
                        PKGNAMESUFFIX=-lite

That means, the maintainer sets the desired package-names and WITH_Flags
(and other stuff that's needed).

Then the package-build cluster can do stuff like
.for var in ${VARIANTS}
make `make -VVARIANTS_${var}` clean package
.endfor

(yes, this is ugly, it's just do show the general workings...)

I don't know much about pkg_add and sysinstall, so I can't tell you how
this should interact with the variants selection...

> I don't know if there is a clean solution, but I remember that this is 
> (at least in some cases) handled with diff ports and setting MASTERDIR 
> and including the master's makefile.
> But this would lead to many add. ports just for package building...

Slave ports are silly IMHO. They are only "allowed" for important ports
and suggest a higher port count than we actually have :)

Ulrich Spoerlein
-- 
PGP Key ID: F0DB9F44				Encrypted mail welcome!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
didn't you understand?


More information about the freebsd-ports mailing list