File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 854854 " zstd.h" ,
855855 " zstd_errors.h"
856856 ]
857+ },
858+ "watcher" : {
859+ "source" : " watcher" ,
860+ "static-libs-unix" : [
861+ " libwatcher-c.a"
862+ ],
863+ "headers" : [
864+ " wtr/watcher-c.h"
865+ ]
857866 }
858867}
Original file line number Diff line number Diff line change 10701070 "type" : " file" ,
10711071 "path" : " LICENSE"
10721072 }
1073+ },
1074+ "watcher" : {
1075+ "type" : " ghtar" ,
1076+ "repo" : " e-dant/watcher" ,
1077+ "prefer-stable" : true ,
1078+ "license" : {
1079+ "type" : " file" ,
1080+ "path" : " license"
1081+ }
10731082 }
10741083}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SPC \builder \freebsd \library ;
6+
7+ class watcher extends BSDLibraryBase
8+ {
9+ use \SPC \builder \unix \library \watcher;
10+
11+ public const NAME = 'watcher ' ;
12+ }
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 watcher extends LinuxLibraryBase
8+ {
9+ use \SPC \builder \unix \library \watcher;
10+
11+ public const NAME = 'watcher ' ;
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 watcher extends MacOSLibraryBase
8+ {
9+ use \SPC \builder \unix \library \watcher;
10+
11+ public const NAME = 'watcher ' ;
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 watcher
12+ {
13+ /**
14+ * @throws RuntimeException
15+ * @throws FileSystemException
16+ */
17+ protected function build (): void
18+ {
19+ shell ()->cd ($ this ->source_dir . '/watcher-c ' )
20+ ->initializeEnv ($ this )
21+ ->exec (getenv ('CC ' ) . ' -c -o libwatcher-c.o ./src/watcher-c.cpp -I ./include -I ../include -std=c++17 -Wall -Wextra -fPIC ' )
22+ ->exec (getenv ('AR ' ) . ' rcs libwatcher-c.a libwatcher-c.o ' );
23+
24+ copy ($ this ->source_dir . '/watcher-c/libwatcher-c.a ' , BUILD_LIB_PATH . '/libwatcher-c.a ' );
25+ FileSystem::createDir (BUILD_INCLUDE_PATH . '/wtr ' );
26+ copy ($ this ->source_dir . '/watcher-c/include/wtr/watcher-c.h ' , BUILD_INCLUDE_PATH . '/wtr/watcher-c.h ' );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments