OptionalPackages revision 77e13923
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# Available Optional Packages:
6#	BeOSCompatibility		- creates links within the system to support old apps
7#	Bluetooth				- experimental Haiku components for Bluetooth
8#	Development				- more complete dev environment (including autotools)
9#	DevelopmentBase			- basic development environment (gcc, headers, libs,...)
10#	DevelopmentJava			- JamVM, a Java Virtual machine, GNU Classpath, ECJ
11#	DevelopmentMin			- development headers, libs, tools, from sources only
12#	DevelopmentPowerPC		- Cross compiling environment for PowerPC
13#	FFMpeg					- audio/video library
14#	FFMpeg-devel			- FFMpeg development files
15#	Git						- the distributed version control system
16#	NetFS					- the native networked file system components
17#	UserlandFS				- aids native file system development (like FUSE)
18#	WebPositive				- native, WebKit-based web browser
19#	Welcome					- introductory documentation to Haiku
20#	WifiFirmwareScriptData	- data files needed by install-wifi-firmwares.sh
21
22
23# dependencies between optional packages
24OptionalPackageDependencies Development : DevelopmentBase ;
25OptionalPackageDependencies DevelopmentBase : DevelopmentMin ;
26OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
27OptionalPackageDependencies NetFS : UserlandFS ;
28
29
30local baseURL = http://haiku-files.org/files/optional-packages ;
31local hpkgBaseURL = http://haiku-files.org/files/hpkg ;
32local baseSourceURL = http://haiku-files.org/files/sources ;
33
34
35# BeBook
36if [ IsOptionalHaikuImagePackageAdded BeBook ] {
37	AddHaikuImagePackages be_book ;
38	AddSymlinkToHaikuImage home Desktop
39		: /boot/system/documentation/BeBook/index.html
40		: BeBook ;
41}
42
43
44# BeOSCompatibility
45if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
46	if $(TARGET_ARCH) != x86 {
47		Echo "No optional package BeOSCompatibility available for"
48			"$(TARGET_ARCH)" ;
49	} else if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) >= 4 {
50		Echo "No optional package BeOSCompatibility available for gcc4" ;
51	} else {
52		Echo "Warning: Adding BeOS compatibility symlinks. This will go away."
53			"Please fix your apps!" ;
54		AddSymlinkToHaikuImage beos : ../system/apps ;
55		AddSymlinkToHaikuImage beos : ../system/bin ;
56		AddSymlinkToHaikuImage beos
57			: ../system/documentation ;
58		AddSymlinkToHaikuImage beos : ../system/settings/etc ;
59		AddSymlinkToHaikuImage beos : ../system/preferences ;
60		AddSymlinkToHaikuImage beos : ../system ;
61		AddDirectoryToHaikuImage var ;
62		AddSymlinkToHaikuImage var : /boot/system/var/log ;
63		AddSymlinkToHaikuImage var : /boot/system/cache/tmp ;
64	}
65}
66
67
68# Bluetooth stack
69if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
70# TODO: Make this an actual package!
71# 	local bluetoothDrivers = h2generic ;
72# 	AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
73# 	AddFilesToHaikuImage system servers : bluetooth_server ;
74# 	AddFilesToHaikuImage system lib : libbluetooth.so ;
75# 	AddFilesToHaikuImage
76# 		system add-ons kernel network protocols : l2cap ;
77# 	AddFilesToHaikuImage system add-ons kernel bluetooth
78# 		: btCoreData hci ;
79# 	AddFilesToHaikuImage system preferences : Bluetooth ;
80# 	AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
81# 	AddSymlinkToHaikuImage home config settings deskbar menu Preferences
82# 		: /boot/system/preferences/Bluetooth ;
83# 	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
84# 		&& $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 {
85# 		local arch = $(TARGET_ARCH) ;
86# 		local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
87# 		AddSymlinkToHaikuImage system develop lib
88# 			: /system/lib libbluetooth.so ;
89# 	}
90}
91
92
93# Development
94if [ IsOptionalHaikuImagePackageAdded Development ] {
95	# auto tools and perl
96	AddHaikuImagePackages autoconf automake libtool perl texinfo ;
97
98	# some other build tools
99	AddHaikuImagePackages cmake pkgconfig scons ;
100
101	# devel packages for mandatory packages
102	local architectureObject ;
103	for architectureObject in [ MultiArchSubDirSetup ] {
104		on $(architectureObject) {
105			AddHaikuImagePackages curl_devel ffmpeg_devel freetype_devel
106				glu_devel jpeg_devel libpng_devel zlib_devel ;
107		}
108	}
109}
110
111
112# DevelopmentBase
113if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ] {
114	# gcc and binutils (for all target architectures)
115	local architectureObject ;
116	for architectureObject in [ MultiArchSubDirSetup ] {
117		on $(architectureObject) {
118			AddHaikuImagePackages binutils gcc ;
119		}
120	}
121
122	# other commonly used tools
123	AddHaikuImagePackages bison cdrtools flex jam m4 make mkdepend nasm ;
124}
125
126
127# DevelopmentJava
128if [ IsOptionalHaikuImagePackageAdded DevelopmentJava ] {
129# TODO: Build actual packages!
130# 	InstallOptionalHaikuImagePackage
131# 		$(baseURL)/gnu-classpath-0.98-r1a3-x86-gcc4-2011-06-08.zip ;
132# 	InstallOptionalHaikuImagePackage
133# 		$(baseURL)/jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip ;
134# 	AddSymlinkToHaikuImage common bin
135# 		: /boot/common/bin/jamvm : java ;
136# 	InstallOptionalHaikuImagePackage
137# 		$(baseURL)/ecj-3.6.2-haiku-2011-06-08.zip ;
138}
139
140
141# DevelopmentMin
142if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
143		&& ( $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 ) {
144	AddPackageFilesToHaikuImage system
145		:
146		haiku_devel.hpkg
147		haiku_$(TARGET_PACKAGING_ARCHS[2-])_devel.hpkg
148		makefile_engine.hpkg
149		:
150		nameFromMetaInfo
151		;
152}
153
154
155# DevelopmentPowerPC
156if [ IsOptionalHaikuImagePackageAdded DevelopmentPowerPC ] {
157# TODO: Build actual packages!
158# 	InstallOptionalHaikuImagePackage
159# 		$(baseURL)/gcc-ppc-4.6.2-x86-gcc4-2012-03-17.zip ;
160# 	InstallOptionalHaikuImagePackage
161# 		$(baseURL)/haiku-devlibs-ppc-gcc4-2012-03-18.zip ;
162}
163
164
165# FFMpeg
166if [ IsOptionalHaikuImagePackageAdded FFMpeg ] {
167	local packages = ffmpeg speex libtheora libvorbis libogg libvpx ;
168	AddHaikuImagePackages $(packages) ;
169}
170
171
172# FFMpeg-devel
173if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
174	local packages = ffmpeg speex libtheora libvorbis libogg libvpx ;
175	AddHaikuImagePackages $(packages)_devel ;
176}
177
178
179# Git
180if [ IsOptionalHaikuImagePackageAdded Git ] {
181	AddHaikuImagePackages git git_arch git_daemon git_email git_svn ;
182
183	# git_cvs depends on cvsps, which does not build with gcc2. So it is not
184	# available on gcc2-only builds.
185	if $(TARGET_PACKAGING_ARCHS) != x86_gcc2 {
186		AddHaikuImagePackages git_cvs ;
187	}
188}
189
190
191# NetFS network file system
192if [ IsOptionalHaikuImagePackageAdded NetFS ] {
193# TODO: Make this an actual package!
194# 	# userlandfs module
195# 	AddFilesToHaikuImage home config add-ons userlandfs
196# 		: netfs ;
197#
198# 	# servers
199# 	AddFilesToHaikuImage system servers : netfs_server ;
200# 	AddFilesToHaikuImage system servers
201# 		: authentication_server ;
202#
203# 	# tools
204# 	AddFilesToHaikuImage system bin : netfs_config ;
205# 	AddFilesToHaikuImage system bin : netfs_server_prefs ;
206#
207# 	#example settings for netfs_server
208# 	local netfsServerSettingsFiles = <driver-settings>netfs-server ;
209# 	SEARCH on $(netfsServerSettingsFiles)
210# 		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems netfs ] ;
211# 	AddFilesToHaikuImage home config settings kernel drivers
212# 	: $(netfsServerSettingsFiles) ;
213#
214# 	#userlandfs settings are needed for netfs_config to work (ioctls)
215# 	local userlandfsServerSettingsFiles = <driver-settings>userlandfs ;
216# 	SEARCH on $(userlandfsServerSettingsFiles)
217# 		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ;
218# 	AddFilesToHaikuImage home config settings kernel drivers
219# 		: $(userlandfsServerSettingsFiles) ;
220}
221
222
223# UserlandFS
224if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
225# TODO: Make this an actual package!
226# 	local arch = $(TARGET_ARCH) ;
227# 	local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
228#
229# 	# kernel module
230# 	AddFilesToHaikuImage system add-ons kernel file_systems
231# 		: userlandfs ;
232#
233# 	# server
234# 	AddFilesToHaikuImage system servers : userlandfs_server ;
235#
236# 	# libs
237# 	local userlandfsLibs =
238# 		libuserlandfs_beos_kernel.so
239# 		libuserlandfs_haiku_kernel.so
240# 		libuserlandfs_fuse.so
241# 	;
242# 	AddFilesToHaikuImage system lib : $(userlandfsLibs) ;
243#
244# 	# development goodies
245# 	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] {
246# 		if ! ( $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 ) {
247# 			Exit "Optional package UserlandFS: Unsupported GCC version:"
248# 				$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
249# 		}
250#
251# 		# library symlinks
252# 		local lib ;
253# 		for lib in $(userlandfsLibs) {
254# 			AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
255# 				: /system/lib/$(lib:BS) ;
256# 		}
257#
258# 		# FUSE headers
259# 		local fuseHeaders =
260# 			fuse_common_compat.h
261# 			fuse_common.h
262# 			fuse_compat.h
263# 			fuse.h
264# 			fuse_lowlevel_compat.h
265# 			fuse_lowlevel.h
266# 			fuse_opt.h
267# 		;
268# 		fuseHeaders = $(fuseHeaders:G=userlandfs!fuse) ;
269# 		SEARCH on $(fuseHeaders)
270# 			= [ FDirName $(HAIKU_TOP) headers private userlandfs fuse ] ;
271# 		AddFilesToHaikuImage develop headers userlandfs fuse : $(fuseHeaders) ;
272# 	}
273}
274
275
276# WebPositive
277if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
278	local architectureObject ;
279	for architectureObject in [ MultiArchSubDirSetup ] {
280		on $(architectureObject) {
281			if [ FIsBuildFeatureEnabled webpositive ] {
282				AddPackageFilesToHaikuImage system : webpositive.hpkg
283					: nameFromMetaInfo ;
284				InstallOptionalHaikuImagePackage
285					$(baseURL)/WebPositiveBookmarks-2014-07-21.zip
286					: home config settings WebPositive ;
287				break ;
288			}
289		}
290	}
291}
292
293
294# Welcome
295if [ IsOptionalHaikuImagePackageAdded Welcome ] {
296	AddPackageFilesToHaikuImage system : haiku_userguide.hpkg
297		: nameFromMetaInfo ;
298	AddPackageFilesToHaikuImage system : haiku_welcome.hpkg : nameFromMetaInfo ;
299
300	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/welcome
301		: Welcome ;
302	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/userguide
303		: User\ Guide ;
304}
305
306
307# WifiFirmwareScriptData
308# This optional package is for people who build their own images & have wifi
309# hardware that requires install-wifi-firmwares.sh & have no active network
310# connection. This is not to be added to default images.
311if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
312# TODO: Make this an actual package!
313# 	if $(TARGET_ARCH) != x86 {
314# 		Echo "No optional package WifiFirmwareScriptData available for"
315# 			$(TARGET_ARCH) ;
316# 	} else {
317# 		# broadcom43xx
318# 		# firmware cutter
319# 		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
320# 		local broadcomFWCutterURL =
321# 			http://www.haiku-files.org/files/wifi-firmwares/b43/fwcutter/$(broadcomFWCutterArchive) ;
322# 		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
323# 			: $(broadcomFWCutterURL) ] ;
324# 		AddFilesToHaikuImage
325# 			system data firmware broadcom43xx b43-fwcutter
326# 			: $(broadcomFWCutterFile) ;
327#
328# 		# headers needed to compile firmware cutter
329# 		local glibcDir = [ FDirName
330# 			$(HAIKU_TOP) src system libroot posix glibc ] ;
331# 		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
332# 		AddFilesToHaikuImage
333# 			system data firmware broadcom43xx b43-fwcutter
334# 			: $(byteswapHeader) ;
335# 		local bitByteswapHeader = [ FDirName
336# 			$(glibcDir) include arch x86 bits byteswap.h ] ;
337# 		AddFilesToHaikuImage
338# 			system data firmware broadcom43xx b43-fwcutter bits
339# 			: $(bitByteswapHeader) ;
340#
341# 		# file containing firmware
342# 		local broadcom43xxFile ;
343# 		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
344# 			: http://www.haiku-files.org/files/wifi-firmwares/b43/wl_apsta-3.130.20.0.o ] ;
345# 		AddFilesToHaikuImage system data firmware broadcom43xx
346# 			: $(broadcom43xxFile) ;
347#
348# 		# marvell88w8335
349# 		local marvellArchive = malo-firmware-1.4.tgz ;
350# 		local marvellURL = http://www.haiku-files.org/files/wifi-firmwares/marvell/$(marvellArchive) ;
351# 		local marvellFile = [ DownloadFile $(marvellArchive) : $(marvellURL) ] ;
352# 		AddFilesToHaikuImage system data firmware marvell88w8335
353# 			: $(marvellFile) ;
354# 	}
355}
356