From 76942dd85a461c8daaf0c3ea4da104a5df892346 Mon Sep 17 00:00:00 2001 From: Julien Dehos Date: Fri, 23 Sep 2016 23:17:11 +0200 Subject: [PATCH] New package: tup-0.7.5 Closes: #4826 [via git-merge-pr] --- srcpkgs/tup/patches/aarch64.patch | 22 +++++++++++++++++++ srcpkgs/tup/template | 36 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 srcpkgs/tup/patches/aarch64.patch create mode 100644 srcpkgs/tup/template diff --git a/srcpkgs/tup/patches/aarch64.patch b/srcpkgs/tup/patches/aarch64.patch new file mode 100644 index 00000000000..ba048ff4731 --- /dev/null +++ b/srcpkgs/tup/patches/aarch64.patch @@ -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: diff --git a/srcpkgs/tup/template b/srcpkgs/tup/template new file mode 100644 index 00000000000..0fc35986256 --- /dev/null +++ b/srcpkgs/tup/template @@ -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 " +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 +}