Commit: dca145ad6db4dc8fe6a2b7d4b05f41ca4ce83c92
Parent: c327597866a81a2ff08948a78c2fee1c2db9b76c
Author: Randy Palamar
Date: Fri, 6 Oct 2023 08:07:33 -0600
add www/stagit
Diffstat:
7 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -57,3 +57,6 @@
[submodule "pkg/textproc/cmark/src"]
path = pkg/textproc/cmark/src
url = https://github.com/commonmark/cmark.git
+[submodule "pkg/www/stagit/src"]
+ path = pkg/www/stagit/src
+ url = git://git.codemadness.org/stagit
diff --git a/pkg/gen.lua b/pkg/gen.lua
@@ -8,3 +8,4 @@ subgen('libs')
subgen('net')
subgen('sys')
subgen('textproc')
+subgen('www')
diff --git a/pkg/www/gen.lua b/pkg/www/gen.lua
@@ -0,0 +1 @@
+subgen('stagit')
diff --git a/pkg/www/stagit/gen.lua b/pkg/www/stagit/gen.lua
@@ -0,0 +1,29 @@
+cflags({
+ '-std=c99', '-Wall', '-Wpedantic',
+ '-D _XOPEN_SOURCE=700',
+ '-isystem $builddir/pkg/libs/libgit2/include',
+})
+
+pkg.deps = {'pkg/libs/libgit2/headers'}
+
+lib('libcompat.a', {'strlcat.c', 'strlcpy.c', 'reallocarray.c'})
+
+for _, tool in ipairs({'stagit', 'stagit-index'}) do
+ exe(tool, {tool..'.c', 'libcompat.a', '$builddir/pkg/libs/libgit2/libgit2.a.d'})
+ file('bin/'..tool, '755', '$outdir/'..tool)
+ man({tool..'.1'})
+end
+
+local examples = {
+ 'example_create.sh',
+ 'example_post-receive.sh',
+ 'favicon.png',
+ 'logo.png',
+ 'style.css'
+}
+
+for _, ex in ipairs(examples) do
+ file('share/stagit/'..ex, '644', '$srcdir/'..ex)
+end
+
+fetch('git')
diff --git a/pkg/www/stagit/src b/pkg/www/stagit/src
@@ -0,0 +1 @@
+Subproject commit 02c00248d8134c69758557a78e3c632ac77ae687
diff --git a/pkg/www/stagit/ver b/pkg/www/stagit/ver
@@ -0,0 +1 @@
+1.2 r0
diff --git a/sets.lua b/sets.lua
@@ -16,6 +16,7 @@ S.bin = {
'sfeed',
'skeleton',
'spm',
+ 'stagit',
'strace',
'vis',
}