changeset 1172:6c57eafaa842

dev/fossil: initial import, closes #1259
author David Demelier <markand@malikania.fr>
date Thu, 17 Oct 2019 12:46:05 +0200
parents 4beb14cb5714
children b56931d3ac0d
files dev/fossil/fossil.sh dev/fossil/fossil.sha1
diffstat 2 files changed, 84 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/fossil/fossil.sh	Thu Oct 17 12:46:05 2019 +0200
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+PKGNAME=fossil
+PKGVERSION=2.10
+PKGREVISION=1
+PKGLICENSE="BSD2CLAUSE"
+PKGSUMMARY="simple distributed software configuration management system"
+PKGDOWNLOAD="https://fossil-scm.org/home/uv/$PKGNAME-src-$PKGVERSION.tar.gz"
+PKGDEPENDS="tcl:dev zlib"
+PKGOPTIONS="FUSE JSON SSL STATIC"
+
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${LIBS:=}
+: ${FUSE:=no}
+: ${JSON:=yes}
+: ${STATIC:=no}
+: ${SSL:=yes}
+
+if [ "$FUSE" = "yes" ]; then
+	PKGDEPENDS="fuse2 $PKGDEPENDS"
+else
+	with_fuse="--disable-fusefs"
+fi
+
+if [ "$JSON" = "yes" ]; then
+	with_json="--json"
+fi
+
+if [ "$SSL" = "yes" ]; then
+	PKGDEPENDS="libressl $PKGDEPENDS"
+	with_ssl="--with-openssl=auto"
+else
+	with_ssl="--with-openssl=none"
+fi
+
+# TODO: libressl does not ship static libraries yet.
+if [ "$STATIC" = "yes" ]; then
+	with_static="--static"
+fi
+
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-src-$PKGVERSION.tar.gz
+	cd $PKGNAME-$PKGVERSION
+
+	# CXX=$CC: fool C++ compiler, there is no C++ file in fossil.
+	CC="$CC" \
+	CC_FOR_BUILD="$CC" \
+	CXX="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--prefix= \
+		$with_fuse \
+		$with_json \
+		$with_ssl \
+		$with_static
+	make BCC=$CC TCC=$CC
+	install -Dm0755 fossil $DESTDIR/bin/fossil
+	install -Dm0644 fossil.1 $DESTDIR/share/man/man1/fossil.1
+
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/fossil/fossil.sha1	Thu Oct 17 12:46:05 2019 +0200
@@ -0,0 +1,1 @@
+db68c266c2df094972ce7c38a0e2e0294b7b2f1f  fossil-src-2.10.tar.gz