File tree 7 files changed +120
-3
lines changed
7 files changed +120
-3
lines changed Original file line number Diff line number Diff line change 325
325
" libxml2"
326
326
]
327
327
},
328
+ "snappy" : {
329
+ "type" : " external" ,
330
+ "source" : " ext-snappy" ,
331
+ "arg-type" : " custom" ,
332
+ "lib-depends" : [
333
+ " snappy"
334
+ ],
335
+ "ext-suggest" : [
336
+ " apcu"
337
+ ]
338
+ },
328
339
"snmp" : {
329
340
"type" : " builtin" ,
330
341
"arg-type" : " with" ,
490
501
" zstd"
491
502
]
492
503
}
493
- }
504
+ }
Original file line number Diff line number Diff line change 510
510
" zstd.h" ,
511
511
" zstd_errors.h"
512
512
]
513
+ },
514
+ "snappy" : {
515
+ "source" : " snappy" ,
516
+ "static-libs-unix" : [
517
+ " libsnappy.a"
518
+ ],
519
+ "headers-unix" : [
520
+ " snappy-c.h" ,
521
+ " snappy-sinksource.h" ,
522
+ " snappy.h" ,
523
+ " snappy-stubs-internal.h" ,
524
+ " snappy-stubs-public.h"
525
+ ]
513
526
}
514
- }
527
+ }
Original file line number Diff line number Diff line change 80
80
"path" : " LICENSE"
81
81
}
82
82
},
83
+ "ext-snappy" : {
84
+ "type" : " git" ,
85
+ "path" : " php-src/ext/snappy" ,
86
+ "rev" : " master" ,
87
+ "url" : " https://github.com/kjdev/php-ext-snappy" ,
88
+ "license" : {
89
+ "type" : " file" ,
90
+ "path" : " LICENSE"
91
+ }
92
+ },
83
93
"ext-ssh2" : {
84
94
"type" : " url" ,
85
95
"url" : " https://pecl.php.net/get/ssh2" ,
401
411
"path" : " COPYING"
402
412
}
403
413
},
414
+ "snappy" : {
415
+ "type" : " git" ,
416
+ "repo" : " google/snappy" ,
417
+ "rev" : " main" ,
418
+ "url" : " https://github.com/google/snappy" ,
419
+ "license" : {
420
+ "type" : " file" ,
421
+ "path" : " COPYING"
422
+ }
423
+ },
404
424
"sqlite" : {
405
425
"type" : " url" ,
406
426
"url" : " https://www.sqlite.org/2023/sqlite-autoconf-3410100.tar.gz" ,
476
496
"path" : " LICENSE"
477
497
}
478
498
}
479
- }
499
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace SPC \builder \extension ;
6
+
7
+ use SPC \builder \Extension ;
8
+ use SPC \util \CustomExt ;
9
+
10
+ #[CustomExt('snappy ' )]
11
+ class snappy extends Extension
12
+ {
13
+ public function getUnixConfigureArg (): string
14
+ {
15
+ return '--enable-snappy --with-snappy-includedir=" ' . BUILD_ROOT_PATH . '" ' ;
16
+ }
17
+ }
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 snappy extends LinuxLibraryBase
8
+ {
9
+ use \SPC \builder \unix \library \snappy;
10
+
11
+ public const NAME = 'snappy ' ;
12
+ }
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 snappy extends MacOSLibraryBase
8
+ {
9
+ use \SPC \builder \unix \library \snappy;
10
+
11
+ public const NAME = 'snappy ' ;
12
+ }
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
+ use SPC \exception \FileSystemException ;
8
+ use SPC \exception \RuntimeException ;
9
+ use SPC \store \FileSystem ;
10
+
11
+ trait snappy
12
+ {
13
+ /**
14
+ * @throws RuntimeException
15
+ * @throws FileSystemException
16
+ */
17
+ protected function build (): void
18
+ {
19
+ FileSystem::resetDir ($ this ->source_dir . '/cmake/build ' );
20
+
21
+ shell ()->cd ($ this ->source_dir . '/cmake/build ' )
22
+ ->exec (
23
+ "{$ this ->builder ->configure_env } cmake " .
24
+ "{$ this ->builder ->makeCmakeArgs ()} " .
25
+ '-DSNAPPY_BUILD_TESTS=OFF ' .
26
+ '-DSNAPPY_BUILD_BENCHMARKS=OFF ' .
27
+ '../.. '
28
+ )
29
+ ->exec ("cmake --build . -j {$ this ->builder ->concurrency }" )
30
+ ->exec ('make install DESTDIR= ' . BUILD_ROOT_PATH );
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments