[arch-commits] Commit in (4 files)

Balló György bgyorgy at archlinux.org
Fri Jun 5 17:18:18 UTC 2020


    Date: Friday, June 5, 2020 @ 17:18:18
  Author: bgyorgy
Revision: 639173

Add torrential

Added:
  torrential/
  torrential/trunk/
  torrential/trunk/PKGBUILD
  torrential/trunk/no-unity.patch

----------------+
 PKGBUILD       |   69 +++++++++++++++++++++++++++++++++++++++++++++++++
 no-unity.patch |   77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 146 insertions(+)

Added: torrential/trunk/PKGBUILD
===================================================================
--- torrential/trunk/PKGBUILD	                        (rev 0)
+++ torrential/trunk/PKGBUILD	2020-06-05 17:18:18 UTC (rev 639173)
@@ -0,0 +1,69 @@
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+
+pkgname=torrential
+pkgver=1.1.0
+pkgrel=3
+pkgdesc="Simple BitTorrent client for elementary OS"
+arch=(x86_64)
+url="https://github.com/davidmhewitt/torrential"
+license=(GPL)
+depends=(granite libevent libnatpmp miniupnpc)
+makedepends=(cmake git vala)
+_commit=1d731f992e4567e102d1ffa28a0c44c4322eba76  # tags/1.1.0
+source=("git+https://github.com/davidmhewitt/torrential#commit=$_commit"
+        "transmission-torrential::git+https://github.com/davidmhewitt/transmission"
+        "git+https://github.com/transmission/dht"
+        "git+https://github.com/transmission/libb64"
+        "git+https://github.com/transmission/libevent"
+        "git+https://github.com/transmission/libnatpmp"
+        "git+https://github.com/transmission/libutp"
+        "git+https://github.com/transmission/miniupnpc"
+        "no-unity.patch")
+sha256sums=('SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            '8b279ca266c8b1643cf10ff0a66a66283be6595959720bcc321fdef0f3da6ea7')
+
+pkgver() {
+  cd $pkgname
+  git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+  [[ -d build ]] || mkdir build
+  cd $pkgname
+  git submodule init
+  git submodule set-url transmission "$srcdir/transmission-torrential"
+  git submodule update
+
+  cd transmission
+  git submodule init
+  git submodule set-url third-party/dht "$srcdir/dht"
+  git submodule set-url third-party/libb64 "$srcdir/libb64"
+  git submodule set-url third-party/libevent "$srcdir/libevent"
+  git submodule set-url third-party/libnatpmp "$srcdir/libnatpmp"
+  git submodule set-url third-party/libutp "$srcdir/libutp"
+  git submodule set-url third-party/miniupnpc "$srcdir/miniupnpc"
+  git submodule update
+  
+  cd ..
+  patch -Np1 -i ../no-unity.patch
+  sed -i '/--fatal-warnings/d' CMakeLists.txt
+}
+
+build() {
+  cd build
+  cmake -G "Unix Makefiles" ../$pkgname/ \
+    -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="$pkgdir" install
+}

Added: torrential/trunk/no-unity.patch
===================================================================
--- torrential/trunk/no-unity.patch	                        (rev 0)
+++ torrential/trunk/no-unity.patch	2020-06-05 17:18:18 UTC (rev 639173)
@@ -0,0 +1,77 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6f4b631..dd5d925 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,12 +34,6 @@ add_subdirectory (po)
+ # now let's actually check for the required dependencies
+ pkg_check_modules(DEPS REQUIRED granite)
+ 
+-pkg_check_modules (UNITY REQUIRED unity>=4.0.0)
+-if (UNITY_FOUND)
+-    add_definitions(${UNITY_CFLAGS})
+-    link_directories(${UNITY_LIBRARY_DIRS})
+-endif ()
+-
+ add_definitions(${DEPS_CFLAGS})
+ link_directories(${DEPS_LIBRARY_DIRS})
+ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/transmission)
+@@ -71,7 +65,6 @@ CUSTOM_VAPIS
+ # tell what libraries to use when compiling
+ PACKAGES
+     granite
+-    unity
+     posix
+ OPTIONS
+     --fatal-warnings
+@@ -87,7 +80,7 @@ add_schema (data/com.github.davidmhewitt.torrential.gschema.xml)
+ # tell cmake what to call the executable we just made
+ add_executable(${EXEC_NAME} ${VALA_C} ${GLIB_RESOURCES_ICONS})
+ add_dependencies(${EXEC_NAME} transmission)
+-target_link_libraries(${EXEC_NAME} ${DEPS_LIBRARIES} ${UNITY_LIBRARIES} transmission)
++target_link_libraries(${EXEC_NAME} ${DEPS_LIBRARIES} transmission)
+ 
+ # install the binaries we just made
+ install (TARGETS ${EXEC_NAME} RUNTIME DESTINATION bin)
+diff --git a/src/MainWindow.vala b/src/MainWindow.vala
+index 5b40124..5829902 100644
+--- a/src/MainWindow.vala
++++ b/src/MainWindow.vala
+@@ -35,7 +35,6 @@ public class Torrential.MainWindow : Gtk.Window {
+     private Widgets.MultiInfoBar infobar;
+     private Widgets.TorrentListBox list_box;
+     private Gtk.ScrolledWindow list_box_scroll;
+-    private Unity.LauncherEntry launcher_entry;
+ 
+     private Gtk.SearchEntry search_entry;
+ 
+@@ -147,8 +146,6 @@ public class Torrential.MainWindow : Gtk.Window {
+         set_titlebar (headerbar);
+         show_all ();
+ 
+-        launcher_entry = Unity.LauncherEntry.get_for_desktop_id ("com.github.davidmhewitt.torrential.desktop");
+-
+         var torrents = torrent_manager.get_torrents ();
+         if (torrents.size > 0) {
+             enable_main_view ();
+@@ -173,13 +170,6 @@ public class Torrential.MainWindow : Gtk.Window {
+         refresh_timer = Timeout.add_seconds (1, () => {
+             list_box.update ();
+             update_category_totals (torrent_manager.get_torrents ());
+-            launcher_entry.progress = torrent_manager.get_overall_progress ();
+-            var focused = (get_window ().get_state () & Gdk.WindowState.FOCUSED) != 0;
+-            if (!focused && list_box.has_visible_children ()) {
+-                launcher_entry.progress_visible = true;
+-            } else {
+-                launcher_entry.progress_visible = false;
+-            }
+             return true;
+         });
+ 
+@@ -395,7 +385,6 @@ public class Torrential.MainWindow : Gtk.Window {
+         Source.remove (int_sig);
+         Source.remove (term_sig);
+ 
+-        launcher_entry.progress_visible = false;
+         quitting_for_real = true;
+         close ();
+     }


More information about the arch-commits mailing list