man-db: update to version 2.9.3
authorAchim Gratz <Achim.Gratz@Stromeko.DE>
Sat, 2 Jan 2021 18:11:30 +0000 (19:11 +0100)
committerAchim Gratz <Achim.Gratz@Stromeko.DE>
Sun, 3 Jan 2021 18:29:16 +0000 (19:29 +0100)
2.7.4-shared-libmandb.patch [deleted file]
2.7.5-gnulib-cygwin25.patch [deleted file]
man-db-2.9.3-avoid-multiply-defined-symbols.patch [new file with mode: 0644]
man-db.cygport

diff --git a/2.7.4-shared-libmandb.patch b/2.7.4-shared-libmandb.patch
deleted file mode 100644 (file)
index 67232c3..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
---- origsrc/man-db-2.7.4/libdb/db_ver.c        2015-04-08 04:23:25.000000000 -0500
-+++ src/man-db-2.7.4/libdb/db_ver.c    2015-10-08 21:17:15.986955600 -0500
-@@ -37,6 +37,8 @@
- #include "mydbm.h"
-+char *database = NULL;
-+
- int dbver_rd (MYDBM_FILE dbfile)
- {
-       datum key, content;
---- origsrc/man-db-2.7.4/src/accessdb.c        2015-04-08 04:23:25.000000000 -0500
-+++ src/man-db-2.7.4/src/accessdb.c    2015-10-08 21:18:29.661811100 -0500
-@@ -49,9 +49,6 @@
- char *program_name;
- const char *cat_root;
--/* for db_storage.c */
--char *database;
--
- const char *argp_program_version = "accessdb " PACKAGE_VERSION;
- const char *argp_program_bug_address = PACKAGE_BUGREPORT;
- error_t argp_err_exit_status = FAIL;
---- origsrc/man-db-2.7.4/src/catman.c  2015-04-08 04:23:25.000000000 -0500
-+++ src/man-db-2.7.4/src/catman.c      2015-10-08 21:18:33.018237300 -0500
-@@ -85,7 +85,6 @@ int quiet = 1;
- MYDBM_FILE dbf_close_post_fork;
- char *manp;
- extern char *user_config_file;
--char *database;
- static const char **sections;
- const char *argp_program_version = "catman " PACKAGE_VERSION;
---- origsrc/man-db-2.7.4/src/man.c     2015-10-07 19:44:31.000000000 -0500
-+++ src/man-db-2.7.4/src/man.c 2015-10-08 21:18:45.220786900 -0500
-@@ -189,7 +189,6 @@ static char *manpathlist[MAXDIRS];
- /* globals */
- int quiet = 1;
- char *program_name;
--char *database = NULL;
- extern const char *extension; /* for globbing.c */
- extern char *user_config_file;        /* defined in manp.c */
- extern int disable_cache;
---- origsrc/man-db-2.7.4/src/mandb.c   2015-09-22 08:15:30.000000000 -0500
-+++ src/man-db-2.7.4/src/mandb.c       2015-10-08 21:18:52.547217200 -0500
-@@ -76,7 +76,6 @@ char *program_name;
- int quiet = 1;
- extern int opt_test;          /* don't update db */
- char *manp;
--char *database = NULL;
- extern char *extension;               /* for globbing.c */
- extern int force_rescan;      /* for check_mandirs.c */
- static char *single_filename = NULL;
---- origsrc/man-db-2.7.4/src/whatis.c  2015-04-08 04:23:25.000000000 -0500
-+++ src/man-db-2.7.4/src/whatis.c      2015-10-08 21:18:59.648619000 -0500
-@@ -85,7 +85,6 @@ static int num_keywords;
- char *program_name;
- int am_apropos;
--char *database;
- int quiet = 1;
- #ifdef HAVE_ICONV
diff --git a/2.7.5-gnulib-cygwin25.patch b/2.7.5-gnulib-cygwin25.patch
deleted file mode 100644 (file)
index 45b3693..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- origsrc/man-db-2.7.5/gnulib/lib/sys_select.in.h    2014-09-29 06:45:13.000000000 -0500
-+++ src/man-db-2.7.5/gnulib/lib/sys_select.in.h        2016-08-12 12:17:18.465465300 -0500
-@@ -81,7 +81,7 @@
-    Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
-    in <sys/time.h>.
-    But avoid namespace pollution on glibc systems.  */
--# ifndef __GLIBC__
-+# if !defined __GLIBC__ && !defined __NEWLIB__
- #  include <sys/time.h>
- # endif
-@@ -102,7 +102,7 @@
-    But avoid namespace pollution on glibc systems.
-    Do this after the include_next (for the sake of OpenBSD 5.0) but before
-    the split double-inclusion guard (for the sake of Solaris).  */
--#if !(defined __GLIBC__ && !defined __UCLIBC__)
-+#if !(defined __GLIBC__ && !defined __UCLIBC__) && !defined __CYGWIN__
- # include <signal.h>
- #endif
diff --git a/man-db-2.9.3-avoid-multiply-defined-symbols.patch b/man-db-2.9.3-avoid-multiply-defined-symbols.patch
new file mode 100644 (file)
index 0000000..1ae52d4
--- /dev/null
@@ -0,0 +1,11 @@
+--- origsrc/man-db-2.9.3/src/Makefile.am       2020-01-01 16:11:59.000000000 +0100
++++ src/man-db-2.9.3/src/Makefile.am   2021-01-02 16:18:16.046315200 +0100
+@@ -56,7 +56,7 @@ AM_CFLAGS = \
+       $(WARN_CFLAGS) \
+       $(libpipeline_CFLAGS)
+-LIBMAN = $(top_builddir)/lib/libman.la $(top_builddir)/gl/lib/libgnu.la \
++LIBMAN = $(top_builddir)/lib/libman.la \
+        @LTLIBINTL@
+ LIBMANDB = $(top_builddir)/libdb/libmandb.la $(LIBMAN) $(DBLIBS)
index 60e076bfb31ba36dcae5fb54bb092d68b1e0ae5b..d9e39dc915ca513540f1304732cf4a328c7e9e02 100644 (file)
@@ -1,27 +1,42 @@
+# -*- mode: sh; sh-shell: bash -*-
+BUILD_REQUIRES=" flex groff libgdbm-devel libiconv-devel libpipeline-devel lzip po4a zstd"
 NAME="man-db"
-VERSION=2.7.6.1
-RELEASE=1
+VERSION="2.9.3"
+RELEASE="1"
 CATEGORY="Base"
 SUMMARY="Man page viewer"
 DESCRIPTION="man-db is an implementation of the standard Unix documentation
 system accessed using the man command. It uses a Berkeley DB database in place
 of the traditional flat-text whatis databases."
-HOMEPAGE="http://www.nongnu.org/man-db/"
-SRC_URI="mirror://savannah/man-db/man-db-${VERSION}.tar.xz"
+HOMEPAGE="https://www.nongnu.org/man-db/"
+SRC_URI="
+  mirror://savannah/man-db/${P}.tar.xz
+  mirror://savannah/man-db/${P}.tar.xz.asc
+"
 PATCH_URI="
-       2.7.4-shared-libmandb.patch
-       2.7.5-gnulib-cygwin25.patch
+  ${P}-avoid-multiply-defined-symbols.patch
 "
 
-PKG_NAMES=${NAME}
+PKG_NAMES="${PN} ${PN}-create-index ${PN}-index-synchronously"
 man_db_OBSOLETES="man"
-man_db_REQUIRES="groff gzip less libiconv util-linux" # lynx
-man_db_CONTENTS="etc/defaults/ etc/p* usr/bin/ usr/libexec/ usr/sbin/
-       usr/share/doc/ usr/share/locale/ usr/share/man/ var/cache/man/"
-PKG_IGNORE="usr/lib/man-db/libman* usr/lib/tmpfiles.d/"
-
-# Build dependencies only
-DEPEND="groff libgdbm-devel libpipeline-devel check po4a"
+man_db_REQUIRES="groff gzip less util-linux" # lynx
+man_db_CONTENTS="
+  etc/defaults/
+  etc/postinstall/zp_${PN}-update-index.dash etc/postinstall/${PN}.sh etc/preremove/${PN}.sh 
+  usr/bin/ usr/libexec/ usr/sbin/
+  usr/share/doc/ usr/share/locale/ usr/share/man/
+  var/cache/man/"
+PKG_IGNORE="usr/lib/man-db/libman*"
+man_db_create_index_SUMMARY="Create and maintain index of man pages"
+man_db_create_index_REQUIRES="${PN}"
+man_db_create_index_CONTENTS="
+  etc/postinstall/${PN}-create-index.dash
+"
+man_db_index_synchronously_SUMMARY="Maintain index of man pages synchronously"
+man_db_index_synchronously_REQUIRES="${PN}-create-index"
+man_db_index_synchronously_CONTENTS="
+  etc/postinstall/${PN}-index-synchronously.dash etc/preremove/${PN}-index-synchronously.dash
+"
 
 src_compile() {
        cd ${S}
@@ -50,10 +65,24 @@ src_install() {
        keepdir /var/cache/man
 
        dodir /etc/postinstall
-       cat > ${D}/etc/postinstall/zp_${NAME}.sh <<_EOF
-[ ! -s /var/cache/man/index.db ] || /usr/bin/mandb -pq
+       cat > ${D}/etc/postinstall/zp_${PN}-update-index.dash <<_EOF
+if [ -f /var/cache/man/index.db ] ; then
+    printf "  ManDB index update starting...\n"
+    /usr/bin/nohup /usr/bin/mandb < /dev/null > /var/log/mandb-index.log 2>&1 &
+    [ -f /var/cache/man/.index-synchronously ] && wait \
+      && printf "  ... ManDB index update complete.\n" \
+      || printf "  ... ManDB index update continuing in background.\n"
+else
+    printf "  ManDB index not available.\n"
+fi
+_EOF
+       cat > ${D}/etc/postinstall/${PN}-create-index.dash <<_EOF
+[ -f /var/cache/man/index.db ] || exec /usr/bin/touch /var/cache/man/index.db
+_EOF
+       cat > ${D}/etc/postinstall/${PN}-index-synchronously.dash <<_EOF
+exec /usr/bin/touch /var/cache/man/.index-synchronously
+_EOF
+       cat > ${D}/etc/preremove/${PN}-index-synchronously.dash <<_EOF
+exec /usr/bin/rm -f /var/cache/man/.index-synchronously
 _EOF
-
-       # In Fedora, zsoelim is in groff as a symlink to soelim(1)
-#      rm -f ${D}/usr/bin/zsoelim.exe ${D}/usr/share/man/man1/zsoelim.*
 }
This page took 0.02696 seconds and 5 git commands to generate.