summaryrefslogtreecommitdiff
path: root/dev-libs/sway
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-28 04:06:07 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-28 04:06:07 +0000
commitccf84bcd604130256d1377cd58f0a634ae6ee20f (patch)
treef42a709e0c7805183f5680883bc76dc935b7a0cc /dev-libs/sway
parentc85a90f90521c7e11d618b527d6630cc64cecbd4 (diff)
gentoo resync : 28.12.2017
Diffstat (limited to 'dev-libs/sway')
-rw-r--r--dev-libs/sway/Manifest5
-rw-r--r--dev-libs/sway/files/sway-0.15.0-json-c-fixes.patch370
-rw-r--r--dev-libs/sway/sway-0.15.0.ebuild2
-rw-r--r--dev-libs/sway/sway-9999.ebuild2
4 files changed, 377 insertions, 2 deletions
diff --git a/dev-libs/sway/Manifest b/dev-libs/sway/Manifest
index 41dd9d6c2f5a..34e4770ce060 100644
--- a/dev-libs/sway/Manifest
+++ b/dev-libs/sway/Manifest
@@ -1,6 +1,7 @@
+AUX sway-0.15.0-json-c-fixes.patch 11281 BLAKE2B 85da7be6f1179c6177f982048da54eec994a0266f1f351ea17c63aebca18d43aa7d9693dbe2d4e10270d1d33a895caf6ed111a0737a677783d090feae33b6944 SHA512 29ffd1a613f43d0dc706c2cdc3196691dffb7cf1f855a42cb638492d1e563068db9f0d6cd65a722677f0657c8d110e84373c22e603fb819fb64d1767813dd11d
DIST sway-0.14.0.tar.gz 5376243 BLAKE2B 9990db2d0a17831ac55669236533737a3422a8cb8faa338acae3e897586e410bb95f83f395462332889886be148d0151cad5465bce7786bc8e1a1aa3ceba721c SHA512 2c2e45ddc935504bd240288386662d05f284eb0d540e05b6e56ca577e9b1f2303929b9659eaa3cb99b8cdadb60bd1bfa4104624bf2574e41365e1b3df5361410
DIST sway-0.15.0.tar.gz 5394917 BLAKE2B 40b12e4c276bda3f6364f1a8d9f55604535632ce0186c0706ff6020bc6ff1b8f5b4b560ae52d281f5cc549547c7f1455bcf30e9b854db26b231e68e648819905 SHA512 2ac448f16cae83563b4ed7039b355c238cdf45bf16af58002c56781fbbac640a5b61b2fd05eb8bcfea5cc06a65707a48e093a68e80be44c14cf1d5d0a9410331
EBUILD sway-0.14.0.ebuild 1906 BLAKE2B aba3a6e43bf908e01ef087b407fe6396bb2fe8212ce6d72398aa0828ce64de2a5f75b0b204a0ad2fe2a254a174577158857c5816754102e4eff58305d5546ff9 SHA512 1f9d9f4706d2334f04d088330b977269cbf917c0a9e5e2c99b311ec29127c8daa88d69b27a3e4002729d42a5ee172deada44c5e307a9e4496d7dcbc84355545d
-EBUILD sway-0.15.0.ebuild 1930 BLAKE2B 56767e8d8d105cd96a7b4c45315b6c14dbccffb59afd69643ab4a7ba6cb4568c3a738f00b415ab681efb48ae00ff56bf1811ab01bed64f456caa849404e392fd SHA512 3eb9da2a95b3cf737605b41e96ce2598a453285e3ec3563020dad6baf8ab8ee9f8f42c058a48e8d194c7cc3d67660934f370d00bf01b3057ab63b9860d3431a7
-EBUILD sway-9999.ebuild 1878 BLAKE2B 7c3745bc07b3656f78c11519ba6026f3c9a1e3fd69cf1a6cc6212f590d989c4ef508bb9d655833e063e7e9426c352da82d9d7b6100190c3122bf10ae9fc63fbe SHA512 e5ca4c3664bf89029d42e83777892bafd5afdc9c82e9842aef744abbd7e85f9c6f8a538d2a350dc1c2655340f46a81dcb93699ea8cd564feef9bb294d13caea6
+EBUILD sway-0.15.0.ebuild 1988 BLAKE2B 6e3899699af109735744ad82c3378de89538d0c64facc80b8e019d7ef15c876384a5d52e1a3dfd26b55a2425b30af9f9c3b38447b4faec249871b85088a5d826 SHA512 cf97d366c9de0de7edc7f162c39b41dad039b5105c61e2577915d9e80578a050f9d83053bcdf1826e2e80e1600c1bd9e74b28ec2f19d06a0637b421698727ad8
+EBUILD sway-9999.ebuild 1936 BLAKE2B eb363ec691e8b51714a497a27decdb685de670c23215e9070a753a37a39c170213d70604248c2881e773d95f514b696512dd03533bee98fd700071829023328e SHA512 6712f338c32dc43f67d28f7cb560c2190544922a092cfe91e9d1dfdc7b2f0d0b66c106d765931e44008094d548fd380e8a7ec45fcd30df683958525519ea23fd
MISC metadata.xml 1756 BLAKE2B 98c5ea811df7218a945de7d8ae3891692ae7fa137f320ab316f985c99ac288ac62fe006879cdd539f48ea9207a953434f3a5dbaf815f32a40a5c7ff73376c594 SHA512 c66066c76ea1c1cbbdf79664fdd123d22a681e82bfa5c3ffe92ae12fd6fd4adaf51d12767b3ca4e2f88405df59a386e7dfe8f9f5a8fd382918b7566f6461d27a
diff --git a/dev-libs/sway/files/sway-0.15.0-json-c-fixes.patch b/dev-libs/sway/files/sway-0.15.0-json-c-fixes.patch
new file mode 100644
index 000000000000..1e43eda62e81
--- /dev/null
+++ b/dev-libs/sway/files/sway-0.15.0-json-c-fixes.patch
@@ -0,0 +1,370 @@
+From c6e12368a531dd4bbb0778c9a1dd5d3fb935c197 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
+Date: Thu, 14 Dec 2017 01:30:54 +0100
+Subject: [PATCH 1/3] Lift restriction on json-c <= 0.12.1
+
+---
+ CMakeLists.txt | 2 +-
+ README.de.md | 2 +-
+ README.el.md | 2 +-
+ README.fr.md | 2 +-
+ README.it.md | 2 +-
+ README.ja.md | 2 +-
+ README.md | 2 +-
+ README.pt.md | 2 +-
+ README.ru.md | 2 +-
+ README.uk.md | 2 +-
+ 10 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dc521570..bd12b191 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,7 +59,7 @@ if (LD_LIBRARY_PATH)
+ add_definitions(-D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}")
+ endif()
+
+-find_package(JsonC 0.12.1 REQUIRED)
++find_package(JsonC REQUIRED)
+ find_package(PCRE REQUIRED)
+ find_package(WLC REQUIRED)
+ find_package(Wayland REQUIRED)
+diff --git a/README.de.md b/README.de.md
+index 701cc34f..293ffe70 100644
+--- a/README.de.md
++++ b/README.de.md
+@@ -60,7 +60,7 @@ Abhängigkeiten:
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.el.md b/README.el.md
+index df39364f..eba97b9c 100644
+--- a/README.el.md
++++ b/README.el.md
+@@ -53,7 +53,7 @@ To username μου στο Freenode είναι kon14 και θα με βρείτ
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.fr.md b/README.fr.md
+index 47b6c410..a4ff7cb9 100644
+--- a/README.fr.md
++++ b/README.fr.md
+@@ -55,7 +55,7 @@ Installez les dépendances :
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.it.md b/README.it.md
+index f5e0d8e2..ded441c3 100644
+--- a/README.it.md
++++ b/README.it.md
+@@ -56,7 +56,7 @@ Installa queste dipendenze:
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.ja.md b/README.ja.md
+index 2e8f9bfb..94b4ce9d 100644
+--- a/README.ja.md
++++ b/README.ja.md
+@@ -46,7 +46,7 @@ Swayは沢山のディストリビューションで提供されています。"
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.md b/README.md
+index 29e8a674..eeca9f88 100644
+--- a/README.md
++++ b/README.md
+@@ -61,7 +61,7 @@ Install dependencies:
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.pt.md b/README.pt.md
+index b5ca132f..e35849ec 100644
+--- a/README.pt.md
++++ b/README.pt.md
+@@ -62,7 +62,7 @@ Antes de iniciar a compilação, instale as dependências:
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.ru.md b/README.ru.md
+index 4035b0fc..1551caa0 100644
+--- a/README.ru.md
++++ b/README.ru.md
+@@ -55,7 +55,7 @@ Sway доступен во многих дистрибутивах и наход
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+diff --git a/README.uk.md b/README.uk.md
+index 2e107afc..c8520e4b 100644
+--- a/README.uk.md
++++ b/README.uk.md
+@@ -62,7 +62,7 @@ Sway доступний у багатьох дистрибутивах Linux (а
+ * libcap
+ * asciidoc
+ * pcre
+-* json-c <= 0.12.1
++* json-c
+ * pango
+ * cairo
+ * gdk-pixbuf2 *
+
+From 8272a9bae0d288b479c517dde3e831ea3889dc7f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
+Date: Thu, 14 Dec 2017 16:44:18 +0100
+Subject: [PATCH 2/3] ipc-server: Acquire ownership of referenced json_object
+ properly
+
+When adding a referenced json_object with an unknown lifetime to
+another json_object, it must be done with a wrapped call to
+json_object_get() to acquire the ownership of that json_object.
+---
+ sway/ipc-server.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sway/ipc-server.c b/sway/ipc-server.c
+index b560b930..80f4e5d0 100644
+--- a/sway/ipc-server.c
++++ b/sway/ipc-server.c
+@@ -1126,7 +1126,8 @@ static void ipc_event_binding(json_object *sb_obj) {
+ sway_log(L_DEBUG, "Sending binding::run event");
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, "change", json_object_new_string("run"));
+- json_object_object_add(obj, "binding", sb_obj);
++ // sb_obj gets owned by the temporary json_object, too.
++ json_object_object_add(obj, "binding", json_object_get(sb_obj));
+
+ const char *json_string = json_object_to_json_string(obj);
+ ipc_send_event(json_string, IPC_EVENT_BINDING);
+
+From 02da9c4e7cafb36083566e511cc7913d8922aaa6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
+Date: Thu, 14 Dec 2017 17:14:47 +0100
+Subject: [PATCH 3/3] Adaptions for API change in json-c v0.13
+
+---
+ include/sway_json_helper.h | 16 ++++++++++++++++
+ include/swaygrab/json.h | 2 +-
+ sway/ipc-server.c | 4 ++--
+ swaybar/status_line.c | 5 ++---
+ swaygrab/json.c | 9 ++++-----
+ swaylock/main.c | 4 ++--
+ swaymsg/main.c | 4 ++--
+ 7 files changed, 29 insertions(+), 15 deletions(-)
+ create mode 100644 include/sway_json_helper.h
+
+diff --git a/include/sway_json_helper.h b/include/sway_json_helper.h
+new file mode 100644
+index 00000000..66f9cff1
+--- /dev/null
++++ b/include/sway_json_helper.h
+@@ -0,0 +1,16 @@
++#ifndef _SWAY_JSON_HELPER_H
++#define _SWAY_JSON_HELPER_H
++
++#include <json-c/json.h>
++
++// Macros for checking a specific version.
++#define JSON_C_VERSION_013 (13 << 8)
++
++// json-c v0.13 uses size_t for array_list_length().
++#if defined(JSON_C_VERSION_NUM) && JSON_C_VERSION_NUM >= JSON_C_VERSION_013
++typedef size_t json_ar_len_t;
++#else
++typedef int json_ar_len_t;
++#endif
++
++#endif // _SWAY_JSON_HELPER_H
+diff --git a/include/swaygrab/json.h b/include/swaygrab/json.h
+index c1093ef1..c0bd8587 100644
+--- a/include/swaygrab/json.h
++++ b/include/swaygrab/json.h
+@@ -1,4 +1,4 @@
+-#include <json-c/json.h>
++#include "sway_json_helper.h"
+ #include "wlc/wlc.h"
+
+ void init_json_tree(int socketfd);
+diff --git a/sway/ipc-server.c b/sway/ipc-server.c
+index 80f4e5d0..e10445cf 100644
+--- a/sway/ipc-server.c
++++ b/sway/ipc-server.c
+@@ -15,7 +15,6 @@
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+-#include <json-c/json.h>
+ #include <list.h>
+ #include <libinput.h>
+ #ifdef __linux__
+@@ -25,6 +24,7 @@ struct ucred {
+ gid_t gid;
+ };
+ #endif
++#include "sway_json_helper.h"
+ #include "sway/ipc-json.h"
+ #include "sway/ipc-server.h"
+ #include "sway/security.h"
+@@ -724,7 +724,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
+ }
+
+ // parse requested event types
+- for (int i = 0; i < json_object_array_length(request); i++) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(request); i++) {
+ const char *event_type = json_object_get_string(json_object_array_get_idx(request, i));
+ if (strcmp(event_type, "workspace") == 0) {
+ client->subscribed_events |= event_mask(IPC_EVENT_WORKSPACE);
+diff --git a/swaybar/status_line.c b/swaybar/status_line.c
+index 87e90caf..e3cc0bf4 100644
+--- a/swaybar/status_line.c
++++ b/swaybar/status_line.c
+@@ -2,8 +2,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <json-c/json.h>
+
++#include "sway_json_helper.h"
+ #include "swaybar/config.h"
+ #include "swaybar/status_line.h"
+ #include "log.h"
+@@ -70,8 +70,7 @@ static void parse_json(struct bar *bar, const char *text) {
+
+ bar->status->block_line = create_list();
+
+- int i;
+- for (i = 0; i < json_object_array_length(results); ++i) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(results); ++i) {
+ json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
+ json_object *name, *instance, *separator, *separator_block_width;
+ json_object *background, *border, *border_top, *border_bottom;
+diff --git a/swaygrab/json.c b/swaygrab/json.c
+index 286085c3..f0e8fa90 100644
+--- a/swaygrab/json.c
++++ b/swaygrab/json.c
+@@ -50,8 +50,7 @@ static json_object *get_focused_container_r(json_object *c) {
+ } else {
+ json_object *nodes, *node, *child;
+ json_object_object_get_ex(c, "nodes", &nodes);
+- int i;
+- for (i = 0; i < json_object_array_length(nodes); i++) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(nodes); i++) {
+ node = json_object_array_get_idx(nodes, i);
+
+ if ((child = get_focused_container_r(node))) {
+@@ -60,7 +59,7 @@ static json_object *get_focused_container_r(json_object *c) {
+ }
+
+ json_object_object_get_ex(c, "floating_nodes", &nodes);
+- for (i = 0; i < json_object_array_length(nodes); i++) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(nodes); i++) {
+ node = json_object_array_get_idx(nodes, i);
+
+ if ((child = get_focused_container_r(node))) {
+@@ -83,7 +82,7 @@ char *get_focused_output() {
+ if (!outputs) {
+ sway_abort("Unabled to get focused output. No nodes in tree.");
+ }
+- for (int i = 0; i < json_object_array_length(outputs); i++) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(outputs); i++) {
+ output = json_object_array_get_idx(outputs, i);
+
+ if (get_focused_container_r(output)) {
+@@ -131,7 +130,7 @@ json_object *get_output_container(const char *output) {
+ json_object *outputs, *json_output, *name;
+ json_object_object_get_ex(tree, "nodes", &outputs);
+
+- for (int i = 0; i < json_object_array_length(outputs); i++) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(outputs); i++) {
+ json_output = json_object_array_get_idx(outputs, i);
+ json_object_object_get_ex(json_output, "name", &name);
+
+diff --git a/swaylock/main.c b/swaylock/main.c
+index c2615951..7b7dd601 100644
+--- a/swaylock/main.c
++++ b/swaylock/main.c
+@@ -3,7 +3,6 @@
+ #include <xkbcommon/xkbcommon.h>
+ #include <xkbcommon/xkbcommon-names.h>
+ #include <security/pam_appl.h>
+-#include <json-c/json.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -13,6 +12,7 @@
+ #include <signal.h>
+ #include <stdbool.h>
+ #include <unistd.h>
++#include "sway_json_helper.h"
+ #include "client/window.h"
+ #include "client/registry.h"
+ #include "client/cairo.h"
+@@ -584,7 +584,7 @@ int main(int argc, char **argv) {
+
+ for (i = 0; i < registry->outputs->length; ++i) {
+ if (displays_paths[i * 2] != NULL) {
+- for (int j = 0;; ++j) {
++ for (json_ar_len_t j = 0;; ++j) {
+ if (j >= json_object_array_length(json_outputs)) {
+ sway_log(L_ERROR, "%s is not an extant output", displays_paths[i * 2]);
+ exit(EXIT_FAILURE);
+diff --git a/swaymsg/main.c b/swaymsg/main.c
+index 2f9cfb14..0ee7c76f 100644
+--- a/swaymsg/main.c
++++ b/swaymsg/main.c
+@@ -9,7 +9,7 @@
+ #include <sys/socket.h>
+ #include <ctype.h>
+ #include <unistd.h>
+-#include <json-c/json.h>
++#include "sway_json_helper.h"
+ #include "stringop.h"
+ #include "ipc-client.h"
+ #include "readline.h"
+@@ -149,7 +149,7 @@ static void pretty_print_version(json_object *v) {
+ static void pretty_print_clipboard(json_object *v) {
+ if (success(v, true)) {
+ if (json_object_is_type(v, json_type_array)) {
+- for (int i = 0; i < json_object_array_length(v); ++i) {
++ for (json_ar_len_t i = 0; i < json_object_array_length(v); ++i) {
+ json_object *o = json_object_array_get_idx(v, i);
+ printf("%s\n", json_object_get_string(o));
+ }
diff --git a/dev-libs/sway/sway-0.15.0.ebuild b/dev-libs/sway/sway-0.15.0.ebuild
index 2b14a8ebf6b1..4763bcbcc74a 100644
--- a/dev-libs/sway/sway-0.15.0.ebuild
+++ b/dev-libs/sway/sway-0.15.0.ebuild
@@ -34,6 +34,8 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
app-text/asciidoc"
+PATCHES=( "${FILESDIR}/sway-0.15.0-json-c-fixes.patch" )
+
src_prepare() {
cmake-utils_src_prepare
diff --git a/dev-libs/sway/sway-9999.ebuild b/dev-libs/sway/sway-9999.ebuild
index 041564b463d5..f7250762bfe6 100644
--- a/dev-libs/sway/sway-9999.ebuild
+++ b/dev-libs/sway/sway-9999.ebuild
@@ -34,6 +34,8 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
app-text/asciidoc"
+PATCHES=( "${FILESDIR}/sway-0.15.0-json-c-fixes.patch" )
+
src_prepare() {
cmake-utils_src_prepare