2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2014 Alexander Pyhalov. All rights reserved.
18 include ..
/..
/..
/make-rules
/shared-macros.mk
19 include $(WS_MAKE_RULES
)/x11.mk
21 COMPONENT_NAME
= tigervnc
22 COMPONENT_VERSION
= 1.8.0
24 COMPONENT_SUMMARY
= TigerVNC X11
/VNC server
25 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
26 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
27 COMPONENT_ARCHIVE_HASH
= \
28 sha256
:9951dab0e10f8de03996ec94bec0d938da9f36d48dca8c954e8bbc95c16338f8
29 COMPONENT_ARCHIVE_URL
= \
30 https
://github.com
/TigerVNC
/tigervnc
/archive
/v
$(COMPONENT_VERSION
).
tar.gz
31 COMPONENT_PROJECT_URL
= http
://tigervnc.org
/
32 COMPONENT_LICENSE_FILE
= LICENCE.TXT
33 COMPONENT_LICENSE
= GPLv2
35 # Note that the xorg additional patch (tigervnc-xserver) does not fit this pattern. That is intentional
36 PATCH_PATTERN
= [0-9][0-9]*.patch
38 XORG_ADDITIONAL_PATCH_1
= $(PATCH_DIR
)/tigervnc-screenlock.patch
40 XORG_SERVER_VERSION
= 1.19.7
41 XORG_SERVER_PATCH
= xserver119.patch
43 TEST_TARGET
= $(NO_TESTS
)
45 include $(WS_MAKE_RULES
)/common.mk
47 # Avoid prepending /usr/gnu/bin to $(PATH)
48 # as ld is used during dix build and GNU ld
49 # can't handle dtrace probes
50 PATH
=$(GCC_ROOT
)/bin
:$(PATH.illumos
)
52 COMPONENT_POST_UNPACK_ACTION
+= ( cp
-r
$(COMPONENT_DIR
)/srcs
/* $(SOURCE_DIR
) )
54 $(SOURCE_DIR
)/.prep
: $(ARCHIVE_STAMPS
) $(COMPONENT_DIR
)/..
/xorg-server
/xorg-server-
$(XORG_SERVER_VERSION
)/.prep
55 $(COMPONENT_PREP_ACTION
)
56 chmod
-R u
+w
$(COMPONENT_SRC
)/unix
/xserver
57 cp
-r
$(COMPONENT_DIR
)/..
/xorg-server
/xorg-server-
$(XORG_SERVER_VERSION
)/* $(COMPONENT_SRC
)/unix
/xserver
58 $(GPATCH
) -d
$(@D
)/unix
$(GPATCH_FLAGS
) < $(SOURCE_DIR
)/unix
/$(XORG_SERVER_PATCH
)
59 $(GPATCH
) -d
$(@D
) $(GPATCH_FLAGS
) < $(XORG_ADDITIONAL_PATCH_1
)
60 ( cd
$(@D
)/unix
/xserver
&& \
65 $(COMPONENT_DIR
)/..
/xorg-server
/xorg-server-
$(XORG_SERVER_VERSION
)/.prep
:
66 $(GMAKE
) -C
$(COMPONENT_DIR
)/..
/xorg-server prep
68 # Build with the distribution preferred libjpeg implementation
69 CFLAGS
+= $(JPEG_CPPFLAGS
) $(JPEG_CFLAGS
)
70 CXXFLAGS
+= $(JPEG_CPPFLAGS
) $(JPEG_CXXFLAGS
)
71 LDFLAGS
+= $(JPEG_LDFLAGS
)
73 JPEG_PKG_CONFIG_PATH
= $(JPEG_LIBDIR.
$(BITS
))/pkgconfig
75 # Set standard explicitly
77 CXXFLAGS
+= -std
=gnu
++98
79 COMPONENT_PRE_CMAKE_ACTION
= ($(CLONEY
) $(SOURCE_DIR
) $(@D
))
81 CMAKE_OPTIONS
+= -DCMAKE_BUILD_TYPE
=Release
82 CMAKE_OPTIONS
+= -DENABLE_NLS
:BOOL
=OFF
83 CMAKE_OPTIONS
+= -DBUILD_JAVA
:BOOL
=TRUE
84 CMAKE_OPTIONS
+= -DCMAKE_C_ARCHIVE_CREATE
:STRING
="crS"
85 CMAKE_OPTIONS
+= -DCMAKE_CXX_ARCHIVE_CREATE
:STRING
="crS"
86 CMAKE_OPTIONS
+= -G
"Unix Makefiles"
88 # Disable epoll on illumos
89 XVNC_CONFIGURE_OPTIONS
+= ac_cv_func_epoll_ctl
=no
90 XVNC_CONFIGURE_OPTIONS
+= ac_cv_func_epoll_create1
=no
92 CONFIGURE_LIBDIR
= /usr
/lib
/vnc
94 # I don't know why, but it just doesn't work without this
97 CPPFLAGS
+= $(CPP_LARGEFILES
)
98 CPPFLAGS
+= -DSUNSOFT
-DTSOL
99 CPPFLAGS
+= -I
/usr
/include/pixman-1
100 CPPFLAGS
+= -I
/usr
/include/mesa
101 CPPFLAGS
+= -I
/usr
/include/xorg
103 # Required for linking to libXfont2
104 LDFLAGS
+= -L
$(X11_SERVERLIBS_DIR
) -R
$(X11_SERVERLIBS_DIR
)
106 CONFIGURE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
107 CMAKE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
109 JAVA_SOURCE_DIR
= $(SOURCE_DIR
)/java
/com
/tigervnc
110 JAVA_BUILD_DIR
= $(BUILD_DIR_64
)/java
111 JAVA_INSTALL_DIR
= $(PROTO_DIR
)/usr
/share
/vnc
/classes
113 XVNC_CONFIGURE_SCRIPT
= $(BUILD_DIR_64
)/unix
/xserver
/configure
115 XVNC_CONFIGURE_OPTIONS
+= --bindir=$(USRBINDIR
)
116 XVNC_CONFIGURE_OPTIONS
+= --disable-builddocs
117 XVNC_CONFIGURE_OPTIONS
+= --disable-config-hal
118 XVNC_CONFIGURE_OPTIONS
+= --disable-dga
119 XVNC_CONFIGURE_OPTIONS
+= --disable-dmx
120 XVNC_CONFIGURE_OPTIONS
+= --disable-dri3
121 XVNC_CONFIGURE_OPTIONS
+= --disable-install-setuid
122 XVNC_CONFIGURE_OPTIONS
+= --disable-kdrive
123 XVNC_CONFIGURE_OPTIONS
+= --disable-present
124 XVNC_CONFIGURE_OPTIONS
+= --disable-static
125 XVNC_CONFIGURE_OPTIONS
+= --disable-unit-tests
126 XVNC_CONFIGURE_OPTIONS
+= --disable-xephyr
127 XVNC_CONFIGURE_OPTIONS
+= --disable-xfree86-utils
128 XVNC_CONFIGURE_OPTIONS
+= --disable-xnest
129 XVNC_CONFIGURE_OPTIONS
+= --disable-xorg
130 XVNC_CONFIGURE_OPTIONS
+= --disable-xsdl
131 XVNC_CONFIGURE_OPTIONS
+= --disable-xvfb
132 XVNC_CONFIGURE_OPTIONS
+= --disable-xwin
133 XVNC_CONFIGURE_OPTIONS
+= --enable-dri2
134 XVNC_CONFIGURE_OPTIONS
+= --enable-glx
135 XVNC_CONFIGURE_OPTIONS
+= --enable-shared
136 XVNC_CONFIGURE_OPTIONS
+= --enable-xcsecurity
137 XVNC_CONFIGURE_OPTIONS
+= --enable-xdm-auth-1
138 XVNC_CONFIGURE_OPTIONS
+= --enable-xdmcp
139 XVNC_CONFIGURE_OPTIONS
+= --prefix=/usr
140 XVNC_CONFIGURE_OPTIONS
+= --with-builderstring
="Solaris ABI: $(BITS)-bit"
141 XVNC_CONFIGURE_OPTIONS
+= --with-default-font-path
='catalogue:/etc/X11/fontpath.d'
142 XVNC_CONFIGURE_OPTIONS
+= --with-default-xkb-model
=pc105
143 XVNC_CONFIGURE_OPTIONS
+= --with-dri-driver-path
=/usr
/lib
/xorg
/modules
/dri
144 XVNC_CONFIGURE_OPTIONS
+= --with-log-dir
=/var
/log
145 XVNC_CONFIGURE_OPTIONS
+= --with-module-dir
=/usr
/lib
/xorg
/modules
146 XVNC_CONFIGURE_OPTIONS
+= --with-os-name
="`uname -srm`"
147 XVNC_CONFIGURE_OPTIONS
+= --with-vendor-name
="Project OpenIndiana"
148 XVNC_CONFIGURE_OPTIONS
+= --with-vendor-web
="http://openindiana.org"
149 XVNC_CONFIGURE_OPTIONS
+= --with-xkb-bin-directory
=/usr
/bin
150 XVNC_CONFIGURE_OPTIONS
+= --with-xkb-output
=/var
/run
/xkb
151 XVNC_CONFIGURE_OPTIONS
+= --without-int10
152 XVNC_CONFIGURE_OPTIONS
+= --disable-selective-werror
153 XVNC_CONFIGURE_OPTIONS
+= CC
="$(CC)"
154 XVNC_CONFIGURE_OPTIONS
+= AR_FLAGS
="cruS"
155 XVNC_CONFIGURE_OPTIONS
+= LDFLAGS
="$(LDFLAGS)"
156 XVNC_CONFIGURE_OPTIONS
+= CFLAGS
="$(CFLAGS)"
157 XVNC_CONFIGURE_OPTIONS
+= CXXFLAGS
="$(CXXFLAGS)"
159 $(BUILD_DIR
)/.configured_Xvnc
: BITS
=64
160 $(BUILD_DIR
)/.built_Xvnc
: BITS
=64
162 $(BUILD_DIR
)/.configured_Xvnc
: $(BUILD_DIR_64
)/.configured
163 (cd
$(BUILD_DIR_64
)/unix
/xserver
; \
164 $(ENV
) $(CONFIGURE_ENV
) $(CONFIG_SHELL
) \
165 $(XVNC_CONFIGURE_SCRIPT
) $(XVNC_CONFIGURE_OPTIONS
))
168 $(BUILD_DIR
)/.built_Xvnc
: $(BUILD_64
) $(BUILD_DIR
)/.configured_Xvnc
169 (cd
$(BUILD_DIR_64
)/unix
; $(ENV
) $(COMPONENT_BUILD_ENV
) \
170 $(GMAKE
) $(COMPONENT_BUILD_GMAKE_ARGS
) $(COMPONENT_BUILD_ARGS
) \
171 $(COMPONENT_BUILD_TARGETS
))
172 (cd
$(BUILD_DIR_64
)/unix
/xserver
; $(ENV
) $(COMPONENT_BUILD_ENV
) \
173 $(GMAKE
) $(COMPONENT_BUILD_GMAKE_ARGS
) $(COMPONENT_BUILD_ARGS
) \
174 $(COMPONENT_BUILD_TARGETS
))
177 $(BUILD_DIR
)/.installed_jar
: $(INSTALL_64
)
178 rm -fr
$(JAVA_INSTALL_DIR
)
179 $(MKDIR
) $(JAVA_INSTALL_DIR
)
181 $(JAVA_SOURCE_DIR
)/vncviewer
/README \
182 $(JAVA_SOURCE_DIR
)/vncviewer
/LICENCE.TXT \
183 $(JAVA_SOURCE_DIR
)/vncviewer
/index.html \
184 $(JAVA_SOURCE_DIR
)/vncviewer
/index.vnc \
185 $(JAVA_SOURCE_DIR
)/vncviewer
/tigervnc_16.gif \
187 $(INSTALL
) -m
0555 $(JAVA_BUILD_DIR
)/VncViewer.jar
$(JAVA_INSTALL_DIR
)
190 $(BUILD_DIR
)/.installed_Xvnc
: $(INSTALL_64
) $(BUILD_DIR
)/.built_Xvnc
191 (cd
$(BUILD_DIR_64
)/unix
/xserver
/hw
/vnc
; $(ENV
) $(COMPONENT_INSTALL_ENV
) \
192 $(GMAKE
) $(COMPONENT_BUILD_GMAKE_ARGS
) $(COMPONENT_INSTALL_ARGS
) \
193 $(COMPONENT_INSTALL_TARGETS
))
197 build
: $(BUILD_64
) $(BUILD_DIR
)/.built_Xvnc
199 install: $(INSTALL_64
) $(BUILD_DIR
)/.installed_jar
$(BUILD_DIR
)/.installed_Xvnc
202 REQUIRED_PACKAGES
+= text
/xmlto
203 REQUIRED_PACKAGES
+= x11
/server
/xorg
205 # Auto-generated dependencies
206 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
207 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
208 REQUIRED_PACKAGES
+= image
/library
/libjpeg8-turbo
209 REQUIRED_PACKAGES
+= library
/fltk
210 REQUIRED_PACKAGES
+= library
/gnutls-3
211 REQUIRED_PACKAGES
+= library
/graphics
/pixman
212 REQUIRED_PACKAGES
+= library
/zlib
213 REQUIRED_PACKAGES
+= runtime
/perl
214 REQUIRED_PACKAGES
+= system
/library
215 REQUIRED_PACKAGES
+= system
/library
/math
216 REQUIRED_PACKAGES
+= x11
/library
/libx11
217 REQUIRED_PACKAGES
+= x11
/library
/libxau
218 REQUIRED_PACKAGES
+= x11
/library
/libxdamage
219 REQUIRED_PACKAGES
+= x11
/library
/libxdmcp
220 REQUIRED_PACKAGES
+= x11
/library
/libxext
221 REQUIRED_PACKAGES
+= x11
/library
/libxfixes
222 REQUIRED_PACKAGES
+= x11
/library
/libxfont2
223 REQUIRED_PACKAGES
+= x11
/library
/libxrender
224 REQUIRED_PACKAGES
+= x11
/library
/libxtst
225 REQUIRED_PACKAGES
+= x11
/server
/xserver-common