Hello ports@,

This patch brings discount from 1.6.6 (very old) to 2.1.6. Just like
before, the binary is renamed from "markdown" to "discount" to avoid
conflict with other ports.

All tests pass on amd64.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/discount/Makefile,v
retrieving revision 1.6
diff -u -p -u -r1.6 Makefile
--- Makefile    11 Mar 2013 11:42:41 -0000      1.6
+++ Makefile    16 Aug 2014 11:54:43 -0000
@@ -2,7 +2,9 @@
 
 COMMENT =              fast C implementation of Markdown
 
-DISTNAME =             discount-1.6.6
+DISTNAME =             discount-2.1.6
+EXTRACT_SUFX =         .tar.bz2
+
 CATEGORIES =           textproc
 
 HOMEPAGE =             http://www.pell.portland.or.us/~orc/Code/markdown/
@@ -14,22 +16,16 @@ PERMIT_PACKAGE_CDROM =      Yes
 
 WANTLIB +=             c
 
-# Stupid github.
-MASTER_SITES =         http://distfiles.nl/
-WRKDIST =              ${WRKDIR}/Orc-discount-9dabdb8
+MASTER_SITES =         http://www.pell.portland.or.us/~orc/Code/discount/
 
 CONFIGURE_STYLE =      simple
 CONFIGURE_SCRIPT =     configure.sh
 CONFIGURE_ARGS +=      ${CONFIGURE_SHARED}
 
-BUILD_DEPENDS =        archivers/gtar
-TAR =                  ${LOCALBASE}/bin/gtar
-
 INSTALL_TARGET =       install.everything
-TEST_TARGET =  test
-USE_GROFF =            Yes
+TEST_TARGET =          test
 
 pre-configure:
