public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlitestudio/
Date: Sat, 21 Oct 2023 21:04:47 +0000 (UTC)	[thread overview]
Message-ID: <1697922258.c3df0397bfc0f43affc657903b7def77e977e2a7.asturm@gentoo> (raw)

commit:     c3df0397bfc0f43affc657903b7def77e977e2a7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 18:58:12 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 21:04:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3df0397

dev-db/sqlitestudio: Drop unused dev-qt/qtscript:5

Bug: https://bugs.gentoo.org/915786
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-db/sqlitestudio/sqlitestudio-3.4.4-r1.ebuild | 186 +++++++++++++++++++++++
 1 file changed, 186 insertions(+)

diff --git a/dev-db/sqlitestudio/sqlitestudio-3.4.4-r1.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.4.4-r1.ebuild
new file mode 100644
index 000000000000..27fdbf0612c4
--- /dev/null
+++ b/dev-db/sqlitestudio/sqlitestudio-3.4.4-r1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 kaa 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://github.com/pawelsalawa/sqlitestudio/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cli cups python tcl test"
+
+REQUIRED_USE="
+	test? ( cli )
+	python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+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/qtsvg:5
+	dev-qt/qtwidgets:5
+	dev-qt/qtxml:5
+	cli? (
+		sys-libs/readline:=
+		sys-libs/ncurses:=
+	)
+	python? ( ${PYTHON_DEPS} )
+	cups? ( dev-qt/qtprintsupport:5 )
+	tcl? ( dev-lang/tcl:0= )
+"
+DEPEND="${RDEPEND}
+	dev-qt/designer:5
+	dev-qt/qtconcurrent:5
+	test? ( dev-qt/qttest:5 )
+"
+BDEPEND="
+	dev-qt/linguist-tools:5
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.4.3-fix-python.patch
+	"${FILESDIR}"/${PN}-3.4.3-fix-PyThreadState.patch
+)
+
+core_build_dir="${S}/output/build"
+plugins_build_dir="${core_build_dir}/Plugins"
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	disable_modules() {
+		[[ $# -lt 2 ]] && die "not enough arguments"
+
+		local pro="$1"; shift
+		local modules="${@}"
+
+		sed -r -i \
+			-e 's/('${modules// /|}')[[:space:]]*(\\?)/\2/' \
+			${pro} || die
+	}
+
+	use cli || disable_modules SQLiteStudio3/SQLiteStudio3.pro cli
+
+	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
+	local ts_dir_lst=$(find * -type f -name "*.qm" -printf '%h\n' | sort -u)
+	local ts_pro_lst=$(find * -type f -name "*.pro" -exec grep -l 'TRANSLATIONS' {} \;)
+	local ts_qrc_lst=$(find * -type f -name "*.qrc" -exec grep -l '\.qm' {} \;)
+
+	# delete all "*.qm"
+	for ts_dir in ${ts_dir_lst[@]}; do
+		rm "${ts_dir}"/*.qm || die
+	done
+
+	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"
+		done
+	}
+
+	rm_locale() {
+		for ts_pro in ${ts_pro_lst[@]}; do
+			sed -i -r -e 's/[^[:space:]]*'${1}'\.ts//' \
+				${ts_pro} || die
+		done
+
+		for ts_qrc in ${ts_qrc_lst[@]}; do
+			sed -i -e '/'${1}'\.qm/d' \
+				${ts_qrc} || die
+		done
+	}
+
+	local ts_dir_main="SQLiteStudio3/sqlitestudio/translations"
+	plocale_find_changes ${ts_dir_main} "sqlitestudio_" '.ts'
+	plocale_for_each_locale lrelease_locale
+	plocale_for_each_disabled_locale rm_locale
+
+	# 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)"
+		"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"
+
+	## Plugins
+	mkdir -p "${plugins_build_dir}" && cd "${plugins_build_dir}" || die
+	eqmake5 "${myqmakeargs[@]}" "${S}/Plugins"
+}
+
+src_compile() {
+	emake -C "${core_build_dir}"
+	emake -C "${plugins_build_dir}"
+}
+
+src_install() {
+	emake -C "${core_build_dir}" INSTALL_ROOT="${D}" install
+	emake -C "${plugins_build_dir}" INSTALL_ROOT="${D}" 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
+
+	doicon -s scalable "SQLiteStudio3/guiSQLiteStudio/img/${PN}.svg"
+
+	local make_desktop_entry_args=(
+		"${PN} -- %F"
+		'SQLiteStudio3'
+		"${PN}"
+		'Development;Database;Utility'
+	)
+	make_desktop_entry "${make_desktop_entry_args[@]}" \
+		"$( printf '%s\n' "MimeType=application/x-sqlite3;" )"
+}


             reply	other threads:[~2023-10-21 21:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 21:04 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-16 20:04 [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlitestudio/ Andreas Sturmlechner
2025-04-16 19:40 Andreas Sturmlechner
2024-10-09 12:52 Sam James
2024-07-29 10:51 Pacho Ramos
2023-10-21 21:04 Andreas Sturmlechner
2023-05-06  3:46 Sam James
2023-02-17  9:45 Viorel Munteanu
2022-06-07 23:02 Sam James
2021-04-30 23:43 Sam James
2021-02-28 14:54 Joonas Niilola
2020-06-26 16:14 Andreas Sturmlechner
2019-02-03 16:14 Andreas Sturmlechner
2019-02-03 16:14 Andreas Sturmlechner
2017-09-04 21:02 Andreas Sturmlechner
2017-09-03 21:15 Andreas Sturmlechner
2016-07-25 22:13 Johannes Huber
2016-07-07 23:38 Austin English
2016-05-29 15:30 Kristian Fiskerstrand
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=1697922258.c3df0397bfc0f43affc657903b7def77e977e2a7.asturm@gentoo \
    --to=asturm@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