summaryrefslogtreecommitdiff
path: root/packages/sys-apps/man/man-1.6g-r3.exheres-0
blob: cf75bb86445acdb053a9f7afd3fc3b7b03a1a4d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 2007 Bryan Østergaard <kloeri@exherbo.org>
# Distributed under the terms of the GNU General Public License v2

require alternatives

SUMMARY="Man page reader"
HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
DOWNLOADS="http://primates.ximian.com/~flucifredi/${PN}/${PNV}.tar.gz"

LICENCES="GPL-2"
SLOT="0"
PLATFORMS="~amd64 ~arm ~armv7 ~armv8 ~x86"
MYOPTIONS=""

DEPENDENCIES="
    run:
        sys-apps/groff[>=1.19.2]
"

DEFAULT_SRC_PREPARE_PATCHES=(
    "${FILES}"/${PN}-1.6f-unicode.patch
    "${FILES}"/${PN}-1.6g-fix-install-location-of-man2html.patch
)

src_configure() {
    local build=$(exhost --build)
    local build_cflags_var=${build//-/_}_CFLAGS

    edo env                                       \
        BUILD_CC="$(exhost --build)-cc ${!build_cflags_var}" \
        DEFS="-I/usr/$(exhost --target)/include"  \
    "${WORK}/configure"                           \
            -default                              \
            -prefix=/usr/$(exhost --target)       \
            -sbindir=/usr/$(exhost --target)/bin  \
            -mandir=/usr/share/man                \
            -confdir=/etc                         \
            -compatibility_mode_for_colored_groff
    # Redcore Linux : adjust conf_script to -Wp,-D_FORTIFY_SOURCE=2
    edo sed -e "s/\,/\?/g" -e "s/"Wp?"/"Wp,"/g" conf_script
}

src_install() {
    default
    alternatives_for man ${PN} 1000 \
        /usr/$(exhost --target)/bin/apropos     ${PN}.apropos       \
        /usr/$(exhost --target)/bin/man         ${PN}.man           \
        /usr/$(exhost --target)/bin/makewhatis  ${PN}.makewhatis    \
        /usr/$(exhost --target)/bin/whatis      ${PN}.whatis        \
        /usr/share/man/man1/apropos.1           ${PN}.apropos.1     \
        /usr/share/man/man1/man.1               ${PN}.man.1         \
        /usr/share/man/man1/whatis.1            ${PN}.whatis.1      \
        /usr/share/man/man8/makewhatis.8        ${PN}.makewhatis.8

}