commit:     cee69b8f71b0bde09a4e74e9a8190c69feb80289
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  5 14:08:33 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Feb  5 14:08:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cee69b8f

sys-apps/man-db-2.9.3-r2: revbump for Prefix

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../files/man-db-2.9.3-darwin-libdb-intl.patch     | 28 +++++++++++++
 .../{man-db-9999.ebuild => man-db-2.9.3-r2.ebuild} | 49 +++++++++++++++++++---
 sys-apps/man-db/man-db-9999.ebuild                 | 42 ++++++++++++++++++-
 3 files changed, 112 insertions(+), 7 deletions(-)

diff --git a/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch 
b/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch
new file mode 100644
index 00000000000..a7df3c62fd0
--- /dev/null
+++ b/sys-apps/man-db/files/man-db-2.9.3-darwin-libdb-intl.patch
@@ -0,0 +1,28 @@
+libdb: link against libintl
+
+necessary since gettext is used for translations
+
+Signed-off-by: Fabian Groffen <grob...@gentoo.org>
+
+--- a/libdb/Makefile.am
++++ b/libdb/Makefile.am
+@@ -43,7 +43,7 @@
+       db_xdbm.h \
+       mydbm.h
+ 
+-libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS)
++libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS) $(LIBINTL)
+ 
+ libmandb_la_LDFLAGS = \
+       -avoid-version -release $(VERSION) -rpath $(pkglibdir) -no-undefined
+--- a/libdb/Makefile.in
++++ b/libdb/Makefile.in
+@@ -1541,7 +1541,7 @@
+       db_xdbm.h \
+       mydbm.h
+ 
+-libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS)
++libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS) $(LIBINTL)
+ libmandb_la_LDFLAGS = \
+       -avoid-version -release $(VERSION) -rpath $(pkglibdir) -no-undefined
+ 

diff --git a/sys-apps/man-db/man-db-9999.ebuild 
b/sys-apps/man-db/man-db-2.9.3-r2.ebuild
similarity index 73%
copy from sys-apps/man-db/man-db-9999.ebuild
copy to sys-apps/man-db/man-db-2.9.3-r2.ebuild
index cf3711365b0..fc6eaf54888 100644
--- a/sys-apps/man-db/man-db-9999.ebuild
+++ b/sys-apps/man-db/man-db-2.9.3-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit systemd
+inherit systemd prefix
 
 DESCRIPTION="a man replacement that utilizes berkdb instead of flat files"
 HOMEPAGE="http://www.nongnu.org/man-db/";
@@ -12,7 +12,7 @@ if [[ "${PV}" = 9999* ]] ; then
        EGIT_REPO_URI="https://git.savannah.gnu.org/git/man-db.git";
 else
        SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 
 LICENSE="GPL-3"
@@ -36,6 +36,8 @@ BDEPEND="
        nls? (
                >=app-text/po4a-0.45
                sys-devel/gettext
+               virtual/libiconv
+               virtual/libintl
        )
 "
 RDEPEND="
@@ -47,7 +49,9 @@ RDEPEND="
 PDEPEND="manpager? ( app-text/manpager )"
 
 PATCHES=(
-       "${FILESDIR}"/man-db-2.9.3-sandbox-env-tests.patch
+       "${FILESDIR}"/${PN}-2.9.3-sandbox-env-tests.patch
+       "${FILESDIR}"/man-db-2.9.3-clock_gettime64.patch
+       "${FILESDIR}"/man-db-2.9.3-darwin-libdb-intl.patch
 )
 
 pkg_setup() {
@@ -84,21 +88,56 @@ src_prepare() {
 
                eautoreconf
        fi
+
+       hprefixify src/man_db.conf.in
+       if use prefix ; then
+               {
+                       echo "#"
+                       echo "# Added settings for Gentoo Prefix"
+                       [[ ${CHOST} == *-darwin* ]] && \
+                               echo "MANDATORY_MANPATH 
${EPREFIX}/MacOSX.sdk/usr/share/man"
+                       echo "MANDATORY_MANPATH /usr/share/man"
+               } >> src/man_db.conf.in
+       fi
 }
 
 src_configure() {
+       # set sections we want to search by default
+       local sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
+       sections+=" 1x 2x 3x 4x 5x 6x 7x 8x"
+       case ${CHOST} in
+               *-solaris*)
+                       # Solaris tends to use sections named after the pkgs 
that
+                       # owns them, in particular for libc functions we want 
those
+                       # sections
+                       local s
+                       for s in $(cd /usr/share/man/ && echo man*) ; do
+                               s=${s#man}
+                               [[ " ${sections} " != *" ${s} "* ]] && 
sections+=" ${s}"
+                       done
+                       ;;
+       esac
+
        export ac_cv_lib_z_gzopen=$(usex zlib)
        local myeconfargs=(
                --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
                --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
                --disable-setuid #662438
                --enable-cache-owner=man
-               --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 1x 2x 
3x 4x 5x 6x 7x 8x"
+               --with-sections="${sections}"
                $(use_enable nls)
                $(use_enable static-libs static)
                $(use_with seccomp libseccomp)
                --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm))
        )
