akira-unstable: 2019-10-12 -> 2020-05-01
This commit is contained in:
parent
9893f64b57
commit
c9c29390c7
|
@ -23,13 +23,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "akira";
|
pname = "akira";
|
||||||
version = "2019-10-12";
|
version = "2020-05-01";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "akiraux";
|
owner = "akiraux";
|
||||||
repo = "Akira";
|
repo = "Akira";
|
||||||
rev = "cab952dee4591b6bde34d670c1f853f5a3ff6b19";
|
rev = "87c495fa0a686b1e9b84aff7d9c0a9553da2c466";
|
||||||
sha256 = "1fp3a79hkh6xwwqqdrx4zqq2zhsm236c6fhhl5f2nmi108yxz04q";
|
sha256 = "0ikz6dyx0z2wqskas628hbrbhx3z5gy7i4acrvspfhhg6rk88aqd";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -59,8 +59,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
mesonFlags = [ "-Dprofile=default" ];
|
mesonFlags = [ "-Dprofile=default" ];
|
||||||
|
|
||||||
patches = [ ./fix-build-with-vala-0-44-or-later.patch ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
chmod +x build-aux/meson/post_install.py
|
chmod +x build-aux/meson/post_install.py
|
||||||
patchShebangs build-aux/meson/post_install.py
|
patchShebangs build-aux/meson/post_install.py
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
From bcda8fd53f6f232db0b6411269ba108af551629f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alberto Fanjul <albertofanjul@gmail.com>
|
|
||||||
Date: Tue, 9 Apr 2019 09:45:36 +0200
|
|
||||||
Subject: [PATCH] Build on vala >= 0.44.2
|
|
||||||
|
|
||||||
---
|
|
||||||
src/FileFormat/JsonObject.vala | 2 +-
|
|
||||||
src/FileFormat/JsonObjectArray.vala | 2 +-
|
|
||||||
src/FileFormat/ZipArchiveHandler.vala | 18 +++++++++++++++++-
|
|
||||||
3 files changed, 19 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/FileFormat/JsonObject.vala b/src/FileFormat/JsonObject.vala
|
|
||||||
index 7bfe46f..805fbad 100644
|
|
||||||
--- a/src/FileFormat/JsonObject.vala
|
|
||||||
+++ b/src/FileFormat/JsonObject.vala
|
|
||||||
@@ -31,7 +31,7 @@ public abstract class Akira.FileFormat.JsonObject : GLib.Object {
|
|
||||||
|
|
||||||
private ObjectClass obj_class;
|
|
||||||
|
|
||||||
- public JsonObject.from_object (Json.Object object) {
|
|
||||||
+ protected JsonObject.from_object (Json.Object object) {
|
|
||||||
Object (object: object);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/FileFormat/JsonObjectArray.vala b/src/FileFormat/JsonObjectArray.vala
|
|
||||||
index 4f6e573..d0a7dad 100644
|
|
||||||
--- a/src/FileFormat/JsonObjectArray.vala
|
|
||||||
+++ b/src/FileFormat/JsonObjectArray.vala
|
|
||||||
@@ -31,7 +31,7 @@ public abstract class Akira.FileFormat.JsonObjectArray : Object {
|
|
||||||
*
|
|
||||||
* Your JsonObject implementation should have it's own list of items
|
|
||||||
*/
|
|
||||||
- public JsonObjectArray (Json.Object object, string property_name) {
|
|
||||||
+ protected JsonObjectArray (Json.Object object, string property_name) {
|
|
||||||
Object (object: object, property_name: property_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/FileFormat/ZipArchiveHandler.vala b/src/FileFormat/ZipArchiveHandler.vala
|
|
||||||
index ca60dd0..5d65aa2 100644
|
|
||||||
--- a/src/FileFormat/ZipArchiveHandler.vala
|
|
||||||
+++ b/src/FileFormat/ZipArchiveHandler.vala
|
|
||||||
@@ -262,11 +262,17 @@ public class Akira.FileFormat.ZipArchiveHandler : GLib.Object {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ Posix.off_t offset;
|
|
||||||
+#if VALA_0_42
|
|
||||||
+ uint8[] buffer;
|
|
||||||
+ while (archive.read_data_block (out buffer, out offset) == Archive.Result.OK) {
|
|
||||||
+ if (extractor.write_data_block (buffer, offset) != Archive.Result.OK) {
|
|
||||||
+#else
|
|
||||||
void* buffer = null;
|
|
||||||
size_t buffer_length;
|
|
||||||
- Posix.off_t offset;
|
|
||||||
while (archive.read_data_block (out buffer, out buffer_length, out offset) == Archive.Result.OK) {
|
|
||||||
if (extractor.write_data_block (buffer, buffer_length, offset) != Archive.Result.OK) {
|
|
||||||
+#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -316,9 +322,15 @@ public class Akira.FileFormat.ZipArchiveHandler : GLib.Object {
|
|
||||||
// Add an entry to the archive
|
|
||||||
Archive.Entry entry = new Archive.Entry ();
|
|
||||||
entry.set_pathname (initial_folder.get_relative_path (current_file));
|
|
||||||
+#if VALA_0_42
|
|
||||||
+ entry.set_size ((Archive.int64_t) file_info.get_size ());
|
|
||||||
+ entry.set_filetype (Archive.FileType.IFREG);
|
|
||||||
+ entry.set_perm (Archive.FileType.IFREG);
|
|
||||||
+#else
|
|
||||||
entry.set_size (file_info.get_size ());
|
|
||||||
entry.set_filetype ((uint) Posix.S_IFREG);
|
|
||||||
entry.set_perm (0644);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (archive.write_header (entry) != Archive.Result.OK) {
|
|
||||||
critical ("Error writing '%s': %s (%d)", current_file.get_path (), archive.error_string (), archive.errno ());
|
|
||||||
@@ -333,7 +345,11 @@ public class Akira.FileFormat.ZipArchiveHandler : GLib.Object {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if VALA_0_42
|
|
||||||
+ archive.write_data (buffer[0:bytes_read]);
|
|
||||||
+#else
|
|
||||||
archive.write_data (buffer, bytes_read);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue