10 |
10 |
LICENSE="GPL-2"
|
11 |
11 |
# Use Gentoo versioning for slotting.
|
12 |
12 |
SLOT="${PV:0:4}"
|
13 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos"
|
|
13 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos"
|
14 |
14 |
IUSE="test"
|
15 |
15 |
RESTRICT="test !test? ( test )"
|
16 |
16 |
|
... | ... | |
44 |
44 |
}
|
45 |
45 |
|
46 |
46 |
src_compile() {
|
47 |
|
default
|
|
47 |
# Also used in install.
|
|
48 |
MY_INFODIR="${EPREFIX}/usr/share/automake-${PV}/info"
|
|
49 |
econf --infodir="${MY_INFODIR}"
|
48 |
50 |
|
49 |
51 |
local x
|
50 |
52 |
for x in aclocal automake; do
|
... | ... | |
52 |
54 |
done
|
53 |
55 |
}
|
54 |
56 |
|
55 |
|
# slot the info pages. do this w/out munging the source so we don't have
|
56 |
|
# to depend on texinfo to regen things. #464146 (among others)
|
57 |
|
slot_info_pages() {
|
58 |
|
pushd "${ED}"/usr/share/info >/dev/null || die
|
59 |
|
rm -f dir || die
|
60 |
|
|
61 |
|
# Rewrite all the references to other pages.
|
62 |
|
# before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
|
63 |
|
# after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
|
64 |
|
local p pages=( *.info ) args=()
|
65 |
|
for p in "${pages[@]/%.info}" ; do
|
66 |
|
args+=(
|
67 |
|
-e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
|
68 |
|
-e "s:(${p}):(${p}-${SLOT}):g"
|
69 |
|
)
|
70 |
|
done
|
71 |
|
sed -i "${args[@]}" * || die
|
72 |
|
|
73 |
|
# Rewrite all the file references, and rename them in the process.
|
74 |
|
local f d
|
75 |
|
for f in * ; do
|
76 |
|
d=${f/.info/-${SLOT}.info}
|
77 |
|
mv "${f}" "${d}" || die
|
78 |
|
sed -i -e "s:${f}:${d}:g" * || die
|
79 |
|
done
|
80 |
|
|
81 |
|
popd >/dev/null || die
|
82 |
|
}
|
83 |
|
|
84 |
57 |
src_install() {
|
85 |
58 |
default
|
86 |
|
slot_info_pages
|
87 |
59 |
|
88 |
60 |
rm \
|
89 |
61 |
"${ED}"/usr/bin/{aclocal,automake} \
|
... | ... | |
102 |
74 |
if [[ -f "${tarfile}" ]] ; then
|
103 |
75 |
gunzip "${tarfile}" || die
|
104 |
76 |
fi
|
|
77 |
|
|
78 |
pushd "${D}/${MY_INFODIR}" >/dev/null || die
|
|
79 |
for f in *.info*; do
|
|
80 |
# Install convenience aliases for versioned Automake pages.
|
|
81 |
ln -s "$f" "${f/./-${PV}.}" || die
|
|
82 |
done
|
|
83 |
popd >/dev/null || die
|
|
84 |
|
|
85 |
local major="$(ver_cut 1)"
|
|
86 |
local minor="$(ver_cut 2)"
|
|
87 |
local idx="$((99999-(major*1000+minor)))"
|
|
88 |
newenvd - "06automake${idx}" <<-EOF
|
|
89 |
INFOPATH="${MY_INFODIR}"
|
|
90 |
EOF
|
105 |
91 |
}
|