blob: 14b824ccaf3950c232e00329f785f806d907b160 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools edo flag-o-matic toolchain-funcs
MY_PV="${PV%%_p*}"
PATCH_LEVEL="${PV##*_p}"
DESCRIPTION="Utility for opening arj archives"
HOMEPAGE="https://arj.sourceforge.net/"
SRC_URI="
mirror://debian/pool/main/a/arj/arj_${MY_PV}.orig.tar.gz
mirror://debian/pool/main/a/arj/arj_${MY_PV}-${PATCH_LEVEL}.debian.tar.xz"
S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 ~sparc x86"
DOCS=( doc/compile.txt doc/debug.txt doc/glossary.txt doc/rev_hist.txt doc/xlation.txt )
src_prepare() {
PATCHES=(
$(sed -e 's:^:../debian/patches/:' "${WORKDIR}"/debian/patches/series || die)
"${FILESDIR}"/arj-3.10.22-implicit-declarations.patch
"${FILESDIR}"/arj-3.10.22-darwin.patch
"${FILESDIR}"/arj-3.10.22-aligned-pointers.patch
)
default
cd gnu || die 'failed to change to the "gnu" directory'
echo -n "" > stripgcc.lnk || die "failed to disable stripgcc.lnk"
# Fix typo in configure in a (non-)comment line
sed -i -e '/^dns Unconditionally align pointers$/s:dns:dnl:' configure.in || die
eautoreconf
}
src_configure() {
# Needed for keeping intergrity_identifier around so that postproc can find it later
# GCC defaults to enabling it, Clang doesn't.
# bug #509700
append-cflags -fkeep-static-consts
# Debian patches assume this is set. Can be updated with "date +%s"
export SOURCE_DATE_EPOCH="1737318540"
tc-export CC # Uses autoconf but not automake.
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
else
export CFLAGS_FOR_BUILD="${CFLAGS}"
fi
cd gnu || die 'failed to change to the "gnu" directory'
econf
}
src_test() {
# debian includes a test script. why not use it?
local -x AUTOPKGTEST_TMP="${T}/debian-test"
local -x PATH="${S}/linux-gnu/en/rs/arj/:${PATH}"
edo "${WORKDIR}"/debian/tests/test-command
}
|