One of the nice things about the .info files is that just about anything can be added to them; automated build tools will generally ignore any new fields you may choose to add. From my clone of the SBo repo, I have a branch named "spbuilder" (after the name of the build tool I use). In that branch I make any modifications that I want, in particular the addition of an ENVOPTS field in which I place any environment variables I want exported before building. For instance my ffmpeg.info has:

ENVOPTS="LAME=yes X264=yes CELT=yes DC1394=yes FREI0R=yes GSM=yes RTMP=yes SCHROEDINGER=yes SPEEX=yes VPX=yes XVID=yes BLURAY=yes ASS=yes OPENAL=yes IEC61883=yes ILBC=yes MODPLUG=yes OPUS=yes TWOLAME=yes LADSPA=yes PULSEAUDIO=yes X265=yes ZVBI=yes OPENCORE=yes FAAC=yes OPENSSL=yes DECKLINK=yes
"

I use this as example as it demonstrates exactly the sort of thing I don't want to have to remember when I build ffmpeg. I could keep a note about it somewhere - how about as an ENVOPTS field in the .info file?

Another sometimes useful option is ENVOPTS="MAKEFLAGS=-j1".

Since each build is done in a new container, there's no problem with polluting the environment for future builds. That said, I have sometimes used a qemu or vbox VM to build an app and all its dependencies and I didn't find environment pollution due to multiple exports of the different ENVOPTS to be a problem.

The only work is adding the options you want but that is also the advantage - you have the options _you_ want rather some some arbitrary set of options the maintainer wants or believes end users will want. Naturally not all SlackBuilds need any options set so the number of changes is actually quite small (I have 9 modified out of the 434 that I have builds of), so the amount of work for an individual is quite low.

Of course it will need support by build tools to be useful. Luckily I have my own build tool that supports it. If the recognised tools won't support it, fork one of them and add such support yourself - the general idea is just to just export the ENVOPTS field immediately before the .SlackBuild is run (at least after the .info file is sourced or parsed). I guess more complete support could include unsetting each of the added options after each build.

Lastly, ENVOPTS was just my choice of name - you can name it whatever you like.

chris

_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/

Reply via email to