net-snmp sun mods install: make sure destdirs exist
[unleashed-userland.git] / components / x11 / tigervnc / Makefile
blobda825cd2a966383ea769682337cc9e03668650ce
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
5 # 1.0 of the CDDL.
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.
16 include ../../../make-rules/shared-macros.mk
18 COMPONENT_NAME= tigervnc
19 COMPONENT_VERSION= 1.1.0
20 COMPONENT_REVISION= 2
21 COMPONENT_SUMMARY= TigerVNC X11/VNC server
22 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
23 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
24 COMPONENT_ARCHIVE_HASH= \
25 sha256:594b70825a2c24863afd7b8dd2a5bc1935807118c6726e1d98396dee44d060f4
26 COMPONENT_ARCHIVE_URL= \
27 ftp://tux.rainside.sk/gentoo/distfiles/$(COMPONENT_ARCHIVE)
28 COMPONENT_PROJECT_URL = http://tigervnc.org/
29 COMPONENT_LICENSE_FILE= LICENCE.TXT
30 COMPONENT_LICENSE= GPLv2
32 PATCH_LEVEL=0
34 # Note that the xorg additional patch (tigervnc-xserver) does not fit this pattern. That is intentional
35 PATCH_PATTERN = [0-9][0-9]*.patch
37 XORG_ADDITIONAL_PATCH_1 = $(PATCH_DIR)/tigervnc11-xorg111.patch
38 XORG_ADDITIONAL_PATCH_2 = $(PATCH_DIR)/tigervnc11-xorg112.patch
39 XORG_ADDITIONAL_PATCH_3 = $(PATCH_DIR)/tigervnc11-xorg114.patch
41 XORG_SERVER_VERSION= 1.14.7
43 include $(WS_TOP)/make-rules/prep.mk
44 include $(WS_TOP)/make-rules/configure.mk
45 include $(WS_TOP)/make-rules/ips.mk
47 COMPONENT_POST_UNPACK_ACTION += ( cp -r $(COMPONENT_DIR)/srcs/* $(SOURCE_DIR) )
49 $(SOURCE_DIR)/.prep: $(ARCHIVE_STAMPS) $(COMPONENT_DIR)/../xorg-server/xorg-server-$(XORG_SERVER_VERSION)/.prep
50 $(COMPONENT_PREP_ACTION)
51 chmod -R u+w $(COMPONENT_SRC)/unix/xserver
52 cp -r $(COMPONENT_DIR)/../xorg-server/xorg-server-$(XORG_SERVER_VERSION)/* $(COMPONENT_SRC)/unix/xserver
53 $(GPATCH) -d $(@D)/unix $(GPATCH_FLAGS) < $(SOURCE_DIR)/unix/xserver114.patch
54 $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(XORG_ADDITIONAL_PATCH_1)
55 $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(XORG_ADDITIONAL_PATCH_2)
56 $(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(XORG_ADDITIONAL_PATCH_3)
57 ( cd $(@D)/unix/xserver && \
58 aclocal -I m4 && \
59 autoheader && \
60 libtoolize --automake --copy --force && \
61 automake -a -f -c &&\
62 autoconf)
63 $(TOUCH) $@
66 $(COMPONENT_DIR)/../xorg-server/xorg-server-$(XORG_SERVER_VERSION)/.prep:
67 $(GMAKE) -C $(COMPONENT_DIR)/../xorg-server prep
69 # Force use of gnutls-3 pkgconfig during 2.x->3.x transition
70 GNUTLS_PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig/gnutls-3
71 GNUTLS_PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig/gnutls-3
72 PKG_CONFIG_PATH = $(GNUTLS_PKG_CONFIG_PATH_$(BITS)):$(PKG_CONFIG_PATH.$(BITS))
74 LD_OPTIONS.32 += -L/usr/lib/gnutls-3 -R/usr/lib/gnutls-3
75 LD_OPTIONS.64 += -L/usr/lib/$(MACH64)/gnutls-3 -R/usr/lib/$(MACH64)/gnutls-3
76 LD_OPTIONS += $(LD_OPTIONS.$(BITS))
78 COMPONENT_PREP_ACTION = (cd $(@D) &&\
79 aclocal -I m4 && \
80 autoheader && \
81 libtoolize --automake --copy --force && \
82 automake -a -f -c &&\
83 autoconf )
85 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
87 CONFIGURE_OPTIONS+= --with-installed-zlib
88 CONFIGURE_OPTIONS+= --with-system-jpeg
89 CONFIGURE_OPTIONS+= --without-simd
90 CONFIGURE_OPTIONS+= --localstatedir=/var
92 CONFIGURE_LIBDIR = /usr/lib/vnc
94 # I don't know why, but it just doesn't work without this
95 gcc_OPT=
97 CPPFLAGS += -DSUNSOFT
98 CPPFLAGS += -I/usr/include/pixman-1
99 CPPFLAGS += -I/usr/include/xorg
101 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
103 JAVA_INSTALL_DIR = $(PROTO_DIR)/usr/share/vnc/classes
105 XVNC_CONFIGURE_SCRIPT= $(BUILD_DIR_32)/unix/xserver/configure
107 XVNC_CONFIGURE_OPTIONS += --bindir=/usr/bin
108 XVNC_CONFIGURE_OPTIONS += --disable-builddocs
109 XVNC_CONFIGURE_OPTIONS += --disable-config-hal
110 XVNC_CONFIGURE_OPTIONS += --disable-dga
111 XVNC_CONFIGURE_OPTIONS += --disable-dmx
112 XVNC_CONFIGURE_OPTIONS += --disable-dri3
113 XVNC_CONFIGURE_OPTIONS += --disable-install-setuid
114 XVNC_CONFIGURE_OPTIONS += --disable-kdrive
115 XVNC_CONFIGURE_OPTIONS += --disable-present
116 XVNC_CONFIGURE_OPTIONS += --disable-static
117 XVNC_CONFIGURE_OPTIONS += --disable-unit-tests
118 XVNC_CONFIGURE_OPTIONS += --disable-xephyr
119 XVNC_CONFIGURE_OPTIONS += --disable-xfree86-utils
120 XVNC_CONFIGURE_OPTIONS += --disable-xnest
121 XVNC_CONFIGURE_OPTIONS += --disable-xorg
122 XVNC_CONFIGURE_OPTIONS += --disable-xsdl
123 XVNC_CONFIGURE_OPTIONS += --disable-xvfb
124 XVNC_CONFIGURE_OPTIONS += --disable-xwin
125 XVNC_CONFIGURE_OPTIONS += --enable-dri2
126 XVNC_CONFIGURE_OPTIONS += --enable-glx
127 XVNC_CONFIGURE_OPTIONS += --enable-shared
128 XVNC_CONFIGURE_OPTIONS += --enable-xcsecurity
129 XVNC_CONFIGURE_OPTIONS += --enable-xdm-auth-1
130 XVNC_CONFIGURE_OPTIONS += --enable-xdmcp
131 XVNC_CONFIGURE_OPTIONS += --prefix=/usr
132 XVNC_CONFIGURE_OPTIONS += --with-builderstring="Solaris ABI: $(BITS)-bit"
133 XVNC_CONFIGURE_OPTIONS += --with-default-font-path='catalogue:/etc/X11/fontpath.d'
134 XVNC_CONFIGURE_OPTIONS += --with-default-xkb-model=pc105
135 XVNC_CONFIGURE_OPTIONS += --with-dri-driver-path=/usr/lib/xorg/modules/dri
136 XVNC_CONFIGURE_OPTIONS += --with-log-dir=/var/log
137 XVNC_CONFIGURE_OPTIONS += --with-module-dir=/usr/lib/xorg/modules
138 XVNC_CONFIGURE_OPTIONS += --with-os-name="`uname -srm`"
139 XVNC_CONFIGURE_OPTIONS += --with-vendor-name="Project OpenIndiana"
140 XVNC_CONFIGURE_OPTIONS += --with-vendor-web="http://openindiana.org"
141 XVNC_CONFIGURE_OPTIONS += --with-xkb-bin-directory=/usr/bin
142 XVNC_CONFIGURE_OPTIONS += --with-xkb-output=/var/run/xkb
143 XVNC_CONFIGURE_OPTIONS += --without-int10
144 XVNC_CONFIGURE_OPTIONS += --disable-selective-werror
146 $(BUILD_DIR)/.built_jar: $(BULD_32)
147 $(ENV) $(COMPONENT_BUILD_ENV) \
148 $(GMAKE) -C $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer $(COMPONENT_BUILD_GMAKE_ARGS)
149 $(TOUCH) $(@)
151 $(BUILD_DIR)/.installed_jar: $(INSTALL_32) $(BUILD_DIR)/.built_jar
152 rm -fr $(JAVA_INSTALL_DIR)
153 $(MKDIR) $(JAVA_INSTALL_DIR)
154 $(INSTALL) -m 0444 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/README \
155 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/LICENCE.TXT \
156 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/index.html \
157 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/index.vnc \
158 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/tigervnc_16.gif \
159 $(JAVA_INSTALL_DIR)
160 $(INSTALL) -m 0555 $(BUILD_DIR_32)/java/src/com/tigervnc/vncviewer/VncViewer.jar $(JAVA_INSTALL_DIR)
161 $(TOUCH) $(@)
163 $(BUILD_DIR)/.built_Xvnc: $(BULD_32) $(BUILD_DIR)/.configured_Xvnc
164 (cd $(BUILD_DIR_32)/unix; $(ENV) $(COMPONENT_BUILD_ENV) \
165 $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \
166 $(COMPONENT_BUILD_TARGETS))
167 (cd $(BUILD_DIR_32)/unix/xserver; $(ENV) $(COMPONENT_BUILD_ENV) \
168 $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \
169 $(COMPONENT_BUILD_TARGETS))
170 $(TOUCH) $@
172 $(BUILD_DIR)/.installed_Xvnc: $(INSTALL_32) $(BUILD_DIR)/.built_Xvnc
173 (cd $(BUILD_DIR_32)/unix/xserver/hw/vnc; $(ENV) $(COMPONENT_INSTALL_ENV) \
174 $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_INSTALL_ARGS) \
175 $(COMPONENT_INSTALL_TARGETS))
176 $(TOUCH) $@
179 $(BUILD_DIR)/.configured_Xvnc: $(BUILD_DIR_32)/.configured
180 (cd $(BUILD_DIR_32)/unix/xserver ; $(ENV) $(CONFIGURE_ENV) $(CONFIG_SHELL) $(XVNC_CONFIGURE_SCRIPT) $(XVNC_CONFIGURE_OPTIONS))
181 $(TOUCH) $(@)
183 build: $(BUILD_32) $(BUILD_DIR)/.built_jar $(BUILD_DIR)/.built_Xvnc
185 install: $(INSTALL_32) $(BUILD_DIR)/.installed_jar $(BUILD_DIR)/.installed_Xvnc
187 REQUIRED_PACKAGES += image/library/libjpeg6
188 REQUIRED_PACKAGES += image/library/libjpeg6-ijg
189 REQUIRED_PACKAGES += library/gnutls-3
190 REQUIRED_PACKAGES += library/graphics/pixman
191 REQUIRED_PACKAGES += library/zlib
192 REQUIRED_PACKAGES += runtime/perl-522
193 REQUIRED_PACKAGES += system/library
194 REQUIRED_PACKAGES += system/library/g++-4-runtime
195 REQUIRED_PACKAGES += system/library/gcc-4-runtime
196 REQUIRED_PACKAGES += system/library/math
197 REQUIRED_PACKAGES += x11/library/libx11
198 REQUIRED_PACKAGES += x11/library/libxau
199 REQUIRED_PACKAGES += x11/library/libxdmcp
200 REQUIRED_PACKAGES += x11/library/libxext
201 REQUIRED_PACKAGES += x11/library/libxfont
202 REQUIRED_PACKAGES += x11/library/libxtst
203 REQUIRED_PACKAGES += x11/server/xserver-common