summaryrefslogtreecommitdiff
blob: 02eecd472933e45941abcf775f043a5bb317201a (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

WX_GTK_VER=3.0

inherit cmake wxwidgets xdg

if [[ ${PV} == *9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI=${EGIT_REPO_URI:-https://github.com/anonbeat/guayadeque}
	EGIT_BRANCH=${EGIT_BRANCH:-master}
else
	SRC_URI="https://github.com/anonbeat/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi

DESCRIPTION="Music management program designed for all music enthusiasts"
HOMEPAGE="https://guayadeque.org/"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="appindicator ipod +minimal"

# No test available, Making src_test fail
RESTRICT="test"

GST_DEPS="
	media-plugins/gst-plugins-libav:1.0
	media-plugins/gst-plugins-libnice:1.0
	media-plugins/gst-plugins-pulse:1.0
	media-plugins/gst-plugins-soup:1.0
	media-libs/gst-plugins-bad:1.0
	media-libs/gst-plugins-ugly:1.0
"
BDEPEND="
	sys-devel/gettext
	virtual/pkgconfig
"
RDEPEND="
	dev-db/sqlite:3
	dev-db/wxsqlite3
	dev-libs/glib:2
	media-libs/flac
	media-libs/gst-plugins-base:1.0
	media-libs/gst-plugins-good:1.0
	media-libs/gstreamer:1.0
	media-libs/taglib
	net-misc/curl
	sys-apps/dbus
	x11-libs/wxGTK:${WX_GTK_VER}[X]
	appindicator? ( >=dev-libs/libindicate-0.7 )
	ipod? ( media-libs/libgpod )
	!minimal? ( ${GST_DEPS} )"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}/${PN}-0.4.5_p20170110-missing-aui-component.patch"
	"${FILESDIR}/${P}-gcc10.patch"
	"${FILESDIR}/${P}-metadata.patch"
)

# echo $(cat po/CMakeLists.txt | grep ADD_SUBDIRECTORY | sed 's#ADD_SUBDIRECTORY( \(\w\+\) )#\1#')
LANGS=( bg ca_ES cs de el es fr hr hu is it ja nb nl pl pt pt_BR ru sk sr sr@latin sv th tr uk )

pkg_setup() {
	setup-wxwidgets
}

src_prepare() {
	cmake_src_prepare

	# remove bundled libs
	rm -rf src/wx/wxsql* src/wxsqlite3 || die

	# comment out unused languages
	cd po || die
	local l
	for l in "${LANGS[@]}"; do
		! has ${l} ${LINGUAS-${l}} && cmake_comment_add_subdirectory ${l}
	done
}

src_configure() {
	local mycmakeargs=(
		-DENABLE_IPOD=$(usex ipod)
		-DENABLE_LIBINDICATE=$(usex appindicator)
	)
	cmake_src_configure
}

pkg_postinst() {
	if use minimal; then
		elog "If you are missing functionalities consider setting USE=-minimal"
		elog "or install any of the following packages:"

		local pkg
		for pkg in ${GST_DEPS}; do
			elog "\t ${pkg}"
		done
	fi

	xdg_desktop_database_update
}