summaryrefslogtreecommitdiff
blob: 574c1976ac85781151696c0c42aebc632820aa06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/nx/nx-1.5.0.ebuild,v 1.2 2007/04/26 10:06:32 voyageur Exp $

inherit eutils

DESCRIPTION="A special version of the X11 libraries supporting NX compression technology"
HOMEPAGE="http://www.nomachine.com/developers.php"

URI_BASE="http://web04.nomachine.com/download/1.5.0/sources"
SRC_NX_X11="nx-X11-$PV-21.tar.gz"
SRC_NXAGENT="nxagent-$PV-112.tar.gz"
SRC_NXAUTH="nxauth-$PV-1.tar.gz"
SRC_NXCOMP="nxcomp-$PV-80.tar.gz"
SRC_NXCOMPEXT="nxcompext-$PV-20.tar.gz"
SRC_NXDESKTOP="nxdesktop-$PV-78.tar.gz"
SRC_NXVIEWER="nxviewer-$PV-15.tar.gz"
SRC_NXPROXY="nxproxy-$PV-9.tar.gz"

SRC_URI="$URI_BASE/$SRC_NX_X11 $URI_BASE/$SRC_NXAGENT $URI_BASE/$SRC_NXPROXY
	$URI_BASE/$SRC_NXAUTH $URI_BASE/$SRC_NXCOMPEXT $URI_BASE/$SRC_NXCOMP
	rdesktop? ( $URI_BASE/$SRC_NXDESKTOP )
	vnc? ( $URI_BASE/$SRC_NXVIEWER )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="rdesktop vnc"

RDEPEND="|| ( ( x11-libs/libX11
				x11-libs/libFS
				x11-libs/libXvMC
				x11-libs/libICE
				x11-libs/libXmu
				x11-libs/libXdmcp
				x11-libs/libSM
				x11-libs/libXt
				x11-libs/libXau
				x11-libs/libXaw
				x11-libs/libXp
				x11-libs/libXpm
				x11-libs/libXext
				dev-libs/openssl
				media-libs/mesa
			)
			virtual/x11
		)
		>=media-libs/jpeg-6b-r4
		>=media-libs/libpng-1.2.8
		>=sys-libs/zlib-1.2.3
		virtual/libc"

DEPEND="${RDEPEND}
		|| ( ( x11-proto/xproto
				x11-proto/xf86vidmodeproto
				x11-proto/glproto
				x11-proto/videoproto
				x11-proto/xextproto
				x11-proto/fontsproto

				x11-misc/gccmakedep
				x11-misc/imake

				app-text/rman
			)
			virtual/x11
		)
		app-text/rman
		"
S=${WORKDIR}/${PN//x11/X11}

src_unpack() {
	# we can't use ${A} because of bug #61977
	unpack ${SRC_NX_X11}
	unpack ${SRC_NXAGENT}
	unpack ${SRC_NXAUTH}
	unpack ${SRC_NXCOMPEXT}
	unpack ${SRC_NXCOMP}
	unpack ${SRC_NXPROXY}
	use rdesktop && unpack ${SRC_NXDESKTOP}
	use vnc && unpack ${SRC_NXVIEWER}

	cd ${S}
	epatch ${FILESDIR}/1.5.0/nx-x11-windows-linux-resume.patch
	epatch ${FILESDIR}/1.5.0/nx-x11-1.5.0-plastik-render-fix.patch
	epatch ${FILESDIR}/1.5.0/nx-x11-1.5.0-xorg7-font-fix.patch
	epatch ${FILESDIR}/1.5.0/nx-x11-1.5.0-tmp-exec.patch
	epatch ${FILESDIR}/1.5.0/nx-x11-1.5.0-amd64.patch

	cd ${WORKDIR}/nxcomp
	epatch ${FILESDIR}/1.5.0/nxcomp-1.5.0-pic.patch
	epatch ${FILESDIR}/1.5.0/nxcomp-1.5.0-gcc4.patch
}

src_compile() {
	cd ${WORKDIR}/nxcomp || die
	./configure || die
	emake || die

	cd ${WORKDIR}/nxproxy || die
	./configure || die
	emake || die

	cd ${WORKDIR}/nx-X11 || die
	emake World || die

	cd ${WORKDIR}/nxcompext || die
	./configure || die
	emake || die

	if use vnc ; then
		cd ${WORKDIR}/nxviewer || die
		xmkmf -a || die
		emake World || die
	fi

	if use rdesktop ; then
		cd ${WORKDIR}/nxdesktop || die
		./configure || die
		emake || die
	fi
}

src_install() {
	newbin ${FILESDIR}/1.5.0/nxwrapper nxagent || die
	newbin ${FILESDIR}/1.5.0/nxwrapper nxauth  || die
	newbin ${FILESDIR}/1.5.0/nxwrapper nxproxy || die
	if use vnc ; then
		newbin ${FILESDIR}/1.5.0/nxwrapper nxviewer || die
		newbin ${FILESDIR}/1.5.0/nxwrapper nxpasswd || die
	fi
	if use rdesktop ; then
		newbin ${FILESDIR}/1.5.0/nxwrapper nxdesktop || die
	fi

	into /usr/lib/NX
	dobin ${WORKDIR}/nx-X11/programs/Xserver/nxagent || die
	dobin ${WORKDIR}/nx-X11/programs/nxauth/nxauth || die
	dobin ${WORKDIR}/nxproxy/nxproxy || die

	if use vnc ; then
		dobin ${WORKDIR}/nxviewer/nxviewer/nxviewer || die
		dobin ${WORKDIR}/nxviewer/nxpasswd/nxpasswd || die
	fi

	if use rdesktop ; then
		dobin ${WORKDIR}/nxdesktop/nxdesktop || die
	fi

	dolib.so ${WORKDIR}/nx-X11/lib/X11/libX11.so* || die
	dolib.so ${WORKDIR}/nx-X11/lib/Xext/libXext.so* || die
	dolib.so ${WORKDIR}/nx-X11/lib/Xrender/libXrender.so* || die
	dolib.so ${WORKDIR}/nxcomp/libXcomp.so* || die
	dolib.so ${WORKDIR}/nxcompext/libXcompext.so* || die
}