thunderbird: update to 128.2.2
[oi-userland.git] / make-rules / x11.mk
blob0abaea7823881ca19b5520741b64ed743fdef7c4
1 # This file and its contents are supplied under the terms of the
2 # Common Development and Distribution License ("CDDL"). You may
3 # only use this file in accordance with the terms of the CDDL.
5 # A full copy of the text of the CDDL should have accompanied this
6 # source. A copy of the CDDL is also available via the Internet at
7 # http://www.illumos.org/license/CDDL.
11 # Copyright (c) 2017, Aurelien Larcher. All rights reserved.
14 # All X11 components should now prefer 64-bits unless specified
16 PREFERRED_BITS=64
19 # General macros
21 PKG_X11_VERSION=7.7
23 X11_COMPONENTS_DIR = $(WS_COMPONENTS)/x11
26 # Provide macros for commonly used urls
29 XORG_PROJECT_URL = https://www.x.org/
30 XORG_BASE_URL = https://www.x.org/releases/individual
31 SOLARIS_XORG_URL = https://github.com/oracle/solaris-userland
33 XORG_APP_BASE_URL = $(XORG_BASE_URL)/app
34 XORG_DATA_BASE_URL = $(XORG_BASE_URL)/data
35 XORG_DOC_BASE_URL = $(XORG_BASE_URL)/doc
36 XORG_DRIVER_BASE_URL = $(XORG_BASE_URL)/driver
37 XORG_FONT_BASE_URL = $(XORG_BASE_URL)/font
38 XORG_LIB_BASE_URL = $(XORG_BASE_URL)/lib
39 XORG_PROTO_BASE_URL = $(XORG_BASE_URL)/proto
40 XORG_TEST_BASE_URL = $(XORG_BASE_URL)/test
41 XORG_UTIL_BASE_URL = $(XORG_BASE_URL)/util
42 XORG_XCB_BASE_URL = $(XORG_BASE_URL)/xcb
43 XORG_XSERVER_BASE_URL = $(XORG_BASE_URL)/xserver
46 # Default X11 component values
48 COMPONENT_X11_DEFAULTS?= yes
49 ifeq ($(COMPONENT_X11_DEFAULTS),yes)
50 COMPONENT_PROJECT_URL ?= $(XORG_PROJECT_URL)
51 COMPONENT_SRC ?= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
52 COMPONENT_ARCHIVE_EXTENSION ?= .tar.bz2
53 COMPONENT_ARCHIVE ?= $(COMPONENT_SRC)$(COMPONENT_ARCHIVE_EXTENSION)
54 ifneq ($(strip $(X11_CATEGORY)),)
55 COMPONENT_ARCHIVE_URL ?= $(XORG_$(X11_CATEGORY)_BASE_URL)/$(COMPONENT_ARCHIVE)
56 endif
57 endif
60 # Set defaults for X11 applications
62 ifeq ($(strip $(X11_CATEGORY)),APP)
63 BUILD_BITS = 64
64 PATH=$(PATH.gnu)
65 COMPONENT_CLASSIFICATION = System/X11
66 COMPONENT_LICENSE = MIT License
67 endif
70 # Set defaults for X11 utilities
72 ifeq ($(strip $(X11_CATEGORY)),UTIL)
73 BUILD_BITS = 64
74 PATH=$(PATH.gnu)
75 COMPONENT_CLASSIFICATION = System/X11
76 COMPONENT_LICENSE = MIT License
77 endif
80 # Set defaults for X11 documentation
82 ifeq ($(strip $(X11_CATEGORY)),DOC)
83 BUILD_BITS = 64
84 PATH=$(PATH.gnu)
85 COMPONENT_CLASSIFICATION = System/X11
86 COMPONENT_LICENSE = MIT License
87 endif
90 # Set defaults for X11 libraries
92 ifeq ($(strip $(X11_CATEGORY)),LIB)
93 BUILD_BITS = 32_and_64
94 PATH=$(PATH.gnu)
95 COMPONENT_CLASSIFICATION = System/X11
96 COMPONENT_LICENSE = MIT License
97 endif
100 # Set defaults for X11 drivers
102 ifeq ($(strip $(X11_CATEGORY)),DRIVER)
103 BUILD_BITS = 64
104 PATH=$(PATH.gnu)
105 ifneq (,$(findstring video,$(COMPONENT_NAME)))
106 COMPONENT_CLASSIFICATION = Drivers/Display
107 else
108 COMPONENT_CLASSIFICATION = Drivers/Other Peripherals
109 endif
110 COMPONENT_LICENSE = MIT License
111 COMPONENT_LICENSE_FILE = COPYING
112 COMPONENT_PREP_ACTION = ( cd $(@D) && \
113 libtoolize --automake --copy --force && \
114 aclocal && \
115 autoheader && \
116 automake -a -f -c && \
117 autoconf )
118 endif
121 # Set no test target by default
123 TEST_TARGET = $(NO_TESTS)
126 # Define library and modules install paths
129 XORG_LIBDIR.32 = $(USRLIBDIR)/xorg
130 XORG_LIBDIR.64 = $(USRLIBDIR)/xorg/$(MACH64)
131 XORG_LIBDIR = $(XORG_LIBDIR.$(BITS))
133 X11_SERVERMOD_SUBDIR.32=
134 X11_SERVERMOD_SUBDIR.64=/$(MACH64)
135 X11_SERVERMOD_SUBDIR=$(X11_SERVERMOD_SUBDIR.$(BITS))
137 X11_SERVERLIBS_DIR = $(USRLIBDIR)/xorg$(X11_SERVERMOD_SUBDIR)
138 X11_SERVERMODS_DIR = $(USRLIBDIR)/xorg/modules$(X11_SERVERMOD_SUBDIR)
140 X11_SERVERMODS_DRI_DIR = $(USRLIBDIR)/xorg/modules/dri$(X11_SERVERMOD_SUBDIR)
141 X11_SERVERMODS_DRIVERS_DIR = $(USRLIBDIR)/xorg/modules/drivers$(X11_SERVERMOD_SUBDIR)
142 X11_SERVERMODS_EXTENSIONS_DIR = $(USRLIBDIR)/xorg/modules/extensions$(X11_SERVERMOD_SUBDIR)
143 x11_SERVERMODS_INPUT_DIR = $(USRLIBDIR)/xorg/modules/input$(X11_SERVERMOD_SUBDIR)
144 X11_SERVERMODS_MULTIMEDIA_DIR = $(USRLIBDIR)/xorg/modules/multimedia$(X11_SERVERMOD_SUBDIR)
147 # Define MESA paths
150 MESA_XSERVERLIBS_DIR = $(USRLIBDIR)/mesa$(X11_SERVERMOD_SUBDIR)
151 MESA_XSERVERMODS_DIR = $(USRLIBDIR)/mesa/modules$(X11_SERVERMOD_SUBDIR)
153 MESA_XSERVERMODS_EXTENSIONS_DIR = $(USRLIBDIR)/mesa/modules/extensions$(X11_SERVERMOD_SUBDIR)
156 # Define PKG macros
159 PKG_MACROS += X11PKGVERS=$(PKG_X11_VERSION)
162 # Default build dependencies
164 USERLAND_REQUIRED_PACKAGES += x11/header/x11-protocols
165 USERLAND_REQUIRED_PACKAGES += developer/build/autoconf/xorg-macros