Andreas Wacknitz
2024-03-31 97a780a15002cc79b83dca6ceb54a7411df3f799
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
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"). You may
# only use this file in accordance with the terms of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
 
#
# Copyright (c) 2017, Aurelien Larcher. All rights reserved.
#
 
# All X11 components should now prefer 64-bits unless specified
 
PREFERRED_BITS=64
 
#
# General macros
#
PKG_X11_VERSION=7.7
 
X11_COMPONENTS_DIR = $(WS_COMPONENTS)/x11
 
#
# Provide macros for commonly used urls
#
 
XORG_PROJECT_URL = https://www.x.org/
XORG_BASE_URL    = https://www.x.org/releases/individual
SOLARIS_XORG_URL = https://github.com/oracle/solaris-userland
 
XORG_APP_BASE_URL     = $(XORG_BASE_URL)/app
XORG_DATA_BASE_URL    = $(XORG_BASE_URL)/data
XORG_DOC_BASE_URL     = $(XORG_BASE_URL)/doc
XORG_DRIVER_BASE_URL  = $(XORG_BASE_URL)/driver
XORG_FONT_BASE_URL    = $(XORG_BASE_URL)/font
XORG_LIB_BASE_URL     = $(XORG_BASE_URL)/lib
XORG_PROTO_BASE_URL   = $(XORG_BASE_URL)/proto
XORG_TEST_BASE_URL    = $(XORG_BASE_URL)/test
XORG_UTIL_BASE_URL    = $(XORG_BASE_URL)/util
XORG_XCB_BASE_URL     = $(XORG_BASE_URL)/xcb
XORG_XSERVER_BASE_URL = $(XORG_BASE_URL)/xserver
 
#
# Default X11 component values
#
COMPONENT_X11_DEFAULTS?= yes
ifeq ($(COMPONENT_X11_DEFAULTS),yes)
COMPONENT_PROJECT_URL ?= $(XORG_PROJECT_URL)
COMPONENT_SRC         ?= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE_EXTENSION ?= .tar.bz2
COMPONENT_ARCHIVE     ?= $(COMPONENT_SRC)$(COMPONENT_ARCHIVE_EXTENSION)
ifneq ($(strip $(X11_CATEGORY)),)
COMPONENT_ARCHIVE_URL ?= $(XORG_$(X11_CATEGORY)_BASE_URL)/$(COMPONENT_ARCHIVE)
endif
endif
 
#
# Set defaults for X11 applications
#
ifeq ($(strip $(X11_CATEGORY)),APP)
BUILD_BITS = 64
PATH=$(PATH.gnu)
COMPONENT_CLASSIFICATION = System/X11
COMPONENT_LICENSE        = MIT License
endif
 
#
# Set defaults for X11 utilities
#
ifeq ($(strip $(X11_CATEGORY)),UTIL)
BUILD_BITS = 64
PATH=$(PATH.gnu)
COMPONENT_CLASSIFICATION = System/X11
COMPONENT_LICENSE        = MIT License
endif
 
#
# Set defaults for X11 documentation
#
ifeq ($(strip $(X11_CATEGORY)),DOC)
BUILD_BITS = 64
PATH=$(PATH.gnu)
COMPONENT_CLASSIFICATION = System/X11
COMPONENT_LICENSE        = MIT License
endif
 
#
# Set defaults for X11 libraries
#
ifeq ($(strip $(X11_CATEGORY)),LIB)
BUILD_BITS = 32_and_64
PATH=$(PATH.gnu)
COMPONENT_CLASSIFICATION = System/X11
COMPONENT_LICENSE        = MIT License
endif
 
#
# Set defaults for X11 drivers
#
ifeq ($(strip $(X11_CATEGORY)),DRIVER)
BUILD_BITS = 64
PATH=$(PATH.gnu)
ifneq (,$(findstring video,$(COMPONENT_NAME)))
COMPONENT_CLASSIFICATION = Drivers/Display
else
COMPONENT_CLASSIFICATION = Drivers/Other Peripherals
endif
COMPONENT_LICENSE        = MIT License
COMPONENT_LICENSE_FILE   = COPYING
COMPONENT_PREP_ACTION = ( cd $(@D) && \
                          libtoolize --automake --copy --force && \
                          aclocal && \
                          autoheader && \
                          automake -a -f -c && \
                          autoconf )
endif
 
#
# Set no test target by default
#
TEST_TARGET = $(NO_TESTS)
 
#
# Define library and modules install paths
#
 
XORG_LIBDIR.32 = $(USRLIBDIR)/xorg    
XORG_LIBDIR.64 = $(USRLIBDIR)/xorg/$(MACH64)    
XORG_LIBDIR    = $(XORG_LIBDIR.$(BITS))
 
X11_SERVERMOD_SUBDIR.32=
X11_SERVERMOD_SUBDIR.64=/$(MACH64)
X11_SERVERMOD_SUBDIR=$(X11_SERVERMOD_SUBDIR.$(BITS))
 
X11_SERVERLIBS_DIR = $(USRLIBDIR)/xorg$(X11_SERVERMOD_SUBDIR)
X11_SERVERMODS_DIR = $(USRLIBDIR)/xorg/modules$(X11_SERVERMOD_SUBDIR)
 
X11_SERVERMODS_DRI_DIR        = $(USRLIBDIR)/xorg/modules/dri$(X11_SERVERMOD_SUBDIR)
X11_SERVERMODS_DRIVERS_DIR    = $(USRLIBDIR)/xorg/modules/drivers$(X11_SERVERMOD_SUBDIR)
X11_SERVERMODS_EXTENSIONS_DIR    = $(USRLIBDIR)/xorg/modules/extensions$(X11_SERVERMOD_SUBDIR)
x11_SERVERMODS_INPUT_DIR    = $(USRLIBDIR)/xorg/modules/input$(X11_SERVERMOD_SUBDIR)
X11_SERVERMODS_MULTIMEDIA_DIR    = $(USRLIBDIR)/xorg/modules/multimedia$(X11_SERVERMOD_SUBDIR)
 
#
# Define MESA paths
#
 
MESA_XSERVERLIBS_DIR = $(USRLIBDIR)/mesa$(X11_SERVERMOD_SUBDIR)
MESA_XSERVERMODS_DIR = $(USRLIBDIR)/mesa/modules$(X11_SERVERMOD_SUBDIR)
 
MESA_XSERVERMODS_EXTENSIONS_DIR = $(USRLIBDIR)/mesa/modules/extensions$(X11_SERVERMOD_SUBDIR)
 
#
# Define PKG macros
#
 
PKG_MACROS += X11PKGVERS=$(PKG_X11_VERSION)
 
#
# Default build dependencies
#
USERLAND_REQUIRED_PACKAGES += x11/header/x11-protocols
USERLAND_REQUIRED_PACKAGES += developer/build/autoconf/xorg-macros