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