# Copyright 2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 IMGUI_PN="imgui" IMGUI_PV="v1.92.7" IMGUI_P="${IMGUI_PN}-${IMGUI_PV}" IMPLOT_PN="implot" IMPLOT_PV="v1.0" IMPLOT_P="${IMPLOT_PN}-${IMPLOT_PV}" #MY_PV="${PV}" #MY_PV="af08c89043604f5e496ce355e1ad05dbf6a8f038" MY_PV="1.1b3508" MY_P="${PN}-${MY_PV}" DESCRIPTION="Thermal Processing Panel - a viewer and analyzer of infrared images" HOMEPAGE="https://codeberg.org/subDIMENSION/thpp" SRC_URI="https://codeberg.org/subDIMENSION/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz https://github.com/ocornut/${IMGUI_PN}/archive/${IMGUI_PV}.tar.gz -> ${IMGUI_P}.tar.gz https://github.com/epezent/${IMPLOT_PN}/archive/${IMPLOT_PV}.tar.gz -> ${IMPLOT_P}.tar.gz " S="${WORKDIR}/${PN}/src" LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64 x86" IUSE="debug" DEPEND="media-libs/libglvnd media-libs/glfw media-libs/libpng media-libs/tiff sys-devel/gcc:*[openmp]" RDEPEND="${DEPEND} media-libs/exiftool" src_unpack() { unpack ${MY_P}.tar.gz || die "Unpacking ${P}.tar.gz failed" cd "${S}/../lib" || die "Unpack incomplete" unpack ${IMGUI_P}.tar.gz || die "Unpacking ${IMGUI_P}.tar.gz failed" unpack ${IMPLOT_P}.tar.gz || die "Unpacking ${IMPLOT_P}.tar.gz failed" rm -rf imgui implot ln -s "${IMGUI_P//v}" imgui ln -s "${IMPLOT_PN}-${IMPLOT_PV//v}" implot } src_prepare() { default sed -i '/CONFIG_DEBUG/d' config.h || die use debug && echo '#define CONFIG_DEBUG' >> config.h } src_install() { insinto /usr/share/thpp dodir /usr/share/thpp newins res/dir_icon.png dir_icon.png newins res/file_icon.png file_icon.png newins res/imgui.ini imgui.ini exeinto /usr/bin/ doexe "${S}/${PN}" }