Added qcad's ebuild

This commit is contained in:
dbroqua 2021-03-05 11:28:42 +01:00
parent b1c3a21475
commit 6c5c78dbb2
3 changed files with 197 additions and 0 deletions

View file

@ -0,0 +1,2 @@
DIST qcad-3.25.2.0.tar.gz 34131107 BLAKE2B 906c4d8b4018921ca5ae2ca056546dbd0e494086e91c8cc31f3d3430f2055dd19b838edb1190ebd3980cfc9989dc9b1ce94b9222937db168a1dcba3fb0dd3a2c SHA512 4a59896203040f111d44d23e7709a5e7da64852bfb9b399e7e29e542d157718afd2d9c3ac5cc90deab3e0cfe5aafd46764c40875e5d4a63c39c62220eb795f56
DIST qcad-3.26.0.0.tar.gz 34836775 BLAKE2B 101316f2b36631b6fef9689a9e5d281999275c5ef9a60d67aa6f491a5536fd3f4551e2f6dedeb4140e3a28129f200f9e5c2790f51f2724b20e001758b876d938 SHA512 b233d451027cbc8972b494f19c7db59fcd256e4769c2e61e3dada06f2686811cbf33aa2cc98a0439e215ad64fb9dddc7e8b08c2358ff824f782b9fef97da89d9

View file

@ -0,0 +1,97 @@
# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils qmake-utils #git-r3
DESCRIPTION="Open Source 2D CAD"
HOMEPAGE="http://www.qcad.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
#EGIT_REPO_URI="https://github.com/qcad/qcad.git"
#EGIT_COMMIT="v${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
L10N=( de en es fr it ja nl pl pt ru sl sk sv fi hr hu zh_CN cs TW lt )
IUSE=""
for lingua in ${L10N[*]}; do
IUSE+=" l10n_${lingua}"
done
# qt5 in gentoo repo is already >=5.8.0 so anything in :5 slot will work.
# qt4 is not available in gentoo repo, so this ebuild does not support building with qt4.
# Require rebuild (:=) on any qt5 version bump as qcad scripts are qt minor version specific.
DEPEND="
dev-libs/glib
media-libs/glu
media-libs/mesa
dev-qt/designer:5=
dev-qt/qtcore:5=
dev-qt/qtgui:5=
dev-qt/qthelp:5=
dev-qt/qtopengl:5=
dev-qt/qtscript:5=[scripttools]
dev-qt/qtsql:5=
dev-qt/qtsvg:5=
dev-qt/qtwebkit:5=
dev-qt/qtxmlpatterns:5=
dev-qt/qtwebengine:5=
"
RDEPEND="${DEPEND}"
src_prepare() {
# This is the latest known src/3rdparty/qt-labs-qtscriptgenerator-<qtversion>
local myqtvsrc="5.14.0" # available since 3.24.2.3
#local myqtvsrc="5.14.2" # in git master on 2020 Apr 8 (ie after 3.24.3.0)
local myqt=$(best_version dev-qt/qtcore:5)
local myqtv=${myqt#dev-qt/qtcore-}
local myqtv=${myqtv%-r*}
if ! test -d ${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}
then
einfo Creating QT configuration for QT ${myqtv}
mkdir ${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}
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
fi
default
}
src_configure() {
eqmake5 -r || die
}
src_install() {
cd "${S}"
for lingua in "${L10N[@]}"
do
if ! use l10n_${lingua}
then
find -type f -name "*_${lingua}.*" -delete
fi
done
#dobin ${FILESDIR}/qcad
#test -e ${S}/release/${PN} || ln ${S}/release/qcad-bin ${S}/release/${PN}
#dobin ${S}/release/${PN}
domenu ${S}/*.desktop
doicon ${S}/scripts/${PN}_icon.svg
doicon --size 256 ${S}/scripts/${PN}_icon.png
insinto /usr/lib/${PN}/
doins -r scripts fonts patterns linetypes themes
insopts -m0755
doins release/*
make_wrapper ${PN} /usr/lib/${PN}/qcad-bin "" /usr/lib/${PN}:/usr/lib/${PN}/plugins
doins -r plugins
docinto examples
dodoc -r examples/*
docompress -x /usr/share/doc/${PF}/examples
}

View file

@ -0,0 +1,98 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop xdg eutils qmake-utils #git-r3
DESCRIPTION="Open Source 2D CAD"
HOMEPAGE="http://www.qcad.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
L10N=( de en es fr it ja nl pl pt ru sl sk sv fi hr hu zh_CN cs TW lt )
IUSE=""
for lingua in ${L10N[*]}; do
IUSE+=" l10n_${lingua}"
done
DEPEND="
dev-libs/glib
media-libs/glu
media-libs/mesa
dev-qt/designer:5=
dev-qt/qtcore:5=
dev-qt/qtgui:5=
dev-qt/qthelp:5=
dev-qt/qtopengl:5=
dev-qt/qtscript:5=[scripttools]
dev-qt/qtsql:5=
dev-qt/qtsvg:5=
dev-qt/qtwebkit:5=
dev-qt/qtxmlpatterns:5=
dev-qt/qtwebengine:5=
"
RDEPEND="${DEPEND}"
src_prepare() {
# This is the latest known src/3rdparty/qt-labs-qtscriptgenerator-<qtversion>
local myqtvsrc="5.14.0" # available since 3.24.2.3
#local myqtvsrc="5.14.2" # in git master on 2020 Apr 8 (ie after 3.24.3.0)
local myqt=$(best_version dev-qt/qtcore:5)
local myqtv=${myqt#dev-qt/qtcore-}
local myqtv=${myqtv%-r*}
if ! test -d ${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}
then
einfo Creating QT configuration for QT ${myqtv}
mkdir ${S}/src/3rdparty/qt-labs-qtscriptgenerator-${myqtv}
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
fi
default
}
src_configure() {
eqmake5 -r || die
}
src_install() {
# Create Wayland desktop entry
cp qcad.desktop qcad-wayland.desktop
sed -i 's/Exec=qcad/Exec=qcad -platform xcb/g' qcad-wayland.desktop
sed -i 's/Name=QCAD/Name=QCAD (Wayland)/g' qcad-wayland.desktop
domenu ${S}/*.desktop
doicon ${S}/scripts/${PN}_icon.svg
doicon --size 256 ${S}/scripts/${PN}_icon.png
cd "${S}"
for lingua in "${L10N[@]}"
do
if ! use l10n_${lingua}
then
find -type f -name "*_${lingua}.*" -delete
fi
done
insinto /usr/lib/${PN}/
doins -r scripts fonts patterns linetypes themes
insopts -m0755
doins release/*
make_wrapper ${PN} /usr/lib/${PN}/qcad-bin "" /usr/lib/${PN}:/usr/lib/${PN}/plugins
doins -r plugins
docinto examples
dodoc -r examples/*
docompress -x /usr/share/doc/${PF}/examples
}
pkg_postinst() {
xdg_pkg_postinst
}