xref: /haiku/build/jam/OptionalPackages (revision 45b01eb84189a623981270a02d21c7a8cb93a9e1)
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) && $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
10	isHybridBuild = 1 ;
11}
12
13
14# Available Optional Packages:
15#	ABI-compliance-checker	- tool for checking ABI compatibility between libs
16#	APR						- support libraries used for example by Subversion
17#	APR-util				- Apache portable runtime utility library
18#	BeAE					- open source Audio Editor
19#	Beam					- powerful native e-mail client
20#	BeBook					- the classic BeOS API documentation
21#	BeHappy					- special documentation (i.e. BeBook) browser
22#	BeOSCompatibility		- creates links within the system to support old apps
23#	BePDF					- native PDF reader
24#	BeZillaBrowser			- fork of Mozilla's 1.8 branch.
25#	Bluetooth				- experimental Haiku components for Bluetooth
26#	CDRecord				- the command line CD writing tools
27#	Clockwerk				- native audio/video compositing
28#	CLucene					- indexed file search
29#	Curl					- a client that groks URLs
30#	CMake					- cross platform make
31#	CVS						- the version control system
32#	Development				- more complete dev environment (including autotools)
33#	DevelopmentBase			- basic development environment (gcc, headers, libs,...)
34#	DevelopmentMin			- development headers, libs, tools, from sources only
35#	Expat					- XML parsing libraries
36#	friss					- RSS/ATOM/... feeds reader
37#	Git						- the distributed version control system
38#	ICU-devel				- the headers for ICU (for development)
39#	KeymapSwitcher			- Desktop utility
40#	LibIconv				- text encoding conversion library
41#	LibLayout				- GCC2 package needed by some BeOS apps to compile
42#	LibXML2					- the XML support libary
43#	LibXSLT					- xslt library and utility
44#	Links					- the web browser
45#	Mercurial				- the distributed version control system
46#	Nano					- the command line text editor
47#	Neon					- support libraries used for example by SVN
48#	NetFS					- the native networked file system components
49#	NetSurf					- the web browser
50#	OCaml					- the Objective Caml language
51#	OpenSound				- additional audio driver package
52#	OpenSSH					- the secure shell
53#	OpenSSL					- secure sockets library
54#	P7zip					- file archiving utility
55#	PCRE					- the (Perl-compatible) regex engine
56#	Pe						- the powerful native Programmer's Editor
57#	Perl					- the scripting language
58#	Python					- the scripting language
59#	Rsync					- remote directory synchronization
60#	Sed						- the ultimate stream editor
61#	SQLite					- the database implementation
62#	Subversion				- the version control system
63#	Tar						- archiving utility
64#	UserlandFS				- aids native file system development (like FUSE)
65#	Vim						- the command line text editor
66#	Vision					- powerful native IRC client
67#	VLC						- the multi media player with native interface
68#	Welcome					- introductory documentation to Haiku
69#	WifiFirmwareScriptData	- data files needed by install-wifi-firmwares.sh
70#	WonderBrush				- native graphics application
71#	Yasm					- the assembler utility
72
73local baseURL = http://haiku-files.org/files/optional-packages ;
74
75# ABI-compliance-checker
76if [ IsOptionalHaikuImagePackageAdded ABI-compliance-checker ] {
77	if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
78		Echo "No optional package ABI-compliance-checker for gcc2" ;
79	} else {
80		InstallOptionalHaikuImagePackage
81			ABI-compliance-checker-1.12-noarch-gcc4-2010-02-01.zip
82			: $(baseURL)/ABI-compliance-checker-1.12-noarch-gcc4-2010-02-01.zip
83		;
84	}
85}
86
87
88# APR
89if [ IsOptionalHaikuImagePackageAdded APR ] {
90	if $(TARGET_ARCH) != x86 {
91		Echo "No optional package APR available for $(TARGET_ARCH)" ;
92	} else {
93		InstallOptionalHaikuImagePackage apr-1.3.9-x86-gcc2-2009-10-18.zip
94			: $(baseURL)/apr-1.3.9-x86-gcc2-2009-10-18.zip
95			:
96			: true
97		;
98	}
99}
100
101
102# APR-util
103if [ IsOptionalHaikuImagePackageAdded APR-util ] {
104	if $(TARGET_ARCH) != x86 {
105		Echo "No optional package APR-util available for $(TARGET_ARCH)" ;
106	} else {
107		InstallOptionalHaikuImagePackage apr-util-1.3.9-r1a1-x86-gcc2-2009-08-29.zip
108			: $(baseURL)/apr-util-1.3.9-r1a1-x86-gcc2-2009-08-29.zip
109			:
110			: true
111		;
112	}
113}
114
115
116# BeAE
117if [ IsOptionalHaikuImagePackageAdded BeAE ] {
118	if $(TARGET_ARCH) != x86 {
119		Echo "No optional package BeAE available for $(TARGET_ARCH)" ;
120	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
121		Echo "No optional package BeAE available for gcc4" ;
122	} else {
123		InstallOptionalHaikuImagePackage beae-20-x86-gcc2-2010-03-14.zip
124			: $(baseURL)/beae-20-x86-gcc2-2010-03-14.zip
125			:
126		;
127		AddSymlinkToHaikuImage home config be Applications
128			: /boot/apps/BeAE/BeAE ;
129	}
130}
131
132
133# Beam
134if [ IsOptionalHaikuImagePackageAdded Beam ] {
135	if $(TARGET_ARCH) != x86 {
136		Echo "No optional package Beam available for $(TARGET_ARCH)" ;
137	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
138		Echo "No optional package Beam available for gcc4" ;
139	} else {
140		InstallOptionalHaikuImagePackage Beam-1.2alpha.zip
141			: $(baseURL)/Beam-1.2alpha-x86-gcc2-2009-09-29.zip
142			: apps
143		;
144		AddSymlinkToHaikuImage home config be Applications
145			: /boot/apps/beam-1.2alpha-haiku/Beam ;
146	}
147}
148
149
150# BeBook
151if [ IsOptionalHaikuImagePackageAdded BeBook ] {
152	InstallOptionalHaikuImagePackage bebook_20081026.zip
153		: $(baseURL)/bebook_20081026.zip
154		: system documentation
155	;
156	AddSymlinkToHaikuImage home Desktop
157		: /boot/system/documentation/bebook/index.html : BeBook ;
158}
159
160
161# BeHappy
162if [ IsOptionalHaikuImagePackageAdded BeHappy ] {
163	if $(TARGET_ARCH) != x86 {
164		Echo "No optional package BeHappy available for $(TARGET_ARCH)" ;
165	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
166		Echo "No optional package BeHappy available for gcc4" ;
167	} else {
168		InstallOptionalHaikuImagePackage BeHappy-1.0.6-x86-gcc2-2008-10-16.zip
169			: $(baseURL)/BeHappy-1.0.6-x86-gcc2-2008-10-16.zip
170			:
171		;
172		AddSymlinkToHaikuImage home config be Applications
173			: /boot/apps/BeHappy/BeHappy ;
174	}
175}
176
177
178# BeOSCompatibility
179if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
180	if $(TARGET_ARCH) != x86 {
181		Echo "No optional package BeOSCompatibility available for $(TARGET_ARCH)" ;
182	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
183		Echo "No optional package BeOSCompatibility available for gcc4" ;
184	} else {
185		Echo "Warning: Adding BeOS compatibility symlinks. This will go away. Please fix your apps!" ;
186		AddSymlinkToHaikuImage beos : ../system/apps ;
187		AddSymlinkToHaikuImage beos : ../system/bin ;
188		AddSymlinkToHaikuImage beos : ../system/documentation ;
189		AddSymlinkToHaikuImage beos : ../common/etc ;
190		AddSymlinkToHaikuImage beos : ../system/preferences ;
191		AddSymlinkToHaikuImage beos : ../system ;
192		AddDirectoryToHaikuImage var ;
193		AddSymlinkToHaikuImage var : /boot/common/var/log ;
194		AddSymlinkToHaikuImage var : /boot/common/cache/tmp ;
195	}
196}
197
198
199# BePDF
200if [ IsOptionalHaikuImagePackageAdded BePDF ] {
201	if $(TARGET_ARCH) != x86 {
202		Echo "No optional package BePDF available for $(TARGET_ARCH)" ;
203	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
204		Echo "No optional package BePDF available for gcc4" ;
205	} else {
206		InstallOptionalHaikuImagePackage BePDF-1.1.1b2-r1a1-x86-gcc2-2009-09-03.zip
207			: $(baseURL)/BePDF-1.1.1b2-r1a1-x86-gcc2-2009-09-03.zip
208			: apps
209		;
210		AddSymlinkToHaikuImage home config be Applications
211			: /boot/apps/BePDF/BePDF ;
212	}
213}
214
215
216# BeZillaBrowser
217if [ IsOptionalHaikuImagePackageAdded BeZillaBrowser ] {
218	if $(TARGET_ARCH) != x86 {
219		Echo "No optional package BeZillaBrowser available for $(TARGET_ARCH)" ;
220	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
221		InstallOptionalHaikuImagePackage
222			BeZillaBrowser-2.0.0.22pre-x86-gcc4-2010-03-14.zip
223			: $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc4-2010-03-14.zip
224 			:
225 		;
226 		AddSymlinkToHaikuImage home config be Applications
227			: /boot/apps/BeZillaBrowser/BeZillaBrowser
228		;
229		if $(HAIKU_INCLUDE_SOURCES) = 1 {
230			InstallSourceArchive BeZillaBrowser-2010-01-21-src.7z
231				: http://www.haiku-files.org/files/sources/2010/BeZillaBrowser-2010-01-21-src.7z
232			;
233		}
234	} else {
235		InstallOptionalHaikuImagePackage
236			BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip
237			: $(baseURL)/BeZillaBrowser-2.0.0.22pre-x86-gcc2-2010-03-14.zip
238 			:
239 		;
240 		AddSymlinkToHaikuImage home config be Applications
241			: /boot/apps/BeZillaBrowser/BeZillaBrowser
242		;
243		if $(HAIKU_INCLUDE_SOURCES) = 1 {
244			InstallSourceArchive BeZillaBrowser-2010-01-21-src.7z
245				: http://www.haiku-files.org/files/sources/2010/BeZillaBrowser-2010-01-21-src.7z
246			;
247		}
248	}
249}
250
251
252# Bluetooth stack
253if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
254	local bluetoothDrivers = h2generic ;
255	AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
256	AddFilesToHaikuImage system servers : bluetooth_server ;
257	AddFilesToHaikuImage system lib : libbluetooth.so ;
258	AddFilesToHaikuImage system add-ons kernel network protocols : l2cap ;
259	AddFilesToHaikuImage system add-ons kernel bluetooth : btCoreData hci ;
260	AddFilesToHaikuImage system preferences : Bluetooth ;
261	AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
262	AddSymlinkToHaikuImage home config be Preferences
263		: /boot/system/preferences/Bluetooth ;
264	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
265		&& $(HAIKU_GCC_VERSION[1]) in 2 4 {
266		local arch = $(TARGET_ARCH) ;
267		local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
268		AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
269			: /system/lib libbluetooth.so : : true ;
270	}
271}
272
273
274# Bzip
275if [ IsOptionalHaikuImagePackageAdded Bzip ] {
276	if $(TARGET_ARCH) != x86 {
277		Echo "No optional package Bzip available for $(TARGET_ARCH)" ;
278	} else {
279		InstallOptionalHaikuImagePackage bzip2-1.0.5-x86-gcc2-2009-12-27.zip
280			: $(baseURL)/bzip2-1.0.5-x86-gcc2-2009-12-27.zip
281			:
282			: true
283		;
284	}
285}
286
287
288# CDRecord
289if [ IsOptionalHaikuImagePackageAdded CDRecord ] {
290	if $(TARGET_ARCH) != x86 {
291		Echo "No optional package CDRecord available for $(TARGET_ARCH)" ;
292	} else {
293		InstallOptionalHaikuImagePackage cdrecord-2.01.01a63-r1a1-x86-gcc2-2009-08-28.zip
294			: $(baseURL)/cdrecord-2.01.01a63-r1a1-x86-gcc2-2009-08-28.zip
295			:
296		;
297	}
298}
299
300
301# Clockwerk
302if [ IsOptionalHaikuImagePackageAdded Clockwerk ] {
303	if $(TARGET_ARCH) != x86 {
304		Echo "No optional package Clockwerk available for $(TARGET_ARCH)" ;
305	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
306		InstallOptionalHaikuImagePackage Clockwerk-0.0.1-x86-gcc4-2009-08-06.zip
307			: $(baseURL)/Clockwerk-0.0.1-x86-gcc4-2009-08-06.zip
308			:
309		;
310		AddSymlinkToHaikuImage home config be Applications
311			: /boot/apps/Clockwerk/Clockwerk ;
312	} else {
313		InstallOptionalHaikuImagePackage Clockwerk-0.0.1-x86-gcc2-2009-08-06.zip
314			: $(baseURL)/Clockwerk-0.0.1-x86-gcc2-2009-08-06.zip
315			:
316		;
317		AddSymlinkToHaikuImage home config be Applications
318			: /boot/apps/Clockwerk/Clockwerk ;
319	}
320}
321
322
323# CLucene
324if [ IsOptionalHaikuImagePackageAdded CLucene ] {
325	if $(TARGET_ARCH) != x86 {
326		Echo "No optional package CLucene available for $(TARGET_ARCH)" ;
327	} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
328		Echo "No optional package CLucene available for GCC2" ;
329	} else {
330		InstallOptionalHaikuImagePackage
331			clucene-0.9.21svn-x86-gcc4-haiku-2009-08-11.zip
332			: $(baseURL)/clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip
333			:
334			: true
335		;
336	}
337}
338
339
340# CMake
341if [ IsOptionalHaikuImagePackageAdded CMake ] {
342	if $(TARGET_ARCH) != x86 {
343		Echo "No optional package CMake available for $(TARGET_ARCH)" ;
344	} else {
345		InstallOptionalHaikuImagePackage cmake-2.8.0-x86-gcc2-2009-11-15.zip
346			: $(baseURL)/cmake-2.8.0-x86-gcc2-2009-11-15.zip
347			:
348			: true
349		;
350	}
351}
352
353
354# Curl
355if [ IsOptionalHaikuImagePackageAdded Curl ] {
356	if $(TARGET_ARCH) != x86 {
357		Echo "No optional package Curl available for $(TARGET_ARCH)" ;
358	} else {
359		InstallOptionalHaikuImagePackage curl-7.20.1-x86-gcc2-2010-04-16.zip
360			: $(baseURL)/curl-7.20.1-x86-gcc2-2010-04-16.zip
361			:
362			: true
363		;
364	}
365}
366
367
368# CVS
369if [ IsOptionalHaikuImagePackageAdded CVS ] {
370	if $(TARGET_ARCH) != x86 {
371		Echo "No optional package CVS available for $(TARGET_ARCH)" ;
372	} else {
373		InstallOptionalHaikuImagePackage cvs-1.12.13-r1a1-x86-gcc2-2009-08-30.zip
374			: $(baseURL)/cvs-1.12.13-r1a1-x86-gcc2-2009-08-30.zip
375			:
376			: true
377		;
378	}
379}
380
381
382# Development
383if [ IsOptionalHaikuImagePackageAdded Development ] && $(TARGET_ARCH) = x86 {
384	# autotools
385	InstallOptionalHaikuImagePackage autoconf-2.65-x86-gcc2-2009-11-28.zip
386		: $(baseURL)/autoconf-2.65-x86-gcc2-2009-11-28.zip
387		:
388		: true ;
389	InstallOptionalHaikuImagePackage automake-1.11.1-x86-gcc2-2009-12-23.zip
390		: $(baseURL)/automake-1.11.1-x86-gcc2-2009-12-23.zip
391		:
392		: true ;
393	InstallOptionalHaikuImagePackage libtool-2.2.6b-x86-gcc2-2010-04-08.zip
394		: $(baseURL)/libtool-2.2.6b-x86-gcc2-2010-04-08.zip
395		:
396		: true ;
397	InstallOptionalHaikuImagePackage texinfo-4.13a-r1a1-x86-gcc2-2009-08-30.zip
398		: $(baseURL)/texinfo-4.13a-r1a1-x86-gcc2-2009-08-30.zip
399		:
400		: true ;
401}
402
403
404# DevelopmentBase
405if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ]
406		&& $(TARGET_ARCH) = x86 {
407	# gcc and binutils
408	if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
409		InstallOptionalHaikuImagePackage gcc-2.95.3-r1a1-x86-gcc2-2010-03-23.zip
410			: $(baseURL)/gcc-2.95.3-r1a1-x86-gcc2-2010-03-23.zip ;
411	}
412
413	if $(HAIKU_GCC_VERSION[1]) = 2 {
414		# symlink to the appropriate system/lib[/gcc2] folder
415		AddSymlinkToHaikuHybridImage
416			develop abi x86 gcc2 tools gcc-2.95.3-haiku-090629 lib
417			: /system/lib libstdc++.r4.so : : true ;
418	}
419
420	if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) {
421		InstallOptionalHaikuImagePackage gcc-4.3.3-r1a1-x86-gcc4-2009-06-29.zip
422			: $(baseURL)/gcc-4.3.3-r1a1-x86-gcc4-2009-06-29.zip ;
423	}
424
425	if $(HAIKU_GCC_VERSION[1]) = 4 {
426		# symlink cpp to g++'s headers
427		AddSymlinkToHaikuImage develop abi x86 gcc4 headers
428			: ../tools/current/include/g++ : cpp ;
429
430		# symlink to the appropriate system/lib[/gcc4] folder
431		local libs = libstdc++.so libsupc++.so ;
432		for lib in $(libs) {
433			AddSymlinkToHaikuHybridImage
434				develop abi x86 gcc4 tools gcc-4.3.3-haiku-090629 lib
435				: /system/lib $(lib) : : true ;
436		}
437	}
438
439	# other commonly used tools
440	InstallOptionalHaikuImagePackage bison-2.4.1-r1a1-x86-gcc2-2009-08-31.zip
441		: $(baseURL)/bison-2.4.1-r1a1-x86-gcc2-2009-08-31.zip ;
442	InstallOptionalHaikuImagePackage m4-1.4.14-x86-gcc2-2010-02-27.zip
443		: $(baseURL)/m4-1.4.14-x86-gcc2-2010-02-27.zip ;
444	InstallOptionalHaikuImagePackage flex-2.5.35-r1a1-x86-gcc2-2009-08-31.zip
445		: $(baseURL)/flex-2.5.35-r1a1-x86-gcc2-2009-08-31.zip ;
446	InstallOptionalHaikuImagePackage jam-2.5-r1a1-x86-gcc2-2009-08-31.zip
447		: $(baseURL)/jam-2.5-r1a1-x86-gcc2-2009-08-31.zip ;
448
449}
450
451
452# DevelopmentMin
453if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
454	if ! ( $(HAIKU_GCC_VERSION[1]) in 2 4 ) {
455		Exit "Optional package DevelopmentMin: Unsupported GCC version:"
456			$(HAIKU_GCC_VERSION[1]) ;
457	}
458
459	local arch = $(TARGET_ARCH) ;
460	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
461	local abiDirTokens = develop abi $(arch) $(abi) ;
462
463	# glue code
464	AddFilesToHaikuHybridImage $(abiDirTokens) lib :
465		<src!system!glue!arch!$(arch)>crti.o
466		<src!system!glue!arch!$(arch)>crtn.o
467		<src!system!glue>init_term_dyn.o
468		<src!system!glue>start_dyn.o
469		<src!system!glue>haiku_version_glue.o
470	;
471
472	# kernel
473	AddFilesToHaikuHybridImage $(abiDirTokens) lib : kernel.so : _KERNEL_ ;
474
475	# additional libraries
476	local developmentLibs = <revisioned>libroot_debug.so ;
477	AddFilesToHaikuHybridImage system lib : $(developmentLibs) : : true ;
478
479	# library symlinks
480	local lib ;
481	for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) $(developmentLibs) {
482		AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
483			: /system/lib $(lib:BS) : : true ;
484		local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
485		if $(abiVersion) {
486			local abiVersionedLib = $(lib:BS).$(abiVersion) ;
487			AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
488				: /system/lib $(abiVersionedLib) : : true ;
489		}
490	}
491
492	# static libraries
493	AddFilesToHaikuHybridImage $(abiDirTokens) lib : libncurses.a ;
494
495	# the POSIX error code mapper library
496	AddFilesToHaikuHybridImage $(abiDirTokens) lib : libposix_error_mapper.a ;
497
498	# symlinks for ABI abstraction
499	AddSymlinkToHaikuImage develop abi : $(arch)/$(abi) : current ;
500	AddSymlinkToHaikuImage develop lib : /boot/develop/abi/current/lib
501		: $(arch) ;
502	AddSymlinkToHaikuImage develop tools
503		: /boot/develop/abi/current/tools/current : gnupro ;
504	AddSymlinkToHaikuImage develop headers
505		: /boot/develop/abi/current/headers/cpp ;
506	AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
507		: /boot/common/lib : common : true ;
508	AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
509		: /boot/home/config/lib : home : true ;
510
511	# ABI independent stuff
512
513	# scripts: cc and c++ wrapper, freetype-config, setgcc
514	local scripts = cc c++ freetype-config setgcc ;
515	SEARCH on $(scripts) = [ FDirName $(HAIKU_TOP) data bin ] ;
516	AddFilesToHaikuImage system bin : $(scripts) ;
517
518	# make and mkdepend build tool, which are part of the Haiku source tree
519	# TODO: Both should be removed from the tree, made download packages
520	# and moved to the DevelopmentBase package.
521	AddFilesToHaikuImage system bin : make mkdepend ;
522
523	# skeleton makefile and makefile-engine
524	local makefileEngineFiles =
525		<makefile-engine>makefile
526		<makefile-engine>makefile-engine
527	;
528	SEARCH on $(makefileEngineFiles)
529		= [ FDirName $(HAIKU_TOP) data develop ] ;
530	AddFilesToHaikuImage develop etc : $(makefileEngineFiles) ;
531
532	# headers
533	AddHeaderDirectoryToHaikuImage config ;
534	AddHeaderDirectoryToHaikuImage glibc ;
535	AddHeaderDirectoryToHaikuImage os ;
536	AddHeaderDirectoryToHaikuImage posix ;
537
538	# create be -> os symlink for now
539	AddSymlinkToHaikuImage develop headers : os : be ;
540
541	# BSD and GNU compatibility headers
542	AddHeaderDirectoryToHaikuImage compatibility bsd : bsd ;
543	AddHeaderDirectoryToHaikuImage compatibility gnu : gnu ;
544
545	# third party libs headers
546	AddHeaderDirectoryToHaikuImage libs freetype2 : 3rdparty ;
547	AddHeaderDirectoryToHaikuImage libs jpeg : 3rdparty ;
548	AddHeaderDirectoryToHaikuImage libs ncurses : 3rdparty ;
549	AddHeaderDirectoryToHaikuImage libs png : 3rdparty ;
550	AddHeaderDirectoryToHaikuImage libs termcap : 3rdparty ;
551	AddHeaderDirectoryToHaikuImage libs zlib : 3rdparty ;
552
553	# cpp headers
554	if $(HAIKU_GCC_VERSION[1]) = 2 {
555		# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
556		CopyDirectoryToHaikuImage $(abiDirTokens) headers
557			: [ FDirName $(HAIKU_TOP) headers cpp ] : : -x .svn ;
558		CopyDirectoryToAlternativeGCCArchive $(abiDirTokens) headers
559			: [ FDirName $(HAIKU_TOP) headers cpp ] : : -x .svn ;
560	}
561}
562
563
564# Expat
565if [ IsOptionalHaikuImagePackageAdded Expat ] {
566	if $(TARGET_ARCH) != x86 {
567		Echo "No optional package Expat available for $(TARGET_ARCH)" ;
568	} else {
569		InstallOptionalHaikuImagePackage expat-2.0.1-x86-gcc2-2010-03-08.zip
570			: $(baseURL)/expat-2.0.1-x86-gcc2-2010-03-08.zip
571			:
572			: true
573		;
574	}
575}
576
577
578# friss
579if [ IsOptionalHaikuImagePackageAdded friss ] {
580	if $(TARGET_ARCH) != x86 {
581		Echo "No optional package friss available for $(TARGET_ARCH)" ;
582	} else if $(HAIKU_GCC_VERSION[1]) = 2 {
583		Echo "No optional package friss available for gcc2" ;
584	} else {
585		InstallOptionalHaikuImagePackage friss-0.5pre7-x86-gcc4.zip
586			: http://pulkomandy.ath.cx/projects/friss/export/8/bin/friss-0.5pre7-x86-gcc4.zip
587			:
588			: true
589		;
590	}
591}
592
593
594# Git
595if [ IsOptionalHaikuImagePackageAdded Git ] {
596	if $(TARGET_ARCH) != x86 {
597		Echo "No optional package Git available for $(TARGET_ARCH)" ;
598	} else {
599		InstallOptionalHaikuImagePackage git-1.7.0.5-x86-gcc2-2010-04-14.zip
600			: $(baseURL)/git-1.7.0.5-x86-gcc2-2010-04-14.zip
601			:
602			: true
603		;
604	}
605}
606
607
608# ICU-devel
609if [ IsOptionalHaikuImagePackageAdded ICU-devel ] {
610	InstallOptionalHaikuImagePackage icu-devel-4.2-2010-01-26.zip
611		: $(baseURL)/icu-devel-4.2-2010-01-26.zip
612	;
613	local arch = $(TARGET_ARCH) ;
614	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
615	local libs = common data i18n ;
616	for lib in $(libs) {
617		lib = libicu-$(lib).so ;
618		local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
619		if $(abiVersion) {
620			local abiVersionedLib = $(lib).$(abiVersion) ;
621			AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
622				: /system/lib $(abiVersionedLib) : : true ;
623		}
624		AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
625			: /system/lib $(lib) : : true ;
626	}
627}
628
629
630# KeymapSwitcher
631if [ IsOptionalHaikuImagePackageAdded KeymapSwitcher ] {
632	if $(TARGET_ARCH) != x86 {
633		Echo "No optional package KeymapSwitcher available for $(TARGET_ARCH)" ;
634	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
635		InstallOptionalHaikuImagePackage
636			KeymapSwitcher-1.2.3-x86-gcc4-2009-05-31.zip
637			: $(baseURL)/KeymapSwitcher-1.2.3-x86-gcc4-2009-05-31.zip
638			:
639		;
640		AddSymlinkToHaikuImage home config be Desktop\ applets
641			: /boot/common/bin/KeymapSwitcher ;
642	} else {
643		InstallOptionalHaikuImagePackage
644			KeymapSwitcher-1.2.4-r1a1-x86-gcc2-2009-09-06.zip
645			: $(baseURL)/KeymapSwitcher-1.2.4-r1a1-x86-gcc2-2009-09-06.zip
646			:
647		;
648		AddSymlinkToHaikuImage home config be Desktop\ applets
649			: /boot/common/bin/KeymapSwitcher ;
650	}
651}
652
653
654# LibIconv
655if [ IsOptionalHaikuImagePackageAdded LibIconv ] {
656	if $(TARGET_ARCH) != x86 {
657		Echo "No optional package LibIconv available for $(TARGET_ARCH)" ;
658	} else {
659		InstallOptionalHaikuImagePackage libiconv-1.13.1-r1a1-x86-gcc2-2009-09-08.zip
660			: $(baseURL)/libiconv-1.13.1-r1a1-x86-gcc2-2009-09-08.zip
661			:
662		;
663	}
664}
665
666
667# LibLayout library
668if [ IsOptionalHaikuImagePackageAdded LibLayout ] {
669	if $(TARGET_ARCH) != x86 {
670		Echo "No optional package LibLayout available for $(TARGET_ARCH)" ;
671	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
672		Echo "No optional package LibLayout available for gcc4" ;
673	} else {
674		InstallOptionalHaikuImagePackage liblayout-1.4.0-gcc2-2009-03-08.zip
675			: $(baseURL)/liblayout-1.4.0-gcc2-2009-03-08.zip
676			:
677		;
678	}
679}
680
681
682# LibXML2
683if [ IsOptionalHaikuImagePackageAdded LibXML2 ] {
684	if $(TARGET_ARCH) != x86 {
685		Echo "No optional package LibXML2 available for $(TARGET_ARCH)" ;
686	} else {
687		InstallOptionalHaikuImagePackage libxml2-2.7.7-x86-gcc2-2010-04-11.zip
688			: $(baseURL)/libxml2-2.7.7-x86-gcc2-2010-04-11.zip
689			:
690			: true
691		;
692	}
693}
694
695
696# LibXSLT
697if [ IsOptionalHaikuImagePackageAdded LibXSLT ] {
698	if $(TARGET_ARCH) != x86 {
699		Echo "No optional package LibXSLT available for $(TARGET_ARCH)" ;
700	} else {
701		InstallOptionalHaikuImagePackage libxslt-1.1.26-x86-gcc2-2010-04-11.zip
702			: $(baseURL)/libxslt-1.1.26-x86-gcc2-2010-04-11.zip
703			:
704			: true
705		;
706	}
707}
708
709
710# Links web browser
711if [ IsOptionalHaikuImagePackageAdded Links ] {
712	if $(TARGET_ARCH) != x86 {
713		Echo "No optional package Links available for $(TARGET_ARCH)" ;
714	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
715		Echo "No optional package Links available for gcc4" ;
716	} else {
717		InstallOptionalHaikuImagePackage Links.zip
718			: $(baseURL)/links-x86-gcc2-2008-05-03.zip
719			:
720		;
721		AddSymlinkToHaikuImage home config be Applications
722			: /boot/home/config/bin/links ;
723	}
724}
725
726
727# MandatoryPackages
728if [ IsOptionalHaikuImagePackageAdded MandatoryPackages ] {
729	# Pseudo package for grouping packages, which are added to all images.
730}
731
732
733# Mercurial
734if [ IsOptionalHaikuImagePackageAdded Mercurial ] {
735	if $(TARGET_ARCH) != x86 {
736		Echo "No optional package Mercurial available for $(TARGET_ARCH)" ;
737	} else {
738		InstallOptionalHaikuImagePackage mercurial-1.5-x86-gcc2-2010-03-12.zip
739			: $(baseURL)/mercurial-1.5-x86-gcc2-2010-03-12.zip
740			:
741			: true
742		;
743	}
744}
745
746
747# Nano
748if [ IsOptionalHaikuImagePackageAdded Nano ] {
749	if $(TARGET_ARCH) != x86 {
750		Echo "No optional package Nano available for $(TARGET_ARCH)" ;
751	} else {
752		InstallOptionalHaikuImagePackage nano-2.2.3-x86-gcc2-2010-03-11.zip
753			: $(baseURL)/nano-2.2.3-x86-gcc2-2010-03-11.zip
754			:
755		;
756	}
757}
758
759
760# Neon
761if [ IsOptionalHaikuImagePackageAdded Neon ] {
762	if $(TARGET_ARCH) != x86 {
763		Echo "No optional package Neon available for $(TARGET_ARCH)" ;
764	} else {
765		InstallOptionalHaikuImagePackage neon-0.29.3-x86-gcc2-2010-04-08.zip
766			: $(baseURL)/neon-0.29.3-x86-gcc2-2010-04-08.zip
767			:
768			: true
769		;
770	}
771}
772
773
774# NetFS network file system
775if [ IsOptionalHaikuImagePackageAdded NetFS ] {
776	# userlandfs module
777	AddFilesToHaikuImage home config add-ons userlandfs : netfs ;
778
779	# servers
780	AddFilesToHaikuImage system servers : netfs_server ;
781	AddFilesToHaikuImage system servers : authentication_server ;
782
783	# tools
784	AddFilesToHaikuImage system bin : netfs_config ;
785	AddFilesToHaikuImage system bin : netfs_server_prefs ;
786
787	#example settings for netfs_server
788	local netfsServerSettingsFiles = <driver-settings>netfs-server ;
789	SEARCH on $(netfsServerSettingsFiles)
790		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems netfs ] ;
791	AddFilesToHaikuImage home config settings kernel drivers
792	: $(netfsServerSettingsFiles) ;
793
794	#userlandfs settings are needed for netfs_config to work (ioctls)
795	local userlandfsServerSettingsFiles = <driver-settings>userlandfs ;
796	SEARCH on $(userlandfsServerSettingsFiles)
797		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ;
798	AddFilesToHaikuImage home config settings kernel drivers
799	: $(userlandfsServerSettingsFiles) ;
800}
801
802
803# NetSurf web browser
804if [ IsOptionalHaikuImagePackageAdded NetSurf ] {
805	if $(TARGET_ARCH) != x86 {
806		Echo "No optional package NetSurf available for $(TARGET_ARCH)" ;
807	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
808		Echo "No optional package NetSurf available for gcc4" ;
809	} else {
810		InstallOptionalHaikuImagePackage NetSurf-r9862b.zip
811			: $(baseURL)/NetSurf-r9862-x86-gcc2-2010-01-27.zip
812			:
813		;
814		AddSymlinkToHaikuImage home config be Applications
815			: /boot/apps/netsurf/NetSurf ;
816		if $(HAIKU_INCLUDE_SOURCES) = 1 {
817			InstallSourceArchive netsurf-r9862.7z
818				: http://www.haiku-files.org/files/sources/2010/netsurf-r9862.7z
819			;
820		}
821	}
822}
823
824
825# OCaml
826if [ IsOptionalHaikuImagePackageAdded OCaml ] {
827	if $(TARGET_ARCH) != x86 {
828		Echo "No optional package OCaml available for $(TARGET_ARCH)" ;
829	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
830		Echo "No optional package OCaml available for gcc4" ;
831	} else {
832		InstallOptionalHaikuImagePackage ocaml-3.11.1-r1a1-x86-gcc2-2009-09-06.zip
833			: http://jerome.duval.free.fr/obos/ocaml-3.11.1-r1a1-x86-gcc2-2009-09-06.zip
834			:
835		;
836		InstallOptionalHaikuImagePackage camlp5-5.12-r1a1-x86-gcc2-2009-09-06.zip
837			: http://jerome.duval.free.fr/obos/camlp5-5.12-r1a1-x86-gcc2-2009-09-06.zip
838			:
839		;
840	}
841}
842
843
844# OpenSound drivers
845if [ IsOptionalHaikuImagePackageAdded OpenSound ] {
846	if $(TARGET_ARCH) != x86 {
847		Echo "No optional package OpenSound available for $(TARGET_ARCH)" ;
848	} else {
849		InstallOptionalHaikuImagePackage OpenSound.zip
850			: $(baseURL)/OpenSound-x86-gcc2-2008-06-21.zip
851			:
852		;
853	}
854	#ExtractArchiveToHaikuImage home : data/vv.mp3.zip : 0 ;
855}
856
857
858# OpenSSH
859if [ IsOptionalHaikuImagePackageAdded OpenSSH ] {
860	if $(TARGET_ARCH) != x86 {
861		Echo "No optional package OpenSSH available for $(TARGET_ARCH)" ;
862	} else {
863		if ! $(HAIKU_IMAGE_HOST_NAME) && ! $(HAIKU_IGNORE_USER_BUILD_CONFIG) {
864			Exit "Optional package OpenSSH requires the HAIKU_IMAGE_HOST_NAME"
865				"variable to be set!" ;
866		}
867
868		InstallOptionalHaikuImagePackage openssh-5.5p1-x86-gcc2-2010-04-16.zip
869			: $(baseURL)/openssh-5.5p1-x86-gcc2-2010-04-16.zip
870			:
871		;
872
873		AddUserToHaikuImage sshd : 1001 : 100 : /var/empty : /bin/true
874			: "sshd user" ;
875	}
876}
877
878
879# OpenSSL
880if [ IsOptionalHaikuImagePackageAdded OpenSSL ] {
881	if $(TARGET_ARCH) != x86 {
882		Echo "No optional package OpenSSL available for $(TARGET_ARCH)" ;
883	} else {
884		InstallOptionalHaikuImagePackage $(HAIKU_OPENSSL_PACKAGE)
885			: $(HAIKU_OPENSSL_URL)
886			:
887		;
888	}
889}
890
891
892# P7zip
893if [ IsOptionalHaikuImagePackageAdded P7zip ] {
894	if $(TARGET_ARCH) != x86 {
895		Echo "No optional package P7zip available for $(TARGET_ARCH)" ;
896	} else {
897		if $(HAIKU_GCC_VERSION[1]) >= 4 {
898			InstallOptionalHaikuImagePackage p7zip-9.04-x86-gcc4-2009-10-25.zip
899				: $(baseURL)/p7zip-9.04-x86-gcc4-2009-10-25.zip
900				:
901			;
902		} else {
903			InstallOptionalHaikuImagePackage p7zip-9.04-x86-gcc2-2009-10-25.zip
904				: $(baseURL)/p7zip-9.04-x86-gcc2-2009-10-25.zip
905				:
906			;
907		}
908		AddExpanderRuleToHaikuImage "application/x-7z-compressed" : .7z
909			: "7za l \\0045s"
910			: "7za x -y \\0045s"
911		;
912
913	}
914}
915
916
917# PCRE regex engine
918if [ IsOptionalHaikuImagePackageAdded PCRE ] {
919	if $(TARGET_ARCH) != x86 {
920		Echo "No optional package PCRE available for $(TARGET_ARCH)" ;
921	} else {
922		if $(HAIKU_GCC_VERSION[1]) >= 4 {
923			InstallOptionalHaikuImagePackage pcre-7.9-x86-gcc4-2009-09-30.zip
924				: $(baseURL)/pcre-7.9-x86-gcc4-2009-09-30.zip
925			;
926		} else {
927			InstallOptionalHaikuImagePackage libpcre-8.02-x86-gcc2-2010-04-16.zip
928				: $(baseURL)/libpcre-8.02-x86-gcc2-2010-04-16.zip
929			;
930		}
931	}
932}
933
934
935# Pe text editor
936if [ IsOptionalHaikuImagePackageAdded Pe ] {
937	if $(TARGET_ARCH) != x86 {
938		Echo "No optional package Pe available for $(TARGET_ARCH)" ;
939	} else {
940		if $(HAIKU_GCC_VERSION[1]) >= 4 {
941			InstallOptionalHaikuImagePackage Pe-2.4.2-x86-gcc4-2009-08-04.zip
942				: $(baseURL)/Pe-2.4.2-x86-gcc4-2009-08-04.zip
943			;
944		} else {
945			InstallOptionalHaikuImagePackage Pe-2.4.2-r593-r1a1-x86-gcc2-2009-09-08.zip
946				: $(baseURL)/Pe-2.4.2-r593-r1a1-x86-gcc2-2009-09-08.zip
947			;
948		}
949
950		AddSymlinkToHaikuImage home config be Applications
951			: /boot/apps/Pe/Pe ;
952		AddSymlinkToHaikuImage common bin
953			: /boot/apps/Pe/lpe ;
954	}
955}
956
957
958# Perl
959if [ IsOptionalHaikuImagePackageAdded Perl ] {
960	if $(TARGET_ARCH) != x86 {
961		Echo "No optional package Perl available for $(TARGET_ARCH)" ;
962	} else {
963		InstallOptionalHaikuImagePackage perl-5.10.1-r1a1-x86-gcc2-2009-09-08.zip
964			: $(baseURL)/perl-5.10.1-r1a1-x86-gcc2-2009-09-08.zip
965			:
966			: true
967		;
968	}
969}
970
971
972# Python
973if [ IsOptionalHaikuImagePackageAdded Python ] {
974	if $(TARGET_ARCH) != x86 {
975		Echo "No optional package Python available for $(TARGET_ARCH)" ;
976	} else {
977		InstallOptionalHaikuImagePackage python-2.6.5-x86-gcc2-2010-04-08.zip
978			: $(baseURL)/python-2.6.5-x86-gcc2-2010-04-08.zip
979			:
980			: true
981		;
982	}
983}
984
985
986# Rsync
987if [ IsOptionalHaikuImagePackageAdded Rsync ] {
988	if $(TARGET_ARCH) != x86 {
989		Echo "No optional package Rsync available for $(TARGET_ARCH)" ;
990	} else {
991		InstallOptionalHaikuImagePackage rsync-3.0.7-x86-gcc2-2010-01-05.zip
992			: $(baseURL)/rsync-3.0.7-x86-gcc2-2010-01-05.zip
993			:
994		;
995	}
996}
997
998
999# Sed
1000if [ IsOptionalHaikuImagePackageAdded Sed ] {
1001	if $(TARGET_ARCH) != x86 {
1002		Echo "No optional package Sed available for $(TARGET_ARCH)" ;
1003	} else {
1004		InstallOptionalHaikuImagePackage sed-4.2.1-r1a1-x86-gcc2-2009-08-30.zip
1005			: $(baseURL)/sed-4.2.1-r1a1-x86-gcc2-2009-08-30.zip
1006			:
1007			:
1008		;
1009	}
1010}
1011
1012
1013# SQLite
1014if [ IsOptionalHaikuImagePackageAdded SQLite ] {
1015	if $(TARGET_ARCH) != x86 {
1016		Echo "No optional package SQLite available for $(TARGET_ARCH)" ;
1017	} else {
1018		InstallOptionalHaikuImagePackage sqlite-3.6.22-x86-gcc2-2010-03-09.zip
1019			: $(baseURL)/sqlite-3.6.22-x86-gcc2-2010-03-09.zip
1020			:
1021			: true
1022		;
1023	}
1024}
1025
1026
1027# Subversion
1028if [ IsOptionalHaikuImagePackageAdded Subversion ] {
1029	if $(TARGET_ARCH) != x86 {
1030		Echo "No optional package Subversion available for $(TARGET_ARCH)" ;
1031	} else {
1032		InstallOptionalHaikuImagePackage subversion-1.6.9-x86-gcc2-2010-04-08.zip
1033			: $(baseURL)/subversion-1.6.9-x86-gcc2-2010-04-08.zip
1034			:
1035			: true
1036		;
1037	}
1038}
1039
1040
1041# Tar
1042if [ IsOptionalHaikuImagePackageAdded Tar ] {
1043	if $(TARGET_ARCH) != x86 {
1044		Echo "No optional package Tar available for $(TARGET_ARCH)" ;
1045	} else {
1046		InstallOptionalHaikuImagePackage tar-1.22-x86-gcc4-2010-02-25.zip
1047			: $(baseURL)/tar-1.22-x86-gcc4-2010-02-25.zip
1048			:
1049		;
1050	}
1051}
1052
1053
1054# UserlandFS
1055if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
1056	local arch = $(TARGET_ARCH) ;
1057	local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
1058
1059	# kernel module
1060	AddFilesToHaikuImage system add-ons kernel file_systems : userlandfs ;
1061
1062	# server
1063	AddFilesToHaikuImage system servers : userlandfs_server ;
1064
1065	# libs
1066	local userlandfsLibs =
1067		libuserlandfs_beos_kernel.so
1068		libuserlandfs_haiku_kernel.so
1069		libuserlandfs_fuse.so
1070	;
1071	AddFilesToHaikuHybridImage system lib : $(userlandfsLibs) : : true ;
1072
1073	# development goodies
1074	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] {
1075		if ! ( $(HAIKU_GCC_VERSION[1]) in 2 4 ) {
1076			Exit "Optional package UserlandFS: Unsupported GCC version:"
1077				$(HAIKU_GCC_VERSION[1]) ;
1078		}
1079
1080		# library symlinks
1081		local lib ;
1082		for lib in $(userlandfsLibs) {
1083			AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
1084				: /system/lib/$(lib:BS) ;
1085			AddSymlinkToAlternativeGCCArchive develop abi $(arch) $(abi) lib
1086				: /system/lib/$(arch)/$(lib:BS) ;
1087		}
1088
1089		# FUSE headers
1090		local fuseHeaders =
1091			fuse_common_compat.h
1092			fuse_common.h
1093			fuse_compat.h
1094			fuse.h
1095			fuse_lowlevel_compat.h
1096			fuse_lowlevel.h
1097			fuse_opt.h
1098		;
1099		fuseHeaders = $(fuseHeaders:G=userlandfs!fuse) ;
1100		SEARCH on $(fuseHeaders)
1101			= [ FDirName $(HAIKU_TOP) headers private userlandfs fuse ] ;
1102		AddFilesToHaikuImage develop headers userlandfs fuse : $(fuseHeaders) ;
1103	}
1104}
1105
1106
1107# Vim
1108if [ IsOptionalHaikuImagePackageAdded Vim ] {
1109	if $(TARGET_ARCH) != x86 {
1110		Echo "No optional package Vim available for $(TARGET_ARCH)" ;
1111	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1112		InstallOptionalHaikuImagePackage vim-7.2-x86-gcc4-2009-05-31.zip
1113			:  $(baseURL)/vim-7.2-x86-gcc4-2009-05-31.zip
1114			:
1115		;
1116		AddSymlinkToHaikuImage home config be Applications
1117			: /boot/common/bin/gvim ;
1118		# TODO: move this symlink to the archive
1119		AddSymlinkToHaikuImage common bin : vim : vi ;
1120		# TODO: remove vimrc from the repository and add it to the archive
1121		SEARCH on <etc>vimrc = [ FDirName $(HAIKU_TOP) data etc vim ] ;
1122		AddFilesToHaikuImage common etc vim : <etc>vimrc ;
1123	} else {
1124		InstallOptionalHaikuImagePackage vim-7.2-r1a1-x86-gcc2-2009-09-06.zip
1125			:  $(baseURL)/vim-7.2-r1a1-x86-gcc2-2009-09-06.zip
1126			:
1127		;
1128		AddSymlinkToHaikuImage home config be Applications
1129			: /boot/common/bin/gvim ;
1130		# TODO: move this symlink to the archive
1131		AddSymlinkToHaikuImage common bin : vim : vi ;
1132		# TODO: remove vimrc from the repository and add it to the archive
1133		SEARCH on <etc>vimrc = [ FDirName $(HAIKU_TOP) data etc vim ] ;
1134		AddFilesToHaikuImage common etc vim : <etc>vimrc ;
1135	}
1136}
1137
1138
1139# Vision
1140if [ IsOptionalHaikuImagePackageAdded Vision ] {
1141	if $(TARGET_ARCH) != x86 {
1142		Echo "No optional package Vision available for $(TARGET_ARCH)" ;
1143	} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
1144		InstallOptionalHaikuImagePackage Vision-0.9.7-H-090423-1.zip
1145			: $(baseURL)/Vision-0.9.7-H-x86-gcc4-2009-04-23.zip
1146			: apps
1147		;
1148		AddSymlinkToHaikuImage home config be Applications
1149			: /boot/apps/Vision-0.9.7-H-090423/Vision ;
1150	} else {
1151		InstallOptionalHaikuImagePackage Vision-0.9.7-H-090423.zip
1152			: $(baseURL)/Vision-0.9.7-H-x86-gcc2-2009-04-23.zip
1153			: apps
1154		;
1155		AddSymlinkToHaikuImage home config be Applications
1156			: /boot/apps/Vision-0.9.7-H-090423/Vision ;
1157	}
1158}
1159
1160
1161# VLC media player
1162if [ IsOptionalHaikuImagePackageAdded VLC ] {
1163	if $(TARGET_ARCH) != x86 {
1164		Echo "No optional package VLC available for $(TARGET_ARCH)" ;
1165	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
1166		Echo "No optional package VLC available for gcc4" ;
1167	} else {
1168		InstallOptionalHaikuImagePackage VLC-0.8.6d.zip
1169			: $(baseURL)/vlc-0.8.6d-gcc2-2009-04-18.zip
1170			: apps
1171		;
1172		AddSymlinkToHaikuImage home config be Applications
1173			: "/boot/apps/vlc-0.8.6d/VLC media player" ;
1174		AddSymlinkToHaikuImage common bin
1175			: "/boot/apps/vlc-0.8.6d/VLC media player" : vlc ;
1176	}
1177}
1178
1179
1180# Welcome
1181if [ IsOptionalHaikuImagePackageAdded Welcome ] {
1182	CopyDirectoryToHaikuImage system documentation
1183		: [ FDirName $(HAIKU_TOP) docs welcome ]
1184		: welcome : -x .svn ;
1185	CopyDirectoryToHaikuImage system documentation
1186		: [ FDirName $(HAIKU_TOP) docs userguide ]
1187		: userguide : -x .svn ;
1188	CopyDirectoryToHaikuImage system documentation
1189		: [ FDirName $(HAIKU_TOP) docs images ]
1190		: images : -x .svn ;
1191	AddSymlinkToHaikuImage home Desktop
1192		: /boot/system/documentation/welcome/welcome_en.html : Welcome ;
1193	AddSymlinkToHaikuImage home Desktop
1194		: /boot/system/documentation/userguide/en/contents.html : User\ Guide ;
1195}
1196
1197
1198# WifiFirmwareScriptData
1199# This optional package is for people who build their own images & have wifi
1200# hardware that requires install-wifi-firmwares.sh & have no active network
1201# connection. This is not to be added to default images.
1202if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
1203	if $(TARGET_ARCH) != x86 {
1204		Echo "No optional package WifiFirmwareScriptData available for"
1205			$(TARGET_ARCH) ;
1206	} else {
1207		# broadcom43xx
1208		# firmware cutter
1209		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
1210		local broadcomFWCutterURL =
1211			http://bu3sch.de/b43/fwcutter/$(broadcomFWCutterArchive) ;
1212		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
1213			: $(broadcomFWCutterURL) ] ;
1214		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
1215			: $(broadcomFWCutterFile) ;
1216
1217		# headers needed to compile firmware cutter
1218		local glibcDir = [ FDirName
1219			$(HAIKU_TOP) src system libroot posix glibc ] ;
1220		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
1221		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
1222			: $(byteswapHeader) ;
1223		local bitByteswapHeader = [ FDirName
1224			$(glibcDir) include arch x86 bits byteswap.h ] ;
1225		AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter bits
1226			: $(bitByteswapHeader) ;
1227
1228		# file containing firmware
1229		local broadcom43xxFile ;
1230		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
1231			: http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o ] ;
1232		AddFilesToHaikuImage system data firmware broadcom43xx
1233			: $(broadcom43xxFile) ;
1234
1235		# marvell88w8335
1236		local marvelArchive = malo-firmware-1.4.tgz ;
1237		local marvelURL = http://www.nazgul.ch/malo/$(marvelArchive) ;
1238		local marvelFile = [ DownloadFile $(marvelArchive) : $(marvelURL) ] ;
1239		AddFilesToHaikuImage system data firmware marvell88w8335
1240			: $(marvelFile) ;
1241	}
1242}
1243
1244
1245# WonderBrush
1246if [ IsOptionalHaikuImagePackageAdded WonderBrush ] {
1247	if $(TARGET_ARCH) != x86 {
1248		Echo "No optional package WonderBrush available for $(TARGET_ARCH)" ;
1249	} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
1250		Echo "No optional package WonderBrush available for gcc4" ;
1251	} else {
1252		InstallOptionalHaikuImagePackage WonderBrush-2.1.2.zip
1253			: $(baseURL)/WonderBrush-2.1.2-x86-gcc2-2008-11-08.zip
1254			: apps
1255		;
1256		AddSymlinkToHaikuImage home config be Applications
1257			: /boot/apps/WonderBrush/WonderBrush ;
1258	}
1259}
1260
1261
1262# XZ-Utils
1263if [ IsOptionalHaikuImagePackageAdded XZ-Utils ] {
1264	if $(TARGET_ARCH) != x86 {
1265		Echo "No optional package XZ-Utils available for $(TARGET_ARCH)" ;
1266	} else {
1267		InstallOptionalHaikuImagePackage xz-utils-4.999.9-x86-gcc4-2010-02-25.zip
1268			: $(baseURL)/xz-utils-4.999.9-x86-gcc4-2010-02-25.zip
1269			:
1270		;
1271		AddExpanderRuleToHaikuImage "application/x-xz" : .tar.xz
1272			: "tar -Jtvf \\0045s"
1273			: "tar -Jxvf \\0045s"
1274		;
1275		AddExpanderRuleToHaikuImage "application/x-xz" : .txz
1276			: "tar -Jtvf \\0045s"
1277			: "tar -Jxvf \\0045s"
1278		;
1279		AddExpanderRuleToHaikuImage "application/x-xz" : .xz
1280			: "echo \\0045s | sed 's/.xz\\\$//g'"
1281			: "xz -df \\0045s"
1282		;
1283	}
1284}
1285
1286
1287# Yasm
1288if [ IsOptionalHaikuImagePackageAdded Yasm ] {
1289	if $(TARGET_ARCH) != x86 {
1290		Echo "No optional package Yasm available for $(TARGET_ARCH)" ;
1291	} else {
1292		InstallOptionalHaikuImagePackage yasm-0.8.0-r1a1-x86-gcc2-2009-08-30.zip
1293			: $(baseURL)/yasm-0.8.0-r1a1-x86-gcc2-2009-08-30.zip
1294			:
1295		;
1296	}
1297}
1298