Diff dumb-0.9.3-r3 with a dumb-2.0.3

/usr/portage/media-libs/dumb/dumb-2.0.3.ebuild 2021-01-24 15:39:00.000000000 +0300
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5

  
6
inherit toolchain-funcs multilib-build multilib-minimal
6
CMAKE_ECLASS=cmake
7
inherit cmake-multilib
7 8

  
8
DESCRIPTION="IT/XM/S3M/MOD player library with click removal and IT filters"
9
HOMEPAGE="http://dumb.sourceforge.net/"
10
SRC_URI="mirror://sourceforge/dumb/${P}.tar.gz"
9
DESCRIPTION="Module/tracker based music format parser and player library"
10
HOMEPAGE="https://github.com/kode54/dumb"
11
SRC_URI="https://github.com/kode54/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11 12

  
12 13
LICENSE="DUMB-0.9.3"
13
SLOT="0"
14
KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86"
15
IUSE="debug"
16

  
17
RDEPEND=""
18
DEPEND=""
14
SLOT="0/2"
15
KEYWORDS="~alpha amd64 ~arm64 ~ia64 ppc ppc64 sparc x86"
16
IUSE="allegro cpu_flags_x86_sse examples"
17

  
18
RDEPEND="
19
	allegro? (
20
		media-libs/allegro:0[${MULTILIB_USEDEP}]
21
		!media-libs/aldumb
22
	)
23
	examples? (
24
		>=dev-libs/argtable-2
25
		media-libs/libsdl2[sound]
26
	)
27
"
28

  
29
DEPEND="
30
	${RDEPEND}
31
"
19 32

  
20 33
PATCHES=(
21
	"${FILESDIR}"/${P}-PIC-as-needed.patch
22
	"${FILESDIR}"/${P}_CVE-2006-3668.patch
34
	"${FILESDIR}"/${P}-pkg-config.patch
23 35
)
24 36

  
25
src_prepare() {
26
	default
27

  
28
	cat << EOF > make/config.txt
29
include make/unix.inc
30
ALL_TARGETS := core core-examples core-headers
31
PREFIX := /usr
32
EOF
33

  
34
	sed -i '/= -s/d' Makefile || die "sed failed"
35
	cp -f Makefile Makefile.rdy
36

  
37
	multilib_copy_sources
38
}
39

  
40
multilib_src_compile() {
41
	emake CC="$(tc-getCC)" OFLAGS="${CFLAGS}" all
42
}
43

  
44
multilib_src_install() {
45
	dolib.so lib/unix/libdumb.so
46
	use debug && dolib.so lib/unix/libdumbd.so
47

  
48
	doheader include/dumb.h
49

  
50
	dobin examples/{dumbout,dumb2wav}
51
	dodoc readme.txt release.txt docs/*
52
}
37
DOCS=(
38
	CHANGELOG.md
39
	DUMBFILE_SYSTEM.md
40
	README.md
41
	UPDATING_YOUR_PROJECTS.md
42
)
53 43

  
54
pkg_postinst() {
55
	elog "DUMB's core has been installed. This will enable you to convert module"
56
	elog "files to PCM data (ready for sending to /dev/dsp, writing to a .wav"
57
	elog "file, piping through oggenc, etc.)."
58
	elog
59
	elog "If you are using Allegro, you will also want to 'emerge aldumb'. This"
60
	elog "provides you with a convenient API for playing module files through"
61
	elog "Allegro's sound system, and also enables DUMB to integrate with"
62
	elog "Allegro's datafile system so you can add modules to datafiles."
63
	elog
64
	elog "As a developer, when you distribute your game and write your docs, be"
65
	elog "aware that 'dumb' and 'aldumb' actually come from the same download."
66
	elog "People who don't use Gentoo will only have to download and install one"
67
	elog "package. See readme.txt in /usr/share/doc/${PF} for details on"
68
	elog "how DUMB would be compiled manually."
44
multilib_src_configure() {
45
	local mycmakeargs=(
46
		-DBUILD_ALLEGRO4=$(usex allegro)
47
		-DBUILD_EXAMPLES=$(multilib_native_usex examples)
48
		-DUSE_SSE=$(usex cpu_flags_x86_sse)
49
	)
50
	cmake_src_configure
69 51
}
Thank you!