Diff arj-3.10.22-r8 with a arj-3.10.22_p28

/usr/portage/app-arch/arj/arj-3.10.22_p28.ebuild 2025-02-03 17:39:32.278664957 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit autotools toolchain-funcs
6
inherit autotools flag-o-matic toolchain-funcs
7 7

  
8
PATCH_LEVEL=15
9
MY_P="${PN}_${PV}"
8
MY_PV="${PV%%_p*}"
9
PATCH_LEVEL="${PV##*_p}"
10 10

  
11 11
DESCRIPTION="Utility for opening arj archives"
12 12
HOMEPAGE="https://arj.sourceforge.net/"
13 13
SRC_URI="
14
	mirror://debian/pool/main/a/arj/${MY_P}.orig.tar.gz
15
	mirror://debian/pool/main/a/arj/${MY_P}-${PATCH_LEVEL}.debian.tar.xz"
14
	mirror://debian/pool/main/a/arj/arj_${MY_PV}.orig.tar.gz
15
	mirror://debian/pool/main/a/arj/arj_${MY_PV}-${PATCH_LEVEL}.debian.tar.xz"
16
S="${WORKDIR}/${PN}-${MY_PV}"
16 17

  
17 18
LICENSE="GPL-2"
18 19
SLOT="0"
19
KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
20
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
20 21

  
21 22
PATCHES=(
22
	"${FILESDIR}/${P}-implicit-declarations.patch"
23
	"${FILESDIR}/${P}-glibc2.10.patch"
24
	"${WORKDIR}"/debian/patches/
25
	"${FILESDIR}/${P}-darwin.patch"
23
	# get order of patches from series file. otherwise the order is wrong :/
24
	"${WORKDIR}"/debian/patches/001_arches_align.patch
25
	"${WORKDIR}"/debian/patches/002_no_remove_static_const.patch
26
	"${WORKDIR}"/debian/patches/003_64_bit_clean.patch
27
	"${WORKDIR}"/debian/patches/004_parallel_build.patch
28
	"${WORKDIR}"/debian/patches/005_use_system_strnlen.patch
29
	"${WORKDIR}"/debian/patches/006_use_safe_strcpy.patch
30
	"${WORKDIR}"/debian/patches/hurd_no_fcntl_getlk.patch
31
	"${WORKDIR}"/debian/patches/security_format.patch
32
	"${WORKDIR}"/debian/patches/doc_refer_robert_k_jung.patch
33
	"${WORKDIR}"/debian/patches/gnu_build_fix.patch
34
	"${WORKDIR}"/debian/patches/gnu_build_flags.patch
35
	"${WORKDIR}"/debian/patches/gnu_build_strip.patch
36
	"${WORKDIR}"/debian/patches/gnu_build_pie.patch
37
	"${WORKDIR}"/debian/patches/self_integrity_64bit.patch
38
	"${WORKDIR}"/debian/patches/security-afl.patch
39
	"${WORKDIR}"/debian/patches/security-traversal-dir.patch
40
	"${WORKDIR}"/debian/patches/security-traversal-symlink.patch
41
	"${WORKDIR}"/debian/patches/out-of-bounds-read.patch
42
	"${WORKDIR}"/debian/patches/remove_build_date.patch
43
	"${WORKDIR}"/debian/patches/reproducible_help_archive.patch
44
	"${WORKDIR}"/debian/patches/gnu_build_cross.patch
45
	"${WORKDIR}"/debian/patches/fix-time_t-usage.patch
46
	"${WORKDIR}"/debian/patches/gnu_build_fix_autoreconf.patch
47
	"${WORKDIR}"/debian/patches/fix-implicit-func.patch
48
	"${FILESDIR}"/arj-3.10.22-implicit-declarations.patch
49
	"${FILESDIR}"/arj-3.10.22-darwin.patch
26 50
)
27 51

  
28 52
DOCS=( doc/compile.txt doc/debug.txt doc/glossary.txt doc/rev_hist.txt doc/xlation.txt )
29 53

  
30 54
src_prepare() {
31 55
	default
56

  
32 57
	cd gnu || die 'failed to change to the "gnu" directory'
33 58
	echo -n "" > stripgcc.lnk || die "failed to disable stripgcc.lnk"
34 59

  
......
36 61
}
37 62

  
38 63
src_configure() {
39
	cd gnu || die 'failed to change to the "gnu" directory'
64
	# Needed for keeping intergrity_identifier around so that postproc can find it later
65
	# GCC defaults to enabling it, Clang doesn't.
66
	# bug #509700
67
	append-cflags -fkeep-static-consts
68

  
69
	# Debian patches assume this is set. Can be updated with "date +%s"
70
	export SOURCE_DATE_EPOCH="1737318540"
71

  
40 72
	tc-export CC # Uses autoconf but not automake.
73
	export CC_FOR_BUILD="$(tc-getBUILD_CC)"
74

  
75
	if tc-is-cross-compiler; then
76
		export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
77
	else
78
		export CFLAGS_FOR_BUILD="${CFLAGS}"
79
	fi
80

  
81
	cd gnu || die 'failed to change to the "gnu" directory'
41 82
	econf
42 83
}
84

  
85
src_test() {
86
	# debian includes a test script. why not use it?
87
	local -x AUTOPKGTEST_TMP="${T}/debian-test"
88

  
89
	local -x PATH="${S}/linux-gnu/en/rs/arj/:${PATH}"
90

  
91
	"${WORKDIR}"/debian/tests/test-command || die
92
}
Thank you!