Diff transmission-3.00-r6 with a transmission-4.0.3

/usr/portage/net-p2p/transmission/transmission-4.0.3.ebuild 2023-10-09 14:52:34.744368483 +0300
1 1
# Copyright 2006-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
inherit cmake flag-o-matic systemd xdg-utils
6
inherit cmake flag-o-matic tmpfiles systemd xdg-utils
7 7

  
8 8
if [[ ${PV} == 9999 ]]; then
9 9
	inherit git-r3
10 10
	EGIT_REPO_URI="https://github.com/transmission/transmission"
11 11
else
12
	SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
13
	KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 ~riscv x86"
12
	MY_PV="${PV/_beta/-beta.}"
13
	MY_P="${PN}-${MY_PV}"
14
	S="${WORKDIR}/${MY_P}"
15
	SRC_URI="https://github.com/transmission/transmission/releases/download/${MY_PV}/${MY_P}.tar.xz"
16
	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
14 17
fi
15 18

  
16 19
DESCRIPTION="A fast, easy, and free BitTorrent client"
......
21 24
# MIT is in several libtransmission/ headers
22 25
LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
23 26
SLOT="0"
24
IUSE="appindicator cli debug gtk lightweight nls mbedtls qt5 systemd test"
27
IUSE="appindicator cli debug gtk nls mbedtls qt5 qt6 systemd test"
28
REQUIRED_USE="?? ( qt5 qt6 )"
25 29
RESTRICT="!test? ( test )"
26 30

  
27 31
ACCT_DEPEND="
28 32
	acct-group/transmission
29 33
	acct-user/transmission
30 34
"
31
BDEPEND="${ACCT_DEPEND}
35
BDEPEND="
32 36
	virtual/pkgconfig
33 37
	nls? (
34 38
		gtk? ( sys-devel/gettext )
35
		qt5? ( dev-qt/linguist-tools:5 )
36 39
	)
40
	qt5? ( dev-qt/linguist-tools:5 )
41
	qt6? ( dev-qt/qttools:6[linguist] )
37 42
"
38 43
COMMON_DEPEND="
39
	>=dev-libs/libevent-2.0.10:=
44
	>=dev-libs/libevent-2.1.0:=[threads(+)]
40 45
	!mbedtls? ( dev-libs/openssl:0= )
41 46
	mbedtls? ( net-libs/mbedtls:0= )
42 47
	net-libs/libnatpmp
48
	>=net-libs/libpsl-0.21.1
43 49
	>=net-libs/miniupnpc-1.7:=
44
	>=net-misc/curl-7.16.3[ssl]
50
	>=net-misc/curl-7.28.0[ssl]
45 51
	sys-libs/zlib:=
46 52
	nls? ( virtual/libintl )
47 53
	gtk? (
48
		>=dev-libs/glib-2.32:2
49
		>=x11-libs/gtk+-3.4:3
50
		appindicator? ( >=dev-libs/libappindicator-0.4.30:3 )
54
		>=dev-cpp/gtkmm-3.24.0:3.0
55
		>=dev-cpp/glibmm-2.60.0:2
56
		appindicator? ( dev-libs/libayatana-appindicator )
51 57
	)
52 58
	qt5? (
53 59
		dev-qt/qtcore:5
60
		dev-qt/qtdbus:5
54 61
		dev-qt/qtgui:5
55
		dev-qt/qtwidgets:5
56 62
		dev-qt/qtnetwork:5
57
		dev-qt/qtdbus:5
63
		dev-qt/qtsvg:5
64
		dev-qt/qtwidgets:5
65
	)
66
	qt6? (
67
		dev-qt/qtbase:6[dbus,gui,network,widgets]
68
		dev-qt/qtsvg:6
58 69
	)
59 70
	systemd? ( >=sys-apps/systemd-209:= )
60 71
"
......
65 76
	${ACCT_DEPEND}
66 77
"
67 78

  
68
PATCHES=(
69
	"${FILESDIR}"/cmake-unused-command-line.patch
70
	"${FILESDIR}"/transmission-3.00-openssl-3.patch
71
	"${FILESDIR}"/transmission-3.00-horizontal-progress-bars.patch
72
)
73

  
74 79
src_configure() {
75 80
	local mycmakeargs=(
76 81
		-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
77 82

  
78
		-DENABLE_CLI=$(usex cli ON OFF)
79 83
		-DENABLE_GTK=$(usex gtk ON OFF)
80
		-DENABLE_LIGHTWEIGHT=$(usex lightweight ON OFF)
81
		-DENABLE_NLS=$(usex nls ON OFF)
82
		-DENABLE_QT=$(usex qt5 ON OFF)
84
		-DENABLE_MAC=OFF
85
		-DREBUILD_WEB=OFF
86
		-DENABLE_CLI=$(usex cli ON OFF)
83 87
		-DENABLE_TESTS=$(usex test ON OFF)
88
		-DENABLE_NLS=$(usex nls ON OFF)
89

  
90
		-DRUN_CLANG_TIDY=OFF
84 91

  
92
		-DUSE_GTK_VERSION=3
85 93
		-DUSE_SYSTEM_EVENT2=ON
94
		-DUSE_SYSTEM_DEFLATE=OFF
86 95
		-DUSE_SYSTEM_DHT=OFF
87 96
		-DUSE_SYSTEM_MINIUPNPC=ON
88 97
		-DUSE_SYSTEM_NATPMP=ON
89 98
		-DUSE_SYSTEM_UTP=OFF
90 99
		-DUSE_SYSTEM_B64=OFF
100
		-DUSE_SYSTEM_PSL=ON
91 101

  
92
		-DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
102
		-DWITH_CRYPTO=$(usex mbedtls mbedtls openssl)
93 103
		-DWITH_INOTIFY=ON
94
		-DWITH_LIBAPPINDICATOR=$(usex appindicator ON OFF)
104
		-DWITH_APPINDICATOR=$(usex appindicator ON OFF)
95 105
		-DWITH_SYSTEMD=$(usex systemd ON OFF)
96 106
	)
97 107

  
108
	if use qt6; then
109
		mycmakeargs+=( -DENABLE_QT=ON -DUSE_QT_VERSION=6 )
110
	elif use qt5; then
111
		mycmakeargs+=( -DENABLE_QT=ON -DUSE_QT_VERSION=5 )
112
	else
113
		mycmakeargs+=( -DENABLE_QT=OFF )
114
	fi
115

  
98 116
	# Disable assertions by default, bug 893870.
99 117
	use debug || append-cppflags -DNDEBUG
100 118

  
......
116 134
	insinto /usr/lib/sysctl.d
117 135
	doins "${FILESDIR}"/60-transmission.conf
118 136

  
119
	if [[ ${EUID} == 0 ]]; then
120
		diropts -o transmission -g transmission
121
	fi
122
	keepdir /var/lib/transmission
137
	newtmpfiles "${FILESDIR}"/transmission-daemon.tmpfiles transmission-daemon.conf
123 138
}
124 139

  
125 140
pkg_postrm() {
126
	if use gtk || use qt5; then
141
	if use gtk || use qt5 || use qt6; then
127 142
		xdg_desktop_database_update
128 143
		xdg_icon_cache_update
129 144
	fi
130 145
}
131 146

  
132 147
pkg_postinst() {
133
	if use gtk || use qt5; then
148
	if use gtk || use qt5 || use qt6; then
134 149
		xdg_desktop_database_update
135 150
		xdg_icon_cache_update
136 151
	fi
152
	tmpfiles_process transmission-daemon.conf
137 153
}
Thank you!