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