# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit toolchain-funcs wrapper desktop MAJOR_PV="$(ver_cut 1-3)" FULL_PV="${MAJOR_PV}-$(ver_cut 4)" DESCRIPTION="X11/VNC/NXServer client (remote desktops over low-bandwidth links)" HOMEPAGE="http://www.nomachine.com/" SRC_URI="amd64? ( http://ftp.disconnected-by-peer.at/NX/Linux/nxclient-${FULL_PV}.x86_64.tar.gz ) x86? ( http://ftp.disconnected-by-peer.at/NX/Linux/nxclient-${FULL_PV}.i386.tar.gz ) https://github.com/dimbor-ru/freenx-server/files/4128228/nxfixglibc1190.tar.gz" LICENSE="nomachine" SLOT="0" KEYWORDS="-* amd64 x86" IUSE="cups" RESTRICT="strip" DEPEND="" RDEPEND="dev-libs/expat dev-libs/openssl-compat:0.9.8 media-libs/audiofile virtual/jpeg-compat:62 media-libs/libpng-compat:1.2 media-libs/freetype media-libs/fontconfig cups? ( net-print/cups ) x11-libs/libXft x11-libs/libX11 x11-libs/libXdmcp x11-libs/libXrender x11-libs/libXau x11-libs/libXext sys-libs/zlib" S=${WORKDIR}/NX src_compile() { $(tc-getCC) -shared -ldl -fPIC "${WORKDIR}"/nxfixglibc1190/nxfixglibc1190.c -o "${WORKDIR}"/NX/lib/nxfixglibc1190.so default } src_install() { # we install nxclient into /usr/NX, to make sure it doesn't clash # with libraries installed for FreeNX local binaries="nxclient nxclient.bin nxesd nxkill nxservice nxssh" use cups && binaries="$binaries nxprint" cp bin/nxclient bin/nxclient.bin echo '#!/bin/sh' > bin/nxclient echo 'LD_PRELOAD=/usr/NX/lib/nxfixglibc1190.so /usr/NX/bin/nxclient.bin $@' >> bin/nxclient for x in $binaries; do into /usr/NX dobin bin/$x into /usr make_wrapper $x ./$x /usr/NX/bin /usr/NX/lib || die done dodir /usr/NX/lib cp -P lib/libXcompsh.so* lib/libXcomp.so* lib/nxfixglibc1190.so "${D}"/usr/NX/lib dodir /usr/NX/share cp -R share "${D}"/usr/NX # Add icons/desktop entries (missing in the tarball) cd share/icons for size in *; do #doicon -s ${size} share/icons/hicolor/${size}/apps dodir /usr/share/icons/hicolor/${size}/apps for icon in admin desktop icon wizard; do dosym /usr/NX/share/icons/${size}/nxclient-${icon}.png \ /usr/share/icons/hicolor/${size}/apps/nxclient-${icon}.png done done make_desktop_entry "nxclient" "NX Client" nxclient-icon make_desktop_entry "nxclient -admin" "NX Session Administrator" nxclient-admin make_desktop_entry "nxclient -wizard" "NX Connection Wizard" nxclient-wizard }