pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/discount Update to 2.2.6. From the changelog:
details: https://anonhg.NetBSD.org/pkgsrc/rev/f426c3e78af5
branches: trunk
changeset: 396809:f426c3e78af5
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Mon Jun 10 13:32:56 2019 +0000
description:
Update to 2.2.6. From the changelog:
- make a test program to examine pandoc header elements
- if __mkd_trim_line trims the entire line, manually set the string to \0
- add in a handful of test to verify that empty pandoc headers are not
auto-populated with %
- messed up the definition for missing attributes; should be /**/
instead of '', because AC_DEFINE will convert an empty string into a 1
- move flags.o down to the last line in OBJS= to work around a plan9
makefile bug
- have peek() return an int instead of an unsigned int (netbsd 8; ctype
functions explode with unsigned int arguments?)
- fix all places where I pass flags to be DWORDs
- include config.h before any other headers
- make all instances of 'main()' be integer functions (sigh)
- clean up all references to flags; define them EVERYWHERE as mkd_flag_t
- shuffle around some of the definitions to make everything happily(?)
compile with all instances of flags being mkd_flag_t
- when checking that the C compiler works, compile the test program as
two modules with a function declared with differing pointer types
(char ptr vs void ptr) so if the C compiler generates type signatures
and doesn't think a void pointer is the universal solvent it will fail
right there
- set the Plan9 CFLAGS to the two extensions (instead of having them be
part of the CC macro) and wipe out any CFLAGS (like -T, which tells
the Plan9 posix C compiler to be stupid) that already exists
- tweak the Makefile macros a bit so people can wedge in their own
compilers (BUILD) and linkers (LINK) during a build
- add a list item for testing the build
- patch the cmakefile so that has an option to only generate a library
- push the fencedcode block handler up to the toplevel scanner so it
will handle blank lines inside the fence
- add a fenced code block with embedded html
- don't give a code block class if it's just an empty string
- add a test case for a piece of fenced code with trailing spaces after
the opening ~~~
- deal with cached text before handling fenced code blocks
- yank the repeated inline uncaches out and stuff them into a local function
- add two more tests (unfinished fenced code block, paragraph then
fenced code block) to codeblock.t
- don't publish mkd_string_to_anchor
- add an anchor format callback, plus add the -x option to the markdown
program to squash toc anchors to (close to) github compatability
- add some dle sanity checking into onlyifset()
- when dumping the parse tree, say which header is being dumped --
h1..h6 vs just header
- tweak configure to (a) use the modern standard uintXX_t types for
DWORD, WORD, BYTE if possible and (b) if a program is defined via an
environment variable (like CC) try to use that variable instead of
doing a path search in AC_PROG
- tweak how scalar headers are include in .in files
- support external code formatters
- add an external code block formatter to the markdown program
- mkd2html wasn't passing pgm to hoptusage()
- mkd2html wasn't properly handling two arguments for input & output
files. While I was at it, add the -G option to use gfm_in() to read
the input file in (and preserve newlines)
diffstat:
textproc/discount/Makefile | 15 +++-
textproc/discount/distinfo | 14 ++--
textproc/discount/patches/patch-Makefile.in | 99 ++++++++++++++--------------
textproc/discount/patches/patch-generate.c | 16 ++--
4 files changed, 77 insertions(+), 67 deletions(-)
diffs (253 lines):
diff -r 74fb3da03cc0 -r f426c3e78af5 textproc/discount/Makefile
--- a/textproc/discount/Makefile Mon Jun 10 13:07:04 2019 +0000
+++ b/textproc/discount/Makefile Mon Jun 10 13:32:56 2019 +0000
@@ -1,16 +1,20 @@
-# $NetBSD: Makefile,v 1.8 2018/08/27 20:46:18 schmonz Exp $
+# $NetBSD: Makefile,v 1.9 2019/06/10 13:32:56 schmonz Exp $
#
-DISTNAME= discount-2.2.4
+GITHUB_PROJECT= discount
+DISTNAME= v2.2.6
+PKGNAME= ${GITHUB_PROJECT}-${DISTNAME:S/^v//}
CATEGORIES= textproc
-MASTER_SITES= ${HOMEPAGE}
-EXTRACT_SUFX= .tar.bz2
+MASTER_SITES= ${MASTER_SITE_GITHUB:=Orc/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
MAINTAINER= zecrazytux%zecrazytux.net@localhost
HOMEPAGE= http://www.pell.portland.or.us/~orc/Code/discount/
COMMENT= Markdown C implementation
LICENSE= modified-bsd
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
+
HAS_CONFIGURE= YES
CONFIGURE_SCRIPT= ./configure.sh
CONFIGURE_ARGS= --prefix=${PREFIX}
@@ -20,8 +24,11 @@
CONFIGURE_ARGS+= --shared
CONFIGURE_ARGS+= --enable-all-features
+USE_TOOLS+= pkg-config
USE_LIBTOOL= yes
+PKGCONFIG_OVERRIDE+= libmarkdown.pc.in
+
INSTALL_TARGET= install.everything
TEST_TARGET= test
diff -r 74fb3da03cc0 -r f426c3e78af5 textproc/discount/distinfo
--- a/textproc/discount/distinfo Mon Jun 10 13:07:04 2019 +0000
+++ b/textproc/discount/distinfo Mon Jun 10 13:32:56 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.9 2018/08/27 20:46:18 schmonz Exp $
+$NetBSD: distinfo,v 1.10 2019/06/10 13:32:56 schmonz Exp $
-SHA1 (discount-2.2.4.tar.bz2) = 038e754afe234d92e5f327353fab5772c3f97f63
-RMD160 (discount-2.2.4.tar.bz2) = 5270054635d152d81acb81a8d87f29a98750a1a0
-SHA512 (discount-2.2.4.tar.bz2) = 0650e0ce3f6948e3a30fdaa1a810e895f64621c55df46c7a5ed8755e65c1b718b7a1d1a1bfe0a87a3a59fbb13fca8907718f1aa095125a4b6e152602b8e490cf
-Size (discount-2.2.4.tar.bz2) = 99482 bytes
-SHA1 (patch-Makefile.in) = 66270dca27485373279bd9ce8c445cc5a931e29a
-SHA1 (patch-generate.c) = 40ba6619c592531724ed78df5ffc99998e55498e
+SHA1 (discount/v2.2.6.tar.gz) = 36aeb512a4429e3a672f5e6803dcd59d5ac1a817
+RMD160 (discount/v2.2.6.tar.gz) = ebd9a877842998afda0d0f1a2821280b16c9d16e
+SHA512 (discount/v2.2.6.tar.gz) = 4c5956dea78aacd3a105ddac13f1671d811a5b2b04990cdf8485c36190c8872c4b1b9432a7236f669c34b07564ecd0096632dced54d67de9eaf4f23641417ecc
+Size (discount/v2.2.6.tar.gz) = 128790 bytes
+SHA1 (patch-Makefile.in) = cee33665390bc83d83bf6925886ae945254b66a8
+SHA1 (patch-generate.c) = ca870b8ecf485bd14e9b3302c90fc4a97d73c2f7
diff -r 74fb3da03cc0 -r f426c3e78af5 textproc/discount/patches/patch-Makefile.in
--- a/textproc/discount/patches/patch-Makefile.in Mon Jun 10 13:07:04 2019 +0000
+++ b/textproc/discount/patches/patch-Makefile.in Mon Jun 10 13:32:56 2019 +0000
@@ -1,80 +1,74 @@
-$NetBSD: patch-Makefile.in,v 1.2 2018/04/23 14:42:03 schmonz Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2019/06/10 13:32:56 schmonz Exp $
Libtoolize for portability across pkgsrc platforms.
---- Makefile.in.orig 2018-03-02 22:52:05.000000000 +0000
+--- Makefile.in.orig 2019-04-15 15:28:20.000000000 +0000
+++ Makefile.in
-@@ -1,3 +1,8 @@
+@@ -1,3 +1,4 @@
+LIBTOOL=libtool --tag=CC
-+
-+.c.o:
-+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
-+
- CC=@CC@ -I.
- LFLAGS=-L.
+ CC=@CC@
CFLAGS=@CFLAGS@
-@@ -29,8 +34,10 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions.
+ LDFLAGS=@LDFLAGS@
+@@ -7,8 +8,8 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+ INSTALL_DIR=@INSTALL_DIR@
+ INSTALL_DATA=@INSTALL_DATA@
+
+-BUILD=$(CC) -I. $(CFLAGS)
+-LINK=$(CC) -L. $(LDFLAGS)
++BUILD=$(LIBTOOL) --mode=compile $(CC) -I. $(CFLAGS)
++LINK=$(LIBTOOL) --mode=link $(CC) -L. $(LDFLAGS)
+
+ .c.o:
+ $(BUILD) -c -o $@ $<
+@@ -39,8 +40,10 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions.
all: $(PGMS) $(SAMPLE_PGMS) $(TESTFRAMEWORK)
install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR) $(DESTDIR)$(PKGDIR)
-- @INSTALL_PROGRAM@ $(PGMS) $(DESTDIR)$(BINDIR)
+- $(INSTALL_PROGRAM) $(PGMS) $(DESTDIR)$(BINDIR)
- ./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR)
+ for x in $(PGMS); do \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$$x; \
+ done
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(MKDLIB).la $(DESTDIR)$(LIBDIR)/$(MKDLIB).la
- @INSTALL_DATA@ mkdio.h $(DESTDIR)$(INCDIR)
- @MK_PKGCONFIG@@INSTALL_DATA@ $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
+ $(INSTALL_DATA) mkdio.h $(DESTDIR)$(INCDIR)
+ @MK_PKGCONFIG@$(INSTALL_DATA) $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
-@@ -39,7 +46,7 @@ install.everything: install install.samp
+@@ -49,7 +52,7 @@ install.everything: install install.samp
install.samples: $(SAMPLE_PGMS) install $(DESTDIR)$(BINDIR)
- @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
for x in $(SAMPLE_PGMS); do \
-- @INSTALL_PROGRAM@ $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
+- $(INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
- @INSTALL_DATA@ $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x.1; \
+ $(INSTALL_DATA) $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x.1; \
done
-@@ -75,7 +82,7 @@ $(DESTDIR)$(LIBDIR):
- @MK_PKGCONFIG@ @INSTALL_DIR@ $(DESTDIR)$(PKGDIR)
-
- version.o: version.c VERSION branch
-- $(CC) $(CFLAGS) -DBRANCH=`./branch` -DVERSION=\"`cat VERSION`\" -c version.c
-+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DBRANCH=`./branch` -DVERSION=\"`cat VERSION`\" -c version.c
-
- VERSION:
- @true
-@@ -87,20 +94,19 @@ blocktags: mktags
+@@ -100,19 +103,19 @@ mktags: mktags.o
# example programs
@THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h
--@THEME@ $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o $(COMMON) -lmarkdown @LIBS@
-+@THEME@ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o $(COMMON) $(MKDLIB).la @LIBS@
+-@THEME@ $(LINK) -o theme theme.o $(COMMON) -lmarkdown @LIBS@
++@THEME@ $(LINK) -o theme theme.o $(COMMON) $(MKDLIB).la @LIBS@
+
--
--mkd2html: mkd2html.o $(MKDLIB) mkdio.h gethopt.h $(COMMON)
-- $(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o $(COMMON) -lmarkdown @LIBS@
-+mkd2html: mkd2html.o $(COMMON) $(MKDLIB)
-+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o $(COMMON) $(MKDLIB).la @LIBS@
+ mkd2html: mkd2html.o $(MKDLIB) mkdio.h gethopt.h $(COMMON)
+- $(LINK) -o mkd2html mkd2html.o $(COMMON) -lmarkdown @LIBS@
++ $(LINK) -o mkd2html mkd2html.o $(COMMON) $(MKDLIB).la @LIBS@
markdown: main.o $(COMMON) $(MKDLIB)
-- $(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o $(COMMON) -lmarkdown @LIBS@
-+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o $(COMMON) $(MKDLIB).la @LIBS@
+- $(LINK) -o markdown main.o $(COMMON) -lmarkdown @LIBS@
++ $(LINK) -o markdown main.o $(COMMON) $(MKDLIB).la @LIBS@
--makepage: makepage.c $(COMMON) $(MKDLIB) mkdio.h
-- $(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.c $(COMMON) -lmarkdown @LIBS@
-+makepage: makepage.o $(COMMON) $(MKDLIB)
-+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.o $(COMMON) $(MKDLIB).la @LIBS@
+ makepage.o: makepage.c mkdio.h
+ $(BUILD) -c makepage.c
+ makepage: makepage.o $(COMMON) $(MKDLIB)
+- $(LINK) -o makepage makepage.o $(COMMON) -lmarkdown @LIBS@
++ $(LINK) -o makepage makepage.o $(COMMON) $(MKDLIB).la @LIBS@
pgm_options.o: pgm_options.c mkdio.h config.h
-- $(CC) $(CFLAGS) -I. -c pgm_options.c
-+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I. -c pgm_options.c
-
- notspecial.o: notspecial.c
- $(CC) $(CFLAGS) -I. -c notspecial.c
-@@ -111,8 +117,12 @@ gethopt.o: gethopt.c
+ $(BUILD) -c pgm_options.c
+@@ -126,8 +129,12 @@ gethopt.o: gethopt.c
main.o: main.c mkdio.h config.h
- $(CC) $(CFLAGS) -I. -c main.c
+ $(BUILD) -c main.c
-$(MKDLIB): $(OBJS)
- ./librarian.sh make $(MKDLIB) VERSION $(OBJS)
@@ -83,7 +77,16 @@
+
+$(MKDLIB): $(MKDLIB).la
+$(MKDLIB).la: $(OBJS) libtool-version-info
-+ $(LIBTOOL) --mode=link @CC@ $(LDFLAGS) -o $(MKDLIB).la $(OBJS:S/.o/.lo/g) -version-info `cat libtool-version-info` -rpath $(LIBDIR)
++ $(LINK) -o $(MKDLIB).la $(OBJS:S/.o/.lo/g) -version-info `cat libtool-version-info` -rpath $(LIBDIR)
verify: echo tools/checkbits.sh
@./echo -n "headers ... "; tools/checkbits.sh && echo "GOOD"
+@@ -139,7 +146,7 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
+
+ pandoc_headers.o: tools/pandoc_headers.c config.h
+ $(BUILD) -c -o pandoc_headers.o tools/pandoc_headers.c
+-pandoc_headers: pandoc_headers.o
++pandoc_headers: pandoc_headers.o $(COMMON) $(MKDLIB)
+ $(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown
+
+ branch.o: tools/branch.c config.h
diff -r 74fb3da03cc0 -r f426c3e78af5 textproc/discount/patches/patch-generate.c
--- a/textproc/discount/patches/patch-generate.c Mon Jun 10 13:07:04 2019 +0000
+++ b/textproc/discount/patches/patch-generate.c Mon Jun 10 13:32:56 2019 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-generate.c,v 1.2 2018/07/27 15:50:45 schmonz Exp $
+$NetBSD: patch-generate.c,v 1.3 2019/06/10 13:32:56 schmonz Exp $
Fix self-tests on NetBSD.
---- generate.c.orig 2018-03-02 22:52:05.000000000 +0000
+--- generate.c.orig 2019-04-15 15:28:20.000000000 +0000
+++ generate.c
-@@ -747,7 +747,7 @@ linkylinky(int image, MMIOT *f)
+@@ -757,7 +757,7 @@ linkylinky(int image, MMIOT *f)
else {
int goodlink, implicit_mark = mmiottell(f);
@@ -13,7 +13,7 @@
pull(f);
if ( peek(f,1) == '[' ) {
-@@ -1151,7 +1151,7 @@ islike(MMIOT *f, char *s)
+@@ -1161,7 +1161,7 @@ islike(MMIOT *f, char *s)
}
for (i=1; i < len; i++)
@@ -22,7 +22,7 @@
return 0;
return 1;
}
-@@ -1269,7 +1269,7 @@ tickhandler(MMIOT *f, int tickchar, int
+@@ -1281,7 +1281,7 @@ tickhandler(MMIOT *f, int tickchar, int
int endticks, size;
int tick = nrticks(0, tickchar, f);
@@ -31,12 +31,12 @@
return 0;
if ( (tick >= minticks) && (size = matchticks(f,tickchar,tick,&endticks)) ) {
-@@ -1297,7 +1297,7 @@ text(MMIOT *f)
+@@ -1309,7 +1309,7 @@ text(MMIOT *f)
int smartyflags = 0;
while (1) {
-- if ( (f->flags & MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) )
-+ if ( (f->flags & MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) )
+- if ( is_flag_set(f->flags, MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) )
++ if ( is_flag_set(f->flags, MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) )
maybe_autolink(f);
c = pull(f);
Home |
Main Index |
Thread Index |
Old Index