summaryrefslogtreecommitdiffstats
path: root/build/jam/OptionalPackages
blob: f74b71fd66f0b7c75f127e0edfb52d347b42b50e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# This file defines the optional packages that can be added to the Haiku image.
# It is directly included from HaikuImage -- all variables defined there can
# be used.

# Available Optional Packages:
#	BeOSCompatibility		- creates links within the system to support old apps
#	Bluetooth				- experimental Haiku components for Bluetooth
#	Development				- more complete dev environment (including autotools)
#	DevelopmentBase			- basic development environment (gcc, headers, libs,...)
#	DevelopmentJava			- JamVM, a Java Virtual machine, GNU Classpath, ECJ
#	DevelopmentMin			- development headers, libs, tools, from sources only
#	DevelopmentPowerPC		- Cross compiling environment for PowerPC
#	FFMpeg					- audio/video library
#	FFMpeg-devel			- FFMpeg development files
#	Git						- the distributed version control system
#	NetFS					- the native networked file system components
#	UserlandFS				- aids native file system development (like FUSE)
#	WebPositive				- native, WebKit-based web browser
#	Welcome					- introductory documentation to Haiku
#	WifiFirmwareScriptData	- data files needed by install-wifi-firmwares.sh


# dependencies between optional packages
OptionalPackageDependencies Development : DevelopmentBase ;
OptionalPackageDependencies DevelopmentBase : DevelopmentMin ;
OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
OptionalPackageDependencies NetFS : UserlandFS ;


local baseURL = http://haiku-files.org/files/optional-packages ;
local hpkgBaseURL = http://haiku-files.org/files/hpkg ;
local baseSourceURL = http://haiku-files.org/files/sources ;


# BeBook
if [ IsOptionalHaikuImagePackageAdded BeBook ] {
	AddHaikuImagePackages be_book ;
	AddSymlinkToHaikuImage home Desktop
		: /boot/system/documentation/BeBook/index.html
		: BeBook ;
}


# BeOSCompatibility
if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
	if $(TARGET_ARCH) != x86 {
		Echo "No optional package BeOSCompatibility available for"
			"$(TARGET_ARCH)" ;
	} else if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) >= 4 {
		Echo "No optional package BeOSCompatibility available for gcc4" ;
	} else {
		Echo "Warning: Adding BeOS compatibility symlinks. This will go away."
			"Please fix your apps!" ;
		AddSymlinkToHaikuImage beos : ../system/apps ;
		AddSymlinkToHaikuImage beos : ../system/bin ;
		AddSymlinkToHaikuImage beos
			: ../system/documentation ;
		AddSymlinkToHaikuImage beos : ../system/settings/etc ;
		AddSymlinkToHaikuImage beos : ../system/preferences ;
		AddSymlinkToHaikuImage beos : ../system ;
		AddDirectoryToHaikuImage var ;
		AddSymlinkToHaikuImage var : /boot/system/var/log ;
		AddSymlinkToHaikuImage var : /boot/system/cache/tmp ;
	}
}


# Bluetooth stack
if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
# TODO: Make this an actual package!
# 	local bluetoothDrivers = h2generic ;
# 	AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
# 	AddFilesToHaikuImage system servers : bluetooth_server ;
# 	AddFilesToHaikuImage system lib : libbluetooth.so ;
# 	AddFilesToHaikuImage
# 		system add-ons kernel network protocols : l2cap ;
# 	AddFilesToHaikuImage system add-ons kernel bluetooth
# 		: btCoreData hci ;
# 	AddFilesToHaikuImage system preferences : Bluetooth ;
# 	AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
# 	AddSymlinkToHaikuImage home config settings deskbar menu Preferences
# 		: /boot/system/preferences/Bluetooth ;
# 	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
# 		&& $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 {
# 		local arch = $(TARGET_ARCH) ;
# 		local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
# 		AddSymlinkToHaikuImage system develop lib
# 			: /system/lib libbluetooth.so ;
# 	}
}


# Development
if [ IsOptionalHaikuImagePackageAdded Development ] {
	# auto tools and perl
	AddHaikuImagePackages autoconf automake libtool perl texinfo ;

	# some other build tools
	AddHaikuImagePackages cmake pkgconfig scons ;

	# devel packages for mandatory packages
	local architectureObject ;
	for architectureObject in [ MultiArchSubDirSetup ] {
		on $(architectureObject) {
			AddHaikuImagePackages curl_devel ffmpeg_devel freetype_devel
				glu_devel jpeg_devel libpng_devel zlib_devel ;
		}
	}
}


