New package: tup-0.7.5

Closes: #4826 [via git-merge-pr]
This commit is contained in:
Julien Dehos 2016-09-23 23:17:11 +02:00 committed by Christian Neukirchen
parent 279be09da5
commit 76942dd85a
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,22 @@
--- src/tup/platform.c.orig
+++ src/tup/platform.c
@@ -54,6 +54,8 @@
const char *tup_arch = "sparc";
#elif __arm__
const char *tup_arch = "arm";
+#elif __aarch64__
+const char *tup_arch = "aarch64";
#else
#error Unsupported cpu architecture. Please add support in tup/platform.c
#endif
--- tup.1.orig
+++ tup.1
@@ -684,7 +684,7 @@
TUP_PLATFORM is a special @-variable. If CONFIG_TUP_PLATFORM is not set in the tup.config file, it has a default value according to the platform that tup itself was compiled in. Currently the default value is one of "linux", "solaris", "macosx", "win32", or "freebsd".
.TP
.B @(TUP_ARCH)
-TUP_ARCH is another special @-variable. If CONFIG_TUP_ARCH is not set in the tup.config file, it has a default value according to the processor architecture that tup itself was compiled in. Currently the default value is one of "i386", "x86_64", "powerpc", "powerpc64", "ia64", "alpha", "sparc" or "arm".
+TUP_ARCH is another special @-variable. If CONFIG_TUP_ARCH is not set in the tup.config file, it has a default value according to the processor architecture that tup itself was compiled in. Currently the default value is one of "i386", "x86_64", "powerpc", "powerpc64", "ia64", "alpha", "sparc", "arm", or "aarch64".
.SH "VARIANTS"
Tup supports variants, which allow you to build your project multiple times with different configurations. Perhaps the most common case is to build a release and a debug configuration with different compiler flags, though any number of variants can be used to support whatever configurations you like. Each variant is built in its own directory distinct from each other and from the source tree. When building with variants, the in-tree build is disabled. To create a variant, make a new directory at the top of the tup hierarchy and create a "tup.config" file there. For example:

36
srcpkgs/tup/template Normal file
View file

@ -0,0 +1,36 @@
# Template file for 'tup'
pkgname="tup"
version="0.7.5"
revision=1
hostmakedepends="fuse-devel pkg-config"
makedepends="fuse-devel sqlite-devel"
short_desc="File-based build system"
maintainer="Julien Dehos <dehos@lisic.univ-littoral.fr>"
homepage="http://gittup.org/tup/index.html"
license="GPL-2"
distfiles="https://github.com/gittup/${pkgname}/archive/v${version}.tar.gz"
checksum="361b3e069308ce1d9505d1cb927999ac448811a3425c724123e0c48602a9d1e4"
do_configure() {
sed -i "s/git describe/echo v${version}/" Tupfile
sed -i "s/CC = gcc/CC = ${CC}/" Tuprules.tup
sed -i "1iCFLAGS=${CFLAGS}" Tuprules.tup
sed -i "1iLDFLAGS=${LDFLAGS}" Tuprules.tup
echo "CONFIG_TUP_USE_SYSTEM_SQLITE=y" > tup.config
}
do_build() {
# build tup for host arch using a script
CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
./build.sh
# build tup for target arch using the previous build (boostrapping)
./build/tup generate script.sh
sed -i 's#../lua/lua #../../build/lua #' script.sh
./script.sh
}
do_install() {
vbin tup
vman tup.1
}