-       @perl -pi -e 's,\./markdown,\./discount,' ${WRKSRC}/tests/*.t
+       @perl -pi -e 's,\./markdown,\./discount,' ${WRKSRC}/tests/*
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/textproc/discount/distinfo,v
retrieving revision 1.2
diff -u -p -u -r1.2 distinfo
--- distinfo    30 Aug 2010 21:40:29 -0000      1.2
+++ distinfo    16 Aug 2014 11:54:43 -0000
@@ -1,5 +1,2 @@
-MD5 (discount-1.6.6.tar.gz) = wFy4BL31ATrqLoFuXSIz1w==
-RMD160 (discount-1.6.6.tar.gz) = a+hDjXvYYgHgTy5b/D5HRi13mvI=
-SHA1 (discount-1.6.6.tar.gz) = Ii8ka+XoKlEKT191HDm5/VvU1b0=
-SHA256 (discount-1.6.6.tar.gz) = 1Zu9/eQY80h6v88kH7l8h9cuXL3KiHPQDO05w+7bgnc=
-SIZE (discount-1.6.6.tar.gz) = 93003
+SHA256 (discount-2.1.6.tar.bz2) = cCuynhfjh/guQPrgYtXkk5vG+yLc9T5hCZgqX6oRB5Y=
+SIZE (discount-2.1.6.tar.bz2) = 83823
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/textproc/discount/patches/patch-Makefile_in,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-Makefile_in
--- patches/patch-Makefile_in   30 Aug 2010 21:40:29 -0000      1.2
+++ patches/patch-Makefile_in   16 Aug 2014 11:54:43 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-Makefile_in,v 1.2 2010/08/30 21:40:29 jasper Exp $
---- Makefile.in.orig   Thu Jun 17 03:14:33 2010
-+++ Makefile.in        Mon Aug 30 15:01:46 2010
-@@ -7,7 +7,7 @@ MANDIR=@mandir@
+$OpenBSD$
+--- Makefile.in.orig   Sat Aug 16 12:01:00 2014
++++ Makefile.in        Sat Aug 16 12:03:28 2014
+@@ -9,7 +9,7 @@ MANDIR=@mandir@
  LIBDIR=@libdir@
  INCDIR=@prefix@/include
  
@@ -9,24 +9,25 @@ $OpenBSD: patch-Makefile_in,v 1.2 2010/0
 +PGMS=discount
  SAMPLE_PGMS=mkd2html makepage
  @THEME@SAMPLE_PGMS+= theme
- MKDLIB=libmarkdown.a
-@@ -47,15 +47,16 @@ install.man:
-       @INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man7
-       @INSTALL_DATA@ markdown.7 mkd-extensions.7 $(DESTDIR)/$(MANDIR)/man7
-       @INSTALL_DIR@ $(DESTDIR)/$(MANDIR)/man1
--      @INSTALL_DATA@ markdown.1 $(DESTDIR)/$(MANDIR)/man1
+ MKDLIB=libmarkdown
+@@ -50,7 +50,8 @@ install.man:
+       @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man7
+       @INSTALL_DATA@ markdown.7 mkd-extensions.7 $(DESTDIR)$(MANDIR)/man7
+       @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man1
+-      @INSTALL_DATA@ markdown.1 $(DESTDIR)$(MANDIR)/man1
 +      @mv markdown.1 discount.1
-+      @INSTALL_DATA@ discount.1 $(DESTDIR)/$(MANDIR)/man1
++      @INSTALL_DATA@ discount.1 $(DESTDIR)$(MANDIR)/man1
  
  install.everything: install install.man
  
- version.o: version.c VERSION
-       $(CC) -DVERSION=\"`cat VERSION`\" -c version.c
+@@ -82,8 +83,8 @@ blocktags: mktags
+ mkd2html:  mkd2html.o $(MKDLIB) mkdio.h
+       $(CC) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown @LIBS@
  
--markdown: main.o $(MKDLIB)
--      $(CC) -o markdown main.o -lmarkdown @LIBS@
-+discount: main.o $(MKDLIB)
-+      $(CC) -o discount main.o -lmarkdown @LIBS@
- 
- # example programs
- @THEME@theme:  theme.o $(MKDLIB) mkdio.h
+-markdown: main.o pgm_options.o $(MKDLIB)
+-      $(CC) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown @LIBS@
++discount: main.o pgm_options.o $(MKDLIB)
++      $(CC) $(LFLAGS) -o discount main.o pgm_options.o -lmarkdown @LIBS@
+       
+ makepage:  makepage.c pgm_options.o $(MKDLIB) mkdio.h
+       $(CC) $(LFLAGS) -o makepage makepage.c pgm_options.o -lmarkdown @LIBS@
Index: patches/patch-cstring_h
===================================================================
RCS file: /cvs/ports/textproc/discount/patches/patch-cstring_h,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-cstring_h
--- patches/patch-cstring_h     30 Aug 2010 21:40:29 -0000      1.2
+++ patches/patch-cstring_h     16 Aug 2014 11:54:43 -0000
@@ -1,12 +1,12 @@
-$OpenBSD: patch-cstring_h,v 1.2 2010/08/30 21:40:29 jasper Exp $
---- cstring.h.orig     Thu Jun 17 03:14:33 2010
-+++ cstring.h  Mon Aug 30 15:01:46 2010
+$OpenBSD$
+--- cstring.h.orig     Sun Mar 17 05:02:22 2013
++++ cstring.h  Sat Aug 16 12:06:16 2014
 @@ -18,7 +18,7 @@
   */
  #define STRING(type)  struct { type *text; int size, alloc; }
  
--#define CREATE(x)     T(x) = (void*)(S(x) = (x).alloc = 0)
-+#define CREATE(x)     T(x) = NULL; (S(x) = (x).alloc = 0)
+-#define CREATE(x)     ( (T(x) = (void*)0), (S(x) = (x).alloc = 0) )
++#define CREATE(x)     ( (T(x) = NULL), (S(x) = (x).alloc = 0) )
  #define EXPAND(x)     (S(x)++)[(S(x) < (x).alloc) \
                            ? (T(x)) \
                            : (T(x) = T(x) ? realloc(T(x), sizeof T(x)[0] * 
((x).alloc += 100)) \
Index: patches/patch-markdown_1
===================================================================
RCS file: patches/patch-markdown_1
diff -N patches/patch-markdown_1
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-markdown_1    16 Aug 2014 11:54:43 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- markdown.1.orig    Sat Aug 16 12:51:44 2014
++++ markdown.1 Sat Aug 16 12:52:05 2014
+@@ -4,7 +4,7 @@
+ .Dt MARKDOWN 1
+ .Os MASTODON
+ .Sh NAME
+-.Nm markdown
++.Nm discount
+ .Nd text to html conversion tool
+ .Sh SYNOPSIS
+ .Nm
Index: patches/patch-markdown_1_in
===================================================================
RCS file: patches/patch-markdown_1_in
diff -N patches/patch-markdown_1_in
--- patches/patch-markdown_1_in 13 Apr 2009 20:45:05 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-markdown_1_in,v 1.1.1.1 2009/04/13 20:45:05 sthen Exp $
---- markdown.1.in.orig Sun Apr 12 18:49:05 2009
-+++ markdown.1.in      Sun Apr 12 18:49:41 2009
-@@ -1,10 +1,10 @@
- .\"     %A%
- .\"
- .Dd January 7, 2008
--.Dt MARKDOWN 1
-+.Dt DISCOUNT 1
- .Os MASTODON
- .Sh NAME
--.Nm markdown
-+.Nm discount
- .Nd text to html conversion tool
- .Sh SYNOPSIS
- .Nm
Index: patches/patch-markdown_3
===================================================================
RCS file: /cvs/ports/textproc/discount/patches/patch-markdown_3,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-markdown_3
--- patches/patch-markdown_3    30 Aug 2010 21:40:29 -0000      1.2
+++ patches/patch-markdown_3    16 Aug 2014 11:54:43 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-markdown_3,v 1.2 2010/08/30 21:40:29 jasper Exp $
---- markdown.3.orig    Mon Aug 30 15:00:43 2010
-+++ markdown.3 Mon Aug 30 15:00:57 2010
-@@ -102,7 +102,7 @@ and
+$OpenBSD$
+--- markdown.3.orig    Sat Aug 16 12:07:43 2014
++++ markdown.3 Sat Aug 16 12:09:08 2014
+@@ -116,7 +116,7 @@ and
  .Fn mkd_string
  functions return a MMIOT* on success, null on failure.
  .Sh SEE ALSO
Index: patches/patch-markdown_7
===================================================================
RCS file: /cvs/ports/textproc/discount/patches/patch-markdown_7,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-markdown_7
--- patches/patch-markdown_7    30 Aug 2010 21:40:29 -0000      1.2
+++ patches/patch-markdown_7    16 Aug 2014 11:54:43 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-markdown_7,v 1.2 2010/08/30 21:40:29 jasper Exp $
---- markdown.7.orig    Thu Jun 17 03:14:33 2010
-+++ markdown.7 Mon Aug 30 15:01:46 2010
+$OpenBSD$
+--- markdown.7.orig    Sat Aug 16 12:07:45 2014
++++ markdown.7 Sat Aug 16 12:09:20 2014
 @@ -999,7 +999,7 @@ assumes that tabs are set to 4 spaces.
  John Gruber
  .%T http://daringfireball.net/
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/discount/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -u -r1.2 PLIST
--- pkg/PLIST   30 Aug 2010 21:40:29 -0000      1.2
+++ pkg/PLIST   16 Aug 2014 11:54:43 -0000
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.2 2010/08/30 21:40:29 jasper Exp $
+@comment $OpenBSD$
 @bin bin/discount
 @bin bin/makepage
 @bin bin/mkd2html
@@ -6,6 +6,8 @@
 include/mkdio.h
 lib/libmarkdown.a
 @man man/man1/discount.1
+@man man/man1/makepage.1
+@man man/man1/mkd2html.1
 @man man/man1/theme.1
 @man man/man3/markdown.3
 @man man/man3/mkd-callbacks.3

Reply via email to