# DevelopmentBase
if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ] {
	# gcc and binutils (for all target architectures)
	local architectureObject ;
	for architectureObject in [ MultiArchSubDirSetup ] {
		on $(architectureObject) {
			AddHaikuImagePackages binutils gcc ;
		}
	}

	# other commonly used tools
	AddHaikuImagePackages bison cdrtools flex jam m4 make mkdepend nasm ;
}


# DevelopmentJava
if [ IsOptionalHaikuImagePackageAdded DevelopmentJava ] {
# TODO: Build actual packages!
# 	InstallOptionalHaikuImagePackage
# 		$(baseURL)/gnu-classpath-0.98-r1a3-x86-gcc4-2011-06-08.zip ;
# 	InstallOptionalHaikuImagePackage
# 		$(baseURL)/jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip ;
# 	AddSymlinkToHaikuImage common bin
# 		: /boot/common/bin/jamvm : java ;
# 	InstallOptionalHaikuImagePackage
# 		$(baseURL)/ecj-3.6.2-haiku-2011-06-08.zip ;
}


# DevelopmentMin
if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
		&& ( $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 ) {
	AddPackageFilesToHaikuImage system
		:
		haiku_devel.hpkg
		haiku_$(TARGET_PACKAGING_ARCHS[2-])_devel.hpkg
		makefile_engine.hpkg
		:
		nameFromMetaInfo
		;
}


# DevelopmentPowerPC
if [ IsOptionalHaikuImagePackageAdded DevelopmentPowerPC ] {
# TODO: Build actual packages!
# 	InstallOptionalHaikuImagePackage
# 		$(baseURL)/gcc-ppc-4.6.2-x86-gcc4-2012-03-17.zip ;
# 	InstallOptionalHaikuImagePackage
# 		$(baseURL)/haiku-devlibs-ppc-gcc4-2012-03-18.zip ;
}


# FFMpeg
if [ IsOptionalHaikuImagePackageAdded FFMpeg ] {
	local packages = ffmpeg speex libtheora libvorbis libogg libvpx ;
	AddHaikuImagePackages $(packages) ;
}


# FFMpeg-devel
if [ IsOptionalHaikuImagePackageAdded FFMpeg-devel ] {
	local packages = ffmpeg speex libtheora libvorbis libogg libvpx ;
	AddHaikuImagePackages $(packages)_devel ;
}


# Git
if [ IsOptionalHaikuImagePackageAdded Git ] {
	AddHaikuImagePackages git git_arch git_daemon git_email git_svn ;

	# git_cvs depends on cvsps, which does not build with gcc2. So it is not
	# available on gcc2-only builds.
	if $(TARGET_PACKAGING_ARCHS) != x86_gcc2 {
		AddHaikuImagePackages git_cvs ;
	}
}


# NetFS network file system
if [ IsOptionalHaikuImagePackageAdded NetFS ] {
# TODO: Make this an actual package!
# 	# userlandfs module
# 	AddFilesToHaikuImage home config add-ons userlandfs
# 		: netfs ;
#
# 	# servers
# 	AddFilesToHaikuImage system servers : netfs_server ;
# 	AddFilesToHaikuImage system servers
# 		: authentication_server ;
#
# 	# tools
# 	AddFilesToHaikuImage system bin : netfs_config ;
# 	AddFilesToHaikuImage system bin : netfs_server_prefs ;
#
# 	#example settings for netfs_server
# 	local netfsServerSettingsFiles = <driver-settings>netfs-server ;
# 	SEARCH on $(netfsServerSettingsFiles)
# 		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems netfs ] ;
# 	AddFilesToHaikuImage home config settings kernel drivers
# 	: $(netfsServerSettingsFiles) ;
#
# 	#userlandfs settings are needed for netfs_config to work (ioctls)
# 	local userlandfsServerSettingsFiles = <driver-settings>userlandfs ;
# 	SEARCH on $(userlandfsServerSettingsFiles)
# 		= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ;
# 	AddFilesToHaikuImage home config settings kernel drivers
# 		: $(userlandfsServerSettingsFiles) ;
}


