[Slackbuilds-users] Additional REQUIRES entries
Christoph Willing
chris.willing at linux.com
Fri Jan 31 12:28:04 UTC 2020
On 31/1/20 9:30 pm, B Watson wrote:
> On 1/31/20, Christoph Willing <chris.willing at linux.com> wrote:
>> [opencv]
>> QK_REQUIRES = libdc1394 ffmpeg
>>
>> Of course, just add more entries as needed. Also, multiple quirks files
>> can be maintained for special purposes, changing between them using the
>> new -q option.
>
> Is there a mechanism for keeping track of environment variables,
> preferably in the same quirks file? As an example, ffmpeg has a ton
> of optional FOO=yes BAR=yes and pretty much everyone wants/needs a
> different set of them for their personal ffmpeg build. I have an "env"
> file to source, in my local git tree (untracked, just sitting in the
> ffmpeg dir) but it's not what you'd call an ideal solution.
>
> Also you got stuff that has REQUIRES="python3", and the README says
> python-something is optional (good candidate for quirks file), but
> python-something has to be run with PYTHON3=yes in the env (doesn't
> autodetect).
>
Yes, I also store environment variables in the quirks file - it's what I
was alluding to as "possible further use of a quirks file" in the
original email but didn't elaborate on as it was already so long.
In the case where python3 is optional but not autodetected, thus
requiring a "PYTHON3=yes" in the environment, the quirks file entry I
use is something like:
[python-whatever]
QK_REQUIRES = python3
QK_ENVOPTS = "PYTHON3=yes"
HooRex itself ignores the QK_ENVOPTS line. However my package building
software recognises that line and exports PYTHON3=yes when starting the
build.
The quirks file is in .INI file format. It's easily parsed in Python
(import ConfigParser), which suits HooRex. It's also easily parsed in
bash (which suits my package building software) by including
cfg_parser() from:
https://ajdiaz.wordpress.com/2008/02/09/bash-ini-parser/
although I had to rename cfg_parser() to cfg.parser() due to some not
clearly remembered issue to do with allowable function names in bash.
chris
More information about the SlackBuilds-users
mailing list