ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ozone/mgar/pkg/basilisk/Makefile
Revision: 36
Committed: Mon Jun 22 20:12:19 2026 UTC (4 weeks ago) by operz
File size: 17789 byte(s)
Log Message:
nimbus: new GTK3 theme package; basilisk: add LD_LIBRARY_PATH wrapper, SPKG_CLASSES, OZSWatkbridge dep; get: update mirror to pkg.osol.space, fix Python 3 compat

File Contents

# Content
1 # vim: ft=make ts=4 sw=4 noet
2 .DEFAULT_GOAL := all
3
4 NAME = basilisk
5 VERSION = euxp
6 GARTYPE = v2
7
8 DESCRIPTION = Basilisk browser (UXP/GTK3) tracking the euxp branch
9 define BLURB
10 Basilisk is a web browser based on the Unified XUL Platform (UXP),
11 a fork of Mozilla Firefox 52 ESR. This build tracks the euxp branch.
12 endef
13
14 # Source comes from git (recursive clone for platform/ submodule).
15 # No DISTFILES — fetch/checksum/extract are no-ops; post-extract does the clone.
16 DISTFILES =
17 DISTNAME = basilisk-mirror-euxp
18
19 LICENSE = LICENSE
20
21 BUILD_DEP_PKGS += OZSWgit OZSWgcc12 OZSWpkgconf OZSWpy311
22 BUILD_DEP_PKGS += OZSWgtk3 OZSWcairo OZSWpango OZSWglib
23 BUILD_DEP_PKGS += OZSWlibX11 OZSWlibXt OZSWlibXext OZSWlibXft OZSWlibXrender OZSWlibXmu
24 BUILD_DEP_PKGS += OZSWfreetype OZSWfontconfig OZSWlibpng OZSWlibjpeg OZSWzlib
25
26 PACKAGES += OZSWbasilisk
27 SPKG_CLASSES = cswdictconf
28 SPKG_DESC_OZSWbasilisk = Basilisk browser (UXP, GTK3, euxp branch)
29 CATALOGNAME_OZSWbasilisk = basilisk
30 RUNTIME_DEP_PKGS_OZSWbasilisk += OZSWgcc12rt OZSWzlib
31 RUNTIME_DEP_PKGS_OZSWbasilisk += OZSWgtk3 OZSWcairo OZSWpango OZSWglib
32 RUNTIME_DEP_PKGS_OZSWbasilisk += OZSWlibX11 OZSWlibXt OZSWlibXext OZSWlibXft OZSWlibXrender
33 RUNTIME_DEP_PKGS_OZSWbasilisk += OZSWfreetype OZSWfontconfig OZSWlibpng OZSWlibjpeg
34 RUNTIME_DEP_PKGS_OZSWbasilisk += OZSWatk OZSWatkbridge
35
36 # UXP/mach handles configure and build — skip GAR's defaults
37 CONFIGURE_SCRIPTS =
38 BUILD_SCRIPTS =
39 INSTALL_SCRIPTS =
40
41 post-extract:
42 @echo "==> Cloning Basilisk euxp branch with platform submodule"
43 @if [ ! -d $(WORKSRC)/.git ]; then \
44 mkdir -p $(WORKDIR); \
45 git clone -b euxp --single-branch --recursive --depth=1 \
46 https://github.com/Basilisk-Development-Team/basilisk-mirror.git \
47 $(WORKSRC); \
48 fi
49 @echo "==> Creating /opt/ozsw/bin helper symlinks"
50 @test -f /opt/ozsw/bin/grep || sudo ln -s /usr/bin/ggrep /opt/ozsw/bin/grep
51 @test -f /opt/ozsw/bin/pkg-config || sudo ln -s /opt/ozsw/bin/pkgconf /opt/ozsw/bin/pkg-config
52 @test -f /opt/ozsw/bin/python || sudo ln -s /opt/ozsw/bin/python3 /opt/ozsw/bin/python
53 @echo "==> Patching for Python 3 and Solaris"
54 @gsed -i "s/error = e\.message/error = str(e)/" \
55 $(WORKSRC)/platform/build/moz.configure/checks.configure
56 @printf '#!/bin/sh\nexec /opt/ozsw/bin/python3 "$$(dirname "$$0")/platform/mach" "$$@"\n' \
57 > $(WORKSRC)/mach
58 @chmod +x $(WORKSRC)/mach
59 @/opt/ozsw/bin/python3 /opt/ozsw/lib/ozsw-patch-mach.py $(WORKSRC)/platform/mach
60 @gsed -i 's|PYTHON ?= $$(shell which python3 > /dev/null 2>&1 && echo python3 || echo python)|PYTHON ?= /opt/ozsw/bin/python3|' \
61 $(WORKSRC)/client.mk
62 @# Fix mozconfig.py IGNORE_SHELL_VARIABLES: bash internal arrays (BASH_ARGC etc.)
63 @# pollute old-configure.vars via 'set' output after .mozconfig functions run
64 @gsed -i "s/ IGNORE_SHELL_VARIABLES = {'_'}/ IGNORE_SHELL_VARIABLES = {'_', 'BASH_ARGC', 'BASH_ARGV', 'BASH_LINENO', 'BASH_SOURCE', 'BASH_VERSINFO', 'DIRSTACK', 'FUNCNAME', 'GROUPS', 'PIPESTATUS', 'BASH_REMATCH', '_mozconfig_opt', '_mozconfig_name', '_mozconfig_op', '_mozconfig_app', 'opt'}/" \
65 $(WORKSRC)/platform/python/mozbuild/mozbuild/mozconfig.py
66 @# Fix platform/old-configure: fallback PYTHON if old-configure.vars sourcing aborted
67 @gsed -i '12a # OZSW: ensure PYTHON is set even if old-configure.vars sourcing aborted early\n: $${PYTHON:=/opt/ozsw/bin/python3}' \
68 $(WORKSRC)/platform/old-configure
69 @# Fix NSPR moz.build for SunOS: missing OS_LIBS (-lnsl -lsocket -lrt -ldl).
70 @# Also replace _PR_HAVE_OFF64_T with _PR_NO_LARGE_FILES: the former makes unix.c
71 @# take a direct reference to open64@SUNW_1.1 which GNU ld on OpenSolaris
72 @# mishandles, producing "invalid version 15 (max 0)" link errors.
73 @/opt/ozsw/bin/python3 -c "\
74 path='$(WORKSRC)/platform/config/external/nspr/pr/moz.build'; \
75 c=open(path).read(); \
76 c=c.replace(\" _PR_HAVE_OFF64_T=True,\", \" _PR_NO_LARGE_FILES=True, # open64@SUNW_1.1 confuses GNU ld\"); \
77 c=c.replace(\" DEFINES['SOLARIS'] = True\", \" DEFINES['SOLARIS'] = True\n OS_LIBS += ['-lpthread', '-lsocket', '-lnsl', '-lrt', '-ldl', '-lc']\"); \
78 open(path,'w').write(c)"
79 @# Fix search moz.build: basilisk overrides all platform search components
80 @printf '# OZSW: all search components overridden by basilisk/components/search/service/\n' \
81 > $(WORKSRC)/platform/toolkit/components/search/moz.build
82 @# Fix Chromium IPC: pthread_setname_np not available on OpenSolaris 2009 (snv_111b)
83 @/opt/ozsw/bin/python3 -c "\
84 path='$(WORKSRC)/platform/ipc/chromium/src/base/platform_thread_posix.cc'; \
85 c=open(path).read(); \
86 old='#elif defined(OS_SOLARIS)\n pthread_setname_np(pthread_self(), name);'; \
87 new='#elif defined(OS_SOLARIS)\n /* pthread_setname_np not available on OpenSolaris 2009 */'; \
88 open(path,'w').write(c.replace(old,new))"
89 @# Fix Skia GrAutoLocaleSetter.h: uselocale/freelocale/newlocale/locale_t not on
90 @# OpenSolaris 2009 (snv_111b). Disable HAVE_LOCALE_T for __sun the same way it
91 @# is disabled for Android/uclibc/newlib.
92 @gsed -i 's/#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)/#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__sun)/' \
93 $(WORKSRC)/platform/gfx/skia/skia/src/gpu/GrAutoLocaleSetter.h
94 @# Fix libjxl color_encoding_internal.h: Solaris sys/regset.h (pulled in via
95 @# <sys/ucontext.h> when __EXTENSIONS__ is set) defines CS=15, conflicting with
96 @# the local 'using CS = ColorSpace' alias. Undef it just before the alias.
97 @/opt/ozsw/bin/python3 -c "\
98 path='$(WORKSRC)/platform/media/libjxl/src/lib/jxl/color_encoding_internal.h'; \
99 c=open(path).read(); \
100 old=' using CS = ColorSpace;'; \
101 new='#ifdef CS\n#undef CS /* Solaris sys/regset.h defines CS=15 */\n#endif\n using CS = ColorSpace;'; \
102 open(path,'w').write(c.replace(old,new))"
103 @# Fix js/src/threading/posix/Thread.cpp: pthread_setname_np absent on OpenSolaris snv_111b.
104 @# Add __sun no-op before the #else branch that calls it unconditionally.
105 @gsed -i 's/#elif defined(__NetBSD__)$$/#elif defined(__sun)\\n \/* pthread_setname_np absent on OpenSolaris snv_111b *\/\\n#elif defined(__NetBSD__)/' \\
106 $(WORKSRC)/platform/js/src/threading/posix/Thread.cpp
107 @# Fix libevent bundled Solaris event-config.h: arc4random incorrectly marked available.
108 @gsed -i 's/^#define _EVENT_HAVE_ARC4RANDOM 1$$/\/\* #undef _EVENT_HAVE_ARC4RANDOM *\/ \/\* absent on OpenSolaris snv_111b *\//' \\
109 $(WORKSRC)/platform/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h
110 @gsed -i 's/^#define _EVENT_HAVE_ARC4RANDOM_BUF 1$$/\/\* #undef _EVENT_HAVE_ARC4RANDOM_BUF *\/ \/\* absent on OpenSolaris snv_111b *\//' \\
111 $(WORKSRC)/platform/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h
112 @# Fix arc4random.c: removes XP_SOLARIS block that includes Chromium-specific
113 @# build/build_config.h (not in include path when compiled as static include of evutil_rand.c)
114 @gsed -i '/#ifdef XP_SOLARIS/,/#endif/d' \
115 $(WORKSRC)/platform/ipc/chromium/src/third_party/libevent/arc4random.c
116 @# Fix libopus silk/resampler_private.h: Solaris sys/regset.h also defines SS=18
117 @# (x86 stack-segment register index), conflicting with the 'SS' parameter name.
118 @/opt/ozsw/bin/python3 -c "\
119 path='$(WORKSRC)/platform/media/libopus/silk/resampler_private.h'; \
120 c=open(path).read(); \
121 old='#ifndef SILK_RESAMPLER_PRIVATE_H\n#define SILK_RESAMPLER_PRIVATE_H'; \
122 new='#ifndef SILK_RESAMPLER_PRIVATE_H\n#define SILK_RESAMPLER_PRIVATE_H\n/* Solaris sys/regset.h defines SS=18 (x86 stack segment register index) */\n#ifdef SS\n#undef SS\n#endif'; \
123 open(path,'w').write(c.replace(old,new))"
124 @# Fix libpng moz.build: -std=c89 + _XOPEN_SOURCE=600 is rejected by Solaris
125 @# feature_tests.h (XPG6/UNIX 03 requires C99). Use gnu99 on SunOS instead.
126 @gsed -i "s/ CFLAGS += \['-std=c89'\]/ if CONFIG['OS_TARGET'] == 'SunOS':\n CFLAGS += ['-std=gnu99'] # c89 + _XOPEN_SOURCE=600 rejected by Solaris feature_tests.h\n else:\n CFLAGS += ['-std=c89']/" \
127 $(WORKSRC)/platform/media/libpng/moz.build
128 @# Fix toolkit/library/libxul.mk: NSModules ordering check fails on Solaris because
129 @# GNU ld places sentinel symbols differently than Linux. The runtime ordering IS
130 @# correct per Mozilla bug reports; the check just has wrong expectations. Disable it.
131 @gsed -i 's/^LOCAL_CHECKS = test .*/# LOCAL_CHECKS disabled: Solaris GNU ld ordering OK at runtime/' \
132 $(WORKSRC)/platform/toolkit/library/libxul.mk
133 @gsed -i '/^# LOCAL_CHECKS disabled:/a LOCAL_CHECKS = $$(true)' \
134 $(WORKSRC)/platform/toolkit/library/libxul.mk
135 @gsed -i 's/^LOCAL_CHECKS += ; test .*/# &/' \
136 $(WORKSRC)/platform/toolkit/library/libxul.mk
137 @# Fix xpcom nsMemoryReporterManager.cpp: _XOPEN_SOURCE>=500 (set globally) causes
138 @# Solaris to enable large file mode (_FILE_OFFSET_BITS=64), but procfs.h
139 @# explicitly rejects that. Undef the large-file macros before the procfs include.
140 @/opt/ozsw/bin/python3 -c "\
141 path='$(WORKSRC)/platform/xpcom/base/nsMemoryReporterManager.cpp'; \
142 c=open(path).read(); \
143 old='#elif defined(XP_SOLARIS)\n\n#include <procfs.h>'; \
144 new='#elif defined(XP_SOLARIS)\n\n/* Solaris procfs.h rejects _FILE_OFFSET_BITS=64 (set by _XOPEN_SOURCE>=500) */\n#ifdef _FILE_OFFSET_BITS\n#undef _FILE_OFFSET_BITS\n#endif\n#ifdef _LARGEFILE_SOURCE\n#undef _LARGEFILE_SOURCE\n#endif\n#include <procfs.h>'; \
145 open(path,'w').write(c.replace(old,new))"
146 @echo "==> Writing .mozconfig"
147 @{ \
148 echo '# Basilisk euxp build for OpenSolaris i386 (snv_111b)'; \
149 echo 'ac_add_options --enable-application=basilisk'; \
150 echo 'ac_add_options --enable-optimize="-O2 -w"'; \
151 echo 'ac_add_options --disable-official-branding'; \
152 echo 'ac_add_options --enable-default-toolkit=cairo-gtk3'; \
153 echo 'ac_add_options --enable-jemalloc'; \
154 echo 'ac_add_options --enable-strip'; \
155 echo 'ac_add_options --enable-devtools'; \
156 echo 'ac_add_options --enable-av1'; \
157 echo 'ac_add_options --disable-pie'; \
158 echo 'ac_add_options --disable-webrtc'; \
159 echo 'ac_add_options --disable-gamepad'; \
160 echo 'ac_add_options --disable-tests'; \
161 echo 'ac_add_options --disable-debug'; \
162 echo 'ac_add_options --disable-necko-wifi'; \
163 echo 'ac_add_options --disable-updater'; \
164 echo 'ac_add_options --disable-npapi'; \
165 echo 'ac_add_options --disable-dbus'; \
166 echo 'ac_add_options --disable-pulseaudio'; \
167 echo 'ac_add_options --with-pthreads'; \
168 echo 'ac_add_options --prefix=$(prefix)'; \
169 echo '# Force 32-bit build: OZSW GCC12 target is i386-pc-solaris2.11'; \
170 echo 'ac_add_options --host=i386-pc-solaris2.11'; \
171 echo 'ac_add_options --target=i386-pc-solaris2.11'; \
172 echo 'export CC=/opt/ozsw/bin/gcc'; \
173 echo 'export CXX=/opt/ozsw/bin/g++'; \
174 echo 'export HOST_CC=/opt/ozsw/bin/gcc'; \
175 echo 'export HOST_CXX=/opt/ozsw/bin/g++'; \
176 echo ''; \
177 echo 'export BASILISK_VERSION=1'; \
178 echo 'export MOZ_PKG_SPECIAL=gtk3'; \
179 echo 'export CONFIG_SHELL=/usr/bin/bash'; \
180 echo 'mk_add_options MOZ_MAKE_FLAGS="-j3"'; \
181 echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-build'; \
182 echo 'export MOZILLA_OFFICIAL=1'; \
183 echo ''; \
184 echo 'ac_add_options --x-libraries=$(BUILD_PREFIX)/lib'; \
185 echo 'export PKG_CONFIG_PATH=$(BUILD_PREFIX)/lib/pkgconfig:$(BUILD_PREFIX)/share/pkgconfig'; \
186 echo ''; \
187 echo '# Solaris: _POSIX_C_SOURCE=200809L (from zbuild.h) not handled by old'; \
188 echo '# feature_tests.h; _XOPEN_SOURCE=600 gets _XPG6 so C99 + POSIX is valid.'; \
189 echo '# __EXTENSIONS__ exposes Solaris-specific APIs (madvise, MADV_DONTNEED etc.)'; \
190 echo 'export CFLAGS="-D_XOPEN_SOURCE=600 -D__EXTENSIONS__"'; \
191 echo 'export CXXFLAGS="-D_XOPEN_SOURCE=600 -D__EXTENSIONS__"'; \
192 } > $(WORKSRC)/.mozconfig
193 @$(MAKECOOKIE)
194
195 pre-build:
196 @echo "==> Configuring Basilisk with mach"
197 cd $(WORKSRC) && \
198 PATH="/opt/ozsw/bin:/opt/oz/bin:/usr/bin:/bin:/usr/sfw/bin:/usr/ccs/bin" \
199 MOZCONFIG=$(WORKSRC)/.mozconfig \
200 /opt/ozsw/bin/python3 ./platform/mach configure
201 @echo "==> Setting up ld wrapper and patching system_wrappers/sys/regset.h"
202 @# GNU ld 2.45 on Solaris records SUNW_x.y versioned symbol refs in .so files,
203 @# then fails to parse them when linking the next .so ("invalid version N, max 0").
204 @# Workaround: wrap ld to strip .gnu.version* sections from .so outputs.
205 @# Stripping is safe because ld.so.1 uses SHT_SUNW_versym (not SHT_GNU_versym).
206 @# Install ld wrapper at /opt/ozsw/bin/ld (original backed up as ld.real).
207 @# -B/tmp/mozld-wrap does NOT work: GCC12 collect2 path is hardcoded at compile time.
208 @if [ ! -f /opt/ozsw/bin/ld.real ]; then \
209 sudo cp /opt/ozsw/bin/ld /opt/ozsw/bin/ld.real && \
210 printf '#!/bin/bash\noutput=""\nnext_o=0\nfor arg in "$$@"; do\n if [ $$next_o -eq 1 ]; then output="$$arg"; next_o=0; fi\n if [ "$$arg" = "-o" ]; then next_o=1; fi\ndone\n/opt/ozsw/bin/ld.real "$$@"\nrc=$$?\nif [ $$rc -eq 0 ] && [ -n "$$output" ]; then\n case "$$output" in\n *.so|*.so.*) /opt/ozsw/bin/objcopy --remove-section=.gnu.version --remove-section=.gnu.version_r --remove-section=.gnu.version_d "$$output" 2>/dev/null || true ;;\n esac\nfi\nexit $$rc\n' | sudo tee /opt/ozsw/bin/ld > /dev/null && \
211 sudo chmod +x /opt/ozsw/bin/ld; \
212 fi
213 @echo "==> Patching system_wrappers/sys/regset.h (configure generates this)"
214 @# Solaris sys/regset.h defines short x86 register names (CS=15, SS=18, DS=16,
215 @# ES=17, FS=20, GS=19, EAX=11, ...) as integer macros. These collide with
216 @# variable and parameter names throughout Mozilla/NSS/media code. The system
217 @# wrapper is the right place to undef them after the real header is included.
218 @printf '#pragma GCC system_header\n#pragma GCC visibility push(default)\n#include_next <sys/regset.h>\n#pragma GCC visibility pop\n/* Undef Solaris i386 register-index macros that conflict with C identifiers */\n#undef SS\n#undef CS\n#undef DS\n#undef ES\n#undef FS\n#undef GS\n#undef EAX\n#undef ECX\n#undef EDX\n#undef EBX\n#undef ESP\n#undef EBP\n#undef ESI\n#undef EDI\n#undef EIP\n#undef EFL\n#undef ERR\n#undef TRAPNO\n#undef UESP\n' \
219 > $(WORKSRC)/obj-build/dist/system_wrappers/sys/regset.h
220 @echo "==> Patching system_wrappers/sys/ucontext.h: undef CS/SS etc. from Solaris regset.h"
221 @printf '#pragma GCC system_header\n#pragma GCC visibility push(default)\n#include_next <sys/ucontext.h>\n#pragma GCC visibility pop\n/* Solaris sys/ucontext.h -> regset.h defines CS=15 etc.; undef to avoid C++ collisions */\n#undef CS\n' \\
222 > $(WORKSRC)/obj-build/dist/system_wrappers/sys/ucontext.h
223 @echo "==> Adding atk-bridge-2.0 to MOZ_GTK3_LIBS in config.status and autoconf.mk"
224 @# config.status stores MOZ_GTK3_LIBS as a Python list; patch '-lgdk-3' entry
225 @/opt/ozsw/bin/python3 -c "path='$(WORKSRC)/obj-build/config.status'; c=open(path).read(); \
226 old=\" '-lgdk-3',\\n\"; \
227 new=\" '-lgdk-3',\\n '-latk-bridge-2.0',\\n\"; \
228 open(path,'w').write(c.replace(old,new)) if '-latk-bridge-2.0' not in c else None"
229 @gsed -i "s/MOZ_GTK3_LIBS = -lgtk-3 -lgdk-3 /MOZ_GTK3_LIBS = -lgtk-3 -lgdk-3 -latk-bridge-2.0 /" \\
230 $(WORKSRC)/obj-build/config/autoconf.mk
231 @# Make autoconf.mk newer than config.status to prevent make from regenerating it
232 @touch $(WORKSRC)/obj-build/config/autoconf.mk
233 @echo "==> Adding -rpath-link dist/bin to OS_LDFLAGS (enables GNU ld to find transitive NSS/sqlite"
234 @echo " deps via libxul.so DT_NEEDED when linking executables like xpcshell)"
235 @gsed -i "s|OS_LDFLAGS = |OS_LDFLAGS = -Wl,-rpath-link,$(WORKSRC)/obj-build/dist/bin |" \
236 $(WORKSRC)/obj-build/config/autoconf.mk
237 @/opt/ozsw/bin/python3 -c "path='$(WORKSRC)/obj-build/config.status'; \
238 c=open(path).read(); \
239 old=\" 'OS_LDFLAGS': '-lpthread \"; \
240 new=\" 'OS_LDFLAGS': '-Wl,-rpath-link,$(WORKSRC)/obj-build/dist/bin -lpthread \"; \
241 open(path,'w').write(c.replace(old,new,1)) if '-rpath-link' not in c else None"
242 @touch $(WORKSRC)/obj-build/config/autoconf.mk
243 @echo "==> Building Basilisk with mach (this will take a long time)"
244 cd $(WORKSRC) && \
245 PATH="/opt/ozsw/bin:/opt/oz/bin:/usr/bin:/bin:/usr/sfw/bin:/usr/ccs/bin" \
246 MOZCONFIG=$(WORKSRC)/.mozconfig \
247 /opt/ozsw/bin/python3 ./platform/mach build
248 @echo "==> Running mach package (requires LD_LIBRARY_PATH for xpcshell GTK deps)"
249 @# Patch package-manifest.in for euxp flat layout (no browser/ prefix for devtools,
250 @# no content_geckomediaplugins.xpt which is not built in euxp)
251 @gsed -i 's|^@RESPATH@/components/content_geckomediaplugins\.xpt$$|# euxp: GMP not built -- @RESPATH@/components/content_geckomediaplugins.xpt|' \
252 $(WORKSRC)/basilisk/installer/package-manifest.in
253 @gsed -i 's|@RESPATH@/browser/components/devtools-startup\.|@RESPATH@/components/devtools-startup.|g' \
254 $(WORKSRC)/basilisk/installer/package-manifest.in
255 @gsed -i 's|@RESPATH@/browser/chrome/devtools|@RESPATH@/chrome/devtools|g' \
256 $(WORKSRC)/basilisk/installer/package-manifest.in
257 @gsed -i 's|@RESPATH@/browser/@PREF_DIR@/devtools\.js|@RESPATH@/defaults/pref/devtools.js|' \
258 $(WORKSRC)/basilisk/installer/package-manifest.in
259 cd $(WORKSRC) && \
260 PATH="/opt/ozsw/bin:/opt/oz/bin:/usr/bin:/bin:/usr/sfw/bin:/usr/ccs/bin" \
261 LD_LIBRARY_PATH="/opt/ozsw/lib" \
262 MOZCONFIG=$(WORKSRC)/.mozconfig \
263 bash ./mach package
264 @$(MAKECOOKIE)
265
266 pre-install:
267 @echo "==> Installing Basilisk from mach package tarball"
268 mkdir -p $(DESTDIR)$(libdir)/basilisk
269 mkdir -p $(DESTDIR)$(bindir)
270 gtar -xf $(WORKSRC)/obj-build/dist/Basilisk-*.tar.xz \
271 -C $(DESTDIR)$(libdir)/basilisk --strip-components=1
272 chmod 755 $(DESTDIR)$(libdir)/basilisk/Basilisk
273 chmod 755 $(DESTDIR)$(libdir)/basilisk/Basilisk-bin
274 @printf '#!/bin/sh\nexport LD_LIBRARY_PATH=/opt/ozsw/lib$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}\nexec $(libdir)/basilisk/Basilisk "$$@"\n' \
275 > $(DESTDIR)$(bindir)/basilisk
276 chmod 755 $(DESTDIR)$(bindir)/basilisk
277 @$(MAKECOOKIE)
278
279 include gar/category.mk