1 # Copyright 2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop xdg eutils qmake-utils
#git-r3
8 DESCRIPTION
="Open Source 2D CAD"
9 HOMEPAGE
="http://www.qcad.org/"
10 SRC_URI
="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS
="~amd64 ~x86"
16 L10N
=( de en es fr it ja
nl pl pt ru sl sk sv
fi hr hu zh_CN cs TW lt
)
20 for lingua
in ${L10N[*]}; do
21 IUSE
+=" l10n_${lingua}"
33 dev-qt/qtscript:5=[scripttools]
36 dev-qt/qtxmlpatterns:5=
42 # This is the latest known src/3rdparty/qt-labs-qtscriptgenerator-<qtversion>
43 local myqtvsrc
="5.14.0" # available since 3.24.2.3
44 #local myqtvsrc="5.14.2" # in git master on 2020 Apr 8 (ie after 3.24.3.0)
46 local myqt
=$
(best_version dev-qt
/qtcore
:5)
47 local myqtv
=${myqt#dev-qt/qtcore-}
48 local myqtv
=${myqtv%-r*}
50 if ! test -d "${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}"
52 einfo
"Creating QT configuration for QT ${myqtv}"
53 mkdir
"${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}"
54 ln "${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtvsrc}/qt-labs-qtscriptgenerator-${myqtvsrc}.pro" "${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}/qt-labs-qtscriptgenerator-${myqtv}.pro"
65 # Create Wayland desktop entry
66 cp qcad.desktop qcad-wayland.desktop
67 sed -i 's/Exec=qcad/Exec=qcad -platform xcb/g' qcad-wayland.desktop
68 sed -i 's/Name=QCAD/Name=QCAD (Wayland)/g' qcad-wayland.desktop
70 domenu
"${S}/*.desktop"
71 doicon
"${S}/scripts/${PN}_icon.svg"
72 doicon
--size 256 "${S}/scripts/${PN}_icon.png"
75 for lingua
in "${L10N[@]}"
77 if ! use l10n_
${lingua}
79 find -type f
-name "*_${lingua}.*" -delete
83 insinto
/usr
/lib
/${PN}/
84 doins
-r scripts fonts patterns linetypes themes
87 make_wrapper
${PN} /usr/lib/${PN}/qcad-bin "" /usr/lib/${PN}:/usr/lib/${PN}/plugins
92 docompress
-x /usr
/share
/doc
/${PF}/examples