Diff

Differences From Artifact [2bc32b4350]:

To Artifact [d7da369961]:


32
33
34
35
36
37
38



39
40
41
42
43
44
45
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48







+
+
+








# File to create
result="fossil-${fossil_version}-${target}"

# Clean-up the result file before starting
rm -f "${result}" "${result}.info" "${result}.log"

# Start Directory
start_dir="$(pwd)" || exit 1

# Helper functions
function random() {
	openssl rand -base64 6 | tr '/+' 'ZZ'
}

function downloadFile() {
	local downloadProgram downloadProgramPath file urls
310
311
312
313
314
315
316









317
318
319
320
321
322
323
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335







+
+
+
+
+
+
+
+
+








	# Download the archive
	download "${fossil_url}" "${fossil_archive}" "${fossil_sha256}" || exit 1

	# Extract the archive
	extract "${fossil_archive}" "${fossil_dir}" || exit 1
	cd "${fossil_dir}" || exit 1

	# Apply patches
	for file in "${start_dir}/patches"/fossil-*.diff; do
		if [ ! -e "${file}" ]; then
			continue
		fi

		patch --no-backup-if-mismatch --force -p1 < "${file}" || exit 1
	done

	# Setup cross-compiler
	## From Build-CC 0.9+
	eval $(~/root/cross-compilers/setup-cc "${target}") || exit 1

	# Setup to use LibreSSL we just compiled
	export PKG_CONFIG_PATH="${workdir}/libressl/INST/lib/pkgconfig"