summaryrefslogtreecommitdiff
path: root/sys-boot/unetbootin/unetbootin-661.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-02 17:18:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-02 17:18:14 +0100
commit7b9f15840068dfaeea5684f8a1af1fe460dfa14c (patch)
tree112eea4497761c0227537330b58f9c7e0af3f9d8 /sys-boot/unetbootin/unetbootin-661.ebuild
parent0bff53119f08d677db6c1a991bd30741682a8a08 (diff)
gentoo resync : 02.06.2018
Diffstat (limited to 'sys-boot/unetbootin/unetbootin-661.ebuild')
-rw-r--r--sys-boot/unetbootin/unetbootin-661.ebuild97
1 files changed, 97 insertions, 0 deletions
diff --git a/sys-boot/unetbootin/unetbootin-661.ebuild b/sys-boot/unetbootin/unetbootin-661.ebuild
new file mode 100644
index 000000000000..7f9aafaf7b26
--- /dev/null
+++ b/sys-boot/unetbootin/unetbootin-661.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PATCHSET="${P}-qt5.patch.tar.xz"
+inherit desktop qmake-utils
+
+DESCRIPTION="UNetbootin installs Linux/BSD distributions to a partition or USB drive"
+HOMEPAGE="https://github.com/unetbootin/unetbootin"
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+UNBI_LINGUAS="
+ am ar ast be bg bn ca cs da de el eo es et eu fa fi fo fr gl he hr hu id it
+ ja lt lv ml ms nan nb nl nn pl pt_BR pt ro ru si sk sl sr sv sw tr uk ur vi
+ zh_CN zh_TW
+"
+
+for lingua in ${UNBI_LINGUAS}; do
+ IUSE="${IUSE} l10n_${lingua/_/-}"
+done
+
+S=${WORKDIR}/${P}/src/${PN}
+
+DEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+"
+RDEPEND="
+ ${DEPEND}
+ app-arch/p7zip
+ sys-boot/syslinux
+ sys-fs/mtools
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-581-desktop.patch"
+ "${WORKDIR}"/${PATCHSET/.tar.xz/}
+)
+
+src_prepare() {
+ default
+
+ # QA check in case linguas are added or removed
+ enum() {
+ echo ${#}
+ }
+ [[ $(enum ${UNBI_LINGUAS}) -eq $(( $(enum $(echo ${PN}_*.ts) ) -1 )) ]] \
+ || die "Numbers of recorded and actual linguas do not match"
+ unset enum
+
+ # Remove localisations
+ local lingua
+ for lingua in ${UNBI_LINGUAS}; do
+ if ! use l10n_${lingua/_/-}; then
+ sed -i ${PN}.pro -e "/\.*${PN}_${lingua}\.ts.*/d" || die
+ rm ${PN}_${lingua}.ts || die
+ fi
+ done
+}
+
+src_configure() {
+ sed -i -e '/^RESOURCES/d' unetbootin.pro || die
+
+ UNBN_QTPATH="$(qt5_get_bindir)/"
+ "${UNBN_QTPATH}"lrelease ${PN}.pro || die
+
+ eqmake5 ${PN}.pro || die
+}
+
+src_install() {
+ dobin ${PN}
+
+ domenu ${PN}.desktop
+
+ for file in ${PN}*.png; do
+ size="${file/${PN}_}"
+ size="${size/.png}x${size/.png}"
+ insinto /usr/share/icons/hicolor/${size}/apps
+ newins ${file} ${PN}.png
+ done
+
+ local lingua
+ for lingua in ${UNBI_LINGUAS}; do
+ if use l10n_${lingua/_/-}; then
+ insinto /usr/share/${PN}
+ doins ${PN}_${lingua}.qm
+ fi
+ done
+}