-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
251 lines (216 loc) · 9.41 KB
/
Makefile
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2018, 2024, Oracle and/or its affiliates.
#
BUILD_BITS = 64
include ../../../../make-rules/shared-macros.mk
COMPONENT_NAME= xorg-server
COMPONENT_VERSION= 21.1.12
COMPONENT_ARCHIVE_HASH= \
sha256:1e016e2be1b5ccdd65eac3ea08e54bd13ce8f4f6c3fb32ad6fdac4e71729a90f
COMPONENT_BUGDB= x11/xorg-server
COMPONENT_ANITYA_ID= 5250
COMPONENT_BAID= 163233
# Remove compiler specific visibility flag that breaks builds of drivers
# with other compilers
FIX_PC_FILES = xorg-server.pc.in
COMPONENT_FIX_PC_FLAGS += -e 's|\@symbol_visibility\@||'
include $(WS_MAKE_RULES)/x11-component.mk
CFLAGS.studio += $(studio_FEATURES_EXTENSIONS)
CONFIGURE_OPTIONS += --docdir="$(USRSHAREDOCDIR)"
CONFIGURE_OPTIONS += --disable-dmx
CONFIGURE_OPTIONS += --enable-builddocs
CONFIGURE_OPTIONS += --enable-kdrive
CONFIGURE_OPTIONS += --enable-xephyr
CONFIGURE_OPTIONS += --disable-xsdl
CONFIGURE_OPTIONS += --disable-systemd-logind
CONFIGURE_OPTIONS += --disable-glamor
CONFIGURE_OPTIONS += --enable-xdm-auth-1
CONFIGURE_OPTIONS += --enable-xdmcp
CONFIGURE_OPTIONS += --enable-xcsecurity
CONFIGURE_OPTIONS += --disable-secure-rpc
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --enable-glx
CONFIGURE_OPTIONS += --enable-dri2
CONFIGURE_OPTIONS += --disable-xsdl
CONFIGURE_OPTIONS += --disable-xwin
CONFIGURE_OPTIONS += --disable-xnest
CONFIGURE_OPTIONS += --disable-install-setuid
CONFIGURE_OPTIONS += --without-dtrace
CONFIGURE_OPTIONS += --with-vendor-name="Oracle Corporation, based on X.Org Foundation sources"
CONFIGURE_OPTIONS += --with-vendor-web="https://support.oracle.com/"
CONFIGURE_OPTIONS += --with-builderstring="Solaris ABI: $(BITS)-bit"
CONFIGURE_OPTIONS += --with-os-name="`uname -srm`"
CONFIGURE_OPTIONS += --with-log-dir="/var/log"
CONFIGURE_OPTIONS += --with-xkb-output="/var/run/xkb"
CONFIGURE_OPTIONS += --with-serverconfig-path="/usr/lib/xorg"
CONFIGURE_OPTIONS += --with-module-dir="/usr/lib/xorg/modules"
CONFIGURE_OPTIONS += --with-dri-driver-path="/usr/lib/xorg/modules/dri/$(MACH64)"
CONFIGURE_OPTIONS += --with-default-font-path="catalogue:/etc/X11/fontpath.d"
CONFIGURE_OPTIONS += --with-xkb-bin-directory="$(USRBINDIR)"
CONFIGURE_OPTIONS += --with-default-xkb-model="pc105"
# Makefile.am files of this component are not compatible with Solaris make.
# Use GNU make to avoid the configuration error when makefile fragments are processed.
CONFIGURE_OPTIONS += MAKE=$(GMAKE)
COMPONENT_PREP_ACTION +=(cd $(@D); $(AUTORECONF_ENV) autoreconf -fiv);
COMPONENT_POST_UNPACK_ACTION = \
$(CP) -r sun-src/IA $(SOURCE_DIR); \
$(CP) -r sun-src/os/* $(SOURCE_DIR)/os;
LDFLAGS += -lm
CFLAGS += -I/usr/include/pixman-1
CFLAGS += -I/usr/include/X11/dri/
CPPFLAGS += $(DPMS_DEFINES) -DSUNSOFT -DTSOL
CONFIGURE_ENV += XSERVERCFLAGS_CFLAGS="-DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DXTHREADS -DXUSE_MTSAFE_API"
CONFIGURE_ENV += PTHREAD_LIBS="-lc"
LD_OPTIONS += -z lazyload
# Pass linker mapfile listing symbols that modules can count on resolving
# from the Xorg binary itself
LD_SHARED_OPTIONS += -M$(COMPONENT_DIR)/mapfile.$(MACH)
LD_OPTIONS += -M$(COMPONENT_DIR)/mapfile.$(MACH)
# Disable direct binding in shared objects, since it breaks libglx.so
COMPONENT_BUILD_ENV += LD_SHARED_UNSET="$(LD_B_DIRECT)"
# configure scripts add libraries like -lm to the global $(LIBS) when only
# some objects need them, so discard them in the rest, but only when building
# programs or .so's, not the Dtrace magic relocatable objects.
LD_EXEC_OPTIONS += -zdiscard-unused=dependencies -zdiscard-unused=files
LD_PIE_OPTIONS += -zdiscard-unused=dependencies -zdiscard-unused=files
LD_SHARED_OPTIONS += -zdiscard-unused=dependencies -zdiscard-unused=files
COMPONENT_BUILD_ENV += LD_SHARED_OPTIONS="$(LD_SHARED_OPTIONS)"
# Don't include build date & time in delivered binaries as it just causes
# unnecessary binary differences to be pulled into package updates, but
# leave it in debug builds for developer convenience.
ifeq ($(filter -g,$(CFLAGS)),)
COMPONENT_POST_CONFIGURE_ACTION += \
printf '\#undef BUILD_DATE\\n\#undef BUILD_TIME\\n' > \
$(@D)/hw/xfree86/common/xf86Build.h ;
endif
# Ensure xf86Sbus.h gets installed on x86, not just SPARC
COMPONENT_POST_INSTALL_ACTION += \
$(INSTALL) -m 444 $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
$(PROTO_DIR)/usr/include/xorg/xf86Sbus.h
## Generate exec_attr files for each X server, except for Xorg
EXEC_ATTR_SERVERS = Xephyr Xvfb
EXEC_ATTR_DIR = $(PROTO_DIR)/etc/security/exec_attr.d
install: install_exec_attrs
install_exec_attrs: files/exec_attr.template
$(MKDIR) $(EXEC_ATTR_DIR)
for f in $(EXEC_ATTR_SERVERS) ; do \
$(GSED) -e "s%@XSERVER@%$${f}%" $< > \
$(EXEC_ATTR_DIR)/x11:server:$${f/X/x} ; \
done
## mdb module rules
# Build & install mdb modules & scripts that aren't integrated to
# normal build process.
MDB_SOURCE_DIR = $(SOURCE_DIR)/os/solaris/mdb
MDB_BUILD_DIR = $(BUILD_DIR_64)/os/solaris/mdb
MDB_REL_SOURCE_DIR = ../../../../$(MDB_SOURCE_DIR)
MDB_MODULE_DIR=/usr/lib/mdb/proc/$(MACH64)
MDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
MDB_SCRIPTS=list_Xserver_clients \
list_Xserver_devicegrab_client \
list_Xserver_servergrab_client
MDB_MODULE_NAMES=Xephyr Xorg Xvfb Xvnc
BUILT_MDB_MODULE=$(MDB_BUILD_DIR)/modules/Xserver.so
INSTALLED_MDB_LINKS=$(MDB_MODULE_NAMES:%=$(PROTO_DIR)$(MDB_MODULE_DIR)/%.so)
INSTALLED_MDB_MODULE=$(PROTO_DIR)$(MDB_MODULE_DIR)/Xserver.so
INSTALLED_MDB_README=$(PROTO_DIR)$(MDB_SCRIPT_DIR)/README
INSTALLED_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(PROTO_DIR)$(MDB_SCRIPT_DIR)/%)
INSTALLED_MDB_ALL=$(INSTALLED_MDB_MODULE) $(INSTALLED_MDB_LINKS) \
$(INSTALLED_MDB_README) $(INSTALLED_MDB_SCRIPTS)
# Since configure options aren't used to build the mdb modules, pass
# those variables at build time
MDB_BUILD_ENV = $(CONFIGURE_ENV) $(COMPONENT_BUILD_ENV)
MDB_BUILD_ENV += ARCHLIBSUBDIR="/$(MACH64)"
MDB_BUILD_ENV += top_builddir="$(BUILD_DIR_64)"
MDB_BUILD_ENV += top_srcdir="$(SOURCE_DIR)"
build: $(BUILT_MDB_MODULE)
build_mdb: $(BUILT_MDB_MODULE)
$(BUILT_MDB_MODULE): $(BUILD_DIR_64)/.configured
$(RM) -r $(MDB_BUILD_DIR) ; $(MKDIR) $(MDB_BUILD_DIR)
$(CLONEY) $(MDB_SOURCE_DIR) $(MDB_BUILD_DIR)
cd $(@D) && $(ENV) $(MDB_BUILD_ENV) $(MAKE) all
install: $(INSTALLED_MDB_ALL)
install_mdb: $(INSTALLED_MDB_ALL)
$(INSTALLED_MDB_MODULE): $(BUILT_MDB_MODULE)
$(MKDIR) $(PROTO_DIR)$(MDB_MODULE_DIR)
$(INSTALL) -D -m 0555 $(BUILT_MDB_MODULE) $@
$(INSTALLED_MDB_LINKS): $(INSTALLED_MDB_MODULE)
$(RM) $@
$(SYMLINK) Xserver.so $@
$(INSTALLED_MDB_SCRIPTS): $(INSTALLED_MDB_MODULE)
$(MKDIR) $(PROTO_DIR)$(MDB_SCRIPT_DIR)/
$(INSTALL) -D -m 0555 $(MDB_SOURCE_DIR)/scripts/$(@F) \
$(PROTO_DIR)$(MDB_SCRIPT_DIR)/
$(INSTALLED_MDB_README): $(INSTALLED_MDB_MODULE)
$(MKDIR) $(PROTO_DIR)$(MDB_SCRIPT_DIR)/
$(INSTALL) -D -m 0444 $(MDB_SOURCE_DIR)/README \
$(PROTO_DIR)$(MDB_SCRIPT_DIR)/
# for tests
unexport SHELLOPTS
COMPONENT_TEST_TRANSFORMS += \
'-n ' \
'-e "/TOTAL:/p" ' \
'-e "/SKIP:/p" ' \
'-e "/PASS:/p" ' \
'-e "/FAIL:/p" ' \
'-e "/ERROR:/p" '
# Needed for agp headers on x86
REQUIRED_PACKAGES.i386 += driver/graphics/agpgart
REQUIRED_PACKAGES += $(REQUIRED_PACKAGES.$(MACH))
REQUIRED_PACKAGES += developer/assembler
REQUIRED_PACKAGES += developer/debug/mdb
REQUIRED_PACKAGES += developer/documentation-tool/doxygen
REQUIRED_PACKAGES += developer/lexer/flex
REQUIRED_PACKAGES += developer/parser/bison
REQUIRED_PACKAGES += diagnostic/scanpci
REQUIRED_PACKAGES += file/gnu-coreutils
REQUIRED_PACKAGES += image/graphviz
REQUIRED_PACKAGES += library/graphics/pixman
REQUIRED_PACKAGES += system/dtrace
REQUIRED_PACKAGES += system/hal
REQUIRED_PACKAGES += system/library/libdbus
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/library/security/crypto
REQUIRED_PACKAGES += x11/header/x11-protocols
REQUIRED_PACKAGES += x11/font-utilities
REQUIRED_PACKAGES += x11/library/libdrm
REQUIRED_PACKAGES += x11/library/libepoxy
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxau
REQUIRED_PACKAGES += x11/library/libxcb
REQUIRED_PACKAGES += x11/library/libxcvt
REQUIRED_PACKAGES += x11/library/libxdmcp
REQUIRED_PACKAGES += x11/library/libxext
REQUIRED_PACKAGES += x11/library/libxfixes
REQUIRED_PACKAGES += x11/library/libxfont2
REQUIRED_PACKAGES += x11/library/libxi
REQUIRED_PACKAGES += x11/library/libxmuu
REQUIRED_PACKAGES += x11/library/libxrender
REQUIRED_PACKAGES += x11/library/libxres
REQUIRED_PACKAGES += x11/library/libxshmfence
REQUIRED_PACKAGES += x11/library/mesa
REQUIRED_PACKAGES += x11/library/toolkit/libxaw7
REQUIRED_PACKAGES += x11/library/toolkit/libxt
REQUIRED_PACKAGES += x11/library/xcb-util
REQUIRED_PACKAGES += x11/library/xtrans
REQUIRED_PACKAGES += x11/keyboard/xkeyboard-config