xref: /haiku/build/jam/OptionalPackages (revision 529cd177b573aaba391c8adc9c9f5ad76a14bf81)
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 cmake 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 ;
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-2014-07-21.zip
199					: home config settings WebPositive ;
200				break ;
201			}
202		}
203	}
204}
205
206
207# Welcome
208if [ IsOptionalHaikuImagePackageAdded Welcome ] {
209	AddPackageFilesToHaikuImage system : haiku_userguide.hpkg
210		: nameFromMetaInfo ;
211	AddPackageFilesToHaikuImage system : haiku_welcome.hpkg : nameFromMetaInfo ;
212
213	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/welcome
214		: Welcome ;
215	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/userguide
216		: User\ Guide ;
217}
218
219
220# WifiFirmwareScriptData
221# This optional package is for people who build their own images & have wifi
222# hardware that requires install-wifi-firmwares.sh & have no active network
223# connection. This is not to be added to default images.
224if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
225# TODO: Make this an actual package!
226# 	if $(TARGET_ARCH) != x86 {
227# 		Echo "No optional package WifiFirmwareScriptData available for"
228# 			$(TARGET_ARCH) ;
229# 	} else {
230# 		# broadcom43xx
231# 		# firmware cutter
232# 		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
233# 		local broadcomFWCutterURL =
234# 			http://www.haiku-files.org/files/wifi-firmwares/b43/fwcutter/$(broadcomFWCutterArchive) ;
235# 		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
236# 			: $(broadcomFWCutterURL) ] ;
237# 		AddFilesToHaikuImage
238# 			system data firmware broadcom43xx b43-fwcutter
239# 			: $(broadcomFWCutterFile) ;
240#
241# 		# headers needed to compile firmware cutter
242# 		local glibcDir = [ FDirName
243# 			$(HAIKU_TOP) src system libroot posix glibc ] ;
244# 		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
245# 		AddFilesToHaikuImage
246# 			system data firmware broadcom43xx b43-fwcutter
247# 			: $(byteswapHeader) ;
248# 		local bitByteswapHeader = [ FDirName
249# 			$(glibcDir) include arch x86 bits byteswap.h ] ;
250# 		AddFilesToHaikuImage
251# 			system data firmware broadcom43xx b43-fwcutter bits
252# 			: $(bitByteswapHeader) ;
253#
254# 		# file containing firmware
255# 		local broadcom43xxFile ;
256# 		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
257# 			: http://www.haiku-files.org/files/wifi-firmwares/b43/wl_apsta-3.130.20.0.o ] ;
258# 		AddFilesToHaikuImage system data firmware broadcom43xx
259# 			: $(broadcom43xxFile) ;
260#
261# 		# marvell88w8335
262# 		local marvellArchive = malo-firmware-1.4.tgz ;
263# 		local marvellURL = http://www.haiku-files.org/files/wifi-firmwares/marvell/$(marvellArchive) ;
264# 		local marvellFile = [ DownloadFile $(marvellArchive) : $(marvellURL) ] ;
265# 		AddFilesToHaikuImage system data firmware marvell88w8335
266# 			: $(marvellFile) ;
267# 	}
268}
269