File tree Expand file tree Collapse file tree 10 files changed +101
-32
lines changed
Expand file tree Collapse file tree 10 files changed +101
-32
lines changed Original file line number Diff line number Diff line change 330330 " openssl"
331331 ]
332332 },
333+ "libxml" : {
334+ "support" : {
335+ "BSD" : " wip"
336+ },
337+ "type" : " builtin" ,
338+ "arg-type" : " none" ,
339+ "target" : [
340+ " static"
341+ ]
342+ },
333343 "lz4" : {
334344 "support" : {
335345 "Windows" : " wip" ,
342352 " liblz4"
343353 ]
344354 },
345- "libxml" : {
346- "support" : {
347- "BSD" : " wip"
348- },
349- "type" : " builtin" ,
350- "arg-type" : " none" ,
351- "target" : [
352- " static"
353- ]
354- },
355355 "mbregex" : {
356356 "type" : " builtin" ,
357357 "arg-type" : " custom" ,
396396 "memcached" : {
397397 "support" : {
398398 "Windows" : " wip" ,
399- "BSD" : " wip" ,
400- "Linux" : " no"
399+ "BSD" : " wip"
401400 },
402401 "type" : " external" ,
403402 "source" : " memcached" ,
406405 "lib-depends" : [
407406 " libmemcached"
408407 ],
408+ "lib-depends-unix" : [
409+ " libmemcached" ,
410+ " fastlz"
411+ ],
409412 "ext-depends" : [
410413 " session" ,
411414 " zlib"
10831086 "type" : " external" ,
10841087 "source" : " yac" ,
10851088 "arg-type-unix" : " custom" ,
1089+ "lib-depends-unix" : [
1090+ " fastlz"
1091+ ],
10861092 "ext-depends-unix" : [
10871093 " igbinary"
10881094 ]
Original file line number Diff line number Diff line change 101101 " SystemConfiguration"
102102 ]
103103 },
104+ "fastlz" : {
105+ "source" : " fastlz" ,
106+ "static-libs-unix" : [
107+ " libfastlz.a"
108+ ],
109+ "headers" : [
110+ " fastlz/fastlz.h"
111+ ]
112+ },
104113 "freetype" : {
105114 "source" : " freetype" ,
106115 "static-libs-unix" : [
389398 "source" : " libmemcached" ,
390399 "static-libs-unix" : [
391400 " libmemcached.a" ,
392- " libmemcachedutil.a"
401+ " libmemcachedprotocol.a" ,
402+ " libmemcachedutil.a" ,
403+ " libhashkit.a"
393404 ]
394405 },
395406 "libpng" : {
Original file line number Diff line number Diff line change 272272 "path" : " LICENSE"
273273 }
274274 },
275+ "fastlz" : {
276+ "type" : " git" ,
277+ "url" : " https://github.com/ariya/FastLZ.git" ,
278+ "rev" : " master" ,
279+ "license" : {
280+ "type" : " file" ,
281+ "path" : " LICENSE.MIT"
282+ }
283+ },
275284 "freetype" : {
276285 "type" : " git" ,
277286 "rev" : " VER-2-13-2" ,
528537 }
529538 },
530539 "libmemcached" : {
531- "type" : " git " ,
532- "url " : " https://github.com/static-php/ libmemcached-macos.git " ,
533- "rev " : " master " ,
540+ "type" : " ghtagtar " ,
541+ "repo " : " awesomized/ libmemcached" ,
542+ "match " : " 1. \\ d. \\ d " ,
534543 "license" : {
535544 "type" : " file" ,
536- "path" : " COPYING "
545+ "path" : " LICENSE "
537546 }
538547 },
539548 "libpng" : {
Original file line number Diff line number Diff line change @@ -12,8 +12,11 @@ class memcached extends Extension
1212{
1313 public function getUnixConfigureArg (bool $ shared = false ): string
1414 {
15- $ rootdir = BUILD_ROOT_PATH ;
16- $ zlib_dir = $ this ->builder ->getPHPVersionID () >= 80400 ? '' : "--with-zlib-dir= {$ rootdir }" ;
17- return '--enable-memcached ' . ($ shared ? '=shared ' : '' ) . " {$ zlib_dir } --with-libmemcached-dir= {$ rootdir } --disable-memcached-sasl --enable-memcached-json " ;
15+ return '--enable-memcached ' . ($ shared ? '=shared ' : '' ) . ' ' .
16+ '--with-zlib-dir= ' . BUILD_ROOT_PATH . ' ' .
17+ '--with-libmemcached-dir= ' . BUILD_ROOT_PATH . ' ' .
18+ '--disable-memcached-sasl ' .
19+ '--enable-memcached-json ' .
20+ '--with-system-fastlz ' ;
1821 }
1922}
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ public function patchBeforeBuildconf(): bool
2121
2222 public function getUnixConfigureArg (bool $ shared = false ): string
2323 {
24- return '--enable-yac --enable-igbinary --enable-json ' ;
24+ return '--enable-yac ' . ( $ shared ? ' =shared ' : '' ) . ' --enable-igbinary --enable-json --with-system-fastlz ' ;
2525 }
2626}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SPC \builder \linux \library ;
6+
7+ class fastlz extends LinuxLibraryBase
8+ {
9+ use \SPC \builder \unix \library \fastlz;
10+
11+ public const NAME = 'fastlz ' ;
12+ }
Original file line number Diff line number Diff line change 44
55namespace SPC \builder \linux \library ;
66
7- use SPC \exception \ RuntimeException ;
7+ use SPC \util \ executor \ UnixCMakeExecutor ;
88
9- /**
10- * gmp is a template library class for unix
11- */
129class libmemcached extends LinuxLibraryBase
1310{
1411 public const NAME = 'libmemcached ' ;
1512
16- public function build ()
13+ public function build (): void
1714 {
18- throw new RuntimeException ( ' libmemcached is currently not supported on Linux platform ' );
15+ UnixCMakeExecutor:: create ( $ this )-> build ( );
1916 }
2017}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SPC \builder \macos \library ;
6+
7+ class fastlz extends MacOSLibraryBase
8+ {
9+ use \SPC \builder \unix \library \fastlz;
10+
11+ public const NAME = 'fastlz ' ;
12+ }
Original file line number Diff line number Diff line change 44
55namespace SPC \builder \macos \library ;
66
7- use SPC \util \executor \UnixAutoconfExecutor ;
7+ use SPC \util \executor \UnixCMakeExecutor ;
88
9- /**
10- * gmp is a template library class for unix
11- */
129class libmemcached extends MacOSLibraryBase
1310{
1411 public const NAME = 'libmemcached ' ;
1512
1613 public function build (): void
1714 {
18- UnixAutoconfExecutor ::create ($ this )->configure ( ' --disable-sasl ' )-> exec ( " sed -ie 's/-Werror//g' ./Makefile " )-> make ();
15+ UnixCMakeExecutor ::create ($ this )->build ();
1916 }
2017}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SPC \builder \unix \library ;
6+
7+ trait fastlz
8+ {
9+ protected function build (): void
10+ {
11+ shell ()->cd ($ this ->source_dir )->initializeEnv ($ this )
12+ ->exec ((getenv ('CC ' ) ?? 'cc ' ) . ' -c -O3 -fPIC fastlz.c -o fastlz.o ' )
13+ ->exec ((getenv ('AR ' ) ?? 'ar ' ) . ' rcs libfastlz.a fastlz.o ' );
14+
15+ if (!copy ($ this ->source_dir . '/fastlz.h ' , BUILD_INCLUDE_PATH . '/fastlz.h ' )) {
16+ throw new \RuntimeException ('Failed to copy fastlz.h ' );
17+ }
18+ if (!copy ($ this ->source_dir . '/libfastlz.a ' , BUILD_LIB_PATH . '/libfastlz.a ' )) {
19+ throw new \RuntimeException ('Failed to copy libfastlz.a ' );
20+ }
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments