mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
Merge branch 'package-lz4' into 'master'
Package archives/lz4 See merge request redox-os/cookbook!428
This commit is contained in:
commit
6efa4b7dba
18
recipes/archives/lz4/recipe.toml
Normal file
18
recipes/archives/lz4/recipe.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[source]
|
||||
tar = "https://github.com/lz4/lz4/releases/download/v1.10.0/lz4-1.10.0.tar.gz"
|
||||
blake3 = "3e69fd475e7852e17594985528b5232afeba7d3d56cfebe2e89071768b2ab36a"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
|
||||
# No configure provided
|
||||
COOKBOOK_CONFIGURE="true"
|
||||
COOKBOOK_CONFIGURE_FLAGS=""
|
||||
|
||||
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
|
||||
|
||||
cookbook_configure
|
||||
"""
|
||||
34
recipes/archives/lz4/redox.patch
Normal file
34
recipes/archives/lz4/redox.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff '--color=auto' -ruwN source/programs/util.h source-new/programs/util.h
|
||||
--- source/programs/util.h 2024-07-21 13:29:49.000000000 -0400
|
||||
+++ source-new/programs/util.h 2024-12-13 02:21:03.032769559 -0500
|
||||
@@ -52,6 +52,9 @@
|
||||
#include <time.h> /* time */
|
||||
#include <limits.h> /* INT_MAX */
|
||||
#include <errno.h>
|
||||
+#if defined(_REDOX)
|
||||
+# include <sys/time.h> /* utimes */
|
||||
+#endif
|
||||
|
||||
|
||||
|
||||
@@ -239,12 +242,20 @@
|
||||
timebuf.modtime = statbuf->st_mtime;
|
||||
res += utime(filename, &timebuf); /* set access and modification times */
|
||||
#else
|
||||
+ #if defined(_REDOX)
|
||||
+ struct timeval timebuf[2];
|
||||
+ memset(timebuf, 0, sizeof(timebuf));
|
||||
+ timebuf[0].tv_usec = UTIME_NOW;
|
||||
+ timebuf[1].tv_sec = statbuf->st_mtime;
|
||||
+ res += utimes(filename, timebuf);
|
||||
+ #else
|
||||
struct timespec timebuf[2];
|
||||
memset(timebuf, 0, sizeof(timebuf));
|
||||
timebuf[0].tv_nsec = UTIME_NOW;
|
||||
timebuf[1].tv_sec = statbuf->st_mtime;
|
||||
res += utimensat(AT_FDCWD, filename, timebuf, 0); /* set access and modification times */
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if !defined(_WIN32)
|
||||
@ -1,6 +0,0 @@
|
||||
#TODO missing script for "make", see https://github.com/lz4/lz4#installation
|
||||
[source]
|
||||
git = "https://github.com/lz4/lz4"
|
||||
rev = "5ff839680134437dbf4678f3d0c7b371d84f4964"
|
||||
[build]
|
||||
template = "custom"
|
||||
Loading…
Reference in New Issue
Block a user