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