From 99daec976a4c461ee5391f1dbf0ebf583774ecf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Fri, 17 Apr 2020 21:34:01 +0200 Subject: [PATCH] tup: fix mips* build --- srcpkgs/tup/patches/mips.patch | 22 ++++++++++++++++++++++ srcpkgs/tup/template | 1 + 2 files changed, 23 insertions(+) create mode 100644 srcpkgs/tup/patches/mips.patch diff --git a/srcpkgs/tup/patches/mips.patch b/srcpkgs/tup/patches/mips.patch new file mode 100644 index 00000000000..9d09e0dd03a --- /dev/null +++ b/srcpkgs/tup/patches/mips.patch @@ -0,0 +1,22 @@ +--- src/tup/platform.c 2018-09-27 22:18:09.000000000 +0200 ++++ src/tup/platform.c 2020-04-17 18:15:04.968819165 +0200 +@@ -56,6 +56,8 @@ + const char *tup_arch = "arm"; + #elif __aarch64__ + const char *tup_arch = "arm64"; ++#elif __mips__ ++const char *tup_arch = "mips"; + #else + #error Unsupported cpu architecture. Please add support in tup/platform.c + #endif +--- tup.1 2018-09-27 22:18:09.000000000 +0200 ++++ tup.1 2020-04-17 18:16:08.702822453 +0200 +@@ -755,7 +755,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", "arm64", 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", "arm64", "arm", or "mips". + + .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 index 8315c259bc7..51f8ab3df83 100644 --- a/srcpkgs/tup/template +++ b/srcpkgs/tup/template @@ -17,6 +17,7 @@ do_configure() { sed -i "1iCFLAGS=${CFLAGS}" Tuprules.tup sed -i "1iLDFLAGS=${LDFLAGS}" Tuprules.tup echo "CONFIG_TUP_USE_SYSTEM_SQLITE=y" > tup.config + echo "CONFIG_TUP_USE_SYSTEM_PCRE=y" >> tup.config } do_build() {