xref: /haiku/build/jam/OptionalPackages (revision 54391a5df206f617a4bf6e67fe5baf9c8b70a525)
1# This file defines the optional packages that can be added to the Haiku image.
2# It is directly included from HaikuImage -- all variables defined there can
3# be used
4
5# Detect a hybrid GCC2/GCC4 image and disable the checks for unavailable GCC4
6# packages. (It does not matter if a package was built with either compiler,
7# the system should have the respective other system libs.)
8local isHybridBuild ;
9if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
10		&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
11	isHybridBuild = 1 ;
12}
13
14
15# Available Optional Packages:
16#	ABI-compliance-checker	- tool for checking ABI compatibility between libs
17#	APR						- support libraries used for example by Subversion
18#	APR-util				- Apache portable runtime utility library
19#	ArmyKnife				- tool for editing audio file metadata and attributes
20#	Bazaar					- the distributed version control system
21#	BeAE					- open source Audio Editor
22#	Beam					- powerful native e-mail client
23#	BeBook					- the classic BeOS API documentation
24#	BeHappy					- special documentation (i.e. BeBook) browser
25#	BeOSCompatibility		- creates links within the system to support old apps
26#	BePDF					- native PDF reader
27#	BeZillaBrowser			- fork of Mozilla's 1.8 branch.
28#	Bluetooth				- experimental Haiku components for Bluetooth
29#	BurnItNow				- CD burning app
30#	Bzip					- file archiving utility
31#	Caya					- a multiprotocol im client
32#	CCache					- fast compiler cache
33#	CDRecord				- the command line CD writing tools
34#	Clang					- the LLVM C and C++ compiler (llvm, libs, headers)
35#	Clockwerk				- native audio/video compositing
36#	CLucene					- indexed file search
37#	CMake					- cross platform make
38#	Colors!					- color picker application
39#	Ctags					- exuberant ctags (source files indexing)
40#	Curl					- a client that groks URLs
41#	CVS						- the version control system
42#	Development				- more complete dev environment (including autotools)
43#	DevelopmentBase			- basic development environment (gcc, headers, libs,...)
44#	DevelopmentJava			- JamVM, a Java Virtual machine, GNU Classpath, ECJ
45#	DevelopmentMin			- development headers, libs, tools, from sources only
46#	DevelopmentPowerPC			- Cross compiling environment for PowerPC
47#	Doxygen					- Generate documentation from source code
48#	Droid					- Font family from Google's Android project
49#	Expat					- XML parsing libraries
50#	Fastdep					- fast dependency generator for C/C++ files
51#	friss					- RSS/ATOM/... feeds reader
52#	GetText					- a framework to help produce multi-lingual messages.
53#	Git						- the distributed version control system
54#	GitDoc					- documentation for the distributed version control system
55#	GPerf					- the perfect hash function generator.
56#	Groff					- text formatter used for man pages
57#	HGrep					- header grep tool
58#	ICU-devel				- the headers and lib-links for ICU (for development)
59#	KeymapSwitcher			- Easy to use keymap switcher
60#	LGrep					- Library Grep tool
61#	LibEvent				- An event notification library
62#	LibIconv				- text encoding conversion library
63#	LibLayout				- GCC2 package needed by some BeOS apps to compile
64#	Libmng					- mng support library
65#	LibXML2					- the XML support library
66#	LibXSLT					- xslt library and utility
67#	Links					- the web browser
68#	Lua						- the scripting language
69#	Man						- standard commands to read man pages
70#	Mercurial				- the distributed version control system
71#	Nano					- the command line text editor
72#	Nanumfont				- Korean monospace font
73#	Neon					- support libraries used for example by SVN
74#	NetFS					- the native networked file system components
75#	NetSurf					- the web browser
76#	OCaml					- the Objective Caml language
77#	OpenSound				- additional audio driver package
78#	OpenSSH					- the secure shell
79#	OpenSSL					- secure sockets library
80#	P7zip					- file archiving utility
81#	Paladin					- a Haiku IDE
82#	PCRE					- the (Perl-compatible) regex engine
83#	Pe						- the powerful native Programmer's Editor
84#	Perl					- the scripting language
85#	Python					- the scripting language
86#	Puri					- chess game
87#	Rsync					- remote directory synchronization
88#	Ruby					- the programming language
89#	Sed						- the ultimate stream editor
90#	SQLite					- the database implementation
91#	Subversion				- the version control system
92#	TagLib					- id3 tag library
93#	Tar						- archiving utility
94#	TimGMSoundFont			- a good quality General MIDI Sound Font
95#	TrackerNewTemplates		- template files for Tracker's New menu
96#	Transmission			- a fast, easy, and free BitTorrent Client
97#	UserlandFS				- aids native file system development (like FUSE)
98#	Vim						- Vi IMproved. Highly configurable text editor
99#	Vision					- powerful native IRC client
100#	WebPositive				- native, WebKit-based web browser
101#	WebPositiveBookmarks	- bookmarks for WebPositive
102#	Welcome					- introductory documentation to Haiku
103#	WifiFirmwareScriptData	- data files needed by install-wifi-firmwares.sh
104#	WonderBrush				- native graphics application
105#	wpa_supplicant			- a WPA Supplicant with support for WPA and WPA2
106#	WQY-MicroHei			- Chinese font
107#	XZ-Utils				- file archiving utility
108#	Yasm					- the assembler utility
109
110local baseURL = http://haiku-files.org/files/optional-packages ;
111local baseSourceURL = http://haiku-files.org/files/sources ;
112
113# ABI-compliance-checker
114if [ IsOptionalHaikuImagePackageAdded ABI-compliance-checker ] {
115	if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
116		Echo "No optional package ABI-compliance-checker for gcc2" ;
117	} else {
118		InstallOptionalHaikuImagePackage
119			ABI-compliance-checker-1.12-noarch-gcc4-2010-02-01.zip
120			: $(baseURL)/ABI-compliance-checker-1.12-noarch-gcc4-2010-02-01.zip ;
121	}
122}
123
124
125# APR
126if [ IsOptionalHaikuImagePackageAdded APR ] {
127	if $(TARGET_ARCH) != x86 {
128		Echo "No optional package APR available for $(TARGET_ARCH)" ;
129	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
130		InstallOptionalHaikuImagePackage
131			apr-1.4.6-r1a4-x86-gcc4-2012-08-30.zip
132			: $(baseURL)/apr-1.4.6-r1a4-x86-gcc4-2012-08-30.zip
133			: : true ;
134	} else {
135		InstallOptionalHaikuImagePackage
136			apr-1.4.6-r1a4-x86-gcc2-2012-08-27.zip
137			: $(baseURL)/apr-1.4.6-r1a4-x86-gcc2-2012-08-27.zip
138			: : true ;
139	}
140}
141
142
143# APR-util
144if [ IsOptionalHaikuImagePackageAdded APR-util ] {
145	if $(TARGET_ARCH) != x86 {
146		Echo "No optional package APR-util available for $(TARGET_ARCH)" ;
147	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
148		InstallOptionalHaikuImagePackage
149			apr-util-1.4.1-r1a4-x86-gcc4-2012-08-30.zip
150			: $(baseURL)/apr-util-1.4.1-r1a4-x86-gcc4-2012-08-30.zip
151			: : true ;
152	} else {
153		InstallOptionalHaikuImagePackage
154			apr-util-1.4.1-r1a4-x86-gcc2-2012-08-27.zip
155			: $(baseURL)/apr-util-1.4.1-r1a4-x86-gcc2-2012-08-27.zip
156			: : true ;
157	}
158}
159
160
161# ArmyKnife
162if [ IsOptionalHaikuImagePackageAdded ArmyKnife ] {
163	if $(TARGET_ARCH) != x86 {
164		Echo "No optional package ArmyKnife available for $(TARGET_ARCH)" ;
165	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
166		Echo "No optional package ArmyKnife for gcc4" ;
167	} else {
168		InstallOptionalHaikuImagePackage
169			armyknife-63-r1a4-x86-gcc2-2012-08-30.zip
170			: $(baseURL)/armyknife-63-r1a4-x86-gcc2-2012-08-30.zip ;
171		AddSymlinkToHaikuImage home config settings deskbar Applications
172			: /boot/apps/ArmyKnife/ArmyKnife ;
173	}
174}
175
176
177# Bazaar
178if [ IsOptionalHaikuImagePackageAdded Bazaar ] {
179	if $(TARGET_ARCH) != x86 {
180		Echo "No optional package Bazaar available for $(TARGET_ARCH)" ;
181	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
182		InstallOptionalHaikuImagePackage bzr-2.6b1-r1a4-x86-gcc4-2012-08-30.zip
183			: $(baseURL)/bzr-2.6b1-r1a4-x86-gcc4-2012-08-30.zip ;
184	} else {
185		InstallOptionalHaikuImagePackage bzr-2.5.1-r1a4-x86-gcc2-2012-08-27.zip
186			: $(baseURL)/bzr-2.5.1-r1a4-x86-gcc2-2012-08-27.zip ;
187	}
188}
189
190
191# BeAE
192if [ IsOptionalHaikuImagePackageAdded BeAE ] {
193	if $(TARGET_ARCH) != x86 {
194		Echo "No optional package BeAE available for $(TARGET_ARCH)" ;
195	} else {
196		if $(HAIKU_GCC_VERSION[1]) >= 4 {
197			InstallOptionalHaikuImagePackage
198				beae-22-r1a4-x86-gcc4-2012-08-30.zip
199				: $(baseURL)/beae-22-r1a4-x86-gcc4-2012-08-30.zip ;
200		} else {
201			InstallOptionalHaikuImagePackage
202				beae-22-r1a4-x86-gcc2-2012-08-27.zip
203				: $(baseURL)/beae-22-r1a4-x86-gcc2-2012-08-27.zip ;
204		}
205		AddSymlinkToHaikuImage home config settings deskbar Applications
206			: /boot/apps/BeAE/BeAE ;
207	}
208}
209
210
211# Beam
212if [ IsOptionalHaikuImagePackageAdded Beam ] {
213	if $(TARGET_ARCH) != x86 {
214		Echo "No optional package Beam available for $(TARGET_ARCH)" ;
215	} else {
216		if $(HAIKU_GCC_VERSION[1]) >= 4 {
217			InstallOptionalHaikuImagePackage
218				beam-1.2alpha-r1a4-x86-gcc4-2012-09-12.zip
219				: $(baseURL)/beam-1.2alpha-r1a4-x86-gcc4-2012-09-12.zip ;
220		} else {
221			InstallOptionalHaikuImagePackage
222				beam-1.2alpha-r1a4-x86-gcc2-2012-08-29.zip
223				: $(baseURL)/beam-1.2alpha-r1a4-x86-gcc2-2012-08-29.zip ;
224		}
225		AddSymlinkToHaikuImage home config settings deskbar Applications
226			: /boot/apps/Beam/Beam ;
227	}
228}
229
230
231# bebook
232if [ IsOptionalHaikuImagePackageAdded BeBook ] {
233	InstallOptionalHaikuImagePackage bebook_20081026.zip
234		: $(baseURL)/bebook_20081026.zip
235		: system documentation ;
236	AddSymlinkToHaikuImage home Desktop
237		: /boot/system/documentation/bebook/index.html : BeBook ;
238}
239
240
241# BeHappy
242if [ IsOptionalHaikuImagePackageAdded BeHappy ] {
243	if $(TARGET_ARCH) != x86 {
244		Echo "No optional package BeHappy available for $(TARGET_ARCH)" ;
245	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
246		Echo "No optional package BeHappy available for gcc4" ;
247	} else {
248		Echo "No optional package BeHappy available for gcc2" ;
249	}
250}
251
252
253# BeOSCompatibility
254if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
255	if $(TARGET_ARCH) != x86 {
256		Echo "No optional package BeOSCompatibility available for $(TARGET_ARCH)" ;
257	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
258		Echo "No optional package BeOSCompatibility available for gcc4" ;
259	} else {
260		Echo "Warning: Adding BeOS compatibility symlinks. This will go away. Please fix your apps!" ;
261		AddSymlinkToHaikuImage beos : ../system/apps ;
262		AddSymlinkToHaikuImage beos : ../system/bin ;
263		AddSymlinkToHaikuImage beos : ../system/documentation ;
264		AddSymlinkToHaikuImage beos : ../common/etc ;
265		AddSymlinkToHaikuImage beos : ../system/preferences ;
266		AddSymlinkToHaikuImage beos : ../system ;
267		AddDirectoryToHaikuImage var ;
268		AddSymlinkToHaikuImage var : /boot/common/var/log ;
269		AddSymlinkToHaikuImage var : /boot/common/cache/tmp ;
270	}
271}
272
273
274# BePDF
275if [ IsOptionalHaikuImagePackageAdded BePDF ] {
276	if $(TARGET_ARCH) != x86 {
277		Echo "No optional package BePDF available for $(TARGET_ARCH)" ;
278	} else {
279		if $(HAIKU_GCC_VERSION[1]) >= 4 {
280			InstallOptionalHaikuImagePackage
281				bepdf-1.1.1b4-x86-gcc4-2012-08-11.zip
282				: $(baseURL)/bepdf-1.1.1b4-x86-gcc4-2012-08-11.zip ;
283		} else {
284			InstallOptionalHaikuImagePackage
285				bepdf-1.1.1b4-r1a4-x86-gcc2-2012-08-30.zip
286				: $(baseURL)/bepdf-1.1.1b4-r1a4-x86-gcc2-2012-08-30.zip ;
287		}
288		AddSymlinkToHaikuImage home config settings deskbar Applications
289			: /boot/apps/BePDF/BePDF ;
290	}
291}
292
293
294# BeZillaBrowser
295if [ IsOptionalHaikuImagePackageAdded BeZillaBrowser ] {
296	if $(TARGET_ARCH) != x86 {
297		Echo "No optional package BeZillaBrowser available for $(TARGET_ARCH)" ;
298	} else {
299		if $(HAIKU_GCC_VERSION[1]) >= 4 {
300			InstallOptionalHaikuImagePackage
301				BeZillaBrowser-2.0.0.22pre-x86-gcc4-2012-09-21.zip
302				: $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc4-2012-09-21.zip ;
303 		} else {
304			InstallOptionalHaikuImagePackage
305				BeZillaBrowser-2.0.0.22pre-x86-gcc2-2012-09-21.zip
306				: $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2012-09-21.zip ;
307 		}
308 		AddSymlinkToHaikuImage home config settings deskbar Applications
309			: /boot/apps/BeZillaBrowser/BeZillaBrowser ;
310	}
311}
312
313
314# Bluetooth stack
315if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
316	local bluetoothDrivers = h2generic ;
317	AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
318	AddFilesToHaikuImage system servers : bluetooth_server ;
319	AddFilesToHaikuImage system lib : libbluetooth.so ;
320	AddFilesToHaikuImage system add-ons kernel network protocols : l2cap ;
321	AddFilesToHaikuImage system add-ons kernel bluetooth : btCoreData hci ;
322	AddFilesToHaikuImage system preferences : Bluetooth ;
323	AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
324	AddSymlinkToHaikuImage home config settings deskbar Preferences
325		: /boot/system/preferences/Bluetooth ;
326	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
327		&& $(HAIKU_GCC_VERSION[1]) in 2 4 {
328		local arch = $(TARGET_ARCH) ;
329		local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
330		AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
331			: /system/lib libbluetooth.so : : true ;
332	}
333}
334
335
336# BurnItNow
337if [ IsOptionalHaikuImagePackageAdded BurnItNow ] {
338	if $(TARGET_ARCH) != x86 {
339		Echo "No optional package BurnItNow available for $(TARGET_ARCH)" ;
340	} else {
341		if $(HAIKU_GCC_VERSION[1]) >= 4 {
342			InstallOptionalHaikuImagePackage
343			burnitnow-39-r1a4-x86-gcc4-2012-08-30.zip
344				: $(baseURL)/burnitnow-39-r1a4-x86-gcc4-2012-08-30.zip ;
345		} else {
346		InstallOptionalHaikuImagePackage
347			burnitnow-39-r1a4-x86-gcc2-2012-08-27.zip
348			: $(baseURL)/burnitnow-39-r1a4-x86-gcc2-2012-08-27.zip ;
349		}
350		AddSymlinkToHaikuImage home config settings deskbar Applications
351			: /boot/apps/BurnItNow/BurnItNow ;
352	}
353}
354
355
356# Bzip
357if [ IsOptionalHaikuImagePackageAdded Bzip ] {
358	if $(TARGET_ARCH) != x86 {
359		Echo "No optional package Bzip available for $(TARGET_ARCH)" ;
360	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
361		InstallOptionalHaikuImagePackage
362			bzip2-1.0.6-r1a4-x86-gcc4-2012-08-30.zip
363			: $(baseURL)/bzip2-1.0.6-r1a4-x86-gcc4-2012-08-30.zip
364			: : true ;
365	} else {
366		InstallOptionalHaikuImagePackage
367			bzip2-1.0.6-r1a4-x86-gcc2-2012-08-27.zip
368			: $(baseURL)/bzip2-1.0.6-r1a4-x86-gcc2-2012-08-27.zip
369			: : true ;
370	}
371}
372
373
374# CARootCertificates
375if [ IsOptionalHaikuImagePackageAdded CARootCertificates ] {
376	InstallOptionalHaikuImagePackage cert-2012-07-04.zip
377		: $(baseURL)/cert-2012-07-04.zip
378		: common data ssl ;
379}
380
381
382# Caya
383if [ IsOptionalHaikuImagePackageAdded Caya ] {
384	if $(TARGET_ARCH) != x86 {
385		Echo "No optional package Caya available for $(TARGET_ARCH)" ;
386	} else {
387		if $(HAIKU_GCC_VERSION[1]) >= 4 || $(isHybridBuild) {
388			InstallOptionalHaikuImagePackage
389				caya-279-r1a4-x86-gcc4-2012-10-02.zip
390				: $(baseURL)/caya-279-r1a4-x86-gcc4-2012-10-02.zip
391				: : true ;
392			InstallOptionalHaikuImagePackage
393				caya-gpl-protocols-36-r1a4-x86-gcc4-2012-10-01.zip
394				: $(baseURL)/caya-gpl-protocols-36-r1a4-x86-gcc4-2012-10-01.zip
395				: : true ;
396			AddSymlinkToHaikuImage home config be Applications
397				: /boot/apps/Caya/Caya ;
398		} else {
399			Echo "No optional package Caya available for $(TARGET_ARCH)-gcc2" ;
400		}
401	}
402}
403
404# CCache
405if [ IsOptionalHaikuImagePackageAdded CCache ] {
406	if $(TARGET_ARCH) != x86 {
407		Echo "No optional package CCache available for $(TARGET_ARCH)" ;
408	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
409		InstallOptionalHaikuImagePackage
410			ccache-3.0.1-r1a4-x86-gcc4-2012-08-30.zip
411			: $(baseURL)/ccache-3.0.1-r1a4-x86-gcc4-2012-08-30.zip ;
412	} else {
413		InstallOptionalHaikuImagePackage
414			ccache-3.0.1-r1a4-x86-gcc2-2012-08-27.zip
415			: $(baseURL)/ccache-3.0.1-r1a4-x86-gcc2-2012-08-27.zip ;
416	}
417}
418
419
420# CDRecord
421if [ IsOptionalHaikuImagePackageAdded CDRecord ] {
422	if $(TARGET_ARCH) != x86 {
423		Echo "No optional package CDRecord available for $(TARGET_ARCH)" ;
424	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
425		InstallOptionalHaikuImagePackage
426			cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip
427			: $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc4-2012-08-30.zip ;
428	} else {
429		InstallOptionalHaikuImagePackage
430			cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip
431			: $(baseURL)/cdrtools-3.01a07-r1a4-x86-gcc2-2012-08-28.zip ;
432	}
433}
434
435
436# Clang
437if [ IsOptionalHaikuImagePackageAdded Clang ] {
438	if $(TARGET_ARCH) != x86 {
439		Echo "No optional package Clang available for $(TARGET_ARCH)" ;
440	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
441		Echo "No optional package Clang available for GCC2" ;
442	} else {
443		InstallOptionalHaikuImagePackage
444			clang-3.0-x86-gcc4-2012-03-09.zip
445			: $(baseURL)/clang-3.0-x86-gcc4-2012-03-09.zip ;
446	}
447}
448
449
450# Clockwerk
451if [ IsOptionalHaikuImagePackageAdded Clockwerk ] {
452	if $(TARGET_ARCH) != x86 {
453		Echo "No optional package Clockwerk available for $(TARGET_ARCH)" ;
454	} else {
455		if $(HAIKU_GCC_VERSION[1]) >= 4 {
456			InstallOptionalHaikuImagePackage
457				Clockwerk-0.0.2-x86-gcc4-2012-02-25.zip
458				: $(baseURL)/Clockwerk-0.0.2-x86-gcc4-2012-02-25.zip ;
459		} else {
460			InstallOptionalHaikuImagePackage
461				Clockwerk-0.0.2-x86-gcc2-2012-03-04.zip
462				: $(baseURL)/Clockwerk-0.0.2-x86-gcc2-2012-03-04.zip ;
463		}
464		AddSymlinkToHaikuImage home config settings deskbar Applications
465			: /boot/apps/Clockwerk/Clockwerk ;
466	}
467}
468
469
470# CLucene
471if [ IsOptionalHaikuImagePackageAdded CLucene ] {
472	if $(TARGET_ARCH) != x86 {
473		Echo "No optional package CLucene available for $(TARGET_ARCH)" ;
474	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
475		Echo "No optional package CLucene available for GCC2" ;
476	} else {
477		InstallOptionalHaikuImagePackage
478			clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip
479			: $(baseURL)/clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip
480			: : true ;
481	}
482}
483
484
485# CMake
486if [ IsOptionalHaikuImagePackageAdded CMake ] {
487	if $(TARGET_ARCH) != x86 {
488		Echo "No optional package CMake available for $(TARGET_ARCH)" ;
489	} else {
490		if $(HAIKU_GCC_VERSION[1]) >= 4 {
491			InstallOptionalHaikuImagePackage
492				cmake-2.8.5-r1a4-x86-gcc4-2012-08-28.zip
493				: $(baseURL)/cmake-2.8.5-r1a4-x86-gcc4-2012-08-28.zip
494				: : true ;
495		} else {
496			InstallOptionalHaikuImagePackage
497				cmake-2.8.5-r1a4-x86-gcc2-2012-08-27.zip
498				: $(baseURL)/cmake-2.8.5-r1a4-x86-gcc2-2012-08-27.zip
499				: : true ;
500		}
501	}
502}
503
504
505# Colors!
506if [ IsOptionalHaikuImagePackageAdded Colors! ] {
507	if $(TARGET_ARCH) != x86 {
508		Echo "No optional package Colors! available for $(TARGET_ARCH)" ;
509	} else {
510		if $(HAIKU_GCC_VERSION[1]) >= 4 {
511			InstallOptionalHaikuImagePackage
512				Colors!-2.1-r1a4-x86-gcc4-2012-08-30.zip
513				: $(baseURL)/Colors\!-2.1-r1a4-x86-gcc4-2012-08-30.zip ;
514		} else {
515			InstallOptionalHaikuImagePackage
516				Colors!-2.1-r1a4-x86-gcc2-2012-08-30.zip
517				: $(baseURL)/Colors\!-2.1-r1a4-x86-gcc2-2012-08-30.zip ;
518		}
519		AddSymlinkToHaikuImage home config settings deskbar Applications
520			: /boot/apps/Colors\!/Colors\! ;
521	}
522}
523
524
525# Ctags
526if [ IsOptionalHaikuImagePackageAdded Ctags ] {
527	if $(TARGET_ARCH) != x86 {
528		Echo "No optional package Ctags available for $(TARGET_ARCH)" ;
529	} else {
530		if $(HAIKU_GCC_VERSION[1]) >= 4 {
531			InstallOptionalHaikuImagePackage
532				ctags-5.8-r1a4-x86-gcc4-2012-08-30.zip
533				: $(baseURL)/ctags-5.8-r1a4-x86-gcc4-2012-08-30.zip
534				: : true ;
535		} else {
536			InstallOptionalHaikuImagePackage
537				ctags-5.8-r1a4-x86-gcc2-2012-09-03.zip
538				: $(baseURL)/ctags-5.8-r1a4-x86-gcc2-2012-09-03.zip
539				: : true ;
540		}
541	}
542}
543
544
545# Curl
546if [ IsOptionalHaikuImagePackageAdded Curl ] {
547	if $(TARGET_ARCH) != x86 {
548		Echo "No optional package Curl available for $(TARGET_ARCH)" ;
549	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
550		InstallOptionalHaikuImagePackage curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip
551			: $(baseURL)/curl-7.26.0-r1a4-x86-gcc4-2012-08-29.zip ;
552	} else {
553		InstallOptionalHaikuImagePackage curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip
554			: $(baseURL)/curl-7.26.0-r1a4-x86-gcc2-2012-08-28.zip ;
555	}
556}
557
558
559# CVS
560if [ IsOptionalHaikuImagePackageAdded CVS ] {
561	if $(TARGET_ARCH) != x86 {
562		Echo "No optional package CVS available for $(TARGET_ARCH)" ;
563	} else {
564		if $(HAIKU_GCC_VERSION[1]) >= 4 {
565			InstallOptionalHaikuImagePackage
566				cvs-1.12.13.1-r1a4-x86-gcc4-2012-08-30.zip
567				: $(baseURL)/cvs-1.12.13.1-r1a4-x86-gcc4-2012-08-30.zip
568				: : true ;
569		} else {
570			InstallOptionalHaikuImagePackage
571				cvs-1.12.13.1-r1a4-x86-gcc2-2012-08-28.zip
572				: $(baseURL)/cvs-1.12.13.1-r1a4-x86-gcc2-2012-08-28.zip
573				: : true ;
574		}
575	}
576}
577
578
579# DemoPackage_Audio
580if [ IsOptionalHaikuImagePackageAdded DemoPackage_Audio ] {
581	InstallOptionalHaikuImagePackage DemoPackage_Audio-0.1-2012-02-19.zip
582		: $(baseURL)/DemoPackage_Audio-0.1-2012-02-19.zip
583		: ;
584}
585
586
587# DemoPackage_Data
588if [ IsOptionalHaikuImagePackageAdded DemoPackage_Data ] {
589	InstallOptionalHaikuImagePackage DemoPackage_Data-0.1-2012-02-19.zip
590		: $(baseURL)/DemoPackage_Data-0.1-2012-02-19.zip
591		: ;
592}
593
594
595# DemoPackage_Image
596if [ IsOptionalHaikuImagePackageAdded DemoPackage_Image ] {
597	InstallOptionalHaikuImagePackage DemoPackage_Image-0.2-2012-09-22.zip
598		: $(baseURL)/DemoPackage_Image-0.2-2012-09-22.zip
599		: ;
600}
601
602
603# DemoPackage_Video
604if [ IsOptionalHaikuImagePackageAdded DemoPackage_Video ] {
605	InstallOptionalHaikuImagePackage DemoPackage_Video-0.1-2012-02-19.zip
606		: $(baseURL)/DemoPackage_Video-0.1-2012-02-19.zip
607		: ;
608}
609
610
611# Development
612if [ IsOptionalHaikuImagePackageAdded Development ] && $(TARGET_ARCH) = x86 {
613	AddFilesToHaikuImage system apps : Debugger ;
614	AddSymlinkToHaikuImage home config settings deskbar Applications
615		: /boot/system/apps/Debugger : Debugger ;
616	# autotools
617	if $(HAIKU_GCC_VERSION[1]) >= 4 {
618		InstallOptionalHaikuImagePackage
619			autoconf-2.68-r1a4-x86-gcc4-2012-08-28.zip
620			: $(baseURL)/autoconf-2.68-r1a4-x86-gcc4-2012-08-28.zip
621			: : true ;
622		InstallOptionalHaikuImagePackage
623			automake-1.11.1-r1a4-x86-gcc4-2012-08-28.zip
624			: $(baseURL)/automake-1.11.1-r1a4-x86-gcc4-2012-08-28.zip
625			: : true ;
626		InstallOptionalHaikuImagePackage
627			libtool-2.4-r1a4-x86-gcc4-2012-08-28.zip
628			: $(baseURL)/libtool-2.4-r1a4-x86-gcc4-2012-08-28.zip
629			: : true ;
630		InstallOptionalHaikuImagePackage
631			texinfo-4.13a-r1a4-x86-gcc4-2012-08-30.zip
632			: $(baseURL)/texinfo-4.13a-r1a4-x86-gcc4-2012-08-30.zip
633			: : true ;
634	} else {
635		InstallOptionalHaikuImagePackage
636			autoconf-2.68-r1a4-x86-gcc2-2012-08-26.zip
637			: $(baseURL)/autoconf-2.68-r1a4-x86-gcc2-2012-08-26.zip
638			: : true ;
639		InstallOptionalHaikuImagePackage
640			automake-1.11.1-r1a4-x86-gcc2-2012-08-26.zip
641			: $(baseURL)/automake-1.11.1-r1a4-x86-gcc2-2012-08-26.zip
642			: : true ;
643		InstallOptionalHaikuImagePackage
644			libtool-2.4-r1a4-x86-gcc2-2012-08-26.zip
645			: $(baseURL)/libtool-2.4-r1a4-x86-gcc2-2012-08-26.zip
646			: : true ;
647		InstallOptionalHaikuImagePackage
648			texinfo-4.13a-r1a4-x86-gcc2-2012-08-28.zip
649			: $(baseURL)/texinfo-4.13a-r1a4-x86-gcc2-2012-08-28.zip
650			: : true ;
651	}
652}
653
654
655# DevelopmentBase
656if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ]
657		&& $(TARGET_ARCH) = x86 {
658	# gcc and binutils
659	if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
660		InstallOptionalHaikuImagePackage
661			gcc-2.95.3-r1a4-x86-gcc2-2012-11-01.zip
662			: $(baseURL)/gcc-2.95.3-r1a4-x86-gcc2-2012-11-01.zip ;
663	}
664
665	if $(HAIKU_GCC_VERSION[1]) = 2 {
666		# symlink to the appropriate system/lib[/gcc2] folder
667		AddSymlinkToHaikuHybridImage
668			develop abi x86 gcc2 tools gcc-2.95.3-haiku-121101 lib
669			: /system/lib libstdc++.r4.so : : true ;
670	}
671
672	if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) {
673		InstallOptionalHaikuImagePackage
674			gcc-4.6.3-r1a4-x86-gcc4-2012-11-01.zip
675			: $(baseURL)/gcc-4.6.3-r1a4-x86-gcc4-2012-11-01.zip ;
676	}
677
678	if $(HAIKU_GCC_VERSION[1]) = 4 {
679		# symlink cpp to g++'s headers
680		AddSymlinkToHaikuHybridImage develop abi x86 gcc4 headers
681			: ../tools/current/include/g++ : cpp ;
682
683		# symlink to the appropriate system/lib[/gcc4] folder
684		local libs = libstdc++.so libsupc++.so ;
685		for lib in $(libs) {
686			AddSymlinkToHaikuHybridImage
687				develop abi x86 gcc4 tools gcc-4.6.3-haiku-121101 lib
688				: /system/lib $(lib) : : true ;
689		}
690	}
691
692	# other commonly used tools
693	if $(HAIKU_GCC_VERSION[1]) >= 4 {
694		InstallOptionalHaikuImagePackage
695			bison-2.4.3-r1a4-x86-gcc4-2012-08-28.zip
696			: $(baseURL)/bison-2.4.3-r1a4-x86-gcc4-2012-08-28.zip ;
697		InstallOptionalHaikuImagePackage
698			m4-1.4.16-r1a4-x86-gcc4-2012-08-28.zip
699			: $(baseURL)/m4-1.4.16-r1a4-x86-gcc4-2012-08-28.zip ;
700		InstallOptionalHaikuImagePackage
701			flex-2.5.35-r1a4-x86-gcc4-2012-08-28.zip
702			: $(baseURL)/flex-2.5.35-r1a4-x86-gcc4-2012-08-28.zip ;
703		InstallOptionalHaikuImagePackage
704			jam-2.5-r1a4-x86-gcc4-2012-08-28.zip
705			: $(baseURL)/jam-2.5-r1a4-x86-gcc4-2012-08-28.zip ;
706		InstallOptionalHaikuImagePackage
707			mkdepend-1.7-r1a4-x86-gcc4-2012-08-28.zip
708			: $(baseURL)/mkdepend-1.7-r1a4-x86-gcc4-2012-08-28.zip ;
709		InstallOptionalHaikuImagePackage
710			make-3.82-r1a4-x86-gcc4-2012-08-28.zip
711			: $(baseURL)/make-3.82-r1a4-x86-gcc4-2012-08-28.zip ;
712	} else {
713		InstallOptionalHaikuImagePackage
714			bison-2.4.3-r1a4-x86-gcc2-2012-08-26.zip
715			: $(baseURL)/bison-2.4.3-r1a4-x86-gcc2-2012-08-26.zip ;
716		InstallOptionalHaikuImagePackage
717			m4-1.4.16-r1a4-x86-gcc2-2012-08-26.zip
718			: $(baseURL)/m4-1.4.16-r1a4-x86-gcc2-2012-08-26.zip ;
719		InstallOptionalHaikuImagePackage
720			flex-2.5.35-r1a4-x86-gcc2-2012-09-10.zip
721			: $(baseURL)/flex-2.5.35-r1a4-x86-gcc2-2012-09-10.zip ;
722		InstallOptionalHaikuImagePackage
723			jam-2.5-r1a4-x86-gcc2-2012-08-27.zip
724			: $(baseURL)/jam-2.5-r1a4-x86-gcc2-2012-08-27.zip ;
725		InstallOptionalHaikuImagePackage
726			mkdepend-1.7-r1a4-x86-gcc2-2012-08-26.zip
727			: $(baseURL)/mkdepend-1.7-r1a4-x86-gcc2-2012-08-26.zip ;
728		InstallOptionalHaikuImagePackage
729			make-3.82-r1a4-x86-gcc2-2012-08-26.zip
730			: $(baseURL)/make-3.82-r1a4-x86-gcc2-2012-08-26.zip ;
731	}
732}
733
734
735# DevelopmentJava
736if [ IsOptionalHaikuImagePackageAdded DevelopmentJava ] {
737	if $(TARGET_ARCH) != x86 {
738		Echo "No optional package DevelopmentJava available for $(TARGET_ARCH)" ;
739	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
740		Echo "No optional package DevelopmentJava available for gcc2" ;
741	} else {
742		InstallOptionalHaikuImagePackage
743			gnu-classpath-0.98-r1a3-x86-gcc4-2011-06-08.zip
744			: $(baseURL)/gnu-classpath-0.98-r1a3-x86-gcc4-2011-06-08.zip ;
745		InstallOptionalHaikuImagePackage
746			jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip
747			: $(baseURL)/jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip ;
748		AddSymlinkToHaikuImage common bin : /boot/common/bin/jamvm : java ;
749		InstallOptionalHaikuImagePackage
750			ecj-3.6.2-haiku-2011-06-08.zip
751			: $(baseURL)/ecj-3.6.2-haiku-2011-06-08.zip ;
752	}
753}
754
755
756# DevelopmentMin
757if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
758	if ! ( $(HAIKU_GCC_VERSION[1]) in 2 4 ) {
759		Exit "Optional package DevelopmentMin: Unsupported GCC version:"
760			$(HAIKU_GCC_VERSION[1]) ;
761	}
762
763	local arch = $(TARGET_ARCH) ;
764	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
765	local abiDirTokens = develop abi $(arch) $(abi) ;
766
767	# glue code
768	AddFilesToHaikuHybridImage $(abiDirTokens) lib :
769		<src!system!glue!arch!$(arch)>crti.o
770		<src!system!glue!arch!$(arch)>crtn.o
771		<src!system!glue>init_term_dyn.o
772		<src!system!glue>start_dyn.o
773		<src!system!glue>haiku_version_glue.o
774	;
775
776	# kernel
777	AddFilesToHaikuHybridImage $(abiDirTokens) lib : kernel.so : _KERNEL_ ;
778
779	# additional libraries
780	local developmentLibs = <revisioned>libroot_debug.so ;
781	AddFilesToHaikuHybridImage system lib : $(developmentLibs) : : true ;
782
783	# library symlinks
784	local lib ;
785	for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) $(developmentLibs)
786		$(OPTIONAL_LIBS_ALIASES) {
787		AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
788			: /system/lib $(lib:BS) : : true ;
789		local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
790		if $(abiVersion) {
791			local abiVersionedLib = $(lib:BS).$(abiVersion) ;
792			AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
793				: /system/lib $(abiVersionedLib) : : true ;
794		}
795	}
796
797	# static libraries
798	AddFilesToHaikuHybridImage $(abiDirTokens) lib : libncurses.a ;
799	AddFilesToHaikuHybridImage $(abiDirTokens) lib : liblocalestub.a ;
800
801	# the POSIX error code mapper library
802	AddFilesToHaikuHybridImage $(abiDirTokens) lib : libposix_error_mapper.a ;
803
804	# symlinks for ABI abstraction
805	AddSymlinkToHaikuImage develop abi : $(arch)/$(abi) : current ;
806	AddSymlinkToHaikuImage develop lib : /boot/develop/abi/$(arch)/$(abi)/lib
807		: $(arch) ;
808	AddSymlinkToHaikuImage develop tools
809		: /boot/develop/abi/current/tools/current : gnupro ;
810	AddSymlinkToHaikuImage develop headers
811		: /boot/develop/abi/current/headers/cpp ;
812	AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
813		: /boot/common/lib : common : true ;
814	AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
815		: /boot/home/config/lib : home : true ;
816
817	# ABI independent stuff
818
819	# scripts: cc and c++ wrapper, freetype-config, setgcc
820	local scripts = cc c++ freetype-config setgcc ;
821	SEARCH on $(scripts) = [ FDirName $(HAIKU_TOP) data bin ] ;
822	AddFilesToHaikuImage system bin : $(scripts) ;
823
824	# skeleton makefile and makefile-engine
825	local makefileEngineFiles =
826		<makefile-engine>makefile
827		<makefile-engine>makefile-engine
828	;
829	SEARCH on $(makefileEngineFiles)
830		= [ FDirName $(HAIKU_TOP) data develop ] ;
831	AddFilesToHaikuImage develop etc : $(makefileEngineFiles) ;
832
833	# headers
834	AddHeaderDirectoryToHaikuImage config ;
835	AddHeaderDirectoryToHaikuImage glibc ;
836	AddHeaderDirectoryToHaikuImage os ;
837	AddHeaderDirectoryToHaikuImage posix ;
838
839	# create be -> os symlink for now
840	AddSymlinkToHaikuImage develop headers : os : be ;
841
842	# BSD and GNU compatibility headers
843	AddHeaderDirectoryToHaikuImage compatibility bsd : bsd ;
844	AddHeaderDirectoryToHaikuImage compatibility gnu : gnu ;
845
846	# third party libs headers
847	AddHeaderDirectoryToHaikuImage libs ncurses : 3rdparty ;
848	AddHeaderDirectoryToHaikuImage libs termcap : 3rdparty ;
849	AddHeaderDirectoryToHaikuImage libs tiff : 3rdparty ;
850
851	CopyDirectoryToHaikuImage develop headers :
852		[ FDirName $(HAIKU_FREETYPE_DIR) develop headers 3rdparty ] ;
853	CopyDirectoryToHaikuImage develop headers : $(HAIKU_JPEG_HEADERS)
854		: 3rdparty ;
855	CopyDirectoryToHaikuImage develop headers : $(HAIKU_LIBPNG_HEADERS)
856		: 3rdparty ;
857	CopyDirectoryToHaikuImage develop headers : $(HAIKU_ZLIB_HEADERS)
858		: 3rdparty ;
859
860	# cpp headers
861	if $(HAIKU_GCC_VERSION[1]) = 2 {
862		# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
863		CopyDirectoryToHaikuImage $(abiDirTokens) headers
864			: [ FDirName $(HAIKU_TOP) headers cpp ] ;
865		CopyDirectoryToAlternativeGCCArchive $(abiDirTokens) headers
866			: [ FDirName $(HAIKU_TOP) headers cpp ] ;
867	}
868}
869
870
871# DevelopmentPowerPC
872if [ IsOptionalHaikuImagePackageAdded DevelopmentPowerPC ] {
873	if $(TARGET_ARCH) != x86 {
874		Echo "No optional package DevelopmentPowerPC available for $(TARGET_ARCH)" ;
875	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
876		Echo "No optional package DevelopmentPowerPC available for gcc2" ;
877	} else {
878		InstallOptionalHaikuImagePackage
879			gcc-ppc-4.6.2-x86-gcc4-2012-03-17.zip
880			: $(baseURL)/gcc-ppc-4.6.2-x86-gcc4-2012-03-17.zip ;
881		InstallOptionalHaikuImagePackage
882			haiku-devlibs-ppc-gcc4-2012-03-18.zip
883			: $(baseURL)/haiku-devlibs-ppc-gcc4-2012-03-18.zip ;
884	}
885
886}
887
888
889# DMIDecode
890if [ IsOptionalHaikuImagePackageAdded DMIDecode ] {
891	if $(TARGET_ARCH) != x86 {
892		Echo "No optional package DMIDecode available for $(TARGET_ARCH)" ;
893	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
894		InstallOptionalHaikuImagePackage
895			dmidecode-2.11-r1a4-x86-gcc4-2012-09-04.zip
896			: $(baseURL)/dmidecode-2.11-r1a4-x86-gcc4-2012-09-04.zip ;
897	} else {
898		InstallOptionalHaikuImagePackage
899			dmidecode-2.11-r1a4-x86-gcc2-2012-09-03.zip
900			: $(baseURL)/dmidecode-2.11-r1a4-x86-gcc2-2012-09-03.zip ;
901	}
902}
903
904
905# Doxygen
906if [ IsOptionalHaikuImagePackageAdded Doxygen ] {
907	if $(TARGET_ARCH) != x86 {
908		Echo "No optional package Doxygen available for $(TARGET_ARCH)" ;
909	} else {
910		if $(HAIKU_GCC_VERSION[1]) >= 4 {
911			InstallOptionalHaikuImagePackage
912				doxygen-1.6.3-r1a4-x86-gcc4-2012-09-04.zip
913				: $(baseURL)/doxygen-1.6.3-r1a4-x86-gcc4-2012-09-04.zip
914				: : true ;
915		} else {
916			InstallOptionalHaikuImagePackage
917				doxygen-1.6.3-r1a4-x86-gcc2-2012-09-05.zip
918				: $(baseURL)/doxygen-1.6.3-r1a4-x86-gcc2-2012-09-05.zip
919				: : true ;
920		}
921	}
922}
923
924
925# Droid
926if [ IsOptionalHaikuImagePackageAdded Droid ] {
927	InstallOptionalHaikuImagePackage
928		droid-113-r1a4-x86-gcc2-2012-08-27.zip
929		: $(baseURL)/droid-113-r1a4-x86-gcc2-2012-08-27.zip ;
930}
931
932
933# Expat
934if [ IsOptionalHaikuImagePackageAdded Expat ] {
935	if $(TARGET_ARCH) != x86 {
936		Echo "No optional package Expat available for $(TARGET_ARCH)" ;
937	} else {
938		if $(HAIKU_GCC_VERSION[1]) >= 4 {
939			InstallOptionalHaikuImagePackage
940				expat-2.0.1-r1a4-x86-gcc4-2012-08-30.zip
941				: $(baseURL)/expat-2.0.1-r1a4-x86-gcc4-2012-08-30.zip
942				: : true ;
943		} else {
944			InstallOptionalHaikuImagePackage
945				expat-2.0.1-r1a4-x86-gcc2-2012-08-28.zip
946				: $(baseURL)/expat-2.0.1-r1a4-x86-gcc2-2012-08-28.zip
947				: : true ;
948		}
949	}
950}
951
952
953# Fastdep
954if [ IsOptionalHaikuImagePackageAdded Fastdep ] {
955	if $(TARGET_ARCH) != x86 {
956		Echo "No optional package Fastdep available for $(TARGET_ARCH)" ;
957	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
958		InstallOptionalHaikuImagePackage
959			fastdep-0.16-r1a4-x86-gcc4-2012-08-30.zip
960			: $(baseURL)/fastdep-0.16-r1a4-x86-gcc4-2012-08-30.zip ;
961	} else {
962		InstallOptionalHaikuImagePackage
963			fastdep-0.16-r1a4-x86-gcc2-2012-08-28.zip
964			: $(baseURL)/fastdep-0.16-r1a4-x86-gcc2-2012-08-28.zip ;
965	}
966}
967
968
969# friss
970if [ IsOptionalHaikuImagePackageAdded friss ] {
971	if $(TARGET_ARCH) != x86 {
972		Echo "No optional package friss available for $(TARGET_ARCH)" ;
973	} else {
974		if $(HAIKU_GCC_VERSION[1]) >= 4 {
975			InstallOptionalHaikuImagePackage
976				friss-29-r1a4-x86-gcc4-2012-09-09.zip
977				: $(baseURL)/friss-29-r1a4-x86-gcc4-2012-09-09.zip ;
978		} else {
979			InstallOptionalHaikuImagePackage
980				friss-29-r1a4-x86-gcc2-2012-08-28.zip
981				: $(baseURL)/friss-29-r1a4-x86-gcc2-2012-08-28.zip ;
982		}
983#		AddSymlinkToHaikuImage home config settings deskbar Desktop\ applets
984#			: /boot/apps/FRiSS/FRiSS ;
985	}
986}
987
988
989# GetText
990if [ IsOptionalHaikuImagePackageAdded GetText ] {
991	if $(TARGET_ARCH) != x86 {
992		Echo "No optional package GetText available for $(TARGET_ARCH)" ;
993	} else {
994		if $(HAIKU_GCC_VERSION[1]) >= 4 {
995			InstallOptionalHaikuImagePackage
996				gettext-0.18.1.1-r1a4-x86-gcc4-2012-08-30.zip
997				: $(baseURL)/gettext-0.18.1.1-r1a4-x86-gcc4-2012-08-30.zip
998				: : true ;
999		} else {
1000			InstallOptionalHaikuImagePackage
1001				gettext-0.18.1.1-r1a4-x86-gcc2-2012-08-28.zip
1002				: $(baseURL)/gettext-0.18.1.1-r1a4-x86-gcc2-2012-08-28.zip
1003				: : true ;
1004		}
1005	}
1006}
1007
1008
1009# Git
1010if [ IsOptionalHaikuImagePackageAdded Git ] {
1011	if $(TARGET_ARCH) != x86 {
1012		Echo "No optional package Git available for $(TARGET_ARCH)" ;
1013	} else {
1014		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1015			InstallOptionalHaikuImagePackage
1016				git-1.7.10.2-r1a4-x86-gcc4-2012-08-30.zip
1017				: $(baseURL)/git-1.7.10.2-r1a4-x86-gcc4-2012-08-30.zip
1018				: : true ;
1019		} else {
1020			InstallOptionalHaikuImagePackage
1021				git-1.7.10.2-r1a4-x86-gcc2-2012-08-28.zip
1022				: $(baseURL)/git-1.7.10.2-r1a4-x86-gcc2-2012-08-28.zip
1023				: : true ;
1024		}
1025	}
1026}
1027
1028
1029# GitDoc
1030if [ IsOptionalHaikuImagePackageAdded GitDoc ] {
1031	if $(TARGET_ARCH) != x86 {
1032		Echo "No optional package GitDoc available for $(TARGET_ARCH)" ;
1033	} else {
1034		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1035			InstallOptionalHaikuImagePackage
1036				gitdoc-1.7.10.2-r1a4-x86-gcc4-2012-09-03.zip
1037				: $(baseURL)/gitdoc-1.7.10.2-r1a4-x86-gcc4-2012-09-03.zip
1038				: : true ;
1039		} else {
1040			InstallOptionalHaikuImagePackage
1041				gitdoc-1.7.10.2-r1a4-x86-gcc2-2012-08-28.zip
1042				: $(baseURL)/gitdoc-1.7.10.2-r1a4-x86-gcc2-2012-08-28.zip
1043				: : true ;
1044		}
1045	}
1046}
1047
1048
1049# GPerf
1050if [ IsOptionalHaikuImagePackageAdded GPerf ] {
1051	if $(TARGET_ARCH) != x86 {
1052		Echo "No optional package GPerf available for $(TARGET_ARCH)" ;
1053	} else {
1054		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1055			InstallOptionalHaikuImagePackage
1056				gperf-3.0.4-r1a4-x86-gcc4-2012-08-30.zip
1057				: $(baseURL)/gperf-3.0.4-r1a4-x86-gcc4-2012-08-30.zip
1058				: : true ;
1059		} else {
1060			InstallOptionalHaikuImagePackage
1061				gperf-3.0.4-r1a4-x86-gcc2-2012-08-28.zip
1062				: $(baseURL)/gperf-3.0.4-r1a4-x86-gcc2-2012-08-28.zip
1063				: : true ;
1064		}
1065	}
1066}
1067
1068
1069# Groff
1070if [ IsOptionalHaikuImagePackageAdded Groff ] {
1071	if $(TARGET_ARCH) != x86 {
1072		Echo "No optional package Groff available for $(TARGET_ARCH)" ;
1073	} else {
1074		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1075			InstallOptionalHaikuImagePackage
1076				groff-1.20.1-r1a4-x86-gcc4-2012-08-30.zip
1077				: $(baseURL)/groff-1.20.1-r1a4-x86-gcc4-2012-08-30.zip
1078				: : true ;
1079		} else {
1080			InstallOptionalHaikuImagePackage
1081				 groff-1.20.1-r1a4-x86-gcc2-2012-08-28.zip
1082				: $(baseURL)/groff-1.20.1-r1a4-x86-gcc2-2012-08-28.zip
1083				: : true ;
1084		}
1085	}
1086}
1087
1088
1089# HGgrep
1090if [ IsOptionalHaikuImagePackageAdded HGrep ] {
1091	if $(TARGET_ARCH) != x86 {
1092		Echo "No optional package HGrep available for $(TARGET_ARCH)" ;
1093	} else {
1094		InstallOptionalHaikuImagePackage
1095			hgrep-1.0.1-x86-gcc2-2012-07-23.zip
1096			: $(baseURL)/hgrep-1.0.1-x86-gcc2-2012-07-23.zip ;
1097	}
1098}
1099
1100
1101# ICU
1102if [ IsOptionalHaikuImagePackageAdded ICU ] {
1103	if $(TARGET_ARCH) != x86 {
1104		Echo "No optional package ICU available for $(TARGET_ARCH)" ;
1105	} else {
1106		if $(HAIKU_GCC_VERSION[1]) = 2 {
1107			# unzip gcc2
1108			InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_2_PACKAGE)
1109				: $(baseURL)/$(HAIKU_ICU_GCC_2_PACKAGE)
1110				: system lib ;
1111			if $(isHybridBuild) {
1112				# unzip gcc4 to gcc4 subdir
1113				InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_4_PACKAGE)
1114					: $(baseURL)/$(HAIKU_ICU_GCC_4_PACKAGE)
1115					: system lib gcc4 ;
1116			}
1117		} else {
1118			# unzip gcc4
1119			InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_4_PACKAGE)
1120				: $(baseURL)/$(HAIKU_ICU_GCC_4_PACKAGE)
1121				: system lib ;
1122			if $(isHybridBuild) {
1123				# unzip gcc2 to gcc2 subdir
1124				InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_2_PACKAGE)
1125					: $(baseURL)/$(HAIKU_ICU_GCC_2_PACKAGE)
1126					: system lib gcc2 ;
1127			}
1128		}
1129	}
1130}
1131
1132
1133# ICU-devel
1134if [ IsOptionalHaikuImagePackageAdded ICU-devel ] {
1135	InstallOptionalHaikuImagePackage $(HAIKU_ICU_DEVEL_PACKAGE)
1136		: $(baseURL)/$(HAIKU_ICU_DEVEL_PACKAGE) ;
1137
1138	local arch = $(TARGET_ARCH) ;
1139	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
1140	local lib ;
1141	for abiVersionedLib in $(HAIKU_ICU_LIBS) {
1142		abiVersionedLib = $(abiVersionedLib:B:G=) ;
1143		lib = $(abiVersionedLib:B) ;
1144		while $(lib:S) != ".so" {
1145			abiVersionedLib = $(abiVersionedLib:B) ;
1146			lib = $(abiVersionedLib:B) ;
1147		}
1148		AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
1149			: /system/lib $(abiVersionedLib) : : true ;
1150		AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
1151			: $(abiVersionedLib) : $(lib) ;
1152	}
1153}
1154
1155
1156# KeymapSwitcher
1157if [ IsOptionalHaikuImagePackageAdded KeymapSwitcher ] {
1158	if $(TARGET_ARCH) != x86 {
1159		Echo "No optional package KeymapSwitcher available for $(TARGET_ARCH)" ;
1160	} else {
1161		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1162			InstallOptionalHaikuImagePackage
1163				KeymapSwitcher-1.2.7-r1a4-x86-gcc4-2012-09-09.zip
1164				: $(baseURL)/KeymapSwitcher-1.2.7-r1a4-x86-gcc4-2012-09-09.zip ;
1165		} else {
1166			InstallOptionalHaikuImagePackage
1167				KeymapSwitcher-1.2.7-r1a4-x86-gcc2-2012-08-31.zip
1168				: $(baseURL)/KeymapSwitcher-1.2.7-r1a4-x86-gcc2-2012-08-31.zip ;
1169		}
1170		AddSymlinkToHaikuImage home config settings deskbar Preferences
1171			: /boot/common/bin/KeymapSwitcher ;
1172	}
1173}
1174
1175
1176# LGrep
1177if [ IsOptionalHaikuImagePackageAdded LGrep ] {
1178	if $(TARGET_ARCH) != x86 {
1179		Echo "No optional package LGrep available for $(TARGET_ARCH)" ;
1180	} else {
1181		InstallOptionalHaikuImagePackage
1182			lgrep-1.0-x86-gcc2-2012-07-23.zip
1183			: $(baseURL)/lgrep-1.0-x86-gcc2-2012-07-23.zip ;
1184	}
1185}
1186
1187
1188# LibEvent
1189if [ IsOptionalHaikuImagePackageAdded LibEvent ] {
1190	if $(TARGET_ARCH) != x86 {
1191		Echo "No optional package LibEvent available for $(TARGET_ARCH)" ;
1192	} else {
1193		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1194			InstallOptionalHaikuImagePackage
1195				libevent-2.0.10-r1a4-x86-gcc4-2012-08-30.zip
1196				: $(baseURL)/libevent-2.0.10-r1a4-x86-gcc4-2012-08-30.zip
1197				: : true ;
1198		} else {
1199			InstallOptionalHaikuImagePackage
1200				libevent-2.0.10-r1a4-x86-gcc2-2012-08-28.zip
1201				: $(baseURL)/libevent-2.0.10-r1a4-x86-gcc2-2012-08-28.zip
1202				: : true ;
1203		}
1204	}
1205}
1206
1207
1208# LibIconv
1209if [ IsOptionalHaikuImagePackageAdded LibIconv ] {
1210	if $(TARGET_ARCH) != x86 {
1211		Echo "No optional package LibIconv available for $(TARGET_ARCH)" ;
1212	} else {
1213		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1214			InstallOptionalHaikuImagePackage
1215				libiconv-1.13.1-r1a4-x86-gcc4-2012-08-30.zip
1216				: $(baseURL)/libiconv-1.13.1-r1a4-x86-gcc4-2012-08-30.zip ;
1217		} else {
1218			InstallOptionalHaikuImagePackage
1219				libiconv-1.13.1-r1a4-x86-gcc2-2012-08-28.zip
1220				: $(baseURL)/libiconv-1.13.1-r1a4-x86-gcc2-2012-08-28.zip ;
1221		}
1222	}
1223}
1224
1225
1226# LibLayout library
1227if [ IsOptionalHaikuImagePackageAdded LibLayout ] {
1228	if $(TARGET_ARCH) != x86 {
1229		Echo "No optional package LibLayout available for $(TARGET_ARCH)" ;
1230	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1231		InstallOptionalHaikuImagePackage liblayout-1.4.1-r1a4-x86-gcc4-2012-08-30.zip
1232			: $(baseURL)/liblayout-1.4.1-r1a4-x86-gcc4-2012-08-30.zip ;
1233	} else {
1234		InstallOptionalHaikuImagePackage liblayout-1.4.0-gcc2-2009-03-08.zip
1235			: $(baseURL)/liblayout-1.4.0-gcc2-2009-03-08.zip ;
1236	}
1237}
1238
1239
1240# Libmng library
1241if [ IsOptionalHaikuImagePackageAdded Libmng ] {
1242	if $(TARGET_ARCH) != x86 {
1243		Echo "No optional package Libmng available for $(TARGET_ARCH)" ;
1244	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1245		InstallOptionalHaikuImagePackage
1246			libmng-1.0.10-r1a4-x86-gcc4-2012-09-02.zip
1247			: $(baseURL)/lib/libmng-1.0.10-r1a4-x86-gcc4-2012-09-02.zip ;
1248	} else {
1249		InstallOptionalHaikuImagePackage
1250			libmng-1.0.10-r1a4-x86-gcc2-2012-08-28.zip
1251			: $(baseURL)/lib/libmng-1.0.10-r1a4-x86-gcc2-2012-08-28.zip ;
1252	}
1253}
1254
1255
1256# LibXML2
1257if [ IsOptionalHaikuImagePackageAdded LibXML2 ] {
1258	if $(TARGET_ARCH) != x86 {
1259		Echo "No optional package LibXML2 available for $(TARGET_ARCH)" ;
1260	} else {
1261		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1262			InstallOptionalHaikuImagePackage
1263				libxml2-2.8.0-r1a4-x86-gcc4-2012-08-28.zip
1264				: $(baseURL)/libxml2-2.8.0-r1a4-x86-gcc4-2012-08-28.zip ;
1265		} else {
1266			InstallOptionalHaikuImagePackage
1267				libxml2-2.8.0-r1a4-x86-gcc2-2012-08-30.zip
1268				: $(baseURL)/libxml2-2.8.0-r1a4-x86-gcc2-2012-08-30.zip ;
1269		}
1270	}
1271}
1272
1273
1274# LibXSLT
1275if [ IsOptionalHaikuImagePackageAdded LibXSLT ] {
1276	if $(TARGET_ARCH) != x86 {
1277		Echo "No optional package LibXSLT available for $(TARGET_ARCH)" ;
1278	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1279		InstallOptionalHaikuImagePackage
1280			libxslt-1.1.26-r1a4-x86-gcc4-2012-08-29.zip
1281			: $(baseURL)/libxslt-1.1.26-r1a4-x86-gcc4-2012-08-29.zip ;
1282	} else {
1283		InstallOptionalHaikuImagePackage
1284			libxslt-1.1.26-r1a4-x86-gcc2-2012-08-28.zip
1285			: $(baseURL)/libxslt-1.1.26-r1a4-x86-gcc2-2012-08-28.zip
1286			: : true ;
1287	}
1288}
1289
1290
1291# Links web browser
1292if [ IsOptionalHaikuImagePackageAdded Links ] {
1293	if $(TARGET_ARCH) != x86 {
1294		Echo "No optional package Links available for $(TARGET_ARCH)" ;
1295	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1296		InstallOptionalHaikuImagePackage
1297			links-2.3pre2-r1a4-x86-gcc4-2012-09-09.zip
1298			: $(baseURL)/links-2.3pre2-r1a4-x86-gcc4-2012-09-09.zip ;
1299		AddSymlinkToHaikuImage home config settings deskbar Applications
1300			: /boot/home/config/bin/links ;
1301	} else {
1302		InstallOptionalHaikuImagePackage
1303			links-2.3pre2-r1a4-x86-gcc2-2012-08-30.zip
1304			: $(baseURL)/links-2.3pre2-r1a4-x86-gcc2-2012-08-30.zip ;
1305		AddSymlinkToHaikuImage home config settings deskbar Applications
1306			: /boot/home/config/bin/links ;
1307	}
1308}
1309
1310
1311# Lua
1312if [ IsOptionalHaikuImagePackageAdded Lua ] {
1313	if $(TARGET_ARCH) != x86 {
1314		Echo "No optional package Lua available for $(TARGET_ARCH)" ;
1315	} else {
1316		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1317			InstallOptionalHaikuImagePackage
1318				lua-5.1.4-3-r1a4-x86-gcc4-2012-09-01.zip
1319				: $(baseURL)/lua-5.1.4-3-r1a4-x86-gcc4-2012-09-01.zip
1320				: : true ;
1321		} else {
1322			InstallOptionalHaikuImagePackage
1323				lua-5.1.4-3-r1a4-x86-gcc2-2012-09-01.zip
1324				: $(baseURL)/lua-5.1.4-3-r1a4-x86-gcc2-2012-09-01.zip
1325				: : true ;
1326		}
1327	}
1328}
1329
1330
1331# Man
1332if [ IsOptionalHaikuImagePackageAdded Man ] {
1333	if $(TARGET_ARCH) != x86 {
1334		Echo "No optional package Man available for $(TARGET_ARCH)" ;
1335	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1336		InstallOptionalHaikuImagePackage
1337			 man-1.6g-r1a4-x86-gcc4-2012-08-30.zip
1338			: $(baseURL)/man-1.6g-r1a4-x86-gcc4-2012-08-30.zip ;
1339	} else {
1340		InstallOptionalHaikuImagePackage
1341			 man-1.6g-r1a4-x86-gcc2-2012-08-28.zip
1342			: $(baseURL)/man-1.6g-r1a4-x86-gcc2-2012-08-28.zip ;
1343	}
1344}
1345
1346
1347# MandatoryPackages
1348if [ IsOptionalHaikuImagePackageAdded MandatoryPackages ] {
1349	# Pseudo package for grouping packages, which are added to all images.
1350}
1351
1352
1353# Mercurial
1354if [ IsOptionalHaikuImagePackageAdded Mercurial ] {
1355	if $(TARGET_ARCH) != x86 {
1356		Echo "No optional package Mercurial available for $(TARGET_ARCH)" ;
1357	} else {
1358		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1359			InstallOptionalHaikuImagePackage
1360				mercurial-2.2.2-r1a4-x86-gcc4-2012-08-30.zip
1361				: $(baseURL)/mercurial-2.2.2-r1a4-x86-gcc4-2012-08-30.zip
1362				: : true ;
1363		} else {
1364			InstallOptionalHaikuImagePackage
1365				mercurial-2.2.2-r1a4-x86-gcc2-2012-08-27.zip
1366				: $(baseURL)/mercurial-2.2.2-r1a4-x86-gcc2-2012-08-27.zip
1367				: : true ;
1368		}
1369	}
1370}
1371
1372
1373# Nano
1374if [ IsOptionalHaikuImagePackageAdded Nano ] {
1375	if $(TARGET_ARCH) != x86 {
1376		Echo "No optional package Nano available for $(TARGET_ARCH)" ;
1377	} else {
1378		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1379			InstallOptionalHaikuImagePackage
1380				nano-2.2.6-r1a4-x86-gcc4-2012-08-30.zip
1381				: $(baseURL)/nano-2.2.6-r1a4-x86-gcc4-2012-08-30.zip ;
1382		} else {
1383			InstallOptionalHaikuImagePackage
1384				nano-2.2.6-r1a4-x86-gcc2-2012-08-28.zip
1385				: $(baseURL)/nano-2.2.6-r1a4-x86-gcc2-2012-08-28.zip ;
1386		}
1387	}
1388}
1389
1390
1391# Nanumfont
1392if [ IsOptionalHaikuImagePackageAdded Nanumfont ] {
1393	InstallOptionalHaikuImagePackage
1394		nanumfont-2.0-r1a4-x86-gcc2-2012-09-12.zip
1395		: $(baseURL)/nanumfont-2.0-r1a4-x86-gcc2-2012-09-12.zip ;
1396}
1397
1398
1399# Neon
1400if [ IsOptionalHaikuImagePackageAdded Neon ] {
1401	if $(TARGET_ARCH) != x86 {
1402		Echo "No optional package Neon available for $(TARGET_ARCH)" ;
1403	} else {
1404		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1405			InstallOptionalHaikuImagePackage
1406				neon-0.29.6-r1a4-x86-gcc4-2012-08-29.zip
1407				: $(baseURL)/neon-0.29.6-r1a4-x86-gcc4-2012-08-29.zip ;
1408		} else {
1409			InstallOptionalHaikuImagePackage
1410				neon-0.29.6-r1a4-x86-gcc2-2012-08-28.zip
1411				: $(baseURL)/neon-0.29.6-r1a4-x86-gcc2-2012-08-28.zip ;
1412		}
1413	}
1414}
1415
1416
1417# NetFS network file system
1418if [ IsOptionalHaikuImagePackageAdded NetFS ] {
1419	# userlandfs module
1420	AddFilesToHaikuImage home config add-ons userlandfs : netfs ;
1421
1422	# servers
1423	AddFilesToHaikuImage system servers : netfs_server ;
1424	AddFilesToHaikuImage system servers : authentication_server ;
1425
1426	# tools
1427	AddFilesToHaikuImage system bin : netfs_config ;
1428	AddFilesToHaikuImage system bin : netfs_server_prefs ;
1429
1430	#example settings for netfs_server
1431	local netfsServerSettingsFiles = <driver-settings>netfs-server ;
1432	SEARCH on $(netfsServerSettingsFiles)
1433		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems netfs ] ;
1434	AddFilesToHaikuImage home config settings kernel drivers
1435	: $(netfsServerSettingsFiles) ;
1436
1437	#userlandfs settings are needed for netfs_config to work (ioctls)
1438	local userlandfsServerSettingsFiles = <driver-settings>userlandfs ;
1439	SEARCH on $(userlandfsServerSettingsFiles)
1440		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ;
1441	AddFilesToHaikuImage home config settings kernel drivers
1442	: $(userlandfsServerSettingsFiles) ;
1443}
1444
1445
1446# NetSurf web browser
1447if [ IsOptionalHaikuImagePackageAdded NetSurf ] {
1448	if $(TARGET_ARCH) != x86 {
1449		Echo "No optional package NetSurf available for $(TARGET_ARCH)" ;
1450	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
1451		Echo "No optional package NetSurf available for gcc4" ;
1452	} else {
1453		InstallOptionalHaikuImagePackage
1454			netsurf-2.7-r1a3-x86-gcc2-2011-06-04.zip
1455			: $(baseURL)/netsurf-2.7-r1a3-x86-gcc2-2011-06-04.zip ;
1456		AddSymlinkToHaikuImage home config settings deskbar Applications
1457			: /boot/apps/NetSurf/NetSurf ;
1458	}
1459}
1460
1461
1462# OCaml
1463if [ IsOptionalHaikuImagePackageAdded OCaml ] {
1464	if $(TARGET_ARCH) != x86 {
1465		Echo "No optional package OCaml available for $(TARGET_ARCH)" ;
1466	} else {
1467		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1468			InstallOptionalHaikuImagePackage
1469				ocaml-4.00.0-r1a4-x86-gcc4-2012-09-30.zip
1470				: $(baseURL)/ocaml-4.00.0-r1a4-x86-gcc4-2012-09-30.zip ;
1471			InstallOptionalHaikuImagePackage
1472				camlp5-6.06-r1a4-x86-gcc4-2012-09-30.zip
1473				: $(baseURL)/camlp5-6.06-r1a4-x86-gcc4-2012-09-30.zip ;
1474		} else {
1475			InstallOptionalHaikuImagePackage
1476				ocaml-4.00.0-r1a4-x86-gcc2-2012-09-27.zip
1477				: $(baseURL)/ocaml-4.00.0-r1a4-x86-gcc2-2012-09-27.zip ;
1478			InstallOptionalHaikuImagePackage
1479				camlp5-6.06-r1a4-x86-gcc2-2012-09-27.zip
1480				: $(baseURL)/camlp5-6.06-r1a4-x86-gcc2-2012-09-27.zip ;
1481		}
1482	}
1483}
1484
1485
1486# OpenSound drivers
1487if [ IsOptionalHaikuImagePackageAdded OpenSound ] {
1488	if $(TARGET_ARCH) != x86 {
1489		Echo "No optional package OpenSound available for $(TARGET_ARCH)" ;
1490	} else {
1491		InstallOptionalHaikuImagePackage
1492			opensound-4.2-r1a2-x86-gcc2-2010-05-01.zip
1493			: $(baseURL)/opensound-4.2-r1a2-x86-gcc2-2010-05-01.zip ;
1494	}
1495}
1496
1497
1498# OpenSSH
1499if [ IsOptionalHaikuImagePackageAdded OpenSSH ] {
1500	if $(TARGET_ARCH) != x86 {
1501		Echo "No optional package OpenSSH available for $(TARGET_ARCH)" ;
1502	} else {
1503		if ! $(HAIKU_IMAGE_HOST_NAME) && ! $(HAIKU_IGNORE_USER_BUILD_CONFIG) {
1504			Exit "Optional package OpenSSH requires the HAIKU_IMAGE_HOST_NAME"
1505				"variable to be set!" ;
1506		}
1507
1508		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1509			InstallOptionalHaikuImagePackage
1510				openssh-6.0p1-r1a4-x86-gcc4-2012-09-29.zip
1511				: $(baseURL)/openssh-6.0p1-r1a4-x86-gcc4-2012-09-29.zip ;
1512		} else {
1513			InstallOptionalHaikuImagePackage
1514				openssh-6.0p1-r1a4-x86-gcc2-2012-09-28.zip
1515				: $(baseURL)/openssh-6.0p1-r1a4-x86-gcc2-2012-09-28.zip ;
1516		}
1517
1518		AddUserToHaikuImage sshd : 1001 : 100 : /var/empty : /bin/true
1519			: "sshd user" ;
1520	}
1521}
1522
1523
1524# OpenSSL
1525if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
1526	if $(TARGET_ARCH) != x86 {
1527		Echo "No optional package OpenSSL available for $(TARGET_ARCH)" ;
1528	} else {
1529		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1530			InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_PACKAGE)
1531				: $(HAIKU_OPENSSL_URL) ;
1532		} else {
1533			InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_PACKAGE)
1534				: $(HAIKU_OPENSSL_URL) ;
1535		}
1536	}
1537}
1538
1539
1540# P7zip
1541if [ IsOptionalHaikuImagePackageAdded P7zip ] {
1542	if $(TARGET_ARCH) != x86 {
1543		Echo "No optional package P7zip available for $(TARGET_ARCH)" ;
1544	} else {
1545		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1546			InstallOptionalHaikuImagePackage
1547				p7zip-9.20.1-r1a4-x86-gcc4-2012-08-30.zip
1548				: $(baseURL)/p7zip-9.20.1-r1a4-x86-gcc4-2012-08-30.zip ;
1549		} else {
1550			InstallOptionalHaikuImagePackage
1551				p7zip-9.20.1-r1a4-x86-gcc2-2012-08-29.zip
1552				: $(baseURL)/p7zip-9.20.1-r1a4-x86-gcc2-2012-08-29.zip ;
1553		}
1554		AddExpanderRuleToHaikuImage "application/x-7z-compressed" : .7z
1555			: "7za l \\0045s"
1556			: "7za x -y \\0045s"
1557		;
1558
1559	}
1560}
1561
1562
1563# Paladin
1564if [ IsOptionalHaikuImagePackageAdded Paladin ] {
1565	if $(TARGET_ARCH) != x86 {
1566		Echo "No optional package Paladin available for $(TARGET_ARCH)" ;
1567	} else {
1568		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1569			InstallOptionalHaikuImagePackage
1570				paladin-1.3-r1a4-x86-gcc4-2012-08-30.zip
1571				: $(baseURL)/paladin-1.3-r1a4-x86-gcc4-2012-08-30.zip ;
1572		} else {
1573			InstallOptionalHaikuImagePackage
1574				paladin-1.3-r1a3-x86-gcc2-2011-05-18.zip
1575				: $(baseURL)/paladin-1.3-r1a3-x86-gcc2-2011-05-18.zip ;
1576		}
1577
1578		AddSymlinkToHaikuImage home config settings deskbar Applications
1579			: /boot/apps/Paladin/Paladin ;
1580		AddSymlinkToHaikuImage common bin
1581			: /boot/apps/Paladin/Paladin ;
1582	}
1583}
1584
1585
1586# PCRE regex engine
1587if [ IsOptionalHaikuImagePackageAdded PCRE ] {
1588	if $(TARGET_ARCH) != x86 {
1589		Echo "No optional package PCRE available for $(TARGET_ARCH)" ;
1590	} else {
1591		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1592			InstallOptionalHaikuImagePackage
1593				libpcre-8.21-r1a4-x86-gcc4-2012-09-03.zip
1594				: $(baseURL)/libpcre-8.21-r1a4-x86-gcc4-2012-09-03.zip ;
1595		} else {
1596			InstallOptionalHaikuImagePackage
1597				libpcre-8.21-r1a4-x86-gcc2-2012-08-28.zip
1598				: $(baseURL)/libpcre-8.21-r1a4-x86-gcc2-2012-08-28.zip ;
1599		}
1600	}
1601}
1602
1603
1604# Pe text editor
1605if [ IsOptionalHaikuImagePackageAdded Pe ] {
1606	if $(TARGET_ARCH) != x86 {
1607		Echo "No optional package Pe available for $(TARGET_ARCH)" ;
1608	} else {
1609		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1610			InstallOptionalHaikuImagePackage
1611				pe-2.4.3-600-x86-gcc4-2011-12-18.zip
1612				: $(baseURL)/pe-2.4.3-hg-r1a4-x86-gcc4-2012-09-04.zip ;
1613		} else {
1614			InstallOptionalHaikuImagePackage
1615				pe-2.4.3-hg-r1a4-x86-gcc2-2012-08-29.zip
1616				: $(baseURL)/pe-2.4.3-hg-r1a4-x86-gcc2-2012-08-29.zip ;
1617		}
1618		AddSymlinkToHaikuImage home config settings deskbar Applications
1619			: /boot/apps/Pe/Pe ;
1620		AddSymlinkToHaikuImage common bin
1621			: /boot/apps/Pe/lpe ;
1622	}
1623}
1624
1625
1626# Perl
1627if [ IsOptionalHaikuImagePackageAdded Perl ] {
1628	if $(TARGET_ARCH) != x86 {
1629		Echo "No optional package Perl available for $(TARGET_ARCH)" ;
1630	} else {
1631		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1632			InstallOptionalHaikuImagePackage
1633				perl-5.10.1-r1a4-x86-gcc4-2012-10-17.zip
1634				: $(baseURL)/perl-5.10.1-r1a4-x86-gcc4-2012-10-17.zip
1635				: : true ;
1636		} else {
1637			InstallOptionalHaikuImagePackage
1638				perl-5.10.1-r1a4-x86-gcc2-2012-08-27.zip
1639				: $(baseURL)/perl-5.10.1-r1a4-x86-gcc2-2012-08-27.zip
1640				: : true ;
1641		}
1642	}
1643}
1644
1645
1646# Puri
1647if [ IsOptionalHaikuImagePackageAdded Puri ] {
1648	if $(TARGET_ARCH) != x86 {
1649		Echo "No optional package Puri available for $(TARGET_ARCH)" ;
1650	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
1651		Echo "No optional package Puri for gcc2" ;
1652	} else {
1653		InstallOptionalHaikuImagePackage
1654			puri-0.3.9.1-x86-gcc4-2012-11-01.zip
1655			: $(baseURL)/puri-0.3.9.1-x86-gcc4-2012-11-01.zip ;
1656		AddSymlinkToHaikuImage home config settings deskbar Applications
1657			: /boot/apps/Puri/Puri ;
1658	}
1659}
1660
1661
1662# Python
1663if [ IsOptionalHaikuImagePackageAdded Python ] {
1664	if $(TARGET_ARCH) != x86 {
1665		Echo "No optional package Python available for $(TARGET_ARCH)" ;
1666	} else {
1667		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1668			InstallOptionalHaikuImagePackage
1669				python-2.6.8-r1a4-x86-gcc4-2012-09-03.zip
1670				: $(baseURL)/python-2.6.8-r1a4-x86-gcc4-2012-09-03.zip
1671				: : true ;
1672		} else {
1673			InstallOptionalHaikuImagePackage
1674				python-2.6.8-r1a4-x86-gcc2-2012-08-30.zip
1675				: $(baseURL)/python-2.6.8-r1a4-x86-gcc2-2012-08-30.zip
1676				: : true ;
1677		}
1678	}
1679}
1680
1681
1682# Rsync
1683if [ IsOptionalHaikuImagePackageAdded Rsync ] {
1684	if $(TARGET_ARCH) != x86 {
1685		Echo "No optional package Rsync available for $(TARGET_ARCH)" ;
1686	} else {
1687		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1688			InstallOptionalHaikuImagePackage
1689				rsync-3.0.7-r1a4-x86-gcc4-2012-09-09.zip
1690				: $(baseURL)/rsync-3.0.7-r1a4-x86-gcc4-2012-09-09.zip
1691				: : true ;
1692		} else {
1693			InstallOptionalHaikuImagePackage
1694				rsync-3.0.7-r1a4-x86-gcc2-2012-09-12.zip
1695				: $(baseURL)/rsync-3.0.7-r1a4-x86-gcc2-2012-09-12.zip
1696				: : true ;
1697		}
1698	}
1699}
1700
1701
1702# Ruby
1703if [ IsOptionalHaikuImagePackageAdded Ruby ] {
1704	if $(TARGET_ARCH) != x86 {
1705		Echo "No optional package Ruby available for $(TARGET_ARCH)" ;
1706	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1707		InstallOptionalHaikuImagePackage
1708			ruby-1.9.1-r1a4-x86-gcc4-2012-09-10.zip
1709			: $(baseURL)/ruby-1.9.1-r1a4-x86-gcc4-2012-09-10.zip ;
1710	} else {
1711		InstallOptionalHaikuImagePackage
1712			ruby-1.9.1-r1a4-x86-gcc2-2012-09-10.zip
1713			: $(baseURL)/ruby-1.9.1-r1a4-x86-gcc2-2012-09-10.zip ;
1714	}
1715}
1716
1717
1718# Sed
1719if [ IsOptionalHaikuImagePackageAdded Sed ] {
1720	if $(TARGET_ARCH) != x86 {
1721		Echo "No optional package Sed available for $(TARGET_ARCH)" ;
1722	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1723		InstallOptionalHaikuImagePackage
1724			sed-4.2.1-r1a4-x86-gcc4-2012-08-31.zip
1725			: $(baseURL)/sed-4.2.1-r1a4-x86-gcc4-2012-08-31.zip ;
1726	} else {
1727		InstallOptionalHaikuImagePackage
1728			sed-4.2.1-r1a4-x86-gcc2-2012-08-27.zip
1729			: $(baseURL)/sed-4.2.1-r1a4-x86-gcc2-2012-08-27.zip ;
1730	}
1731}
1732
1733
1734# SQLite
1735if [ IsOptionalHaikuImagePackageAdded SQLite ] {
1736	if $(TARGET_ARCH) != x86 {
1737		Echo "No optional package SQLite available for $(TARGET_ARCH)" ;
1738	} else {
1739		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1740			InstallOptionalHaikuImagePackage
1741				sqlite-3.7.13-r1a4-x86-gcc4-2012-08-30.zip
1742				: $(baseURL)/sqlite-3.7.13-r1a4-x86-gcc4-2012-08-30.zip ;
1743		} else {
1744			InstallOptionalHaikuImagePackage
1745				sqlite-3.7.13-r1a4-x86-gcc2-2012-08-27.zip
1746				: $(baseURL)/sqlite-3.7.13-r1a4-x86-gcc2-2012-08-27.zip ;
1747		}
1748	}
1749}
1750
1751
1752# Subversion
1753if [ IsOptionalHaikuImagePackageAdded Subversion ] {
1754	if $(TARGET_ARCH) != x86 {
1755		Echo "No optional package Subversion available for $(TARGET_ARCH)" ;
1756	} else {
1757		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1758			InstallOptionalHaikuImagePackage
1759				subversion-1.6.18-r1a4-x86-gcc4-2012-08-30.zip
1760				: $(baseURL)/subversion-1.6.18-r1a4-x86-gcc4-2012-08-30.zip
1761				: : true ;
1762		} else {
1763			InstallOptionalHaikuImagePackage
1764				subversion-1.6.18-r1a4-x86-gcc2-2012-08-28.zip
1765				: $(baseURL)/subversion-1.6.18-r1a4-x86-gcc2-2012-08-28.zip
1766				: : true ;
1767		}
1768	}
1769}
1770
1771
1772# TagLib
1773if [ IsOptionalHaikuImagePackageAdded TagLib ] {
1774	if $(TARGET_ARCH) != x86 {
1775		Echo "No optional package TagLib available for $(TARGET_ARCH)" ;
1776	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1777		InstallOptionalHaikuImagePackage
1778			taglib-1.6.3-r1a4-x86-gcc4-2012-09-03.zip
1779			: $(baseURL)/taglib-1.6.3-r1a4-x86-gcc4-2012-09-03.zip ;
1780	} else {
1781		InstallOptionalHaikuImagePackage
1782			taglib-1.6.3-r1a4-x86-gcc2-2012-09-03.zip
1783			: $(baseURL)/taglib-1.6.3-r1a4-x86-gcc2-2012-09-03.zip ;
1784	}
1785}
1786
1787
1788# Tar
1789if [ IsOptionalHaikuImagePackageAdded Tar ] {
1790	if $(TARGET_ARCH) != x86 {
1791		Echo "No optional package Tar available for $(TARGET_ARCH)" ;
1792	} else {
1793		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1794			InstallOptionalHaikuImagePackage
1795				tar-1.26-r1a4-x86-gcc4-2012-09-03.zip
1796				: $(baseURL)/tar-1.26-r1a4-x86-gcc4-2012-09-03.zip ;
1797		} else {
1798			InstallOptionalHaikuImagePackage
1799				tar-1.26-r1a4-x86-gcc2-2012-08-29.zip
1800				: $(baseURL)/tar-1.26-r1a4-x86-gcc2-2012-08-29.zip ;
1801		}
1802	}
1803}
1804
1805
1806# TimGMSoundFont
1807if [ IsOptionalHaikuImagePackageAdded TimGMSoundFont ] {
1808	InstallOptionalHaikuImagePackage TimGMSoundFont-2010-06-16.zip
1809		: $(baseURL)/TimGMSoundFont-2010-06-16.zip ;
1810}
1811
1812
1813# TrackerNewTemplates
1814if [ IsOptionalHaikuImagePackageAdded TrackerNewTemplates ] {
1815	InstallOptionalHaikuImagePackage TrackerNewTemplates-2010-04-26.zip
1816		: $(baseURL)/TrackerNewTemplates-2010-04-26.zip
1817		: home config settings Tracker "Tracker New Templates"
1818	;
1819}
1820
1821
1822# Transmission
1823if [ IsOptionalHaikuImagePackageAdded Transmission ] {
1824	if $(TARGET_ARCH) != x86 {
1825		Echo "No optional package Transmission available for $(TARGET_ARCH)" ;
1826	} else {
1827		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1828			InstallOptionalHaikuImagePackage
1829				transmission-2.21-r1a4-x86-gcc4-2012-09-12.zip
1830				: $(baseURL)/transmission-2.21-r1a4-x86-gcc4-2012-09-12.zip
1831				: : true ;
1832		} else {
1833			InstallOptionalHaikuImagePackage
1834				transmission-2.21-r1a4-x86-gcc2-2012-09-05.zip
1835				: $(baseURL)/transmission-2.21-r1a4-x86-gcc2-2012-09-05.zip
1836				: : true ;
1837		}
1838	}
1839}
1840
1841
1842# UserlandFS
1843if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
1844	local arch = $(TARGET_ARCH) ;
1845	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
1846
1847	# kernel module
1848	AddFilesToHaikuImage system add-ons kernel file_systems : userlandfs ;
1849
1850	# server
1851	AddFilesToHaikuImage system servers : userlandfs_server ;
1852
1853	# libs
1854	local userlandfsLibs =
1855		libuserlandfs_beos_kernel.so
1856		libuserlandfs_haiku_kernel.so
1857		libuserlandfs_fuse.so
1858	;
1859	AddFilesToHaikuHybridImage system lib : $(userlandfsLibs) : : true ;
1860
1861	# development goodies
1862	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] {
1863		if ! ( $(HAIKU_GCC_VERSION[1]) in 2 4 ) {
1864			Exit "Optional package UserlandFS: Unsupported GCC version:"
1865				$(HAIKU_GCC_VERSION[1]) ;
1866		}
1867
1868		# library symlinks
1869		local lib ;
1870		for lib in $(userlandfsLibs) {
1871			AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
1872				: /system/lib/$(lib:BS) ;
1873			AddSymlinkToAlternativeGCCArchive develop abi $(arch) $(abi) lib
1874				: /system/lib/$(arch)/$(lib:BS) ;
1875		}
1876
1877		# FUSE headers
1878		local fuseHeaders =
1879			fuse_common_compat.h
1880			fuse_common.h
1881			fuse_compat.h
1882			fuse.h
1883			fuse_lowlevel_compat.h
1884			fuse_lowlevel.h
1885			fuse_opt.h
1886		;
1887		fuseHeaders = $(fuseHeaders:G=userlandfs!fuse) ;
1888		SEARCH on $(fuseHeaders)
1889			= [ FDirName $(HAIKU_TOP) headers private userlandfs fuse ] ;
1890		AddFilesToHaikuImage develop headers userlandfs fuse : $(fuseHeaders) ;
1891	}
1892}
1893
1894
1895# Vim
1896if [ IsOptionalHaikuImagePackageAdded Vim ] {
1897	if $(TARGET_ARCH) != x86 {
1898		Echo "No optional package Vim available for $(TARGET_ARCH)" ;
1899	} else {
1900		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1901			InstallOptionalHaikuImagePackage vim-7.3-r1a4-x86-gcc4-2012-09-26.zip
1902				:  $(baseURL)/vim-7.3-r1a4-x86-gcc4-2012-09-26.zip
1903				: : true ;
1904		} else {
1905			InstallOptionalHaikuImagePackage vim-7.3-r1a4-x86-gcc2-2012-09-26.zip
1906				:  $(baseURL)/vim-7.3-r1a4-x86-gcc2-2012-09-26.zip
1907				: : true ;
1908		}
1909		AddSymlinkToHaikuImage home config settings deskbar Applications
1910			: /boot/common/bin/gvim ;
1911	}
1912}
1913
1914
1915# Vision
1916if [ IsOptionalHaikuImagePackageAdded Vision ] {
1917	if $(TARGET_ARCH) != x86 {
1918		Echo "No optional package Vision available for $(TARGET_ARCH)" ;
1919	} else {
1920		if $(HAIKU_GCC_VERSION[1]) >= 4 {
1921			InstallOptionalHaikuImagePackage vision-908-r1a4-x86-gcc4-2012-09-04.zip
1922				: $(baseURL)/vision-908-r1a4-x86-gcc4-2012-09-04.zip ;
1923		} else {
1924			InstallOptionalHaikuImagePackage
1925				vision-908-r1a4-x86-gcc2-2012-08-29.zip
1926				: $(baseURL)/vision-908-r1a4-x86-gcc2-2012-08-29.zip ;
1927		}
1928		AddSymlinkToHaikuImage home config settings deskbar Applications
1929			: /boot/apps/Vision/Vision ;
1930	}
1931}
1932
1933
1934# WebKit
1935if [ IsOptionalHaikuImagePackageAdded WebKit ] {
1936	if $(TARGET_ARCH) != x86 {
1937		Echo "No optional package WebKit available for $(TARGET_ARCH)" ;
1938	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
1939		Echo "No optional package WebKit available for gcc2" ;
1940	} else {
1941		InstallOptionalHaikuImagePackage $(HAIKU_WEBKIT_FILE)
1942			: $(baseURL)/$(HAIKU_WEBKIT_FILE)
1943			: common ;
1944	}
1945}
1946
1947
1948# WebPositive
1949if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
1950	if $(TARGET_ARCH) != x86 {
1951		Echo "No optional package WebPositive available for $(TARGET_ARCH)" ;
1952	} else if $(HAIKU_GCC_VERSION[1]) < 4 {
1953		if ! $(isHybridBuild) {
1954			Echo "No optional package WebPositive available for gcc2" ;
1955		} else {
1956			Echo "WebPositive will be compiled by gcc4 inside $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR)" ;
1957			local catalogs = [ on WebPositive return $(HAIKU_CATALOG_FILES) ] ;
1958			if $(catalogs) {
1959				local signature = x-vnd.Haiku-WebPositive ;
1960				AddFilesToHaikuImage system data locale catalogs $(signature)
1961					: $(catalogs) ;
1962			}
1963		}
1964	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1965		AddFilesToHaikuHybridImage apps : WebPositive ;
1966		AddSymlinkToHaikuHybridImage home config settings deskbar Applications
1967			: /boot/apps/WebPositive ;
1968	}
1969}
1970
1971
1972# WebPositiveBookmarks
1973if [ IsOptionalHaikuImagePackageAdded WebPositiveBookmarks ] {
1974	InstallOptionalHaikuImagePackage WebPositiveBookmarks-2012-02-18.zip
1975		: $(baseURL)/WebPositiveBookmarks-2012-02-18.zip
1976		: home config settings WebPositive ;
1977}
1978
1979# Welcome
1980if [ IsOptionalHaikuImagePackageAdded Welcome ] {
1981	CopyDirectoryToHaikuImage system documentation
1982		: [ FDirName $(HAIKU_TOP) docs welcome ]
1983		: welcome ;
1984	CopyDirectoryToHaikuImage system documentation
1985		: [ FDirName $(HAIKU_TOP) docs userguide ]
1986		: userguide ;
1987}
1988
1989
1990# WifiFirmwareScriptData
1991# This optional package is for people who build their own images & have wifi
1992# hardware that requires install-wifi-firmwares.sh & have no active network
1993# connection. This is not to be added to default images.
1994if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
1995	if $(TARGET_ARCH) != x86 {
1996		Echo "No optional package WifiFirmwareScriptData available for"
1997			$(TARGET_ARCH) ;
1998	} else {
1999		# broadcom43xx
2000		# firmware cutter
2001		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
2002		local broadcomFWCutterURL =
2003			http://www.haiku-files.org/files/wifi-firmwares/b43/fwcutter/$(broadcomFWCutterArchive) ;
2004		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
2005			: $(broadcomFWCutterURL) ] ;
2006		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
2007			: $(broadcomFWCutterFile) ;
2008
2009		# headers needed to compile firmware cutter
2010		local glibcDir = [ FDirName
2011			$(HAIKU_TOP) src system libroot posix glibc ] ;
2012		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
2013		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
2014			: $(byteswapHeader) ;
2015		local bitByteswapHeader = [ FDirName
2016			$(glibcDir) include arch x86 bits byteswap.h ] ;
2017		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter bits
2018			: $(bitByteswapHeader) ;
2019
2020		# file containing firmware
2021		local broadcom43xxFile ;
2022		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
2023			: http://www.haiku-files.org/files/wifi-firmwares/b43/wl_apsta-3.130.20.0.o ] ;
2024		AddFilesToHaikuImage system data firmware broadcom43xx
2025			: $(broadcom43xxFile) ;
2026
2027		# marvell88w8335
2028		local marvellArchive = malo-firmware-1.4.tgz ;
2029		local marvellURL = http://www.haiku-files.org/files/wifi-firmwares/marvell/$(marvellArchive) ;
2030		local marvellFile = [ DownloadFile $(marvellArchive) : $(marvellURL) ] ;
2031		AddFilesToHaikuImage system data firmware marvell88w8335
2032			: $(marvellFile) ;
2033	}
2034}
2035
2036
2037# WonderBrush
2038if [ IsOptionalHaikuImagePackageAdded WonderBrush ] {
2039	if $(TARGET_ARCH) != x86 {
2040		Echo "No optional package WonderBrush available for $(TARGET_ARCH)" ;
2041	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
2042		Echo "No optional package WonderBrush available for gcc4" ;
2043	} else {
2044		InstallOptionalHaikuImagePackage WonderBrush-2.1.2.zip
2045			: $(baseURL)/WonderBrush-2.1.2-x86-gcc2-2008-11-08.zip
2046			: apps ;
2047		AddSymlinkToHaikuImage home config settings deskbar Applications
2048			: /boot/apps/WonderBrush/WonderBrush ;
2049	}
2050}
2051
2052
2053# wpa_supplicant
2054if [ IsOptionalHaikuImagePackageAdded wpa_supplicant ] {
2055	if $(TARGET_ARCH) != x86 {
2056		Echo "No optional package wpa_supplicant available for $(TARGET_ARCH)" ;
2057	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
2058		InstallOptionalHaikuImagePackage
2059			wpa_supplicant-0.7.3-x86-gcc4-2012-04-03.zip
2060			: $(baseURL)/wpa_supplicant-0.7.3-x86-gcc4-2012-04-03.zip
2061			: : : false ;
2062	} else {
2063		InstallOptionalHaikuImagePackage
2064			wpa_supplicant-0.7.3-x86-gcc2-2012-04-03.zip
2065			: $(baseURL)/wpa_supplicant-0.7.3-x86-gcc2-2012-04-03.zip
2066			: : : false ;
2067	}
2068}
2069
2070
2071# WQY-MicroHei
2072if [ IsOptionalHaikuImagePackageAdded WQY-MicroHei ] {
2073	InstallOptionalHaikuImagePackage
2074		wqy-microhei-0.2.0-beta-r1a4-x86-gcc2-2012-08-27.zip
2075		: $(baseURL)/wqy-microhei-0.2.0-beta-r1a4-x86-gcc2-2012-08-27.zip ;
2076}
2077
2078
2079# XZ-Utils
2080if [ IsOptionalHaikuImagePackageAdded XZ-Utils ] {
2081	if $(TARGET_ARCH) != x86 {
2082		Echo "No optional package XZ-Utils available for $(TARGET_ARCH)" ;
2083	} else {
2084		InstallOptionalHaikuImagePackage
2085			xz-utils-5.0.1-r1a4-x86-gcc4-2012-09-03.zip
2086			: $(baseURL)/xz-utils-5.0.1-r1a4-x86-gcc4-2012-09-03.zip ;
2087		AddExpanderRuleToHaikuImage "application/x-xz" : .tar.xz
2088			: "tar -Jtvf \\0045s"
2089			: "tar -Jxvf \\0045s"
2090		;
2091		AddExpanderRuleToHaikuImage "application/x-xz" : .txz
2092			: "tar -Jtvf \\0045s"
2093			: "tar -Jxvf \\0045s"
2094		;
2095		AddExpanderRuleToHaikuImage "application/x-xz" : .xz
2096			: "echo \\0045s | sed 's/.xz\\\$//g'"
2097			: "xz -df \\0045s"
2098		;
2099	}
2100}
2101
2102
2103# Yasm
2104if [ IsOptionalHaikuImagePackageAdded Yasm ] {
2105	if $(TARGET_ARCH) != x86 {
2106		Echo "No optional package Yasm available for $(TARGET_ARCH)" ;
2107	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
2108		InstallOptionalHaikuImagePackage
2109			yasm-1.2.0-r1a4-x86-gcc4-2012-08-29.zip
2110			: $(baseURL)/yasm-1.2.0-r1a4-x86-gcc4-2012-08-29.zip ;
2111	} else {
2112		InstallOptionalHaikuImagePackage
2113			yasm-1.2.0-r1a4-x86-gcc2-2012-08-27.zip
2114			: $(baseURL)/yasm-1.2.0-r1a4-x86-gcc2-2012-08-27.zip ;
2115	}
2116}
2117