Diff gsm-1.0.13-r1 with a gsm-1.0.22_p1

/usr/portage/media-sound/gsm/gsm-1.0.22_p1.ebuild 2023-10-09 14:52:31.776368408 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
inherit flag-o-matic multilib-minimal toolchain-funcs
7 7

  
8 8
DESCRIPTION="Lossy speech compression library and tool"
9 9
HOMEPAGE="https://packages.qa.debian.org/libg/libgsm.html"
10
SRC_URI="mirror://gentoo/${P}.tar.gz"
10
SRC_URI="
11
	https://www.quut.com/gsm/${PN}-$(ver_cut 1-3).tar.gz
12
	mirror://debian/pool/main/libg/lib${PN}/lib${PN}_${PV/_p/-}.debian.tar.xz
13
"
14
S="${WORKDIR}/${PN}-$(ver_cut 1-2)-pl$(ver_cut 3)"
11 15

  
12 16
LICENSE="gsm"
13 17
SLOT="0"
14 18
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
15 19

  
16
S="${WORKDIR}/${PN}-$(ver_rs 2 '-pl' )"
17

  
18 20
PATCHES=(
19
	"${FILESDIR}"/${P}-shared.patch
20 21
	"${FILESDIR}"/${PN}-1.0.12-memcpy.patch
21 22
	"${FILESDIR}"/${PN}-1.0.12-64bit.patch
23
	"${WORKDIR}"/debian/patches
24
	"${FILESDIR}"/${PN}-1.0.22-makefile.patch
22 25
)
23 26

  
24 27
DOCS=( ChangeLog MACHINES MANIFEST README )
25 28

  
26 29
src_prepare() {
30
	# Use Fedora's instead as it handles install perms (bug #554358)
31
	rm "${WORKDIR}"/debian/patches/01_makefile.patch || die
32

  
27 33
	default
34

  
28 35
	sed -e 's/\$(GSM_INSTALL_LIB)\/libgsm.a	//g' -i Makefile || die
29 36

  
30 37
	multilib_copy_sources
......
37 44
}
38 45

  
39 46
multilib_src_compile() {
40
	emake -j1 CCFLAGS="${CFLAGS} -c -DNeedFunctionPrototypes=1" \
47
	emake -j1 CCFLAGS="${CFLAGS} -c -DNeedFunctionPrototypes=1 -fPIC" \
41 48
		LD="$(tc-getCC)" AR="$(tc-getAR)" CC="$(tc-getCC)" RANLIB="$(tc-getRANLIB)"
42 49
}
43 50

  
......
52 59
		TOAST_INSTALL_MAN="${ED}"/usr/share/man/man1 \
53 60
		install
54 61

  
55
	dolib.so lib/libgsm.so*
56

  
57 62
	dosym ../gsm/gsm.h /usr/include/libgsm/gsm.h
58 63
}
Thank you!