+       case ${CHOST} in
+               *-solaris*|*-darwin*)
+                       myeconfargs+=(
+                               $(use_with nls libiconv-prefix ${EPREFIX}/usr)
+                               $(use_with nls libintl-prefix ${EPREFIX}/usr)
+                       )
+                       ;;
+       esac
        econf "${myeconfargs[@]}"
 
        # Disable color output from groff so that the manpager can add it. 
#184604

diff --git a/sys-apps/man-db/man-db-9999.ebuild 
b/sys-apps/man-db/man-db-9999.ebuild
index cf3711365b0..fd450d16d1a 100644
--- a/sys-apps/man-db/man-db-9999.ebuild
+++ b/sys-apps/man-db/man-db-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -36,6 +36,8 @@ BDEPEND="
        nls? (
                >=app-text/po4a-0.45
                sys-devel/gettext
+               virtual/libiconv
+               virtual/libintl
        )
 "
 RDEPEND="
@@ -48,6 +50,7 @@ PDEPEND="manpager? ( app-text/manpager )"
 
 PATCHES=(
        "${FILESDIR}"/man-db-2.9.3-sandbox-env-tests.patch
+       "${FILESDIR}"/man-db-2.9.3-darwin-libdb-intl.patch
 )
 
 pkg_setup() {
@@ -84,21 +87,56 @@ src_prepare() {
 
                eautoreconf
        fi
+
+       hprefixify src/man_db.conf.in
+       if use prefix ; then
+               {
+                       echo "#"
+                       echo "# Added settings for Gentoo Prefix"
+                       [[ ${CHOST} == *-darwin* ]] && \
+                               echo "MANDATORY_MANPATH 
${EPREFIX}/MacOSX.sdk/usr/share/man"
+                       echo "MANDATORY_MANPATH /usr/share/man"
+               } >> src/man_db.conf.in
+       fi
 }
 
 src_configure() {
+       # set sections we want to search by default
+       local sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
+       sections+=" 1x 2x 3x 4x 5x 6x 7x 8x"
+       case ${CHOST} in
+               *-solaris*)
+                       # Solaris tends to use sections named after the pkgs 
that
+                       # owns them, in particular for libc functions we want 
those
+                       # sections
+                       local s
+                       for s in $(cd /usr/share/man/ && echo man*) ; do
+                               s=${s#man}
+                               [[ " ${sections} " != *" ${s} "* ]] && 
sections+=" ${s}"
+                       done
+                       ;;
+       esac
+
        export ac_cv_lib_z_gzopen=$(usex zlib)
        local myeconfargs=(
                --with-systemdtmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
                --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
                --disable-setuid #662438
                --enable-cache-owner=man
-               --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 1x 2x 
3x 4x 5x 6x 7x 8x"
+               --with-sections="${sections}"
                $(use_enable nls)
                $(use_enable static-libs static)
                $(use_with seccomp libseccomp)
                --with-db=$(usex gdbm gdbm $(usex berkdb db gdbm))
        )
+       case ${CHOST} in
+               *-solaris*|*-darwin*)
+                       myeconfargs+=(
+                               $(use_with nls libiconv-prefix ${EPREFIX}/usr)
+                               $(use_with nls libintl-prefix ${EPREFIX}/usr)
+                       )
+                       ;;
+       esac
        econf "${myeconfargs[@]}"
 
        # Disable color output from groff so that the manpager can add it. 
#184604

Reply via email to