Skip to content
Snippets Groups Projects
Commit 25bb4c35 authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #61 from ids1024/xz

Add recipe for xz
parents 3faf9753 2aa8d85a
No related branches found
No related tags found
No related merge requests found
diff -ru source/src/xz/file_io.c source-new/src/xz/file_io.c
--- source/src/xz/file_io.c 2016-12-30 03:13:57.000000000 -0800
+++ source-new/src/xz/file_io.c 2017-08-08 12:34:08.453700076 -0700
@@ -17,7 +17,7 @@
#ifdef TUKLIB_DOSLIKE
# include <io.h>
#else
-# include <poll.h>
+//# include <poll.h>
static bool warn_fchown;
#endif
@@ -222,7 +222,7 @@
#endif // ENABLE_SANDBOX
-#ifndef TUKLIB_DOSLIKE
+#if 0
/// \brief Waits for input or output to become available or for a signal
///
/// This uses the self-pipe trick to avoid a race condition that can occur
@@ -704,6 +704,7 @@
// If it is something else than a regular file, wait until
// there is input available. This way reading from FIFOs
// will work when open() is used with O_NONBLOCK.
+#if 0
if (!S_ISREG(pair->src_st.st_mode)) {
signals_unblock();
const io_wait_ret ret = io_wait(pair, -1, true);
@@ -713,6 +714,7 @@
goto error;
}
#endif
+#endif
#ifdef HAVE_POSIX_FADVISE
// It will fail with some special files like FIFOs but that is fine.
@@ -1127,7 +1129,7 @@
continue;
}
-#ifndef TUKLIB_DOSLIKE
+#if 0
if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
const io_wait_ret ret = io_wait(pair,
mytime_get_flush_timeout(),
@@ -1215,7 +1217,7 @@
continue;
}
-#ifndef TUKLIB_DOSLIKE
+#if 0
if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
if (io_wait(pair, -1, false) == IO_WAIT_MORE)
continue;
diff -ru source/src/common/tuklib_open_stdxxx.c source-new/src/common/tuklib_open_stdxxx.c
--- source/src/common/tuklib_open_stdxxx.c 2016-12-30 03:08:20.000000000 -0800
+++ source-new/src/common/tuklib_open_stdxxx.c 2017-08-08 12:38:10.703829409 -0700
@@ -35,8 +35,8 @@
// writing to stdin would fail. However, /dev/full
// is Linux specific, and if the program tries to
// write to stdin, there's already a problem anyway.
- const int fd = open("/dev/null", O_NOCTTY
- | (i == 0 ? O_WRONLY : O_RDONLY));
+ const int fd = open("/dev/null",
+ (i == 0 ? O_WRONLY : O_RDONLY));
if (fd != i) {
if (fd != -1)
diff -ru source/src/xz/message.c source-new/src/xz/message.c
--- source/src/xz/message.c 2016-12-30 03:08:20.000000000 -0800
+++ source-new/src/xz/message.c 2017-08-08 12:44:30.584447139 -0700
@@ -135,7 +135,7 @@
}
*/
-#ifdef SIGALRM
+#if 0
// Establish the signal handlers which set a flag to tell us that
// progress info should be updated.
struct sigaction sa;
diff -ru source/src/xz/signals.c source-new/src/xz/signals.c
--- source/src/xz/signals.c 2016-12-30 03:08:20.000000000 -0800
+++ source-new/src/xz/signals.c 2017-08-08 12:41:59.624111395 -0700
@@ -53,6 +53,7 @@
extern void
signals_init(void)
{
+#if 0
// List of signals for which we establish the signal handler.
static const int sigs[] = {
SIGINT,
@@ -112,6 +113,7 @@
signals_are_initialized = true;
return;
+#endif
}
@@ -152,6 +154,7 @@
extern void
signals_exit(void)
{
+#if 0
const int sig = exit_signal;
if (sig != 0) {
@@ -171,6 +174,7 @@
}
return;
+#endif
}
#else
diff -ru source/src/xz/file_io.c source-new/src/xz/file_io.c
--- source/src/xz/file_io.c 2016-12-30 03:13:57.000000000 -0800
+++ source-new/src/xz/file_io.c 2017-08-08 12:49:15.225290972 -0700
@@ -351,7 +351,7 @@
io_copy_attrs(const file_pair *pair)
{
// Skip chown and chmod on Windows.
-#ifndef TUKLIB_DOSLIKE
+#if 0
// This function is more tricky than you may think at first.
// Blindly copying permissions may permit users to access the
// destination file who didn't have permission to access the
VERSION=5.2.3
TAR=https://tukaani.org/xz/xz-$VERSION.tar.gz
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
./configure --host=${HOST} --prefix=/ --enable-threads=no
make
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
rm -rf "$dest/share"
skip=1
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment