public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Viorel Munteanu" <ceamac@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlitestudio/files/, dev-db/sqlitestudio/
Date: Fri, 17 Feb 2023 09:45:05 +0000 (UTC)	[thread overview]
Message-ID: <1676627047.1cdd81378ca0682a6dd00dd9181bba818d7b39bc.ceamac@gentoo> (raw)

commit:     1cdd81378ca0682a6dd00dd9181bba818d7b39bc
Author:     Onkobu Tanaake <onkobu <AT> onkobutanaake <DOT> de>
AuthorDate: Sun Jan  1 20:35:52 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 09:44:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cdd8137

dev-db/sqlitestudio: bump 3.4.3

- drop unnecessary sed invocation
- introduce USE python
- ncurses fix is not necessary anymore, dependency was removed/ unnecessary
- drop 3.2.1, source could not be downloaded anymore
- add patch to fix linking of python
- update manifest
- Copyright
- sed expression must fix all paths
- delete test artifacts/ avoid installation

Signed-off-by: Onkobu Tanaake <onkobu <AT> onkobutanaake.de>
Reported-by: Onkobu Tanaake <onkobu <AT> onkobutanaake.de>
Closes: https://github.com/gentoo/gentoo/pull/28930
Closes: https://bugs.gentoo.org/889314
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 dev-db/sqlitestudio/Manifest                       |  2 +-
 .../files/sqlitestudio-3.4.3-fix-python.patch      | 13 ++++
 ...o-3.2.1-r1.ebuild => sqlitestudio-3.4.3.ebuild} | 76 ++++++++++++++++------
 3 files changed, 71 insertions(+), 20 deletions(-)

diff --git a/dev-db/sqlitestudio/Manifest b/dev-db/sqlitestudio/Manifest
index 7c5ddd701a4e..7430f3aa492c 100644
--- a/dev-db/sqlitestudio/Manifest
+++ b/dev-db/sqlitestudio/Manifest
@@ -1,2 +1,2 @@
-DIST sqlitestudio-3.2.1.tar.gz 9405867 BLAKE2B 53cd8465a6140cf17c602094cceef2fdf74f513f33257b22e1a3d7adcb9c78d8eb2cdaff047920836a9d98429ba0025924ce608f2eab97319feabf063de4c9ee SHA512 9c07f0dc50bf35ad04d0cb06cfc1a306d3f0aa9446e7d737c8187c63cb7dd2c44fb4b960693f2c30a15ece3aac0878701874a9ce3cebfe0c6bf48df10814a574
 DIST sqlitestudio-3.3.3.tar.gz 8863232 BLAKE2B 1dfa74ab405ec057090f87726c3562470de4c1fd7b97c0fbc3e3fb4b3c8413825ec1884ac8bc9cb86e0d3d64b42af323a46ae4aa324de98c1dc8e967a4eb0d35 SHA512 1b92b06dbca3b5ee051d2582345c0e9a0a3cbd2cbbde0c6b9b18f75ca30140c777746fc9d35a3c314c13d99300dbe8d9bbd313b2ae4cb069b8e81446b27e982f
+DIST sqlitestudio-3.4.3.tar.gz 16115078 BLAKE2B ac083ea53276a87917a532359c5f3eae665140e04efe01c8172fbcb135df65f4128a6b09b96f781c411e3b105f47a2c30172e37ab1bd82be32a36027c75770d9 SHA512 5261bd9c5a7e5be3e140eefda45961dc1978b6d1f9f180a8db07671acc55d275c0f2755a580f57681b17fe233ef54b2680a633693c1ec62d3517e4f968e80549

diff --git a/dev-db/sqlitestudio/files/sqlitestudio-3.4.3-fix-python.patch b/dev-db/sqlitestudio/files/sqlitestudio-3.4.3-fix-python.patch
new file mode 100644
index 000000000000..856bb6e30c69
--- /dev/null
+++ b/dev-db/sqlitestudio/files/sqlitestudio-3.4.3-fix-python.patch
@@ -0,0 +1,13 @@
+diff --git a/Plugins/ScriptingPython/ScriptingPython.pro.orig b/Plugins/ScriptingPython/ScriptingPython.pro
+index 02fb5d3..d928aaf 100644
+--- a/Plugins/ScriptingPython/ScriptingPython.pro.orig
++++ b/Plugins/ScriptingPython/ScriptingPython.pro
+@@ -18,7 +18,7 @@ OTHER_FILES += \
+     scriptingpython.json
+ 
+ linux: {
+-    LIBS += -lpython3.9
++    # LIBS += -lpython3.9
+ }
+ 
+ macx: {

diff --git a/dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.4.3.ebuild
similarity index 67%
rename from dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild
rename to dev-db/sqlitestudio/sqlitestudio-3.4.3.ebuild
index 6477a98ac404..1e3253c24a3a 100644
--- a/dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild
+++ b/dev-db/sqlitestudio/sqlitestudio-3.4.3.ebuild
@@ -1,33 +1,47 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PLOCALES="de es fr it pl pt_BR ro_RO ru sk zh_CN"
-inherit desktop plocale qmake-utils xdg
+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"
+
+# ScriptingPython says exactly 3.9
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit desktop plocale python-single-r1 qmake-utils xdg
 
 DESCRIPTION="Powerful cross-platform SQLite database manager"
 HOMEPAGE="https://sqlitestudio.pl"
-SRC_URI="https://sqlitestudio.pl/files/sqlitestudio3/complete/tar/${P}.tar.gz"
+SRC_URI="https://github.com/pawelsalawa/sqlitestudio/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
 
-KEYWORDS="~amd64 ~x86"
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="cli cups tcl test"
+KEYWORDS="~amd64 ~x86"
+IUSE="cli cups python tcl test"
+
+REQUIRED_USE="
+	test? ( cli )
+	python? ( ${PYTHON_REQUIRED_USE} )
+"
 
-REQUIRED_USE="test? ( cli )"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+	dev-libs/openssl:=
 	dev-db/sqlite:3
 	dev-qt/qtcore:5
+	dev-qt/qtdeclarative:5
 	dev-qt/qtgui:5
 	dev-qt/qtnetwork:5
 	dev-qt/qtscript:5
 	dev-qt/qtsvg:5
 	dev-qt/qtwidgets:5
 	dev-qt/qtxml:5
-	cli? ( sys-libs/readline:0= )
+	cli? (
+		sys-libs/readline:=
+		sys-libs/ncurses:=
+	)
+	python? ( ${PYTHON_DEPS} )
 	cups? ( dev-qt/qtprintsupport:5 )
 	tcl? ( dev-lang/tcl:0= )
 "
@@ -38,17 +52,22 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="
 	dev-qt/linguist-tools:5
+	virtual/pkgconfig
 "
 
-S="${WORKDIR}"
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-python.patch
+)
+
 core_build_dir="${S}/output/build"
 plugins_build_dir="${core_build_dir}/Plugins"
 
-src_prepare() {
-	xdg_src_prepare
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
 
-	sed -i -e 's/linux|portable/portable/' \
-		SQLiteStudio3/sqlitestudio/sqlitestudio.pro || die
+src_prepare() {
+	default
 
 	disable_modules() {
 		[[ $# -lt 2 ]] && die "not enough arguments"
@@ -66,6 +85,7 @@ src_prepare() {
 	local mod_lst=( DbSqlite2 )
 	use cups || mod_lst+=( Printing )
 	use tcl || mod_lst+=( ScriptingTcl )
+	use python || mod_lst+=( ScriptingPython )
 	disable_modules Plugins/Plugins.pro ${mod_lst[@]}
 
 	local mylrelease="$(qt5_get_bindir)"/lrelease
@@ -78,7 +98,7 @@ src_prepare() {
 		rm "${ts_dir}"/*.qm || die
 	done
 
-	prepare_locale() {
+	lrelease_locale() {
 		for ts_dir in ${ts_dir_lst[@]}; do
 			local ts=$(find "${ts_dir}" -type f -name "*${1}.ts" || continue)
 			"${mylrelease}" "${ts}" || die "preparing ${1} locale failed"
@@ -99,24 +119,36 @@ src_prepare() {
 
 	local ts_dir_main="SQLiteStudio3/sqlitestudio/translations"
 	plocale_find_changes ${ts_dir_main} "sqlitestudio_" '.ts'
-	plocale_for_each_locale prepare_locale
+	plocale_for_each_locale lrelease_locale
 	plocale_for_each_disabled_locale rm_locale
 
-	# prevent "multilib-strict check failed" with USE test
-	sed -i -e 's/\(target.*usr\/\)lib/\1'$(get_libdir)'/' \
+	# prevent "multilib-strict check failed" with USE test by
+	# replacing target paths with dynamic lib dir
+	#
+	sed -i -e 's/\(target\.path = .*\/\)lib/\1'$(get_libdir)'/' \
 		SQLiteStudio3/Tests/TestUtils/TestUtils.pro || die
 }
 
 src_configure() {
 	# NOTE: QMAKE_CFLAGS_ISYSTEM option prevents
 	# build error with tcl use enabled (stdlib.h is missing)
+	# "QMAKE_CFLAGS_ISYSTEM=\"\""
+	# CONFIG+ borrowed from compile.sh of tarball
 	local myqmakeargs=(
 		"BINDIR=${EPREFIX}/usr/bin"
 		"LIBDIR=${EPREFIX}/usr/$(get_libdir)"
-		"QMAKE_CFLAGS_ISYSTEM=\"\""
+		"CONFIG+=portable"
 		$(usex test 'DEFINES+=tests' '')
 	)
 
+	# Combination of kvirc ebuild and qtcompress
+	if use python; then
+		myqmakeargs+=(
+			INCLUDEPATH+=" $(python_get_includedir)"
+			LIBS+=" $(python_get_LIBS)"
+		)
+	fi
+
 	## Core
 	mkdir -p "${core_build_dir}" && cd "${core_build_dir}" || die
 	eqmake5 "${myqmakeargs[@]}" "${S}/SQLiteStudio3"
@@ -132,6 +164,12 @@ src_compile() {
 }
 
 src_install() {
+	if use test; then
+		# remove test artifacts that must not be installed
+		rm -r "${ED}"/lib64 || die
+		rm -r "${ED}"/usr/share/qt5/tests || die
+	fi
+
 	emake -C "${core_build_dir}" INSTALL_ROOT="${D}" install
 	emake -C "${plugins_build_dir}" INSTALL_ROOT="${D}" install
 


             reply	other threads:[~2023-02-17  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  9:45 Viorel Munteanu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-14 18:37 [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlitestudio/files/, dev-db/sqlitestudio/ Andreas Sturmlechner
2019-02-03 16:14 Andreas Sturmlechner
2018-09-15 14:22 Andreas Sturmlechner
2016-03-19 23:01 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1676627047.1cdd81378ca0682a6dd00dd9181bba818d7b39bc.ceamac@gentoo \
    --to=ceamac@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox