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