OptionalPackages revision 571def71
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#	DevelopmentMin			- development headers, libs, tools, from sources only
11#	FFMpeg					- audio/video library
12#	FFMpeg-devel			- FFMpeg development files
13#	Git						- the distributed version control system
14#	WebPositive				- native, WebKit-based web browser
15#	Welcome					- introductory documentation to Haiku
16#	WifiFirmwareScriptData	- data files needed by install-wifi-firmwares.sh
17
18
19# dependencies between optional packages
20OptionalPackageDependencies Development : DevelopmentBase ;
21OptionalPackageDependencies DevelopmentBase : DevelopmentMin ;
22OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
23OptionalPackageDependencies NetFS : UserlandFS ;
24
25
26# BeBook
27if [ IsOptionalHaikuImagePackageAdded BeBook ] {
28	AddHaikuImagePackages be_book ;
29	AddSymlinkToHaikuImage home Desktop
30		: /boot/system/documentation/BeBook/index.html
31		: BeBook ;
32}
33
34
35# BeOSCompatibility
36if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
37	if $(TARGET_ARCH) != x86 {
38		Echo "No optional package BeOSCompatibility available for"
39			"$(TARGET_ARCH)" ;
40	} else if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) >= 4 {
41		Echo "No optional package BeOSCompatibility available for gcc4" ;
42	} else {
43		Echo "Warning: Adding BeOS compatibility symlinks. This will go away."
44			"Please fix your apps!" ;
45		AddSymlinkToHaikuImage beos : ../system/apps ;
46		AddSymlinkToHaikuImage beos : ../system/bin ;
47		AddSymlinkToHaikuImage beos
48			: ../system/documentation ;
49		AddSymlinkToHaikuImage beos : ../system/settings/etc ;
50		AddSymlinkToHaikuImage beos : ../system/preferences ;
51		AddSymlinkToHaikuImage beos : ../system ;
52		AddDirectoryToHaikuImage var ;
53		AddSymlinkToHaikuImage var : /boot/system/var/log ;
54		AddSymlinkToHaikuImage var : /boot/system/cache/tmp ;
55	}
56}
57
58
59# Bluetooth stack
60if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
61# TODO: Make this an actual package!
62# 	local bluetoothDrivers = h2generic ;
63# 	AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
64# 	AddFilesToHaikuImage system servers : bluetooth_server ;
65# 	AddFilesToHaikuImage system lib : libbluetooth.so ;
66# 	AddFilesToHaikuImage
67# 		system add-ons kernel network protocols : l2cap ;
68# 	AddFilesToHaikuImage system add-ons kernel bluetooth
69# 		: btCoreData hci ;
70# 	AddFilesToHaikuImage system preferences : Bluetooth ;
71# 	AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
72# 	AddSymlinkToHaikuImage home config settings deskbar menu Preferences
73# 		: /boot/system/preferences/Bluetooth ;
74# 	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
75# 		&& $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 {
76# 		local arch = $(TARGET_ARCH) ;
77# 		local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
78# 		AddSymlinkToHaikuImage system develop lib
79# 			: /system/lib libbluetooth.so ;
80# 	}
81}
82
83
84# Development
85if [ IsOptionalHaikuImagePackageAdded Development ] {
86	# auto tools and perl
87	AddHaikuImagePackages autoconf automake perl texinfo ;
88
89	# some other build tools
90	AddHaikuImagePackages pkgconfig scons ;
91
92	# devel packages for mandatory packages
93	local architectureObject ;
94	for architectureObject in [ MultiArchSubDirSetup ] {
95		on $(architectureObject) {
96			AddHaikuImagePackages curl_devel ffmpeg_devel fontconfig_devel
97				freetype_devel glu_devel jpeg_devel libpng16_devel zlib_devel ;
98		}
99	}
100}
101
102
103# DevelopmentBase
104if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ] {
105	# gcc and binutils (for all target architectures)
106	local architectureObject ;
107	for architectureObject in [ MultiArchSubDirSetup ] {
108		on $(architectureObject) {
109			AddHaikuImagePackages binutils gcc ;
110		}
111	}
112
113	# other commonly used tools
114	AddHaikuImagePackages bison cdrtools flex jam m4 make mkdepend nasm patch ;
115}
116
117
118# DevelopmentMin
119if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
120		&& ( $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 ) {
121	AddPackageFilesToHaikuImage system
122		:
123		haiku_devel.hpkg
124		haiku_$(TARGET_PACKAGING_ARCHS[2-])_devel.hpkg
125		:
126		nameFromMetaInfo
127		;
128
129	if $(HAIKU_IS_BOOTSTRAP) != 1 {
130		AddPackageFilesToHaikuImage system
131			:
132			makefile_engine.hpkg
133			:
134			nameFromMetaInfo
135			;
136	}
137}
138
139
140# FFmpeg
141if [ IsOptionalHaikuImagePackageAdded FFMpeg ] {
142	local packages = ffmpeg speex libtheora libvorbis libogg libvpx3 ;
143	AddHaikuImagePackages $(packages) ;
144}
145
146
147# FFmpeg-devel
148if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
149	local packages = ffmpeg speex libtheora libvorbis libogg libvpx3 ;
150	AddHaikuImagePackages $(packages)_devel ;
151}
152
153
154# Git
155if [ IsOptionalHaikuImagePackageAdded Git ] {
156	AddHaikuImagePackages git git_arch git_daemon git_email ;
157}
158
159
160# WebPositive
161if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
162	local architectureObject ;
163	for architectureObject in [ MultiArchSubDirSetup ] {
164		on $(architectureObject) {
165			if [ FIsBuildFeatureEnabled webpositive ] {
166				AddPackageFilesToHaikuImage system : webpositive.hpkg
167					: nameFromMetaInfo ;
168				break ;
169			}
170		}
171	}
172}
173
174
175# Welcome
176if [ IsOptionalHaikuImagePackageAdded Welcome ] {
177	AddPackageFilesToHaikuImage system : haiku_userguide_ca.hpkg
178		: nameFromMetaInfo ;
179	AddPackageFilesToHaikuImage system : haiku_userguide_de.hpkg
180		: nameFromMetaInfo ;
181	AddPackageFilesToHaikuImage system : haiku_userguide_en.hpkg
182		: nameFromMetaInfo ;
183	AddPackageFilesToHaikuImage system : haiku_userguide_es.hpkg
184		: nameFromMetaInfo ;
185	AddPackageFilesToHaikuImage system : haiku_userguide_fi.hpkg
186		: nameFromMetaInfo ;
187	AddPackageFilesToHaikuImage system : haiku_userguide_fr.hpkg
188		: nameFromMetaInfo ;
189	AddPackageFilesToHaikuImage system : haiku_userguide_hu.hpkg
190		: nameFromMetaInfo ;
191	AddPackageFilesToHaikuImage system : haiku_userguide_it.hpkg
192		: nameFromMetaInfo ;
193	AddPackageFilesToHaikuImage system : haiku_userguide_jp.hpkg
194		: nameFromMetaInfo ;
195	AddPackageFilesToHaikuImage system : haiku_userguide_pl.hpkg
196		: nameFromMetaInfo ;
197	AddPackageFilesToHaikuImage system : haiku_userguide_pt_BR.hpkg
198		: nameFromMetaInfo ;
199	AddPackageFilesToHaikuImage system : haiku_userguide_pt_PT.hpkg
200		: nameFromMetaInfo ;
201	AddPackageFilesToHaikuImage system : haiku_userguide_ru.hpkg
202		: nameFromMetaInfo ;
203	AddPackageFilesToHaikuImage system : haiku_userguide_sk.hpkg
204		: nameFromMetaInfo ;
205	AddPackageFilesToHaikuImage system : haiku_userguide_sv_SE.hpkg
206		: nameFromMetaInfo ;
207	AddPackageFilesToHaikuImage system : haiku_userguide_uk.hpkg
208		: nameFromMetaInfo ;
209	AddPackageFilesToHaikuImage system : haiku_userguide_zh_CN.hpkg
210		: nameFromMetaInfo ;
211
212	AddPackageFilesToHaikuImage system : haiku_welcome.hpkg : nameFromMetaInfo ;
213
214	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/welcome
215		: Welcome ;
216	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/userguide
217		: User\ Guide ;
218}
219
220
221# WifiFirmwareScriptData
222# This optional package is for people who build their own images & have wifi
223# hardware that requires install-wifi-firmwares.sh & have no active network
224# connection. This is not to be added to default images.
225if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
226# TODO: Make this an actual package!
227# 	if $(TARGET_ARCH) != x86 {
228# 		Echo "No optional package WifiFirmwareScriptData available for"
229# 			$(TARGET_ARCH) ;
230# 	} else {
231# 		# broadcom43xx
232# 		# firmware cutter
233# 		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
234# 		local broadcomFWCutterURL =
235# 			http://www.haiku-files.org/files/wifi-firmwares/b43/fwcutter/$(broadcomFWCutterArchive) ;
236# 		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
237# 			: $(broadcomFWCutterURL) ] ;
238# 		AddFilesToHaikuImage
239# 			system data firmware broadcom43xx b43-fwcutter
240# 			: $(broadcomFWCutterFile) ;
241#
242# 		# headers needed to compile firmware cutter
243# 		local glibcDir = [ FDirName
244# 			$(HAIKU_TOP) src system libroot posix glibc ] ;
245# 		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
246# 		AddFilesToHaikuImage
247# 			system data firmware broadcom43xx b43-fwcutter
248# 			: $(byteswapHeader) ;
249# 		local bitByteswapHeader = [ FDirName
250# 			$(glibcDir) include arch x86 bits byteswap.h ] ;
251# 		AddFilesToHaikuImage
252# 			system data firmware broadcom43xx b43-fwcutter bits
253# 			: $(bitByteswapHeader) ;
254#
255# 		# file containing firmware
256# 		local broadcom43xxFile ;
257# 		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
258# 			: http://www.haiku-files.org/files/wifi-firmwares/b43/wl_apsta-3.130.20.0.o ] ;
259# 		AddFilesToHaikuImage system data firmware broadcom43xx
260# 			: $(broadcom43xxFile) ;
261#
262# 		# marvell88w8335
263# 		local marvellArchive = malo-firmware-1.4.tgz ;
264# 		local marvellURL = http://www.haiku-files.org/files/wifi-firmwares/marvell/$(marvellArchive) ;
265# 		local marvellFile = [ DownloadFile $(marvellArchive) : $(marvellURL) ] ;
266# 		AddFilesToHaikuImage system data firmware marvell88w8335
267# 			: $(marvellFile) ;
268# 	}
269}
270