diff options
author | reagentoo <reagentoo@gmail.com> | 2019-01-20 20:32:33 +0300 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-02-03 17:14:09 +0100 |
commit | 77758a540f56b33450c3c2a12b996ab3b1d1203f (patch) | |
tree | 10a65b1754bf4a959ec8e171578f2dae973b4923 /dev-db/sqlitestudio | |
parent | dev-java/icedtea-sound-1.0.1: dependency fix (diff) | |
download | gentoo-77758a540f56b33450c3c2a12b996ab3b1d1203f.tar.gz gentoo-77758a540f56b33450c3c2a12b996ab3b1d1203f.tar.bz2 gentoo-77758a540f56b33450c3c2a12b996ab3b1d1203f.zip |
dev-db/sqlitestudio: version bump to 3.2.1
Also fix build with USE test
Closes: https://bugs.gentoo.org/663926
Closes: https://github.com/gentoo/gentoo/pull/10878
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-db/sqlitestudio')
-rw-r--r-- | dev-db/sqlitestudio/Manifest | 1 | ||||
-rw-r--r-- | dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild | 145 |
2 files changed, 146 insertions, 0 deletions
diff --git a/dev-db/sqlitestudio/Manifest b/dev-db/sqlitestudio/Manifest index 3cc879c663fb..5162c98345f5 100644 --- a/dev-db/sqlitestudio/Manifest +++ b/dev-db/sqlitestudio/Manifest @@ -1,2 +1,3 @@ DIST sqlitestudio-3.0.7.tar.gz 2551341 BLAKE2B b499aac9d251b9682c241e37c30f52d6fce65bc317ee39022e385d2535e2e62b9213bc72941236fcb355d0f8a56924f9d28d32db9937a0af6e7a0cfb05252763 SHA512 2171fe26754aed2abe24d73e9ccc2ee1abe5e87228096bc5643c5638ad578dc323b810535f41d0206b3d7a7aa75132bfb578972c7945b962dd593543c7da3270 DIST sqlitestudio-3.1.1.tar.gz 8610037 BLAKE2B 7f0de65a31a8c25da305cb8d73a03f4215a1134c652e6fb68424ae2153afb1e3655ae3360b2c25b863f105a53cd5fb9909d3f8aa5674f25f0e19a080b15dfa97 SHA512 421247730660e8396f692fd8df9366e6ae834633823004ef3cb7c6f3064e66f420f0517df6a8542b800f7f88dacf2fc646b4224b423ab3994c7d8a083e82e143 +DIST sqlitestudio-3.2.1.tar.gz 9405867 BLAKE2B 53cd8465a6140cf17c602094cceef2fdf74f513f33257b22e1a3d7adcb9c78d8eb2cdaff047920836a9d98429ba0025924ce608f2eab97319feabf063de4c9ee SHA512 9c07f0dc50bf35ad04d0cb06cfc1a306d3f0aa9446e7d737c8187c63cb7dd2c44fb4b960693f2c30a15ece3aac0878701874a9ce3cebfe0c6bf48df10814a574 diff --git a/dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild new file mode 100644 index 000000000000..f19509e0896e --- /dev/null +++ b/dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PLOCALES="de es fr it pl pt_BR ro_RO ru sk zh_CN" + +inherit eutils l10n 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" + +KEYWORDS="~amd64 ~x86" +LICENSE="GPL-3" +SLOT="0" +IUSE="cli cups tcl test" + +REQUIRED_USE="test? ( cli )" + +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:0= ) + 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 ) +" + +S="${WORKDIR}" +core_build_dir="${S}/output/build" +plugins_build_dir="${core_build_dir}/Plugins" + +src_prepare() { + xdg_src_prepare + + sed -i -e 's/linux|portable/portable/' \ + SQLiteStudio3/sqlitestudio/sqlitestudio.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 + + prepare_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" + l10n_find_plocales_changes ${ts_dir_main} "sqlitestudio_" '.ts' + l10n_for_each_locale_do prepare_locale + l10n_for_each_disabled_locale_do 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;" )" +} |