man-db 2.6.7
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>
Fri, 30 May 2014 23:28:12 +0000 (18:28 -0500)
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>
Fri, 30 May 2014 23:28:12 +0000 (18:28 -0500)
2.6.7-shared-libman.patch [new file with mode: 0644]
2.6.7-shared-libmandb.patch [new file with mode: 0644]
man-db.cygport [new file with mode: 0644]
postinstall.sh [new file with mode: 0644]
preremove.sh [new file with mode: 0644]

diff --git a/2.6.7-shared-libman.patch b/2.6.7-shared-libman.patch
new file mode 100644 (file)
index 0000000..980f182
--- /dev/null
@@ -0,0 +1,10 @@
+Shared libmandb is a bit more complicated
+
+--- origsrc/man-db-2.6.7/lib/Makefile.am       2013-12-08 18:43:01.000000000 -0600
++++ src/man-db-2.6.7/lib/Makefile.am   2014-05-30 11:56:02.650041800 -0500
+@@ -62,4 +62,5 @@ libman_la_LIBADD = ../gnulib/lib/libgnu.
+ libman_la_LDFLAGS = \
+       -avoid-version -release $(VERSION) -rpath $(pkglibdir) \
++      -no-undefined \
+       $(libpipeline_LIBS)
diff --git a/2.6.7-shared-libmandb.patch b/2.6.7-shared-libmandb.patch
new file mode 100644 (file)
index 0000000..f694738
--- /dev/null
@@ -0,0 +1,84 @@
+These global symbols are used within libmandb, so if we want to make it
+shared, they need to be moved from each of the executables into the library
+
+--- origsrc/man-db-2.6.7/libdb/Makefile.am     2013-12-08 18:43:01.000000000 -0600
++++ src/man-db-2.6.7/libdb/Makefile.am 2014-05-30 12:02:03.758696100 -0500
+@@ -43,4 +43,4 @@ libmandb_la_SOURCES = \
+ libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS)
+-libmandb_la_LDFLAGS = -avoid-version -release $(VERSION) -rpath $(pkglibdir)
++libmandb_la_LDFLAGS = -avoid-version -release $(VERSION) -rpath $(pkglibdir) -no-undefined
+--- origsrc/man-db-2.6.7/libdb/db_ver.c        2013-12-08 18:38:13.000000000 -0600
++++ src/man-db-2.6.7/libdb/db_ver.c    2014-05-30 12:03:48.648695400 -0500
+@@ -37,6 +37,10 @@
+ #include "mydbm.h"
++/* globals */
++char *database = NULL;
++MYDBM_FILE dbf;
++
+ int dbver_rd (MYDBM_FILE dbfile)
+ {
+       datum key, content;
+--- origsrc/man-db-2.6.7/src/accessdb.c        2014-01-13 05:18:41.000000000 -0600
++++ src/man-db-2.6.7/src/accessdb.c    2014-05-30 12:12:09.086318800 -0500
+@@ -49,10 +49,6 @@
+ char *program_name;
+ const char *cat_root;
+-/* for db_storage.c */
+-char *database;
+-MYDBM_FILE dbf;
+-
+ 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.6.7/src/catman.c  2014-01-14 20:22:15.000000000 -0600
++++ src/man-db-2.6.7/src/catman.c      2014-05-30 12:12:18.804874700 -0500
+@@ -82,10 +82,8 @@
+ /* globals */
+ char *program_name;
+ int quiet = 1;
+-MYDBM_FILE dbf;
+ 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.6.7/src/man.c     2014-03-26 06:19:14.000000000 -0500
++++ src/man-db-2.6.7/src/man.c 2014-05-30 18:01:03.559596500 -0500
+@@ -188,8 +188,6 @@ static char *manpathlist[MAXDIRS];
+ /* globals */
+ int quiet = 1;
+ char *program_name;
+-char *database = NULL;
+-MYDBM_FILE dbf; 
+ extern const char *extension; /* for globbing.c */
+ extern char *user_config_file;        /* defined in manp.c */
+ extern int disable_cache;
+--- origsrc/man-db-2.6.7/src/mandb.c   2014-04-09 19:30:39.000000000 -0500
++++ src/man-db-2.6.7/src/mandb.c       2014-05-30 12:11:38.595574900 -0500
+@@ -71,9 +71,7 @@
+ char *program_name;
+ int quiet = 1;
+ extern int opt_test;          /* don't update db */
+-MYDBM_FILE dbf;
+ 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.6.7/src/whatis.c  2014-01-13 05:18:41.000000000 -0600
++++ src/man-db-2.6.7/src/whatis.c      2014-05-30 12:12:26.972341900 -0500
+@@ -85,8 +85,6 @@ static int num_keywords;
+ char *program_name;
+ int am_apropos;
+-char *database;
+-MYDBM_FILE dbf;
+ int quiet = 1;
+ #ifdef HAVE_ICONV
diff --git a/man-db.cygport b/man-db.cygport
new file mode 100644 (file)
index 0000000..beca39f
--- /dev/null
@@ -0,0 +1,46 @@
+NAME="man-db"
+VERSION=2.6.7
+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"
+PATCH_URI="
+       2.6.7-shared-libman.patch
+       2.6.7-shared-libmandb.patch
+"
+
+PKG_NAMES=${NAME}
+man_db_OBSOLETES="man"
+man_db_REQUIRES="groff gzip less lynx"
+man_db_CONTENTS="etc/defaults/ etc/p* usr/bin/ usr/libexec/ usr/sbin/
+       usr/share/doc/ usr/share/locale/ usr/share/man/"
+PKG_IGNORE="usr/lib/man-db/libman*"
+
+# Build dependencies only
+DEPEND="groff libgdbm-devel libpipeline-devel check"
+
+CYGCONF_ARGS="
+       --disable-setuid
+       --with-browser=lynx
+       --with-pager=less
+       --with-db=gdbm
+"
+
+src_test() {
+       cd ${B}
+       unset MANPATH
+       cygtest
+}
+
+src_install() {
+       cd ${B}
+       cyginstall
+       make_etc_defaults /etc/man_db.conf
+
+       # 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.*
+}
diff --git a/postinstall.sh b/postinstall.sh
new file mode 100644 (file)
index 0000000..e386cfe
--- /dev/null
@@ -0,0 +1,6 @@
+if [ -f /var/cache/man/index.db ]; then
+   /usr/bin/mandb
+else
+   /bin/mkdir -p /var/cache/man
+   /usr/bin/mandb -c
+fi
diff --git a/preremove.sh b/preremove.sh
new file mode 100644 (file)
index 0000000..d0861f9
--- /dev/null
@@ -0,0 +1 @@
+/bin/rm -fr /var/cache/man/
This page took 0.044926 seconds and 5 git commands to generate.