feat(tools/eaglemode/plugins/avif): AVIF image plugin
Animation not implemented. https: //en.wikipedia.org/wiki/AVIF Change-Id: I80f8c4132c4335b2e60ce7b70eb424457e50c73f Reviewed-on: https://cl.tvl.fyi/c/depot/+/12428 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
e4714db2d5
commit
1c898f7ddc
5 changed files with 277 additions and 0 deletions
64
tools/eaglemode/plugins/avif/makers/PlAvif.maker.pm
Normal file
64
tools/eaglemode/plugins/avif/makers/PlAvif.maker.pm
Normal file
|
@ -0,0 +1,64 @@
|
|||
package PlAvif;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub GetDependencies
|
||||
{
|
||||
return ('emCore');
|
||||
}
|
||||
|
||||
sub IsEssential
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub GetFileHandlingrules
|
||||
{
|
||||
return ();
|
||||
}
|
||||
|
||||
sub GetExtraBuildOptions
|
||||
{
|
||||
return ();
|
||||
}
|
||||
|
||||
sub Build
|
||||
{
|
||||
shift;
|
||||
my %options=@_;
|
||||
|
||||
my @libAvifFlags=();
|
||||
if ($options{'avif-inc-dir'} eq '' && $options{'avif-lib-dir'} eq '') {
|
||||
@libAvifFlags=split("\n",readpipe(
|
||||
"perl \"".$options{'utils'}."/PkgConfig.pl\" libavif"
|
||||
));
|
||||
}
|
||||
if (!@libAvifFlags) {
|
||||
if ($options{'avif-inc-dir'} ne '') {
|
||||
push(@libAvifFlags, "--inc-search-dir", $options{'avif-inc-dir'});
|
||||
}
|
||||
if ($options{'avif-lib-dir'} ne '') {
|
||||
push(@libAvifFlags, "--lib-search-dir", $options{'avif-lib-dir'});
|
||||
}
|
||||
push(@libAvifFlags, "--link", "avif");
|
||||
}
|
||||
|
||||
system(
|
||||
@{$options{'unicc_call'}},
|
||||
"--math",
|
||||
"--rtti",
|
||||
"--exceptions",
|
||||
"--bin-dir" , "bin",
|
||||
"--lib-dir" , "lib",
|
||||
"--obj-dir" , "obj",
|
||||
"--inc-search-dir", "include",
|
||||
@libAvifFlags,
|
||||
"--link" , "emCore",
|
||||
"--type" , "dynlib",
|
||||
"--name" , "PlAvif",
|
||||
"src/PlAvif.cpp"
|
||||
)==0 or return 0;
|
||||
|
||||
return 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue