On 2022/07/18 19:59, Klemens Nanni wrote: > On Wed, Jul 13, 2022 at 03:08:10PM +0000, Klemens Nanni wrote: > > This port uses MASTER_SITES_GITHUB in a werid way which predates > > GH_DISTFILE and would preak if my proposed MASTER_SITES_GITHUB/GH_DISTFILE > > change landed. > > > > Fix GH_*/PKGNAME/DISTNAME correctly and use MASTER_SITES0 for the > > additional distfile. > > > > Here's a minimal fix without updates or Makefile cosmetics which works > > with -CURRENT bsd.port.mk as well as my patch. > > I just fixed the odd handling. > > > This port is abandoned since 2016 when upstream released version 6 as > > new repo. > > > > Either way, I think someone should update this port or retire it. > > show-reverse-deps(1) shows no consumers. > > > > Sean, are you still using/maintaining this? > > Here's the proposal to remove this port unless someone objects or jumps > in to update and test the new version. > > (cvs rm omitted for brevity) > > > Index: textproc/Makefile > =================================================================== > RCS file: /cvs/ports/textproc/Makefile,v > retrieving revision 1.721 > diff -u -p -r1.721 Makefile > --- textproc/Makefile 30 Jun 2022 14:51:44 -0000 1.721 > +++ textproc/Makefile 18 Jul 2022 19:55:33 -0000 > @@ -156,7 +156,6 @@ > SUBDIR += miller > SUBDIR += misspell > SUBDIR += mozilla-dicts > - SUBDIR += multimarkdown > SUBDIR += mupdf > SUBDIR += mupdf,js > SUBDIR += mxml > Index: devel/quirks/Makefile > =================================================================== > RCS file: /cvs/ports/devel/quirks/Makefile,v > retrieving revision 1.1394 > diff -u -p -r1.1394 Makefile > --- devel/quirks/Makefile 6 Jul 2022 06:11:03 -0000 1.1394 > +++ devel/quirks/Makefile 18 Jul 2022 19:55:51 -0000 > @@ -3,7 +3,7 @@ CATEGORIES = devel databases > DISTFILES = > > # API.rev > -PKGNAME = quirks-6.10 > +PKGNAME = quirks-6.11 > PKG_ARCH = * > MAINTAINER = Marc Espie <es...@openbsd.org> > > Index: devel/quirks/files/Quirks.pm > =================================================================== > RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v > retrieving revision 1.1403 > diff -u -p -r1.1403 Quirks.pm > --- devel/quirks/files/Quirks.pm 6 Jul 2022 06:11:03 -0000 1.1403 > +++ devel/quirks/files/Quirks.pm 18 Jul 2022 19:56:41 -0000 > @@ -1679,6 +1679,7 @@ setup_obsolete_reason( > 3 => 'kalarmcal', > 5 => 'gnats', > 3 => 'gnome-books', > + 5 => 'multimarkdown', > ); > > # though it's not yet used, these should be pkgnames, so that eventually >
Seems simpler to update it. Index: Makefile =================================================================== RCS file: /cvs/ports/textproc/multimarkdown/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile 11 Mar 2022 20:02:48 -0000 1.5 +++ Makefile 20 Jul 2022 08:44:03 -0000 @@ -1,43 +1,19 @@ -V = 5.4.0 COMMENT = marked-up plain text to formatted document converter -DISTNAME = ${GH_PROJECT}-${V} -PKGNAME = multimarkdown-${V:C/-/./} CATEGORIES = textproc GH_ACCOUNT = fletcher -GH_PROJECT = MultiMarkdown-5 -GH_TAGNAME = ${V} +GH_PROJECT = MultiMarkdown-6 +GH_TAGNAME = 6.6.0 +PKGNAME = multimarkdown-${GH_TAGNAME} -TESTS_COMMIT = 8d5ad66e3bbaeb0de8646783bfe964261ddb39c7 -DIST_SUBDIR = multimarkdown -MASTER_SITES_GITHUB = https://github.com/fletcher/MMD-Test-Suite/archive/ -DISTFILES = ${DISTNAME}${EXTRACT_SUFX} ${TESTS_COMMIT}${EXTRACT_SUFX} -HOMEPAGE = http://fletcherpenney.net/multimarkdown/ -MAINTAINER = Sean Levy <att...@stalphonsos.com> +HOMEPAGE = https://fletcherpenney.net/multimarkdown/ -# Dual licensed: MIT and GPLv2+ +# MIT (see LICENSE) PERMIT_PACKAGE = Yes # uses pledge() -WANTLIB += c - -BUILD_DEPENDS = devel/greg +WANTLIB += c MODULES = devel/cmake - -CFLAGS += -DHAVE_SRAND_DETERMINISTIC - -CONFIGURE_ARGS += -DGREG=${LOCALBASE}/bin/greg - -post-extract: - rm -rf ${WRKSRC}/submodules/MarkdownTest - cp -r ${WRKDIR}/MMD-Test-Suite-${TESTS_COMMIT} \ - ${WRKSRC}/submodules/MarkdownTest - -pre-configure: - touch ${WRKBUILD}/README.html - -do-install: - ${INSTALL_PROGRAM} ${WRKBUILD}/multimarkdown ${PREFIX}/bin/ .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/textproc/multimarkdown/distinfo,v retrieving revision 1.2 diff -u -p -r1.2 distinfo --- distinfo 12 Apr 2017 18:42:34 -0000 1.2 +++ distinfo 20 Jul 2022 08:44:03 -0000 @@ -1,4 +1,2 @@ -SHA256 (multimarkdown/8d5ad66e3bbaeb0de8646783bfe964261ddb39c7.tar.gz) = xGdoX+aZ/y+8ND+LXK24XSgNCccYJV9S6qAW2NI/DKw= -SHA256 (multimarkdown/MultiMarkdown-5-5.4.0.tar.gz) = HMA4X/1sghwmXpcPgcxOwAnH7Lv7EuDhFce7WzPQmoM= -SIZE (multimarkdown/8d5ad66e3bbaeb0de8646783bfe964261ddb39c7.tar.gz) = 185408 -SIZE (multimarkdown/MultiMarkdown-5-5.4.0.tar.gz) = 136693 +SHA256 (MultiMarkdown-6-6.6.0.tar.gz) = ZJa0PJM9L5P/a+gPUCnTfpV2pdXqy5CQDmsoyQQFA38= +SIZE (MultiMarkdown-6-6.6.0.tar.gz) = 3347116 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: patches/patch-CMakeLists_txt diff -N patches/patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Use installed greg ---- CMakeLists.txt.orig Mon Feb 22 20:05:02 2016 -+++ CMakeLists.txt Tue Mar 22 12:45:41 2016 -@@ -149,7 +149,7 @@ endif () - # Need to build parser.c via greg - add_custom_command ( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser.c -- COMMAND ${PROJECT_SOURCE_DIR}/submodules/greg/greg -o ${CMAKE_CURRENT_BINARY_DIR}/parser.c ${PROJECT_SOURCE_DIR}/src/parser.leg -+ COMMAND ${GREG} -o ${CMAKE_CURRENT_BINARY_DIR}/parser.c ${PROJECT_SOURCE_DIR}/src/parser.leg - ) - - # src_files are the primary files, and will be included in doxygen documentation Index: patches/patch-src_html_c =================================================================== RCS file: /cvs/ports/textproc/multimarkdown/patches/patch-src_html_c,v retrieving revision 1.2 diff -u -p -r1.2 patch-src_html_c --- patches/patch-src_html_c 11 Mar 2022 20:02:48 -0000 1.2 +++ patches/patch-src_html_c 20 Jul 2022 08:44:03 -0000 @@ -1,51 +1,31 @@ Use srand_deterministic(3) if available. ---- src/html.c.orig Fri Aug 5 09:08:36 2016 -+++ src/html.c Thu Sep 15 15:35:50 2016 -@@ -115,7 +115,11 @@ void print_html_node(GString *out, node *n, scratch_pa - scratch->footnote_para_counter --; - if (scratch->footnote_para_counter == 0) { +Index: src/html.c +--- src/html.c.orig ++++ src/html.c +@@ -834,7 +834,7 @@ void mmd_export_token_html(DString * out, const char * + temp_short = scratch->footnote_being_printed; + if (scratch->extensions & EXT_RANDOM_FOOT) { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic(scratch->random_seed_base + scratch->footnote_to_print); -+#else - srand(scratch->random_seed_base + scratch->footnote_to_print); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - random = rand() % 99999 + 1; +- srand(scratch->random_seed_base + temp_short); ++ srand_deterministic(scratch->random_seed_base + temp_short); + temp_short = rand() % 32000 + 1; + } + +@@ -1611,7 +1611,7 @@ parse_citation: + // This is a re-use of a previously used note + + if (scratch->extensions & EXT_RANDOM_FOOT) { +- srand(scratch->random_seed_base + temp_short); ++ srand_deterministic(scratch->random_seed_base + temp_short); + temp_short3 = rand() % 32000 + 1; } else { - random = scratch->footnote_to_print; -@@ -604,7 +608,11 @@ void print_html_node(GString *out, node *n, scratch_pa - temp_node = node_for_count(scratch->used_notes, lev); - - if (scratch->extensions & EXT_RANDOM_FOOT) { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic(scratch->random_seed_base + lev); -+#else - srand(scratch->random_seed_base + lev); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - random = rand() % 99999 + 1; - } else { - random = lev; -@@ -658,7 +666,11 @@ void print_html_node(GString *out, node *n, scratch_pa - fprintf(stderr, "matching cite found - %d\n",lev); - #endif + temp_short3 = temp_short; +@@ -1623,7 +1623,7 @@ parse_citation: + // This is the first time this note was used + if (scratch->extensions & EXT_RANDOM_FOOT) { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic(scratch->random_seed_base + lev); -+#else - srand(scratch->random_seed_base + lev); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - random = rand() % 99999 + 1; +- srand(scratch->random_seed_base + temp_short); ++ srand_deterministic(scratch->random_seed_base + temp_short); + temp_short3 = rand() % 32000 + 1; } else { - random = lev; -@@ -951,7 +963,11 @@ void print_html_endnotes(GString *out, scratch_pad *sc - pad(out, 1, scratch); - - if (scratch->extensions & EXT_RANDOM_FOOT) { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic(scratch->random_seed_base + counter); -+#else - srand(scratch->random_seed_base + counter); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - random = rand() % 99999 + 1; - } else { - random = counter; + temp_short3 = temp_short; Index: patches/patch-src_latex_c =================================================================== RCS file: patches/patch-src_latex_c diff -N patches/patch-src_latex_c --- patches/patch-src_latex_c 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@ -Switch from strcat(3) to safer idiom, ensure bogus input doesn't result -in out of bounds pointer. ---- src/latex.c.orig Sat Oct 1 11:12:24 2016 -+++ src/latex.c Sat Oct 1 11:23:02 2016 -@@ -1219,16 +1219,16 @@ void print_latex_url(GString *out, char *str, scratch_ - char * correct_dimension_units(char *original) { - char *result; - int i; -+ size_t result_len; - - result = strdup(original); -+ result_len = strlen(result); - - for (i = 0; result[i]; i++) - result[i] = tolower(result[i]); - -- if (strstr(&result[strlen(result)-2],"px")) { -- result[strlen(result)-2] = '\0'; -- strcat(result, "pt"); -- } -- -+ if ((result_len > 1) && strstr(&result[result_len-2],"px")) -+ result[result_len-1] = 't'; -+ - return result; - } Index: patches/patch-src_main_c =================================================================== RCS file: patches/patch-src_main_c diff -N patches/patch-src_main_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_main_c 20 Jul 2022 08:44:03 -0000 @@ -0,0 +1,28 @@ +Index: src/main.c +--- src/main.c.orig ++++ src/main.c +@@ -54,11 +54,13 @@ + */ + + #include <ctype.h> ++#include <errno.h> + #include <libgen.h> + #include <limits.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + + + #include "argtable3.h" +@@ -213,6 +215,10 @@ int main(int argc, char ** argv) { + goto exit2; + } + ++ if (pledge("stdio rpath wpath cpath", NULL) == -1) { ++ fprintf(stderr,"pledge: error #%d\n", errno); ++ exit(EXIT_FAILURE); ++ } + + // Parse options + unsigned long extensions = EXT_SMART | EXT_NOTES | EXT_CRITIC | EXT_TRANSCLUDE; Index: patches/patch-src_multimarkdown_c =================================================================== RCS file: patches/patch-src_multimarkdown_c diff -N patches/patch-src_multimarkdown_c --- patches/patch-src_multimarkdown_c 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -Use pledge(2) on OpenBSD. ---- src/multimarkdown.c.orig Fri Aug 5 09:08:36 2016 -+++ src/multimarkdown.c Thu Sep 15 17:28:27 2016 -@@ -58,6 +58,7 @@ - */ - - -+#include <errno.h> - #include <getopt.h> - #include <libgen.h> - #include "parser.h" -@@ -262,6 +263,11 @@ int main(int argc, char **argv) - abort(); - } - } -+ -+ if (pledge("stdio rpath wpath cpath", NULL) == -1) { -+ fprintf(stderr,"pledge: error #%d\n", errno); -+ exit(EXIT_FAILURE); -+ } - - /* Compatibility mode emulates the behavior of Markdown.pl */ - if (compatibility_flag) { Index: patches/patch-src_parse_utilities_c =================================================================== RCS file: patches/patch-src_parse_utilities_c diff -N patches/patch-src_parse_utilities_c --- patches/patch-src_parse_utilities_c 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,29 +0,0 @@ -Use srand_deterministic(3) on OpenBSD ---- src/parse_utilities.c.orig Fri Aug 5 09:08:36 2016 -+++ src/parse_utilities.c Thu Sep 15 15:35:50 2016 -@@ -268,10 +268,18 @@ scratch_pad * mk_scratch_pad(unsigned long extensions) - result->inside_footnote = 0; - - if (extensions & EXT_RANDOM_FOOT) { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic((int)time(NULL)); -+#else - srand((int)time(NULL)); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - result->random_seed_base = rand() % 32000; - } else { -+#ifdef HAVE_SRAND_DETERMINISTIC -+ srand_deterministic(1); -+#else - srand(1); -+#endif /* HAVE_SRAND_DETERMINISTIC */ - result->random_seed_base = 0; - } - ran_start(310952L); -@@ -909,4 +917,4 @@ char * my_strndup(const char * source, size_t n) { - result[len] = '\0'; - - return result; --} -\ No newline at end of file -+} Index: patches/patch-src_parser_leg =================================================================== RCS file: patches/patch-src_parser_leg diff -N patches/patch-src_parser_leg --- patches/patch-src_parser_leg 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ -Switch from sprintf(3) to safer idiom. Handle errors as elsewhere in code. ---- src/parser.leg.orig Fri Aug 5 09:08:36 2016 -+++ src/parser.leg Sat Oct 1 14:05:54 2016 -@@ -637,8 +637,12 @@ AutoLinkUrl = '<' < [A-Za-z]+ "://" ( !Newline !'>' - - AutoLinkEmail = '<' ( "mailto:" )? < [-A-Za-z0-9+_./!%~$]+ '@' ( !Newline !'>' . )+ > '>' - { -- char *mailto = malloc(strlen(yytext) + 8); -- sprintf(mailto, "mailto:%s", yytext); -+ char *mailto = NULL; -+ if (asprintf(&mailto, "mailto:%s", yytext) == -1) { -+ fprintf(stderr, "error copying mailto link: %s\n", -+ yytext); -+ exit(1); -+ } - $$ = mk_link(str(yytext), NULL, mailto, NULL, NULL); - free(mailto); - } Index: patches/patch-src_writer_c =================================================================== RCS file: patches/patch-src_writer_c diff -N patches/patch-src_writer_c --- patches/patch-src_writer_c 11 Mar 2022 20:02:48 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@ -Switch from strcat(3) to a safer idiom, make sure bogus dimension does -not result in out of bounds pointer. ---- src/writer.c.orig Sat Oct 1 11:18:59 2016 -+++ src/writer.c Sat Oct 1 11:22:21 2016 -@@ -690,6 +690,7 @@ char * dimension_for_attribute(char *querystring, node - int i; - char *upper; - GString *result; -+ size_t dimension_len; - - attribute = node_for_attribute(querystring, list); - if (attribute == NULL) return NULL; -@@ -698,6 +699,7 @@ char * dimension_for_attribute(char *querystring, node - #endif - - dimension = strdup(attribute->children->str); -+ dimension_len = strlen(dimension); - upper = strdup(attribute->children->str); - - for(i = 0; dimension[ i ]; i++) -@@ -709,15 +711,14 @@ char * dimension_for_attribute(char *querystring, node - fprintf(stderr, "b\n"); - #endif - -- if (strstr(dimension, "px")) { -- ptr = strstr(dimension,"px"); -- ptr[0] = '\0'; -- strcat(ptr,"pt"); -- } -+ ptr = strstr(dimension,"px"); -+ if (ptr) -+ ptr[1] = 't'; - - result = g_string_new(dimension); - -- if ((strcmp(dimension,upper) == 0) && (dimension[strlen(dimension) -1] != '%')) { -+ if ((strcmp(dimension,upper) == 0) && (dimension_len > 0) && -+ (dimension[dimension_len-1] != '%')) { - /* no units */ - g_string_append_printf(result, "pt"); - } Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/textproc/multimarkdown/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 11 Mar 2022 20:02:48 -0000 1.2 +++ pkg/PLIST 20 Jul 2022 08:44:03 -0000 @@ -1 +1,56 @@ +LICENSE.txt +README.txt +bin/markdown +@comment bin/mmd +bin/mmd2all +bin/mmd2epub +bin/mmd2fodt +bin/mmd2odt +bin/mmd2opml +bin/mmd2pdf +bin/mmd2tex @bin bin/multimarkdown +share/texmf/ +share/texmf/tex/ +share/texmf/tex/latex/ +share/texmf/tex/latex/mmd6/ +share/texmf/tex/latex/mmd6/Portfolio.png +share/texmf/tex/latex/mmd6/README.md +share/texmf/tex/latex/mmd6/Vintage.png +share/texmf/tex/latex/mmd6/beamerthemekeynote-gradient.sty +share/texmf/tex/latex/mmd6/beamerthemekeynote-portfolio.sty +share/texmf/tex/latex/mmd6/beamerthemekeynote-vintage.sty +share/texmf/tex/latex/mmd6/manuscript.sty +share/texmf/tex/latex/mmd6/mmd-envelope.sty +share/texmf/tex/latex/mmd6/mmd-letterhead.sty +share/texmf/tex/latex/mmd6/mmd6-article-begin.tex +share/texmf/tex/latex/mmd6/mmd6-article-footer.tex +share/texmf/tex/latex/mmd6/mmd6-article-leader.tex +share/texmf/tex/latex/mmd6/mmd6-beamer-begin.tex +share/texmf/tex/latex/mmd6/mmd6-beamer-footer.tex +share/texmf/tex/latex/mmd6/mmd6-beamer-leader.tex +share/texmf/tex/latex/mmd6/mmd6-criticmarkup.tex +share/texmf/tex/latex/mmd6/mmd6-default-metadata.tex +share/texmf/tex/latex/mmd6/mmd6-letterhead-begin.tex +share/texmf/tex/latex/mmd6/mmd6-letterhead-footer.tex +share/texmf/tex/latex/mmd6/mmd6-letterhead-leader.tex +share/texmf/tex/latex/mmd6/mmd6-manuscript-begin.tex +share/texmf/tex/latex/mmd6/mmd6-manuscript-footer.tex +share/texmf/tex/latex/mmd6/mmd6-manuscript-leader.tex +share/texmf/tex/latex/mmd6/mmd6-manuscript-packages.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-book-begin.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-book-footer.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-book-leader.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-copyright.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-footer.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-layout-8.5x11.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-packages.tex +share/texmf/tex/latex/mmd6/mmd6-memoir-setup.tex +share/texmf/tex/latex/mmd6/mmd6-title.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-book-begin.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-book-footer.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-book-leader.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-footer.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-handout-begin.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-handout-footer.tex +share/texmf/tex/latex/mmd6/mmd6-tufte-handout-leader.tex