# UserlandFS
if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
# TODO: Make this an actual package!
# 	local arch = $(TARGET_ARCH) ;
# 	local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
#
# 	# kernel module
# 	AddFilesToHaikuImage system add-ons kernel file_systems
# 		: userlandfs ;
#
# 	# server
# 	AddFilesToHaikuImage system servers : userlandfs_server ;
#
# 	# libs
# 	local userlandfsLibs =
# 		libuserlandfs_beos_kernel.so
# 		libuserlandfs_haiku_kernel.so
# 		libuserlandfs_fuse.so
# 	;
# 	AddFilesToHaikuImage system lib : $(userlandfsLibs) ;
#
# 	# development goodies
# 	if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] {
# 		if ! ( $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 ) {
# 			Exit "Optional package UserlandFS: Unsupported GCC version:"
# 				$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ;
# 		}
#
# 		# library symlinks
# 		local lib ;
# 		for lib in $(userlandfsLibs) {
# 			AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
# 				: /system/lib/$(lib:BS) ;
# 		}
#
# 		# FUSE headers
# 		local fuseHeaders =
# 			fuse_common_compat.h
# 			fuse_common.h
# 			fuse_compat.h
# 			fuse.h
# 			fuse_lowlevel_compat.h
# 			fuse_lowlevel.h
# 			fuse_opt.h
# 		;
# 		fuseHeaders = $(fuseHeaders:G=userlandfs!fuse) ;
# 		SEARCH on $(fuseHeaders)
# 			= [ FDirName $(HAIKU_TOP) headers private userlandfs fuse ] ;
# 		AddFilesToHaikuImage develop headers userlandfs fuse : $(fuseHeaders) ;
# 	}
}


# WebPositive
if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
	local architectureObject ;
	for architectureObject in [ MultiArchSubDirSetup ] {
		on $(architectureObject) {
			if [ FIsBuildFeatureEnabled webpositive ] {
				AddPackageFilesToHaikuImage system : webpositive.hpkg
					: nameFromMetaInfo ;
				InstallOptionalHaikuImagePackage
					$(baseURL)/WebPositiveBookmarks-2014-07-21.zip
					: home config settings WebPositive ;
				break ;
			}
		}
	}
}


# Welcome
if [ IsOptionalHaikuImagePackageAdded Welcome ] {
	AddPackageFilesToHaikuImage system : haiku_userguide.hpkg
		: nameFromMetaInfo ;
	AddPackageFilesToHaikuImage system : haiku_welcome.hpkg : nameFromMetaInfo ;

	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/welcome
		: Welcome ;
	AddSymlinkToHaikuImage home Desktop	: /boot/system/bin/userguide
		: User\ Guide ;
}


# WifiFirmwareScriptData
# This optional package is for people who build their own images & have wifi
# hardware that requires install-wifi-firmwares.sh & have no active network
# connection. This is not to be added to default images.
if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
# TODO: Make this an actual package!
# 	if $(TARGET_ARCH) != x86 {
# 		Echo "No optional package WifiFirmwareScriptData available for"
# 			$(TARGET_ARCH) ;
# 	} else {
# 		# broadcom43xx
# 		# firmware cutter
# 		local broadcomFWCutterArchive = b43-fwcutter-012.tar.bz2 ;
# 		local broadcomFWCutterURL =
# 			http://www.haiku-files.org/files/wifi-firmwares/b43/fwcutter/$(broadcomFWCutterArchive) ;
# 		local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
# 			: $(broadcomFWCutterURL) ] ;
# 		AddFilesToHaikuImage
# 			system data firmware broadcom43xx b43-fwcutter
# 			: $(broadcomFWCutterFile) ;
#
# 		# headers needed to compile firmware cutter
# 		local glibcDir = [ FDirName
# 			$(HAIKU_TOP) src system libroot posix glibc ] ;
# 		local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
# 		AddFilesToHaikuImage
# 			system data firmware broadcom43xx b43-fwcutter
# 			: $(byteswapHeader) ;
# 		local bitByteswapHeader = [ FDirName
# 			$(glibcDir) include arch x86 bits byteswap.h ] ;
# 		AddFilesToHaikuImage
# 			system data firmware broadcom43xx b43-fwcutter bits
# 			: $(bitByteswapHeader) ;
#
# 		# file containing firmware
# 		local broadcom43xxFile ;
# 		broadcom43xxFile = [ DownloadFile wl_apsta-3.130.20.0.o
# 			: http://www.haiku-files.org/files/wifi-firmwares/b43/wl_apsta-3.130.20.0.o ] ;
# 		AddFilesToHaikuImage system data firmware broadcom43xx
# 			: $(broadcom43xxFile) ;
#
# 		# marvell88w8335
# 		local marvellArchive = malo-firmware-1.4.tgz ;
# 		local marvellURL = http://www.haiku-files.org/files/wifi-firmwares/marvell/$(marvellArchive) ;
# 		local marvellFile = [ DownloadFile $(marvellArchive) : $(marvellURL) ] ;
# 		AddFilesToHaikuImage system data firmware marvell88w8335
# 			: $(marvellFile) ;
# 	}
}