mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-14 11:00:36 +02:00
gnu: tup: Update to 0.8.
* gnu/packages/build-tools.scm (tup): Update to 0.8. Use gexps. <source>: Update URL. Remove patch. <phases>: Adjust. <inputs>: Update pcre to pcre2. Add libinih. <license>: Add Lua license. * gnu/local.mk: Unregister patch. * gnu/packages/patches/tup-unbundle-dependencies.patch: Delete file. Change-Id: If8e55455bbf0dedc70611caf3247e169ad59c4d2 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
8e560da174
commit
a97c086e01
3 changed files with 62 additions and 113 deletions
|
@ -2342,7 +2342,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/transmission-4.0.6-fix-build.patch \
|
%D%/packages/patches/transmission-4.0.6-fix-build.patch \
|
||||||
%D%/packages/patches/trytond-add-guix_trytond_path.patch \
|
%D%/packages/patches/trytond-add-guix_trytond_path.patch \
|
||||||
%D%/packages/patches/ttf2eot-cstddef.patch \
|
%D%/packages/patches/ttf2eot-cstddef.patch \
|
||||||
%D%/packages/patches/tup-unbundle-dependencies.patch \
|
|
||||||
%D%/packages/patches/turbovnc-custom-paths.patch \
|
%D%/packages/patches/turbovnc-custom-paths.patch \
|
||||||
%D%/packages/patches/turbovnc-find-system-packages.patch \
|
%D%/packages/patches/turbovnc-find-system-packages.patch \
|
||||||
%D%/packages/patches/tuxpaint-stamps-path.patch \
|
%D%/packages/patches/tuxpaint-stamps-path.patch \
|
||||||
|
|
|
@ -607,39 +607,56 @@ software.")
|
||||||
(define-public tup
|
(define-public tup
|
||||||
(package
|
(package
|
||||||
(name "tup")
|
(name "tup")
|
||||||
(version "0.7.11")
|
(version "0.8")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "http://gittup.org/tup/releases/tup-v"
|
(uri (string-append "https://gittup.org/tup/releases/tup-v"
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1157qfnhjakm3h07y7h38lrjw5650gkif34k30bnrsypmwl5xyzb"))
|
"1yv60apd8dsigb74cjw1nzvqqqpjbsxz1i9dhq24jdkjwgsra3w4"))
|
||||||
(patches (search-patches "tup-unbundle-dependencies.patch"))
|
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
;; NOTE: Tup uses a slightly modified Lua, so it cannot be
|
;; NOTE: Tup uses a slightly modified Lua, so it cannot be
|
||||||
;; unbundled. See: src/lula/tup-lua.patch
|
;; unbundled. See: src/lua/tup-lua.patch
|
||||||
(delete-file-recursively "src/pcre")
|
(delete-file-recursively "src/pcre")
|
||||||
(delete-file-recursively "src/sqlite3")
|
(delete-file-recursively "src/sqlite3")
|
||||||
#t))))
|
(delete-file-recursively "src/inih")
|
||||||
|
;; ldpreload Used only on BSD. Deleting to avoid putting
|
||||||
|
;; license:bsd-2 in the licenses field
|
||||||
|
(delete-file-recursively "src/ldpreload")))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
;; There is a bootstrap script, but it doesn't do what you think - it
|
;; There is a bootstrap script, but it doesn't do what you think - it
|
||||||
;; builds tup.
|
;; builds tup.
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda _
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "src/tup/link.sh"
|
(substitute* "build.sh"
|
||||||
(("`git describe`") ,version))
|
;; LDFLAGS
|
||||||
|
(("-lm") "-lm -lsqlite3 -linih `pcre2-config --libs8`")
|
||||||
|
;; CFLAGS
|
||||||
|
(("-DHAVE_CONFIG_H") "-DHAVE_CONFIG_H `pcre2-config --cflags`")
|
||||||
|
;; Don't build bundled inih and pcre
|
||||||
|
(("\\.\\./src/inih/ini\\.c \\.\\./src/pcre/\\*\\.c") "")
|
||||||
|
;; Don't build bundled sqlite3
|
||||||
|
(("\\$CC \\$CFLAGS -c \\.\\./src/sqlite3/sqlite3\\.c.*") ""))
|
||||||
|
(substitute* "src/tup/option.c"
|
||||||
|
(("\"ini.h\"") "<ini.h>"))
|
||||||
|
(substitute* '("src/tup/tupid.h"
|
||||||
|
"src/tup/db.c")
|
||||||
|
(("sqlite3/sqlite3.h")
|
||||||
|
(search-input-file inputs "include/sqlite3.h")))
|
||||||
(with-output-to-file "tup.config"
|
(with-output-to-file "tup.config"
|
||||||
(lambda _
|
(lambda _
|
||||||
(format #t "CONFIG_TUP_USE_SYSTEM_SQLITE=y~%")))
|
(format #t (string-append "CONFIG_TUP_USE_SYSTEM_SQLITE=y~%"
|
||||||
#t))
|
"CONFIG_TUP_USE_SYSTEM_PCRE=y~%"
|
||||||
(delete 'check)
|
"CONFIG_TUP_USE_SYSTEM_INIH=y~%"))))))
|
||||||
|
(delete 'check) ; Most tests require fuse to be setup
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Based on bootstrap-nofuse.sh, but with a detour to patch-shebang.
|
;; Based on bootstrap-nofuse.sh, but with a detour to patch-shebang.
|
||||||
|
@ -660,12 +677,9 @@ software.")
|
||||||
(mkdir-p ftdetect)
|
(mkdir-p ftdetect)
|
||||||
(with-output-to-file (string-append ftdetect "/tup.vim")
|
(with-output-to-file (string-append ftdetect "/tup.vim")
|
||||||
(lambda _
|
(lambda _
|
||||||
(display "au BufNewFile,BufRead Tupfile,*.tup setf tup")))
|
(display "au BufNewFile,BufRead Tupfile,*.tup setf tup")))))))))
|
||||||
#t))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list fuse pcre
|
(list fuse libinih pcre2 sqlite))
|
||||||
`(,pcre "bin") ; pcre-config
|
|
||||||
sqlite))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list pkg-config))
|
(list pkg-config))
|
||||||
(home-page "https://gittup.org/tup/")
|
(home-page "https://gittup.org/tup/")
|
||||||
|
@ -675,7 +689,9 @@ graphs of commands to be executed. Tup instruments your build to detect the
|
||||||
exact dependencies of the commands, allowing you to take advantage of ideal
|
exact dependencies of the commands, allowing you to take advantage of ideal
|
||||||
parallelism during incremental builds, and detecting any situations where
|
parallelism during incremental builds, and detecting any situations where
|
||||||
a build worked by accident.")
|
a build worked by accident.")
|
||||||
(license license:gpl2)))
|
(license (list
|
||||||
|
license:gpl2
|
||||||
|
license:x11)))) ; src/lua
|
||||||
|
|
||||||
(define-public osc
|
(define-public osc
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
Allow building tup after removing some bundled sources from the source
|
|
||||||
tree.
|
|
||||||
|
|
||||||
diff --git a/build.sh b/build.sh
|
|
||||||
index 2937116d..eab650f7 100755
|
|
||||||
--- a/build.sh
|
|
||||||
+++ b/build.sh
|
|
||||||
@@ -16,7 +16,7 @@ else
|
|
||||||
echo "Error: invalid TUP_SERVER \"$server\"" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
-LDFLAGS="$LDFLAGS -lm"
|
|
||||||
+LDFLAGS="$LDFLAGS -lm -lsqlite3 `pcre-config --libs`"
|
|
||||||
: ${CC:=gcc}
|
|
||||||
case "$os" in
|
|
||||||
Linux)
|
|
||||||
@@ -65,17 +65,15 @@ mkdir luabuiltin
|
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -DTUP_SERVER=\"$server\""
|
|
||||||
CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
|
|
||||||
+CFLAGS="$CFLAGS `pcre-config --cflags`"
|
|
||||||
|
|
||||||
-for i in ../src/tup/*.c ../src/tup/tup/main.c ../src/tup/monitor/null.c ../src/tup/flock/fcntl.c ../src/inih/ini.c ../src/pcre/*.c $plat_files; do
|
|
||||||
+for i in ../src/tup/*.c ../src/tup/tup/main.c ../src/tup/monitor/null.c ../src/tup/flock/fcntl.c ../src/inih/ini.c $plat_files; do
|
|
||||||
echo " bootstrap CC $CFLAGS $i"
|
|
||||||
# Put -I. first so we find our new luabuiltin.h file, not one built
|
|
||||||
# by a previous 'tup upd'.
|
|
||||||
- $CC $CFLAGS -c $i -I. -I../src -I../src/pcre $plat_cflags
|
|
||||||
+ $CC $CFLAGS -c $i -I. -I../src $plat_cflags
|
|
||||||
done
|
|
||||||
|
|
||||||
-echo " bootstrap CC $CFLAGS ../src/sqlite3/sqlite3.c"
|
|
||||||
-$CC $CFLAGS -c ../src/sqlite3/sqlite3.c -DSQLITE_TEMP_STORE=2 -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $plat_cflags
|
|
||||||
-
|
|
||||||
echo " bootstrap LD tup $LDFLAGS"
|
|
||||||
echo "const char *tup_version(void) {return \"$label\";}" | $CC -x c -c - -o tup_version.o
|
|
||||||
$CC *.o -o tup -lpthread $plat_ldflags $LDFLAGS
|
|
||||||
diff --git a/src/tup/db.c b/src/tup/db.c
|
|
||||||
index 55ee3edd..9bdf7a80 100644
|
|
||||||
--- a/src/tup/db.c
|
|
||||||
+++ b/src/tup/db.c
|
|
||||||
@@ -46,7 +46,7 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
-#include "sqlite3/sqlite3.h"
|
|
||||||
+#include <sqlite3.h>
|
|
||||||
|
|
||||||
#define DB_VERSION 17
|
|
||||||
#define PARSER_VERSION 12
|
|
||||||
diff --git a/src/tup/tupid.h b/src/tup/tupid.h
|
|
||||||
index 7b36ae46..19aed438 100644
|
|
||||||
--- a/src/tup/tupid.h
|
|
||||||
+++ b/src/tup/tupid.h
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#ifndef tup_tupid_h
|
|
||||||
#define tup_tupid_h
|
|
||||||
|
|
||||||
-#include "sqlite3/sqlite3.h"
|
|
||||||
+#include <sqlite3.h>
|
|
||||||
|
|
||||||
typedef sqlite3_int64 tupid_t;
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue