From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 37006158091 for ; Tue, 7 Jun 2022 23:02:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 49731E084A; Tue, 7 Jun 2022 23:02:23 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24475E084A for ; Tue, 7 Jun 2022 23:02:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B55D6340F03 for ; Tue, 7 Jun 2022 23:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4F5B6456 for ; Tue, 7 Jun 2022 23:02:19 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1654642931.819fa97ef1e668378b5e81afcab27e26d07cbd34.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlitestudio/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/sqlitestudio/Manifest dev-db/sqlitestudio/sqlitestudio-3.3.3.ebuild X-VCS-Directories: dev-db/sqlitestudio/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 819fa97ef1e668378b5e81afcab27e26d07cbd34 X-VCS-Branch: master Date: Tue, 7 Jun 2022 23:02:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 920cfb5c-2322-4c0f-a338-d391d54a810b X-Archives-Hash: 669ec11d455d8d66e3c05a972985f131 commit: 819fa97ef1e668378b5e81afcab27e26d07cbd34 Author: Sam James gentoo org> AuthorDate: Tue Jun 7 23:01:23 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jun 7 23:02:11 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=819fa97e dev-db/sqlitestudio: add 3.3.3 Closes: https://bugs.gentoo.org/850499 Closes: https://bugs.gentoo.org/773406 Closes: https://bugs.gentoo.org/838325 Signed-off-by: Sam James gentoo.org> dev-db/sqlitestudio/Manifest | 1 + dev-db/sqlitestudio/sqlitestudio-3.3.3.ebuild | 153 ++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/dev-db/sqlitestudio/Manifest b/dev-db/sqlitestudio/Manifest index 3f2d35cbdf64..7c5ddd701a4e 100644 --- a/dev-db/sqlitestudio/Manifest +++ b/dev-db/sqlitestudio/Manifest @@ -1 +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 diff --git a/dev-db/sqlitestudio/sqlitestudio-3.3.3.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.3.3.ebuild new file mode 100644 index 000000000000..401c8f8bec3e --- /dev/null +++ b/dev-db/sqlitestudio/sqlitestudio-3.3.3.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PLOCALES="de es fr it pl pt_BR ro_RO ru sk zh_CN" +inherit desktop plocale toolchain-funcs 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 tcl test" + +REQUIRED_USE="test? ( cli )" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-db/sqlite:3 + dev-qt/qtcore: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:= + sys-libs/ncurses:= + ) + 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 +" + +core_build_dir="${S}/output/build" +plugins_build_dir="${core_build_dir}/Plugins" + +src_prepare() { + default + + sed -i -e 's/linux|portable/portable/' SQLiteStudio3/sqlitestudio/sqlitestudio.pro || die + + # bug #838325 + sed -i -e "s:-lcurses:$($(tc-getPKG_CONFIG) --libs ncurses):" SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro || die + + 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 ) + 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 + sed -i -e 's/\(target.*usr\/\)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) + local myqmakeargs=( + "BINDIR=${EPREFIX}/usr/bin" + "LIBDIR=${EPREFIX}/usr/$(get_libdir)" + "QMAKE_CFLAGS_ISYSTEM=\"\"" + $(usex test 'DEFINES+=tests' '') + ) + + ## 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 + + 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;" )" +}