Add re2c build

This commit is contained in:
crazywhalecc 2025-07-31 00:55:25 +08:00
parent 6984c29a3a
commit 3c972ac905
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
6 changed files with 60 additions and 2 deletions

View File

@ -129,8 +129,8 @@ RUN curl -o automake.tgz -fsSL https://ftp.gnu.org/gnu/automake/automake-1.17.ta
make install && \
ln -sf /usr/local/bin/automake /usr/bin/automake
RUN curl -o re2c.rpm https://archives.fedoraproject.org/pub/archive/epel/7/$SPC_USE_ARCH/Packages/r/re2c-0.14.3-2.el7.$SPC_USE_ARCH.rpm && \
rpm -Uvh re2c.rpm
RUN bin/spc download re2c && \
bin/spc build:libs re2c
EOF
fi

View File

@ -555,6 +555,12 @@
"libuv.a"
]
},
"re2c": {
"source": "re2c",
"bin-unix": [
"re2c"
]
},
"libwebp": {
"source": "libwebp",
"pkg-configs": [

View File

@ -1117,6 +1117,16 @@
"text": "(C) 1995-2022 Jean-loup Gailly and Mark Adler\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\n claim that you wrote the original software. If you use this software\n in a product, an acknowledgment in the product documentation would be\n appreciated but is not required.\n2. Altered source versions must be plainly marked as such, and must not be\n misrepresented as being the original software.\n3. This notice may not be removed or altered from any source distribution.\n\nJean-loup Gailly Mark Adler\njloup@gzip.org madler@alumni.caltech.edu"
}
},
"re2c": {
"type": "ghrel",
"repo": "skvadrik/re2c",
"match": "re2c.+\\.tar\\.xz",
"prefer-stable": true,
"license": {
"type": "file",
"path": "LICENSE"
}
},
"zstd": {
"type": "ghrel",
"repo": "facebook/zstd",

View File

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
/**
* a template library class for unix
*/
class re2c extends LinuxLibraryBase
{
use \SPC\builder\unix\library\re2c;
public const NAME = 're2c';
}

View File

@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class re2c extends MacOSLibraryBase
{
use \SPC\builder\unix\library\re2c;
public const NAME = 're2c';
}

View File

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\util\executor\UnixCMakeExecutor;
trait re2c
{
protected function build(): void
{
UnixCMakeExecutor::create($this)->build();
}
}