Lines 2-93
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= xrdp |
4 |
PORTNAME= xrdp |
5 |
PORTVERSION= 0.7.0.b20130912 |
5 |
PORTVERSION= 0.9.1 |
6 |
PORTREVISION= 4 |
6 |
DISTVERSIONPREFIX= v |
7 |
PORTEPOCH= 1 |
7 |
PORTEPOCH= 1 |
8 |
CATEGORIES= net |
8 |
CATEGORIES= net |
9 |
PKGNAMESUFFIX= -devel |
9 |
PKGNAMESUFFIX= -devel |
|
|
10 |
DIST_SUBDIR?= ${PORTNAME} |
10 |
|
11 |
|
11 |
MAINTAINER= meta+ports@vmeta.jp |
12 |
MAINTAINER= meta+ports@vmeta.jp |
12 |
COMMENT= Open source Remote Desktop Protocol (RDP) server |
13 |
COMMENT= Open source Remote Desktop Protocol (RDP) server |
13 |
|
14 |
|
14 |
LICENSE= GPLv2 |
15 |
LICENSE= APACHE20 |
|
|
16 |
LICENSE_FILE= ${WRKSRC}/COPYING |
17 |
|
18 |
# pulseaudio's built source is required for audio redirection |
19 |
BUILD_DEPENDS= ${NONEXISTENT}:audio/pulseaudio:configure \ |
20 |
${LOCALBASE}/bin/nasm:devel/nasm |
21 |
RUN_DEPENDS= ${LOCALBASE}/lib/xorg/modules/libxorgxrdp.so:x11-drivers/xorgxrdp |
15 |
|
22 |
|
16 |
USES= autoreconf:build jpeg libtool pkgconfig ssl |
23 |
USES= autoreconf:build jpeg libtool pkgconfig ssl |
17 |
USE_XORG= x11 xfixes |
24 |
USE_XORG= ice pixman sm x11 xfixes xrandr |
18 |
GNU_CONFIGURE= yes |
25 |
GNU_CONFIGURE= yes |
19 |
USE_RC_SUBR= xrdp |
|
|
20 |
USE_LDCONFIG= ${PREFIX}/lib/xrdp |
26 |
USE_LDCONFIG= ${PREFIX}/lib/xrdp |
21 |
USE_GITHUB= yes |
27 |
USE_GITHUB= yes |
22 |
GH_ACCOUNT= neutrinolabs |
28 |
GH_ACCOUNT= neutrinolabs |
23 |
GH_TAGNAME= 64e2291 |
29 |
GH_PROJECT= xrdp librfxcodec:librfxcodec libpainter:libpainter |
|
|
30 |
GH_TAGNAME= v0.1.0:librfxcodec v0.1.0:libpainter |
24 |
|
31 |
|
25 |
CONFIGURE_ARGS= --localstatedir=/var \ |
32 |
CONFIGURE_ARGS= --localstatedir=/var \ |
26 |
--enable-jpeg |
33 |
--with-pkgconfigdir=${LOCALBASE}/libdata/pkgconfig \ |
27 |
CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC} |
34 |
--enable-jpeg --enable-pixman --enable-rfxcodec --enable-painter |
28 |
LIBS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} |
35 |
LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} -lssl |
|
|
36 |
CFLAGS+= -I${LOCALBASE}/include -L${OPENSSLINC} |
29 |
CONFLICTS= xrdp-[0-9]* |
37 |
CONFLICTS= xrdp-[0-9]* |
30 |
# xrdp v0.7 is not compatible with current net/freerdp (1.0.2) |
38 |
INSTALL_TARGET= install-strip |
31 |
#BUILD_DEPENDS+= freerdp>=1.0.2:net/freerdp |
39 |
SUB_FILES= pkg-install pkg-message |
32 |
#CONFIGURE_ARGS+= --enable-freerdp1 |
40 |
SUB_LIST= OPENSSLBASE=${OPENSSLBASE} |
33 |
|
41 |
|
34 |
OPTIONS_DEFINE= DEBUG SOUND |
42 |
OPTIONS_DEFINE= DEBUG FUSE IPV6 MP3LAME OPUS |
35 |
OPTIONS_DEFAULT= TIGERVNC JP106 |
43 |
OPTIONS_DEFAULT= OPUS MP3LAME |
36 |
OPTIONS_GROUP= KEYMAP |
44 |
FUSE_DESC= Enable drive redirection via FUSE (experimental) |
37 |
OPTIONS_GROUP_KEYMAP= JP106 |
45 |
MP3LAME_DESC= Enable MP3 Lame for audio redirection |
38 |
OPTIONS_RADIO= XVNC |
46 |
OPUS_DESC= Enable Opus for audio redirection |
39 |
OPTIONS_RADIO_XVNC= TIGERVNC TIGHTVNC TRIDIAVNC |
47 |
|
40 |
TIGERVNC_DESC= Use TigerVNC (recommended) |
48 |
IPV6_CONFIGURE_ENABLE= ipv6 |
41 |
TIGHTVNC_DESC= Use TightVNC |
49 |
DEBUG_CONFIGURE_ENABLE= xrdpdebug |
42 |
TRIDIAVNC_DESC= Use TridiaVNC |
50 |
FUSE_CONFIGURE_ENABLE= fuse |
43 |
SOUND_DESC= Enable sound support via pulseaudio (experimental) |
51 |
MP3LAME_CONFIGURE_ENABLE= mp3lame |
44 |
JP106_DESC= Install Japanese JP106 keymap |
52 |
MP3LAME_LIB_DEPENDS= libmp3lame.so:audio/lame |
|
|
53 |
OPUS_CONFIGURE_ENABLE= opus |
54 |
OPUS_LIB_DEPENDS= libopus.so:audio/opus |
55 |
|
56 |
# don't forget to increase PORTREVISION after pulseaudio update |
57 |
PULSE_VERSION= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VPORTVERSION |
58 |
PULSE_WRKSRC= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VWRKSRC |
45 |
|
59 |
|
46 |
.include <bsd.port.options.mk> |
60 |
.include <bsd.port.options.mk> |
47 |
|
61 |
|
48 |
# Which Xserver to use |
62 |
.if ${PORT_OPTIONS:MFUSE} |
49 |
.if ${PORT_OPTIONS:MTIGERVNC} |
63 |
USES+= fuse |
50 |
RUN_DEPENDS= Xvnc:net/tigervnc |
|
|
51 |
.endif |
52 |
.if ${PORT_OPTIONS:MTIGHTVNC} |
53 |
RUN_DEPENDS= Xvnc:net/tightvnc |
54 |
.endif |
55 |
.if ${PORT_OPTIONS:MTRIDIAVNC} |
56 |
RUN_DEPENDS= Xvnc:net/tridiavnc |
57 |
.endif |
64 |
.endif |
58 |
|
65 |
|
59 |
.if ${PORT_OPTIONS:MDEBUG} |
66 |
post-extract: |
60 |
CONFIGURE_ARGS+= --enable-xrdpdebug |
67 |
# librfxcodec is provided as git submodule |
61 |
CFLAGS+= -DXRDP_DEBUG |
68 |
@${CP} -r ${WRKSRC_librfxcodec}/ ${WRKSRC}/librfxcodec/ |
62 |
.endif |
69 |
@${CP} -r ${WRKSRC_libpainter}/ ${WRKSRC}/libpainter/ |
63 |
|
|
|
64 |
.if ${PORT_OPTIONS:MJP106} |
65 |
KEYMAP_FILES+= km-0411.ini km-e0010411.ini \ |
66 |
km-e0200411.ini km-e0210411.ini |
67 |
PLIST_SUB+= JP106="" |
68 |
.else |
69 |
PLIST_SUB+= JP106="@comment " |
70 |
.endif |
71 |
|
72 |
.if ${PORT_OPTIONS:MSOUND} |
73 |
BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/simple.h:audio/pulseaudio \ |
74 |
${LOCALBASE}/include/pulse/error.h:audio/pulseaudio |
75 |
CONFIGURE_ARGS+= --enable-simplesound |
76 |
.endif |
77 |
|
78 |
SUB_FILES= pkg-message |
79 |
|
70 |
|
80 |
post-patch: |
71 |
post-patch: |
81 |
.for f in sesman/sesman.ini sesman/startwm.sh xrdp/rsakeys.ini xrdp/xrdp.ini |
72 |
@${REINPLACE_CMD} \ |
82 |
@${MV} ${WRKSRC}/$f ${WRKSRC}/$f.sample |
73 |
-e "s|^PULSE_SCRIPT=/etc/xrdp/pulse/default.pa|PULSE_SCRIPT=${PREFIX}/etc/xrdp/pulse/default.pa|" \ |
83 |
.endfor |
74 |
${WRKSRC}/sesman/sesman.ini |
|
|
75 |
@${REINPLACE_CMD} \ |
76 |
-e "s|^PULSE_DIR = .*|PULSE_DIR = `${PULSE_WRKSRC}`|" \ |
77 |
-e "s|-Wall -O2|-Wall -O2 -I${LOCALBASE}/include|" \ |
78 |
${WRKSRC}/sesman/chansrv/pulse/Makefile |
84 |
|
79 |
|
85 |
pre-configure: |
80 |
pre-configure: |
86 |
@cd ${WRKSRC} && ./bootstrap |
81 |
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./bootstrap |
|
|
82 |
|
83 |
post-build: |
84 |
# build pulseaudio module |
85 |
@${CP} -r "`${PULSE_WRKSRC}`" ${WRKDIR} |
86 |
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} -C sesman/chansrv/pulse |
87 |
|
87 |
|
88 |
post-install: |
88 |
post-install: |
89 |
.for f in ${KEYMAP_FILES} |
89 |
# install pulseaudio module |
90 |
${INSTALL_DATA} ${FILESDIR}/$f ${STAGEDIR}${PREFIX}/etc/xrdp |
90 |
${MKDIR} "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" |
|
|
91 |
.for f in module-xrdp-sink.so module-xrdp-source.so |
92 |
${INSTALL_LIB} -m 0755 ${WRKSRC}/sesman/chansrv/pulse/$f \ |
93 |
"${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" |
94 |
.endfor |
95 |
# substitute pkg-plist not using PLIST_SUB |
96 |
${REINPLACE_CMD} -e "s|%%PULSE_VERSION%%|`${PULSE_VERSION}`|g" ${TMPPLIST} |
97 |
|
98 |
post-stage: |
99 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/rsakeys.ini |
100 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/cert.pem |
101 |
@${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/key.pem |
102 |
.for f in sesman.ini startwm.sh xrdp.ini xrdp_keyboard.ini |
103 |
@${MV} ${STAGEDIR}${PREFIX}/etc/xrdp/$f ${STAGEDIR}${PREFIX}/etc/xrdp/$f.sample |
91 |
.endfor |
104 |
.endfor |
92 |
|
105 |
|
93 |
.include <bsd.port.mk> |
106 |
.include <bsd.port.mk> |