Apocrypha

pablodraw-3.3.13_beta-r1gentoo

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DOTNET_PKG_COMPAT=8.0
NUGETS="
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
"

inherit desktop dotnet-pkg xdg

DESCRIPTION="Ansi/Ascii text and RIPscrip vector graphic art editor/viewer"
HOMEPAGE="https://picoe.ca/products/pablodraw/
	https://github.com/cwensley/pablodraw/"

if [[ "${PV}" == *9999* ]] ; then
	inherit git-r3

	EGIT_REPO_URI="https://github.com/cwensley/${PN}.git"
else
	SRC_URI="https://github.com/cwensley/${PN}/archive/${PV/_/-}.tar.gz
		-> ${P}.tar.gz"
	S="${WORKDIR}/${P/_/-}"

	KEYWORDS="amd64"
fi

SRC_URI+=" ${NUGET_URIS} "

LICENSE="MIT"
SLOT="0"

RDEPEND="
	 x11-libs/gtk+:3[introspection]
"
BDEPEND="
	${RDEPEND}
"

DOTNET_PKG_PROJECTS=( Source/PabloDraw/PabloDraw.csproj )
PATCHES=( "${FILESDIR}/${PN}-3.3.13_beta-csproj.patch" )

src_unpack() {
	dotnet-pkg_src_unpack

	if [[ -n "${EGIT_REPO_URI}" ]] ; then
		git-r3_src_unpack
	fi
}

src_install() {
	dotnet-pkg_src_install
	dotnet-pkg-base_dolauncher "/usr/share/${P}/PabloDraw" "${PN}"

	doicon Assets/PabloDraw.png
	make_desktop_entry "${PN}" PabloDraw PabloDraw "Graphics;RasterGraphics;"
}