| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| ... | ... | |
| 11 |
11 |
|
| 12 |
12 |
DESCRIPTION="unzipper for pkzip-compressed files"
|
| 13 |
13 |
HOMEPAGE="https://infozip.sourceforge.net/UnZip.html"
|
| 14 |
|
SRC_URI="https://downloads.sourceforge.net/infozip/${MY_P}.tar.gz
|
| 15 |
|
mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
|
|
14 |
SRC_URI="
|
|
15 |
https://downloads.sourceforge.net/infozip/${MY_P}.tar.gz
|
|
16 |
mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz
|
|
17 |
"
|
|
18 |
S="${WORKDIR}/${MY_P}"
|
| 16 |
19 |
|
| 17 |
20 |
LICENSE="Info-ZIP"
|
| 18 |
21 |
SLOT="0"
|
| 19 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
|
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
| 20 |
23 |
IUSE="bzip2 natspec unicode"
|
| 21 |
24 |
|
| 22 |
|
DEPEND="bzip2? ( app-arch/bzip2 )
|
| 23 |
|
natspec? ( dev-libs/libnatspec )"
|
|
25 |
DEPEND="
|
|
26 |
bzip2? ( app-arch/bzip2 )
|
|
27 |
natspec? ( dev-libs/libnatspec )
|
|
28 |
"
|
| 24 |
29 |
RDEPEND="${DEPEND}"
|
| 25 |
30 |
|
| 26 |
|
S="${WORKDIR}/${MY_P}"
|
| 27 |
|
|
| 28 |
31 |
PATCHES=(
|
| 29 |
32 |
"${WORKDIR}"/debian/patches
|
| 30 |
33 |
"${FILESDIR}"/${PN}-6.0-no-exec-stack.patch
|
| 31 |
34 |
"${FILESDIR}"/${PN}-6.0-format-security.patch
|
| 32 |
35 |
"${FILESDIR}"/${PN}-6.0-fix-false-overlap-detection-on-32bit-systems.patch
|
|
36 |
"${FILESDIR}"/${PN}-6.0-c99-configure.patch
|
| 33 |
37 |
)
|
| 34 |
38 |
|
| 35 |
39 |
src_prepare() {
|
| ... | ... | |
| 40 |
44 |
|
| 41 |
45 |
default
|
| 42 |
46 |
|
|
47 |
sed -i \
|
|
48 |
-e 's:LFLAGS2="-s":LFLAGS2=:' \
|
|
49 |
unix/configure || die
|
| 43 |
50 |
sed -i -r \
|
| 44 |
51 |
-e '/^CFLAGS/d' \
|
| 45 |
52 |
-e '/CFLAGS/s:-O[0-9]?:$(CFLAGS) $(CPPFLAGS):' \
|
| ... | ... | |
| 66 |
73 |
*linux*) TARGET="linux_noasm" ;;
|
| 67 |
74 |
*-darwin*) TARGET="macosx" ;;
|
| 68 |
75 |
*-solaris*) TARGET="linux_noasm" ;;
|
|
76 |
*-gnu) TARGET="generic" ;;
|
|
77 |
# generic may work but there may be a better-suited target
|
|
78 |
# so we should get people to check.
|
| 69 |
79 |
*) die "Unknown target; please update the ebuild to handle ${CHOST}" ;;
|
| 70 |
80 |
esac
|
| 71 |
81 |
|
| 72 |
|
# Needed for Clang 16
|
| 73 |
|
append-flags -std=gnu89
|
| 74 |
|
|
| 75 |
82 |
[[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD
|
| 76 |
83 |
[[ ${CHOST} == *-solaris* ]] && append-cppflags -DNO_LCHMOD -DBSD4_4
|
| 77 |
84 |
use bzip2 && append-cppflags -DUSE_BZIP2
|