akira-unstable: init at 2019-10-12

Co-authored-by: worldofpeace <worldofpeace@users.noreply.github.com>
This commit is contained in:
Oleksii Filonenko 2019-11-27 15:12:36 +02:00
parent 1b5df99e7a
commit f5257359d8
No known key found for this signature in database
GPG Key ID: F3510FE5691629A1
3 changed files with 167 additions and 1 deletions

View File

@ -0,0 +1,76 @@
{ stdenv
, lib
, fetchFromGitHub
, appstream-glib
, desktop-file-utils
, meson
, ninja
, pantheon
, pkgconfig
, python3
, vala
, vala-lint
, wrapGAppsHook
, cairo
, glib
, goocanvas2
, gtk3
, gtksourceview3
, json-glib
, libarchive
, libgee
, libxml2 }:
stdenv.mkDerivation rec {
pname = "akira";
version = "2019-10-12";
src = fetchFromGitHub {
owner = "akiraux";
repo = "Akira";
rev = "cab952dee4591b6bde34d670c1f853f5a3ff6b19";
sha256 = "1fp3a79hkh6xwwqqdrx4zqq2zhsm236c6fhhl5f2nmi108yxz04q";
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
meson
ninja
pkgconfig
python3
vala
vala-lint
wrapGAppsHook
];
buildInputs = [
cairo
glib
goocanvas2
pantheon.granite
gtk3
gtksourceview3
json-glib
libarchive
libgee
libxml2
];
mesonFlags = [ "-Dprofile=default" ];
patches = [ ./fix-build-with-vala-0-44-or-later.patch ];
postPatch = ''
chmod +x build-aux/meson/post_install.py
patchShebangs build-aux/meson/post_install.py
'';
meta = with lib; {
description = "Native Linux Design application built in Vala and GTK";
homepage = "https://github.com/akiraux/Akira";
license = licenses.gpl3;
maintainers = with maintainers; [ filalex77 ] ++ pantheon.maintainers;
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,88 @@
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
}
}
}

View File

@ -6643,7 +6643,7 @@ in
thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { }; thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { };
tiled = libsForQt5.callPackage ../applications/editors/tiled { }; tiled = libsForQt5.callPackage ../applications/editors/tiled { };
tiledb = callPackage ../development/libraries/tiledb { }; tiledb = callPackage ../development/libraries/tiledb { };
timemachine = callPackage ../applications/audio/timemachine { }; timemachine = callPackage ../applications/audio/timemachine { };
@ -17839,6 +17839,8 @@ in
airwave = callPackage ../applications/audio/airwave { }; airwave = callPackage ../applications/audio/airwave { };
akira-unstable = callPackage ../applications/graphics/akira { };
alembic = callPackage ../development/libraries/alembic {}; alembic = callPackage ../development/libraries/alembic {};
alchemy = callPackage ../applications/graphics/alchemy { }; alchemy = callPackage ../applications/graphics/alchemy { };