gen.lua (4424B)
1 cflags({ 2 '-I $dir', 3 '-I $srcdir/include', 4 '-I $srcdir/deps/http-parser', 5 '-I $srcdir/deps/xdiff', 6 '-I $srcdir/src/libgit2', 7 '-I $srcdir/src/util', 8 '-isystem $builddir/pkg/libs/pcre/include', 9 '-isystem $builddir/pkg/libs/zlib/include', 10 }) 11 12 pkg.deps = { 13 'pkg/libs/pcre/headers', 14 'pkg/libs/zlib/headers', 15 } 16 17 lib('libdeps.a', [[deps/( 18 http-parser/http_parser.c 19 xdiff/( 20 xdiffi.c 21 xemit.c 22 xhistogram.c 23 xmerge.c 24 xpatience.c 25 xprepare.c 26 xutils.c 27 ) 28 )]]) 29 30 lib('libutil.a', [[ 31 src/util/( 32 allocators/( 33 failalloc.c 34 stdalloc.c 35 ) 36 alloc.c 37 date.c 38 errors.c 39 filebuf.c 40 fs_path.c 41 futils.c 42 hash.c 43 hash/( 44 builtin.c 45 collisiondetect.c 46 rfc6234/sha224-256.c 47 sha1dc/( 48 sha1.c 49 ubc_check.c 50 ) 51 ) 52 net.c 53 pool.c 54 posix.c 55 pqueue.c 56 rand.c 57 regexp.c 58 runtime.c 59 sortedcache.c 60 str.c 61 strlist.c 62 strmap.c 63 thread.c 64 tsort.c 65 unix/( 66 map.c 67 process.c 68 realpath.c 69 ) 70 utf8.c 71 util.c 72 varint.c 73 vector.c 74 wildmatch.c 75 zstream.c 76 ) 77 ]]) 78 79 lib('libgit2.a', [[ 80 src/libgit2/( 81 annotated_commit.c 82 apply.c 83 attr.c 84 attr_file.c 85 attrcache.c 86 blame.c 87 blame_git.c 88 blob.c 89 branch.c 90 buf.c 91 cache.c 92 checkout.c 93 cherrypick.c 94 clone.c 95 commit.c 96 commit_graph.c 97 commit_list.c 98 config.c 99 config_cache.c 100 config_file.c 101 config_list.c 102 config_mem.c 103 config_parse.c 104 config_snapshot.c 105 crlf.c 106 delta.c 107 describe.c 108 diff.c 109 diff_driver.c 110 diff_file.c 111 diff_generate.c 112 diff_parse.c 113 diff_print.c 114 diff_stats.c 115 diff_tform.c 116 diff_xdiff.c 117 email.c 118 fetch.c 119 fetchhead.c 120 filter.c 121 grafts.c 122 graph.c 123 hashsig.c 124 ident.c 125 idxmap.c 126 ignore.c 127 index.c 128 indexer.c 129 iterator.c 130 libgit2.c 131 mailmap.c 132 merge.c 133 merge_driver.c 134 merge_file.c 135 message.c 136 midx.c 137 mwindow.c 138 notes.c 139 object.c 140 object_api.c 141 odb.c 142 odb_loose.c 143 odb_mempack.c 144 odb_pack.c 145 offmap.c 146 oid.c 147 oidarray.c 148 oidmap.c 149 pack-objects.c 150 pack.c 151 parse.c 152 patch.c 153 patch_generate.c 154 patch_parse.c 155 path.c 156 pathspec.c 157 proxy.c 158 push.c 159 reader.c 160 rebase.c 161 refdb.c 162 refdb_fs.c 163 reflog.c 164 refs.c 165 refspec.c 166 remote.c 167 repository.c 168 reset.c 169 revert.c 170 revparse.c 171 revwalk.c 172 signature.c 173 stash.c 174 status.c 175 strarray.c 176 streams/( 177 mbedtls.c 178 openssl.c 179 registry.c 180 schannel.c 181 socket.c 182 stransport.c 183 tls.c 184 ) 185 submodule.c 186 sysdir.c 187 tag.c 188 trace.c 189 trailer.c 190 transaction.c 191 transport.c 192 transports/( 193 auth.c 194 auth_ntlmclient.c 195 auth_sspi.c 196 credential.c 197 credential_helpers.c 198 git.c 199 http.c 200 httpclient.c 201 local.c 202 smart.c 203 smart_pkt.c 204 smart_protocol.c 205 ssh.c 206 ssh_exec.c 207 ssh_libssh2.c 208 ) 209 tree-cache.c 210 tree.c 211 worktree.c 212 ) 213 libdeps.a 214 libutil.a 215 $builddir/pkg/libs/pcre/libpcre.a 216 $builddir/pkg/libs/zlib/libz.a 217 ]]) 218 219 -- <cd src/include; find . -type f 220 pkg.hdrs = { 221 copy('$outdir/include', '$srcdir/include', { 'git2.h' }), 222 copy('$outdir/include/git2', '$srcdir/include/git2', { 223 'annotated_commit.h', 224 'apply.h', 225 'attr.h', 226 'blame.h', 227 'blob.h', 228 'branch.h', 229 'buffer.h', 230 'cert.h', 231 'checkout.h', 232 'cherrypick.h', 233 'clone.h', 234 'commit.h', 235 'common.h', 236 'config.h', 237 'cred_helpers.h', 238 'credential.h', 239 'credential_helpers.h', 240 'deprecated.h', 241 'describe.h', 242 'diff.h', 243 'email.h', 244 'errors.h', 245 'experimental.h', 246 'filter.h', 247 'global.h', 248 'graph.h', 249 'ignore.h', 250 'index.h', 251 'indexer.h', 252 'mailmap.h', 253 'merge.h', 254 'message.h', 255 'net.h', 256 'notes.h', 257 'object.h', 258 'odb.h', 259 'odb_backend.h', 260 'oid.h', 261 'oidarray.h', 262 'pack.h', 263 'patch.h', 264 'pathspec.h', 265 'proxy.h', 266 'rebase.h', 267 'refdb.h', 268 'reflog.h', 269 'refs.h', 270 'refspec.h', 271 'remote.h', 272 'repository.h', 273 'reset.h', 274 'revert.h', 275 'revparse.h', 276 'revwalk.h', 277 'signature.h', 278 'stash.h', 279 'status.h', 280 'stdint.h', 281 'strarray.h', 282 'submodule.h', 283 'tag.h', 284 'trace.h', 285 'transaction.h', 286 'transport.h', 287 'tree.h', 288 'types.h', 289 'version.h', 290 'worktree.h', 291 }), 292 copy('$outdir/include/git2/sys', '$srcdir/include/git2/sys', { 293 'alloc.h', 294 'commit.h', 295 'commit_graph.h', 296 'config.h', 297 'cred.h', 298 'credential.h', 299 'diff.h', 300 'email.h', 301 'errors.h', 302 'filter.h', 303 'hashsig.h', 304 'index.h', 305 'mempack.h', 306 'merge.h', 307 'midx.h', 308 'odb_backend.h', 309 'openssl.h', 310 'path.h', 311 'refdb_backend.h', 312 'reflog.h', 313 'refs.h', 314 'remote.h', 315 'repository.h', 316 'stream.h', 317 'transport.h', 318 }) 319 } 320 pkg.hdrs.install = true 321 322 fetch('git')