diff --git a/man-db/PKGBUILD b/man-db/PKGBUILD new file mode 100644 index 00000000..d2338853 --- /dev/null +++ b/man-db/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Alexey Pavlov + +pkgname=man-db +pkgver=2.6.7.1 +pkgrel=1 +pkgdesc="A utility for reading man pages" +arch=('i686' 'x86_64') +url="http://www.nongnu.org/man-db/" +license=('GPL' 'LGPL') +groups=('base') +depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less') +optdepends=('gzip') +makedepends=('libgdbm-devel' 'libpipeline-devel' 'zlib-devel' 'pkg-config') +backup=('etc/man_db.conf') +conflicts=('man') +provides=('man') +replaces=('man') +install=${pkgname}.install +source=(http://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig} + convert-mans + man-db-2.6.7.1-msysize.patch + man-db-2.6.7.1-noundefined.patch) +md5sums=('ce7b697f8e8016a085d9f5975ae6c4fb' + 'SKIP' + '0bd4b663cba0bbe85c4f457f775030bc' + '1a32cc0e6a7993d5155667a07f0efc49' + '4057a1c42d17223b42626f845db5a866') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ${srcdir}/man-db-2.6.7.1-msysize.patch + #patch -p1 -i ${srcdir}/man-db-2.6.7.1-noundefined.patch + + autoreconf -fi +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib \ + --with-db=gdbm \ + --disable-setuid \ + --enable-mandirs=GNU \ + --with-sections="1 n l 8 3 0 2 5 4 9 6 7" + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + + # part of groff pkg + rm -f ${pkgdir}/usr/bin/zsoelim + + # script from LFS to convert manpages, see + # http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html + install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans +} diff --git a/man-db/convert-mans b/man-db/convert-mans new file mode 100644 index 00000000..db98cd39 --- /dev/null +++ b/man-db/convert-mans @@ -0,0 +1,11 @@ +#!/usr/bin/env sh -e +FROM="$1" +TO="$2" +shift ; shift +while [ $# -gt 0 ] +do + FILE="$1" + shift + iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv + mv .tmp.iconv "$FILE" +done diff --git a/man-db/man-db-2.6.7.1-msysize.patch b/man-db/man-db-2.6.7.1-msysize.patch new file mode 100644 index 00000000..5b194b8a --- /dev/null +++ b/man-db/man-db-2.6.7.1-msysize.patch @@ -0,0 +1,220 @@ +diff -Naur man-db-2.6.7.1-orig/build-aux/config.guess man-db-2.6.7.1/build-aux/config.guess +--- man-db-2.6.7.1-orig/build-aux/config.guess 2014-04-10 06:33:51.000000000 +0400 ++++ man-db-2.6.7.1/build-aux/config.guess 2014-06-14 12:12:53.505800000 +0400 +@@ -866,6 +866,9 @@ + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +diff -Naur man-db-2.6.7.1-orig/build-aux/config.rpath man-db-2.6.7.1/build-aux/config.rpath +--- man-db-2.6.7.1-orig/build-aux/config.rpath 2014-04-10 06:32:45.000000000 +0400 ++++ man-db-2.6.7.1/build-aux/config.rpath 2014-06-14 12:08:14.000600000 +0400 +@@ -57,7 +57,7 @@ + aix*) + wl='-Wl,' + ;; +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' +@@ -149,7 +149,7 @@ + hardcode_minus_L=no + + case "$host_os" in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -198,7 +198,7 @@ + ld_shlibs=no + fi + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -348,7 +348,7 @@ + ;; + bsdi[45]*) + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -537,7 +537,7 @@ + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; +diff -Naur man-db-2.6.7.1-orig/gnulib/lib/Makefile.am man-db-2.6.7.1/gnulib/lib/Makefile.am +--- man-db-2.6.7.1-orig/gnulib/lib/Makefile.am 2014-02-20 16:44:28.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/lib/Makefile.am 2014-06-14 12:08:59.771000000 +0400 +@@ -825,7 +825,7 @@ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/btowc.m4 man-db-2.6.7.1/gnulib/m4/btowc.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/btowc.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/btowc.m4 2014-06-14 12:09:18.459800000 +0400 +@@ -49,7 +49,7 @@ + changequote(,)dnl + case "$host_os" in + # Guess no on Cygwin. +- cygwin*) gl_cv_func_btowc_nul="guessing no" ;; ++ cygwin* | msys*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_nul="guessing yes" ;; + esac +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/double-slash-root.m4 man-db-2.6.7.1/gnulib/m4/double-slash-root.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/double-slash-root.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/double-slash-root.m4 2014-06-14 12:09:35.214200000 +0400 +@@ -16,7 +16,7 @@ + # special semantics and is distinct from /, please report it to + # . + case $host in +- *-cygwin | i370-ibm-openedition) ++ *-cygwin | *-msys | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/dup2.m4 man-db-2.6.7.1/gnulib/m4/dup2.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/dup2.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/dup2.m4 2014-06-14 12:09:48.458600000 +0400 +@@ -51,7 +51,7 @@ + [case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works="guessing no" ;; +- cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 ++ cygwin* | msys*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works="guessing no" ;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/getcwd.m4 man-db-2.6.7.1/gnulib/m4/getcwd.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/getcwd.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/getcwd.m4 2014-06-14 12:10:09.175400000 +0400 +@@ -49,7 +49,7 @@ + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. +- cygwin*) gl_cv_func_getcwd_null="guessing yes";; ++ cygwin* | msys*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; + esac +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/getdtablesize.m4 man-db-2.6.7.1/gnulib/m4/getdtablesize.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/getdtablesize.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/getdtablesize.m4 2014-06-14 12:10:20.454200000 +0400 +@@ -26,7 +26,7 @@ + [gl_cv_func_getdtablesize_works=yes], + [gl_cv_func_getdtablesize_works=no], + [case "$host_os" in +- cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows ++ cygwin* | msys*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac]) +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/intl.m4 man-db-2.6.7.1/gnulib/m4/intl.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/intl.m4 2014-02-18 19:02:47.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/intl.m4 2014-06-14 12:10:43.214600000 +0400 +@@ -111,7 +111,7 @@ + dnl exported variables _also_ in the static library. + if test "$enable_shared" = yes; then + case "$host_os" in +- mingw* | cygwin*) is_woe32dll=yes ;; ++ mingw* | cygwin* | msys*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else +@@ -123,7 +123,7 @@ + dnl On mingw and Cygwin, we can activate special Makefile rules which add + dnl version information to the shared libraries and executables. + case "$host_os" in +- mingw* | cygwin*) is_woe32=yes ;; ++ mingw* | cygwin* | msys*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/malloc.m4 man-db-2.6.7.1/gnulib/m4/malloc.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/malloc.m4 2014-02-18 19:02:48.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/malloc.m4 2014-06-14 12:11:07.082600000 +0400 +@@ -30,7 +30,7 @@ + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ | hpux* | solaris* | cygwin* | msys* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/printf.m4 man-db-2.6.7.1/gnulib/m4/printf.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/printf.m4 2014-02-18 19:02:48.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/printf.m4 2014-06-14 12:11:32.448200000 +0400 +@@ -735,7 +735,7 @@ + openbsd*) gl_cv_func_printf_directive_ls="guessing no";; + irix*) gl_cv_func_printf_directive_ls="guessing no";; + solaris*) gl_cv_func_printf_directive_ls="guessing no";; +- cygwin*) gl_cv_func_printf_directive_ls="guessing no";; ++ cygwin* | msys*) gl_cv_func_printf_directive_ls="guessing no";; + beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; + *) gl_cv_func_printf_directive_ls="guessing yes";; + esac +@@ -812,7 +812,7 @@ + [ + changequote(,)dnl + case "$host_os" in +- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; ++ cygwin* | msys*) gl_cv_func_printf_flag_grouping="guessing no";; + netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; + mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; + *) gl_cv_func_printf_flag_grouping="guessing yes";; +@@ -1464,7 +1464,7 @@ + darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on Cygwin. +- cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; ++ cygwin* | msys*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_vsnprintf_zerosize_c99="guessing no";; +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/realloc.m4 man-db-2.6.7.1/gnulib/m4/realloc.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/realloc.m4 2014-02-18 19:02:48.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/realloc.m4 2014-06-14 12:11:41.823800000 +0400 +@@ -30,7 +30,7 @@ + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ | hpux* | solaris* | cygwin* | msys* | mingw*) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; +diff -Naur man-db-2.6.7.1-orig/gnulib/m4/threadlib.m4 man-db-2.6.7.1/gnulib/m4/threadlib.m4 +--- man-db-2.6.7.1-orig/gnulib/m4/threadlib.m4 2014-02-18 19:02:49.000000000 +0400 ++++ man-db-2.6.7.1/gnulib/m4/threadlib.m4 2014-06-14 12:12:04.818200000 +0400 +@@ -68,7 +68,7 @@ + dnl bugs that lead to endless loops or crashes. See + dnl . + osf*) gl_use_threads=no ;; +- cygwin*) ++ cygwin* | msys*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; diff --git a/man-db/man-db-2.6.7.1-noundefined.patch b/man-db/man-db-2.6.7.1-noundefined.patch new file mode 100644 index 00000000..4f0933ea --- /dev/null +++ b/man-db/man-db-2.6.7.1-noundefined.patch @@ -0,0 +1,17 @@ +--- man-db-2.6.7.1-orig/libdb/Makefile.am 2013-12-09 04:43:01.000000000 +0400 ++++ man-db-2.6.7.1/libdb/Makefile.am 2014-06-14 12:21:58.440600000 +0400 +@@ -43,4 +43,4 @@ + + libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS) + +-libmandb_la_LDFLAGS = -avoid-version -release $(VERSION) -rpath $(pkglibdir) ++libmandb_la_LDFLAGS = -avoid-version -no-undefined -release $(VERSION) -rpath $(pkglibdir) +--- man-db-2.6.7.1-orig/lib/Makefile.am 2013-12-09 04:43:01.000000000 +0400 ++++ man-db-2.6.7.1/lib/Makefile.am 2014-06-14 12:24:38.687800000 +0400 +@@ -61,5 +61,5 @@ + $(LIBCOMPRESS) @LTLIBINTL@ + + libman_la_LDFLAGS = \ +- -avoid-version -release $(VERSION) -rpath $(pkglibdir) \ ++ -avoid-version -no-undefined -release $(VERSION) -rpath $(pkglibdir) \ + $(libpipeline_LIBS) diff --git a/man-db/man-db.install b/man-db/man-db.install new file mode 100644 index 00000000..a55a553e --- /dev/null +++ b/man-db/man-db.install @@ -0,0 +1,17 @@ +post_install() { + echo "it's recommended to create an initial" + echo "database running as root:" + echo "\"/usr/bin/mandb --quiet\"" +} + +post_upgrade() { + # force database rebuild to get rid off badly imported pages + if [ "`vercmp $2 2.6.0.2`" -lt 0 ]; then + echo "(re)building database..." + mandb -c --quiet + fi +} + +post_remove() { + rm -rf /var/cache/man +}