summaryrefslogtreecommitdiff
path: root/libcmark-gfm/README-DEV
blob: 94a742b4c032b0b33aaeaf1c9f13138de132c90f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
This document describes how libcmark-gfm was packaged for build2. In
particular, this understanding will be useful when upgrading to a new upstream
version. See ../README-DEV for general notes on cmark-gfm packaging.

Symlink the required upstream files and directories into libcmark-gfm/:

$ mkdir -p libcmark-gfm/src
$ pushd libcmark-gfm/src
$ ln -s ../../../upstream/src/*.{c,h,inc,in} ./

Also patch the HTML renderer not to use the empty attribute syntax (see the
reported issue #245 for details):

$ mv html.c html.c.orig
$ cp html.c.orig html.c
$ git apply fix-html-renderer.patch
$ popd

Note that patches are produced by commands similar to the following:

$ git diff >fix-html-renderer.patch

We unable to generate cmark-gfm_version.h directly from the template, since it
is included as "cmark-gfm_version.h" in upstream's source code, which makes
impossible using the header-generating machinery. That's why we create
libcmark-gfm/cmark-gfm_version.h that includes <libcmark-gfm/version.h> that
we auto-generate from upstream's src/cmark-gfm_version.h.in.

Use libcmark-gfm/config.h.in.orig for creating libcmark-gfm/config.h,
defining/undefining macros introduced with #cmakedefine.

Create cmark-gfm_export.h defining CMARK_GFM_EXPORT macro.