Diff sqlitestudio-3.3.3 with a sqlitestudio-3.4.3

/usr/portage/dev-db/sqlitestudio/sqlitestudio-3.4.3.ebuild 2023-10-09 14:52:29.340368346 +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 4
EAPI=8
5 5

  
6
PLOCALES="de es fr it pl pt_BR ro_RO ru sk zh_CN"
7
inherit desktop plocale toolchain-funcs qmake-utils xdg
6
PLOCALES="af_ZA ar_SA ca_ES cs_CZ da_DK de_DE el_GR en_US es_ES fa_IR fi_FI fr_FR he_IL hu_HU it_IT ja_JP ko_KR nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sr_SP sv_SE tr_TR uk_UA vi_VN zh_CN zh_TW"
7

  
8
# ScriptingPython says exactly 3.9
9
PYTHON_COMPAT=( python3_{9..11} )
10

  
11
inherit desktop plocale python-single-r1 qmake-utils xdg
8 12

  
9 13
DESCRIPTION="Powerful cross-platform SQLite database manager"
10 14
HOMEPAGE="https://sqlitestudio.pl"
......
13 17
LICENSE="GPL-3"
14 18
SLOT="0"
15 19
KEYWORDS="~amd64 ~x86"
16
IUSE="cli cups tcl test"
20
IUSE="cli cups python tcl test"
21

  
22
REQUIRED_USE="
23
	test? ( cli )
24
	python? ( ${PYTHON_REQUIRED_USE} )
25
"
17 26

  
18
REQUIRED_USE="test? ( cli )"
19 27
RESTRICT="!test? ( test )"
20 28

  
21 29
RDEPEND="
30
	dev-libs/openssl:=
22 31
	dev-db/sqlite:3
23 32
	dev-qt/qtcore:5
33
	dev-qt/qtdeclarative:5
24 34
	dev-qt/qtgui:5
25 35
	dev-qt/qtnetwork:5
26 36
	dev-qt/qtscript:5
......
31 41
		sys-libs/readline:=
32 42
		sys-libs/ncurses:=
33 43
	)
44
	python? ( ${PYTHON_DEPS} )
34 45
	cups? ( dev-qt/qtprintsupport:5 )
35 46
	tcl? ( dev-lang/tcl:0= )
36 47
"
......
44 55
	virtual/pkgconfig
45 56
"
46 57

  
58
PATCHES=(
59
	"${FILESDIR}"/${P}-fix-python.patch
60
)
61

  
47 62
core_build_dir="${S}/output/build"
48 63
plugins_build_dir="${core_build_dir}/Plugins"
49 64

  
65
pkg_setup() {
66
	use python && python-single-r1_pkg_setup
67
}
68

  
50 69
src_prepare() {
51 70
	default
52 71

  
53
	sed -i -e 's/linux|portable/portable/' SQLiteStudio3/sqlitestudio/sqlitestudio.pro || die
54

  
55
	# bug #838325
56
	sed -i -e "s:-lcurses:$($(tc-getPKG_CONFIG) --libs ncurses):" SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro || die
57

  
58 72
	disable_modules() {
59 73
		[[ $# -lt 2 ]] && die "not enough arguments"
60 74

  
......
71 85
	local mod_lst=( DbSqlite2 )
72 86
	use cups || mod_lst+=( Printing )
73 87
	use tcl || mod_lst+=( ScriptingTcl )
88
	use python || mod_lst+=( ScriptingPython )
74 89
	disable_modules Plugins/Plugins.pro ${mod_lst[@]}
75 90

  
76 91
	local mylrelease="$(qt5_get_bindir)"/lrelease
......
107 122
	plocale_for_each_locale lrelease_locale
108 123
	plocale_for_each_disabled_locale rm_locale
109 124

  
110
	# prevent "multilib-strict check failed" with USE test
111
	sed -i -e 's/\(target.*usr\/\)lib/\1'$(get_libdir)'/' \
125
	# prevent "multilib-strict check failed" with USE test by
126
	# replacing target paths with dynamic lib dir
127
	#
128
	sed -i -e 's/\(target\.path = .*\/\)lib/\1'$(get_libdir)'/' \
112 129
		SQLiteStudio3/Tests/TestUtils/TestUtils.pro || die
113 130
}
114 131

  
115 132
src_configure() {
116 133
	# NOTE: QMAKE_CFLAGS_ISYSTEM option prevents
117 134
	# build error with tcl use enabled (stdlib.h is missing)
135
	# "QMAKE_CFLAGS_ISYSTEM=\"\""
136
	# CONFIG+ borrowed from compile.sh of tarball
118 137
	local myqmakeargs=(
119 138
		"BINDIR=${EPREFIX}/usr/bin"
120 139
		"LIBDIR=${EPREFIX}/usr/$(get_libdir)"
121
		"QMAKE_CFLAGS_ISYSTEM=\"\""
140
		"CONFIG+=portable"
122 141
		$(usex test 'DEFINES+=tests' '')
123 142
	)
124 143

  
144
	# Combination of kvirc ebuild and qtcompress
145
	if use python; then
146
		myqmakeargs+=(
147
			INCLUDEPATH+=" $(python_get_includedir)"
148
			LIBS+=" $(python_get_LIBS)"
149
		)
150
	fi
151

  
125 152
	## Core
126 153
	mkdir -p "${core_build_dir}" && cd "${core_build_dir}" || die
127 154
	eqmake5 "${myqmakeargs[@]}" "${S}/SQLiteStudio3"
......
140 167
	emake -C "${core_build_dir}" INSTALL_ROOT="${D}" install
141 168
	emake -C "${plugins_build_dir}" INSTALL_ROOT="${D}" install
142 169

  
170
	if use test; then
171
		# remove test artifacts that must not be installed
172
		rm -r "${ED}"/lib64 || die
173
		rm -r "${ED}"/usr/share/qt5/tests || die
174
	fi
175

  
143 176
	doicon -s scalable "SQLiteStudio3/guiSQLiteStudio/img/${PN}.svg"
144 177

  
145 178
	local make_desktop_entry_args=(
Thank you!