Debian Codegraph @

debian/patches/kfreebsd_inotify

raw
1 Description: <short summary of the patch>
2 TODO: Put a short summary on the line above and replace this paragraph
3 with a longer explanation of this change. Complete the meta-information
4 with other relevant fields (see below for details). To make it easier, the
5 information below has been extracted from the changelog. Adjust it or drop
6 it.
7 .
8 katarakt (0.1-3~bpo8+1) jessie-backports; urgency=medium
9 .
10 * Rebuild for jessie-backports.
11 Author: Christoph Egger <[email protected]>
12
13 ---
14 The information above should follow the Patch Tagging Guidelines, please
15 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
16 are templates for supplementary fields that you might want to add:
17
18 Origin: <vendor|upstream|other>, <url of original patch>
19 Bug: <url in upstream bugtracker>
20 Bug-Debian: https://bugs.debian.org/<bugnumber>
21 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
22 Forwarded: <no|not-needed|url proving that it has been forwarded>
23 Reviewed-By: <name and email of someone who approved the patch>
24 Last-Update: <YYYY-MM-DD>
25
26 Index: katarakt/src/resourcemanager.cpp
27 ===================================================================
28 --- katarakt.orig/src/resourcemanager.cpp
29 +++ katarakt/src/resourcemanager.cpp
30 @@ -4,7 +4,7 @@
31 #include <unistd.h>
32 #include <QSocketNotifier>
33 #include <QFileInfo>
34 -#ifdef __linux__
35 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
36 #include <sys/inotify.h>
37 #endif
38 #include "resourcemanager.h"
39 @@ -27,7 +27,7 @@ ResourceManager::ResourceManager(const Q
40 doc(NULL),
41 center_page(0),
42 rotation(0),
43 -#ifdef __linux__
44 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
45 i_notifier(NULL),
46 #endif
47 inverted_colors(false),
48 @@ -58,7 +58,7 @@ void ResourceManager::initialize(const Q
49 worker->start();
50
51 // setup inotify
52 -#ifdef __linux__
53 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
54 QFileInfo info(file);
55 inotify_fd = inotify_init();
56 if (inotify_fd == -1) {
57 @@ -142,7 +142,7 @@ void ResourceManager::shutdown() {
58 garbageMutex.unlock();
59 requests.clear();
60 requestSemaphore.acquire(requestSemaphore.available());
61 -#ifdef __linux__
62 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
63 ::close(inotify_fd);
64 delete i_notifier;
65 i_notifier = NULL;
66 @@ -345,7 +345,7 @@ Poppler::LinkDestination *ResourceManage
67 }
68
69 void ResourceManager::inotify_slot() {
70 -#ifdef __linux__
71 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
72 i_notifier->setEnabled(false);
73
74 size_t event_size = sizeof(struct inotify_event) + NAME_MAX + 1;
75 --- katarakt-0.1.orig/src/resourcemanager.h
76 +++ katarakt-0.1/src/resourcemanager.h
77 @@ -101,7 +101,7 @@ private:
78 int page_count;
79 int rotation;
80
81 -#ifdef __linux__
82 +#if defined(__linux__) || defined(__FreeBSD_kernel__)
83 int inotify_fd;
84 int inotify_wd;
85 QSocketNotifier *i_notifier;
86 --- katarakt-0.1.orig/katarakt.pro
87 +++ katarakt-0.1/katarakt.pro
88 @@ -22,7 +22,7 @@ SOURCES += src/main.cpp \
89 src/viewer.cpp src/canvas.cpp src/resourcemanager.cpp src/grid.cpp src/search.cpp src/gotoline.cpp src/config.cpp \
90 src/download.cpp src/util.cpp src/kpage.cpp src/worker.cpp src/beamerwindow.cpp src/toc.cpp src/splitter.cpp \
91 src/selection.cpp src/dbus/source_correlate.cpp src/dbus/dbus.cpp
92 -unix:LIBS += -lpoppler-qt4
93 +unix:LIBS += -lpoppler-qt4 -linotify
94
95 documentation.target = doc/katarakt.1
96 documentation.depends = doc/katarakt.txt