summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-07-22 11:15:04 -0700
committerMichael Forney <mforney@mforney.org>2017-07-22 11:20:32 -0700
commitffced12d64c91aadb1a96460e174bd965a46925f (patch)
treef3475e9d3087ca168d73d33fbbf3a40657b39ace /pkg
parent2f62dcb2109d4b4fa058cb79e441c4601169ceb4 (diff)
Add discount 2.2.2
Diffstat (limited to 'pkg')
-rw-r--r--pkg/discount/.gitignore1
-rw-r--r--pkg/discount/config.h29
-rw-r--r--pkg/discount/gen.rc35
-rw-r--r--pkg/discount/rev1
m---------pkg/discount/src0
-rw-r--r--pkg/gen.rc1
6 files changed, 67 insertions, 0 deletions
diff --git a/pkg/discount/.gitignore b/pkg/discount/.gitignore
new file mode 100644
index 00000000..25dbd226
--- /dev/null
+++ b/pkg/discount/.gitignore
@@ -0,0 +1 @@
+/tools.ninja \ No newline at end of file
diff --git a/pkg/discount/config.h b/pkg/discount/config.h
new file mode 100644
index 00000000..37a87694
--- /dev/null
+++ b/pkg/discount/config.h
@@ -0,0 +1,29 @@
+#ifndef __AC_MARKDOWN_D
+#define __AC_MARKDOWN_D 1
+
+#include <stdint.h>
+
+#define OS_LINUX 1
+#define THEME_CF 1
+#define NORETURN _Noreturn
+#define DWORD uint32_t
+#define WORD uint16_t
+#define BYTE uint8_t
+#define HAVE_BASENAME 1
+#define HAVE_LIBGEN_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_ALLOCA_H 1
+#define HAVE_PWD_H 1
+#define HAVE_GETPWUID 1
+#define HAVE_SRANDOM 1
+#define INITRNG(x) srandom(x)
+#define HAVE_BZERO 1
+#define HAVE_RANDOM 1
+#define COINTOSS() (random()&1)
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_FCHDIR 1
+#define TABSTOP 4
+#define HAVE_MALLOC_H 1
+
+#endif /* __AC_MARKDOWN_D */
diff --git a/pkg/discount/gen.rc b/pkg/discount/gen.rc
new file mode 100644
index 00000000..3bdef8ef
--- /dev/null
+++ b/pkg/discount/gen.rc
@@ -0,0 +1,35 @@
+cflags\
+ -Wno-return-type -Wno-implicit-int\
+ -I '$dir' \
+ -I '$srcdir' \
+ -I '$outdir'
+
+{
+ toolchain host
+ cflags -Wno-implicit-int -I '$outdir'
+ exe mktags mktags.c
+} >tools.ninja ; subninja '$dir'/tools.ninja
+
+rule mktags '$outdir/mktags >$out.tmp && mv $out.tmp $out'
+build '$outdir'/blocktags mktags '|' '$outdir'/mktags
+
+build '$outdir'/version.c awk '$srcdir'/VERSION ; with\
+ expr '''{printf "char markdown_version[] = \"%s\";\n", $$0}'''
+build '$outdir'/mkdio.h sed '$srcdir'/mkdio.h.in ; exprs=(\
+ -e '''4i#include <stdint.h>''' \
+ -e s,@DWORD@,uint32_t,\
+) with expr $"exprs
+
+phony deps '$outdir'/^(blocktags mkdio.h)
+
+lib libmarkdown.a -d '$dir'/deps\
+ mkdio.c markdown.c dumptree.c generate.c\
+ resource.c docheader.c '$outdir'/version.c toc.c css.c\
+ xml.c Csio.c xmlpage.c basename.c emmatch.c\
+ github_flavoured.c setup.c tags.c html5.c flags.c
+
+exe markdown main.c pgm_options.c libmarkdown.a
+file bin/markdown '$outdir'/markdown 755
+man 1 markdown.1 7 markdown.7
+
+fetch git
diff --git a/pkg/discount/rev b/pkg/discount/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/pkg/discount/rev
@@ -0,0 +1 @@
+1
diff --git a/pkg/discount/src b/pkg/discount/src
new file mode 160000
+Subproject 3035d069e42fd4bc69d11791047e07e5bb2619d
diff --git a/pkg/gen.rc b/pkg/gen.rc
index 5c5af808..0c2bbd81 100644
--- a/pkg/gen.rc
+++ b/pkg/gen.rc
@@ -9,6 +9,7 @@ subgen blind
subgen bzip2
subgen ccid
subgen curl
+subgen discount
subgen dmenu
subgen e2fsprogs
subgen efibootmgr