bogofilter: replace no-docs patch with backport of upstream commit
authorW. Michael Petullo <[email protected]>
Fri, 6 Jun 2025 13:58:44 +0000 (08:58 -0500)
committerJosef Schlehofer <[email protected]>
Fri, 6 Jun 2025 21:05:09 +0000 (23:05 +0200)
Bogofilter added a --disable-documentation option to configure in
response to https://gitlab.com/bogofilter/bogofilter/-/issues/17.

Signed-off-by: W. Michael Petullo <[email protected]>
mail/bogofilter/Makefile
mail/bogofilter/patches/0001-Add-disable-documentation-.-configure-option.-Fixes-.patch [new file with mode: 0644]
mail/bogofilter/patches/010-no-docs.patch [deleted file]

index 3144316526d216c96162d81d2df4d07f94f71955..6f1e83fbfc36813b4c9d70ad2e161c863e729df6 100644 (file)
@@ -52,7 +52,8 @@ PKG_AUTOMAKE_PATHS:=$(MAKE_PATH)
 
 CONFIGURE_ARGS += \
        --with-database=sqlite3 \
-       --with-included-gsl
+       --with-included-gsl \
+       --disable-documentation
 
 define Package/bogofilter/conffiles
 /etc/bogofilter.cf
diff --git a/mail/bogofilter/patches/0001-Add-disable-documentation-.-configure-option.-Fixes-.patch b/mail/bogofilter/patches/0001-Add-disable-documentation-.-configure-option.-Fixes-.patch
new file mode 100644 (file)
index 0000000..b0e97d8
--- /dev/null
@@ -0,0 +1,121 @@
+From 15c2ff1dd5b37bd3c3127b5e894338b53a9c066e Mon Sep 17 00:00:00 2001
+From: Matthias Andree <[email protected]>
+Date: Fri, 6 Jun 2025 11:13:33 +0200
+Subject: [PATCH] Add --disable-documentation ./configure option. Fixes #17.
+
+---
+ bogofilter/NEWS            |  7 +++++++
+ bogofilter/configure.ac    | 11 +++++++++++
+ bogofilter/doc/Makefile.am | 37 ++++++++++++++++++++++---------------
+ 3 files changed, 40 insertions(+), 15 deletions(-)
+
+--- a/bogofilter/NEWS
++++ b/bogofilter/NEWS
+@@ -15,6 +15,13 @@
+ -------------------------------------------------------------------------------
++1.3.0.rc2 (in progress)
++      2025-06-06
++      * Add --disable-documentation configure option, to skip building
++        the documentation.  This will break "make dist" like targets
++        if documentation needs to be rebuilt. Fixes #17.
++
++
+ 1.3.0.rc1
+       2025-04-18
+--- a/bogofilter/configure.ac
++++ b/bogofilter/configure.ac
+@@ -306,6 +306,17 @@ if test x$USE_CP866 = xYES ; then
+ fi
+ fi
++AC_ARG_ENABLE([documentation],
++    AS_HELP_STRING([--disable-documentation],
++                 [do not build documentation]),
++    [case "${enableval}" in
++         yes) docs=true ;;
++         no)  docs=false ;;
++         *)   AC_MSG_ERROR([bad value ${enableval} for --enable-documentation])
++            ;;
++     esac],[docs=true])
++AM_CONDITIONAL([ENABLE_DOCS], [test x$docs = xtrue])
++
+ dnl Allow the user to specify a default charset
+ AC_ARG_WITH(charset, 
+           AS_HELP_STRING([--with-charset=name], 
+--- a/bogofilter/doc/Makefile.am
++++ b/bogofilter/doc/Makefile.am
+@@ -7,15 +7,21 @@ SUFFIXES= .1 .1in .htmlin .html
+ #   nsgmls (opensp)
+ # what to build
++if ENABLE_DOCS
+ man_MANS = bogofilter.1 bogoutil.1 bogoupgrade.1 bogolexer.1 bogotune.1 \
+          bf_copy.1 bf_tar.1 bf_compact.1
+ html_MANS = bogofilter.html bogoutil.html bogoupgrade.html \
+           bogolexer.html bogotune.html \
+           bf_copy.html bf_tar.html bf_compact.html
++else
++man_MANS=
++html_MANS=
++endif
+ all: $(man_MANS) $(html_MANS)
++
+ CLEANFILES = $(man_MANS) $(html_MANS)
+ HTML_DOCS = bogofilter-faq.html bogofilter-faq-fr.html bogofilter-faq-it.html bogotune-faq.html
+@@ -23,14 +29,14 @@ XHTML_DOCS= bogofilter-faq-bg.xhtml
+ # what to distribute
+ EXTRA_DIST = \
+-           bogofilter.xml bogofilter.1in bogofilter.htmlin \
+-           bogolexer.xml bogolexer.1in bogolexer.htmlin \
+-           bogotune.xml bogotune.1in bogotune.htmlin \
+-           bogoupgrade.xml bogoupgrade.1in bogoupgrade.htmlin \
+-           bogoutil.xml bogoutil.1in bogoutil.htmlin \
+-           bf_compact.xml bf_compact.1in bf_compact.htmlin \
+-           bf_copy.xml bf_copy.1in bf_copy.htmlin \
+-           bf_tar.xml bf_tar.1in bf_tar.htmlin \
++           bogofilter.xml $(srcdir)/bogofilter.1in $(srcdir)/bogofilter.htmlin \
++           bogolexer.xml $(srcdir)/bogolexer.1in $(srcdir)/bogolexer.htmlin \
++           bogotune.xml $(srcdir)/bogotune.1in $(srcdir)/bogotune.htmlin \
++           bogoupgrade.xml $(srcdir)/bogoupgrade.1in $(srcdir)/bogoupgrade.htmlin \
++           bogoutil.xml $(srcdir)/bogoutil.1in $(srcdir)/bogoutil.htmlin \
++           bf_compact.xml $(srcdir)/bf_compact.1in $(srcdir)/bf_compact.htmlin \
++           bf_copy.xml $(srcdir)/bf_copy.1in $(srcdir)/bf_copy.htmlin \
++           bf_tar.xml $(srcdir)/bf_tar.1in $(srcdir)/bf_tar.htmlin \
+            $(HTML_DOCS) \
+            $(XHTML_DOCS) \
+            bogofilter-tuning.HOWTO.html \
+@@ -77,18 +83,19 @@ dist-hook:
+ # respectively.
+ .xml.htmlin:
+       $(XMLLINT) --noout --postvalid $<
+-      if test -f $(srcdir)/$@ && test $(srcdir)/$@ -nt $< ; then \
+-          cp $(srcdir)/$@ . ; else \
+-        if xmlto html-nochunks $< ; then f=$@ ; mv $${f%%in} $@ ; else rm -f $@ ; exit 1 ; fi ; \
++      if test -f $@ && test $@ -nt $< ; then \
++          cp $@ . ; else \
++        if xmlto html-nochunks -o "$(srcdir)" $< ; then f=$@ ; mv $${f%%in} $@ ; else rm -f $@ ; exit 1 ; fi ; \
+         perl -pl -e "s|\xA0|&nbsp;|g" -i $@ || { rm -f $@ ; exit 1 ; } \
+       fi
+ .xml.1in:
+       $(XMLLINT) --noout --postvalid $<
+-      if test -f $(srcdir)/$@ && test $(srcdir)/$@ -nt $< ; then \
+-          cp $(srcdir)/$@ . ; else \
+-      if xmlto man $< ; then f=$@ ; mv $${f%in} $@ ; else rm -f $@ ; exit 1 ; fi ; \
+-      perl -pl -e "s|\xA0|\\ |g" -i $@ || { rm -f $@ ; exit 1 ; } \
++      if test -f $@ && test $@ -nt $< ; then \
++          cp $@ . ; \
++      else \
++              if xmlto man -o "$(srcdir)" $< ; then f=$@ ; mv $${f%in} $@ ; else rm -f $@ ; exit 1 ; fi ; \
++              perl -pl -e "s|\xA0|\\ |g" -i $@ || { rm -f $@ ; exit 1 ; } \
+       fi
+ else
+ dist-hook:
diff --git a/mail/bogofilter/patches/010-no-docs.patch b/mail/bogofilter/patches/010-no-docs.patch
deleted file mode 100644 (file)
index f41ac39..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/bogofilter/Makefile.am
-+++ b/bogofilter/Makefile.am
-@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS =
- # search path for m4 macros
- ACLOCAL_AMFLAGS = -I m4
--SUBDIRS = src . doc
-+SUBDIRS = src .
- SYSCONFDIR = @sysconfdir@
- # what to build