commit:     85772fa41d7dd2d8f8410024be98e25ee7627976
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 16 21:35:10 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Oct 16 21:35:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85772fa4

x11-misc/xosview: improve xdg integration

Closes: https://bugs.gentoo.org/954885
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 x11-misc/xosview/xosview-1.24-r1.ebuild | 53 +++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/x11-misc/xosview/xosview-1.24-r1.ebuild 
b/x11-misc/xosview/xosview-1.24-r1.ebuild
new file mode 100644
index 000000000000..f84bc4b78d05
--- /dev/null
+++ b/x11-misc/xosview/xosview-1.24-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs xdg
+
+DESCRIPTION="X11 operating system viewer"
+HOMEPAGE="http://www.pogo.org.uk/~mark/xosview/";
+SRC_URI="http://www.pogo.org.uk/~mark/${PN}/releases/${P}.tar.gz";
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="suid"
+
+COMMON_DEPS="x11-libs/libX11
+       x11-libs/libXpm
+       x11-libs/libXt"
+RDEPEND="${COMMON_DEPS}
+       media-fonts/font-misc-misc"
+DEPEND="${COMMON_DEPS}
+       x11-base/xorg-proto"
+
+DOCS=( CHANGES README.linux TODO )
+
+src_prepare() {
+       default
+
+       sed -i -e 's:lib/X11/app:share/X11/app:g' -i ${PN}.1 || die
+       sed -i -e "s:Git:${PV}:g" ${PN}.cc || die
+       tc-export CXX
+}
+
+src_compile() {
+       emake OPTFLAGS=''
+}
+
+src_install() {
+       emake PREFIX="${D}/usr" install
+       use suid && fperms 4755 /usr/bin/${PN}
+       insinto /usr/share/X11/app-defaults
+       newins Xdefaults XOsview
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if ! use suid ; then
+               ewarn "If you want to use serial meters ${PN} needs to be 
executed as root."
+               ewarn "Please see ${EPREFIX}/usr/share/doc/${PF}/README.linux 
for details."
+       fi
+}

Reply via email to