mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 23:35:37 +08:00
Add libmemcached
This commit is contained in:
16
config/pkg/lib/libmemcached.yml
Normal file
16
config/pkg/lib/libmemcached.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
libmemcached:
|
||||||
|
type: library
|
||||||
|
artifact:
|
||||||
|
source:
|
||||||
|
type: ghtagtar
|
||||||
|
repo: awesomized/libmemcached
|
||||||
|
match: 1.\d.\d
|
||||||
|
metadata:
|
||||||
|
license-files: [LICENSE]
|
||||||
|
license: BSD-3-Clause
|
||||||
|
lang: cpp
|
||||||
|
static-libs@unix:
|
||||||
|
- libmemcached.a
|
||||||
|
- libmemcachedprotocol.a
|
||||||
|
- libmemcachedutil.a
|
||||||
|
- libhashkit.a
|
||||||
28
src/Package/Library/libmemcached.php
Normal file
28
src/Package/Library/libmemcached.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Package\Library;
|
||||||
|
|
||||||
|
use StaticPHP\Attribute\Package\BuildFor;
|
||||||
|
use StaticPHP\Attribute\Package\Library;
|
||||||
|
use StaticPHP\Package\LibraryPackage;
|
||||||
|
use StaticPHP\Runtime\Executor\UnixCMakeExecutor;
|
||||||
|
|
||||||
|
#[Library('libmemcached')]
|
||||||
|
class libmemcached extends LibraryPackage
|
||||||
|
{
|
||||||
|
#[BuildFor('Linux')]
|
||||||
|
public function buildLinux(): void
|
||||||
|
{
|
||||||
|
UnixCMakeExecutor::create($this)
|
||||||
|
->addConfigureArgs('-DCMAKE_INSTALL_RPATH=""')
|
||||||
|
->build();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[BuildFor('Darwin')]
|
||||||
|
public function buildDarwin(): void
|
||||||
|
{
|
||||||
|
UnixCMakeExecutor::create($this)->build();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user