unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45721] Telegram Desktop
@ 2021-01-08  0:20 Raghav Gururajan
  2021-01-08  0:44 ` [bug#45721] Telegram Desktop (v2) Raghav Gururajan
                   ` (23 more replies)
  0 siblings, 24 replies; 55+ messages in thread
From: Raghav Gururajan @ 2021-01-08  0:20 UTC (permalink / raw)
  To: 45721

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

Hello Guix!

This patch-series is for adding Telegram-Desktop application and its 
dependencies to Guix.

Regards,
RG.

[-- Attachment #2: 0001-gnu-Add-GSL.patch --]
[-- Type: text/x-patch, Size: 5732 bytes --]

From 44a403000c2d4c22b309ec8fed5d123faa355b53 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 2 Jan 2021 18:48:03 -0500
Subject: [PATCH 01/19] gnu: Add GSL.

* gnu/packages/cpp.scm (gsl): New variable.
* gnu/packages/patches/gsl-gtest.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                         |  1 +
 gnu/packages/cpp.scm                 | 28 ++++++++
 gnu/packages/patches/gsl-gtest.patch | 96 ++++++++++++++++++++++++++++
 3 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/patches/gsl-gtest.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dfd44ac769..82d254db19 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1124,6 +1124,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/grub-setup-root.patch			\
   %D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \
+  %D%/packages/patches/gsl-gtest.patch                                \
   %D%/packages/patches/gspell-dash-test.patch			\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 00e006928e..8b15533841 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -63,6 +63,34 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))
 
+(define-public gsl
+  (package
+    (name "gsl")
+    (version "3.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/microsoft/GSL.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (patches
+        (search-patches "gsl-gtest.patch"))
+       (sha256
+        (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Guidelines Support Library")
+    (description "GSL contains functions and types that are suggested for use by
+the C++ Core Guidelines maintained by the Standard C++ Foundation.")
+    (home-page "https://github.com/microsoft/GSL/")
+    (license license:expat)))
+
 (define-public libzen
   (package
     (name "libzen")
diff --git a/gnu/packages/patches/gsl-gtest.patch b/gnu/packages/patches/gsl-gtest.patch
new file mode 100644
index 0000000000..2def650292
--- /dev/null
+++ b/gnu/packages/patches/gsl-gtest.patch
@@ -0,0 +1,96 @@
+From f5cf01083baf7e8dc8318db3648bc6098dc32d67 Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <guriev-ns@ya.ru>
+Date: Sat, 18 Apr 2020 13:30:17 +0300
+Subject: [PATCH] Search for GoogleTest via pkg-config first
+
+---
+ tests/CMakeLists.txt | 55 ++++++++++++++++++++++++--------------------
+ 1 file changed, 30 insertions(+), 25 deletions(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 02193197..53d475c2 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,36 +1,41 @@
+ cmake_minimum_required(VERSION 3.0.2)
+ 
+ project(GSLTests CXX)
++include(FindPkgConfig)
+ 
+ # will make visual studio generated project group files
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ 
+-configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
+-execute_process(
+-    COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+-    RESULT_VARIABLE result
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+-    message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
++pkg_search_module(GTestMain gtest_main)
++if (NOT GTestMain_FOUND)
++    configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
++    execute_process(
++        COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
++        RESULT_VARIABLE result
++        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
++    )
++    if(result)
++        message(FATAL_ERROR "CMake step for googletest failed: ${result}")
++    endif()
+ 
+-execute_process(
+-    COMMAND ${CMAKE_COMMAND} --build .
+-    RESULT_VARIABLE result
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+-    message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
++    execute_process(
++        COMMAND ${CMAKE_COMMAND} --build .
++        RESULT_VARIABLE result
++        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
++    )
++    if(result)
++        message(FATAL_ERROR "CMake step for googletest failed: ${result}")
++    endif()
+ 
+-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
++    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
++    set(GTestMain_LIBRARIES gtest_main)
+ 
+-add_subdirectory(
+-    ${CMAKE_CURRENT_BINARY_DIR}/googletest-src
+-    ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
+-    EXCLUDE_FROM_ALL
+-)
++    add_subdirectory(
++        ${CMAKE_CURRENT_BINARY_DIR}/googletest-src
++        ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
++        EXCLUDE_FROM_ALL
++    )
++endif()
+ 
+ if (MSVC AND (GSL_CXX_STANDARD EQUAL 17))
+     set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-)
+@@ -149,7 +154,7 @@ function(add_gsl_test name)
+     target_link_libraries(${name}
+         GSL
+         gsl_tests_config
+-        gtest_main
++        ${GTestMain_LIBRARIES}
+     )
+     add_test(
+         ${name}
+@@ -254,7 +259,7 @@ function(add_gsl_test_noexcept name)
+     target_link_libraries(${name}
+         GSL
+         gsl_tests_config_noexcept
+-        gtest_main
++        ${GTestMain_LIBRARIES}
+     )
+     add_test(
+       ${name}
-- 
2.29.2


[-- Attachment #3: 0002-gnu-Add-fcitx-qt5.patch --]
[-- Type: text/x-patch, Size: 3405 bytes --]

From 55b963d2526c14d01a34c8d7f3dd7621821a1275 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 2 Jan 2021 22:23:51 -0500
Subject: [PATCH 02/19] gnu: Add fcitx-qt5.

* gnu/packages/fcitx.scm (fcitx-qt5): New variable.
---
 gnu/packages/fcitx.scm | 61 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fcitx.scm b/gnu/packages/fcitx.scm
index d52edf1750..18d7d4ee34 100644
--- a/gnu/packages/fcitx.scm
+++ b/gnu/packages/fcitx.scm
@@ -19,11 +19,13 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages fcitx)
-  #:use-module ((guix licenses) #:select (gpl2+))
+  #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt)
   #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages enchant)
@@ -33,14 +35,69 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg))
+
+(define-public fcitx-qt5
+  (package
+    (name "fcitx-qt5")
+    (version "1.2.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/fcitx/fcitx-qt5.git")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1d56bp11jp85b2r4syw1clfg4vqxqfh7gygpwz8wk5sxmfmmdq83"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "quickphrase-editor/CMakeLists.txt"
+               (("\\$\\{FCITX4_ADDON_INSTALL_DIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/fcitx")))
+             (substitute* "platforminputcontext/CMakeLists.txt"
+               (("\\$\\{CMAKE_INSTALL_QTPLUGINDIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins")))
+             #t)))))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fcitx" ,fcitx)
+       ("libintl" ,intltool)
+       ("libxkbcommon" ,libxkbcommon)))
+    (propagated-inputs
+     `(("qtbase" ,qtbase)))
+    (synopsis "Fcitx Qt5 Input Context")
+    (description "Fcitx support for Qt5")
+    (home-page "https://github.com/fcitx/fcitx-qt5/")
+    (license
+     (list
+      ;; Plugin
+      bsd-3
+      ;; Others
+      gpl2+))))
 
 (define-public presage
   (package
-- 
2.29.2


[-- Attachment #4: 0003-gnu-libappindicator-Propagate-some-inputs-as-per-.pc.patch --]
[-- Type: text/x-patch, Size: 1291 bytes --]

From 56ae16b466ab7ad0a4e184cec0ea5a4fe3b7b7d9 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 2 Jan 2021 23:51:51 -0500
Subject: [PATCH 03/19] gnu: libappindicator: Propagate some inputs as per .pc
 file.

* gnu/packages/freedesktop.scm (libappindicator) [inputs]: Move gtk+
and libdbusmenu to ...
[propagated-inputs]: ... here.
---
 gnu/packages/freedesktop.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index ef35349ec2..6dd37005ae 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2021,14 +2021,15 @@ useful with system integration.")
        ("xvfb" ,xorg-server-for-tests)))
     (inputs
      `(("dbus-glib" ,dbus-glib)
-       ("gtk+" ,gtk+)
-       ("libdbusmenu" ,libdbusmenu)
        ("libindicator" ,libindicator)
        ("python@2" ,python-2)
        ("python2-pygtk" ,python2-pygtk)
        ("python2-pygobject-2" ,python2-pygobject-2)
        ;; ("mono" ,mono) ; requires non-packaged gapi
        ("vala" ,vala)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+)
+       ("libdbusmenu" ,libdbusmenu)))
     (arguments
      ;; FIXME: do not hardcode gtk version
      `(#:configure-flags '("--with-gtk=3")
-- 
2.29.2


[-- Attachment #5: 0004-gnu-Add-hime.patch --]
[-- Type: text/x-patch, Size: 3429 bytes --]

From 5b5fcd94a712c06a54922fbc6ece0fa61fc6665a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 3 Jan 2021 15:05:11 -0500
Subject: [PATCH 04/19] gnu: Add hime.

* gnu/packages/language.scm (hime): New variable.
---
 gnu/packages/language.scm | 62 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 61 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 3f17465039..7257a4789e 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -23,8 +23,11 @@
 
 (define-module (gnu packages language)
   #:use-module (gnu packages)
+  #:use-module (gnu packages anthy)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages java)
@@ -37,6 +40,7 @@
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl-check)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages web)
@@ -48,11 +52,67 @@
   #:use-module (guix build-system python)
   #:use-module ((guix licenses)
                 #:select
-                (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ perl-license zpl2.1))
+                (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ perl-license zpl2.1 fdl1.2+))
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils))
 
+(define-public hime
+  (package
+    (name "hime")
+    (version "0.9.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/hime-ime/hime.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1wn0ici78x5qh6hvv50bf76ld7ds42hzzl4l5qz34hp8wyvrwakw"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:configure-flags
+       (list
+        ;; FIXME
+        ;; error: unknown type name ‘GtkStatusIcon’
+        "--disable-system-tray")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-std
+           (lambda _
+             (substitute* '("configure" "Makefile")
+               (("17")
+                "11"))
+             #t)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)
+       ("whereis" ,util-linux)))
+    (inputs
+     `(("anthy" ,anthy)
+       ("appindicator" ,libappindicator)
+       ;; ("chewing" ,libchewing)
+       ("gtk+" ,gtk+)
+       ("qtbase" ,qtbase)
+       ("xtst" ,libxtst)))
+    (synopsis "HIME Input Method Editor")
+    (description "Hime is an extremely easy-to-use input method framework.  It
+is lightweight, stable, powerful and supports many commonly used input methods,
+including Cangjie, Zhuyin, Dayi, Ranked, Shrimp, Greek, Anthy, Korean, Latin,
+Random Cage Fighting Birds, Cool Music etc.")
+    (home-page "http://hime-ime.github.io/")
+    (license
+     (list
+      gpl2+
+      lgpl2.1+
+      ;; Documentation
+      fdl1.2+))))
+
 (define-public liblouis
   (package
     (name "liblouis")
-- 
2.29.2


[-- Attachment #6: 0005-gnu-Add-libchewing.patch --]
[-- Type: text/x-patch, Size: 2869 bytes --]

From 07d5870df7c944339a0c32ddc8590e883643492b Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 3 Jan 2021 17:16:43 -0500
Subject: [PATCH 05/19] gnu: Add libchewing.

* gnu/packages/language.scm (libchewing): New variable.
---
 gnu/packages/language.scm | 55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 7257a4789e..1fefbbf560 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -34,6 +34,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ocr)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -41,6 +42,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages web)
@@ -57,6 +59,59 @@
   #:use-module (guix git-download)
   #:use-module (guix utils))
 
+(define-public libchewing
+  (package
+    (name "libchewing")
+    (version "0.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/chewing/libchewing.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "04d09w6xdd08v6laj9y4qmqsijw5i2jvshcilhh4vg6cfnfgl2my"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "test/Makefile.am"
+               (("	test-bopomofo ")
+                "")
+               (("	test-config ")
+                "")
+               (("	test-reset ")
+                "")
+               (("	test-symbol ")
+                "")
+               (("	test-keyboardless ")
+                "")
+               (("	test-special-symbol ")
+                ""))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("texinfo" ,texinfo)))
+    (inputs
+     `(("ncurses" ,ncurses)
+       ("sqlite" ,sqlite)))
+    (synopsis "Chinese phonetic input method")
+    (description "Chewing is an intelligent phonetic (Zhuyin/Bopomofo) input
+method, one of the most popular choices for Traditional Chinese users.")
+    (home-page "http://chewing.im/")
+    (license lgpl2.1+)))
+
 (define-public hime
   (package
     (name "hime")
-- 
2.29.2


[-- Attachment #7: 0006-gnu-hime-Enable-chewing-support.patch --]
[-- Type: text/x-patch, Size: 860 bytes --]

From 25360fda5f657189a3d802435ac9aad0a9d46eab Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 3 Jan 2021 17:19:21 -0500
Subject: [PATCH 06/19] gnu: hime: Enable chewing support.

* gnu/packages/language.scm (hime) [inputs]: Add libchewing.
---
 gnu/packages/language.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 1fefbbf560..e50e157370 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -151,7 +151,7 @@ method, one of the most popular choices for Traditional Chinese users.")
     (inputs
      `(("anthy" ,anthy)
        ("appindicator" ,libappindicator)
-       ;; ("chewing" ,libchewing)
+       ("chewing" ,libchewing)
        ("gtk+" ,gtk+)
        ("qtbase" ,qtbase)
        ("xtst" ,libxtst)))
-- 
2.29.2


[-- Attachment #8: 0007-gnu-Add-cmake-shared.patch --]
[-- Type: text/x-patch, Size: 2204 bytes --]

From 330afc7d02cfe7b33ad4d795924a1232921b7049 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 3 Jan 2021 19:03:00 -0500
Subject: [PATCH 07/19] gnu: Add cmake-shared.

* gnu/packages/cmake.scm (cmake-shared): New variable.
---
 gnu/packages/cmake.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 56b32792fe..ab74650066 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -31,6 +31,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix deprecation)
   #:use-module (guix build-system gnu)
@@ -43,6 +44,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages file)
   #:use-module (gnu packages hurd)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages serialization)
@@ -52,6 +54,33 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
+(define-public cmake-shared
+  (package
+    (name "cmake-shared")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/lirios/cmake-shared.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1srd3jmlalf0szgyp88ymhbnwds4qiywmf8lq1pif9g8irjjhdry"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))                    ; No target
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (synopsis "Shared CMake functions and macros")
+    (description "CMake-Shared are shared functions and macros for projects
+using the CMake build system.")
+    (home-page "https://github.com/lirios/cmake-shared/")
+    (license license:bsd-3)))
+
 ;;; Build phases shared between 'cmake-bootstrap' and the later variants
 ;;; that use cmake-build-system.
 (define %common-build-phases
-- 
2.29.2


[-- Attachment #9: 0008-gnu-Add-materialdecoration.patch --]
[-- Type: text/x-patch, Size: 2246 bytes --]

From da7d1632f20a46fffcefb8aa1e7bf94d7d303dac Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 3 Jan 2021 19:08:43 -0500
Subject: [PATCH 08/19] gnu: Add materialdecoration.

* gnu/packages/qt.scm (materialdecoration): New variable.
---
 gnu/packages/qt.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 0b94063373..aea8ebeeb0 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -45,6 +45,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (guix packages)
   #:use-module (guix deprecation)
   #:use-module (guix utils)
@@ -71,6 +72,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -102,6 +104,36 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public materialdecoration
+  (package
+    (name "materialdecoration")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/lirios/materialdecoration.git")
+         (commit "2079487116c6c794af3a15452342a69293039b46")))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1pczmxbmnsgj9s1g6ap55qq2q4ccibcnhsw9b6cl5rzgc48izy06"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("cmake-shared" ,cmake-shared)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtwayland" ,qtwayland)
+       ("wayland" ,wayland)))
+    (synopsis "Material Decoration for Qt")
+    (description "MaterialDecoration is the client-side decoration for Qt
+applications on Wayland.")
+    (home-page "https://github.com/lirios/materialdecoration")
+    (license license:lgpl3+)))
+
 (define-public grantlee
   (package
     (name "grantlee")
-- 
2.29.2


[-- Attachment #10: 0009-gnu-Add-nimf.patch --]
[-- Type: text/x-patch, Size: 6435 bytes --]

From 7e65598ad7db40d7260eb924a139203266efb026 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Mon, 4 Jan 2021 19:32:18 -0500
Subject: [PATCH 09/19] gnu: Add nimf.

* gnu/packages/language.scm (nimf): New variable.
---
 gnu/packages/language.scm | 127 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index e50e157370..1d1fe94690 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -26,10 +26,15 @@
   #:use-module (gnu packages anthy)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages emacs)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages ibus)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -47,8 +52,10 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
@@ -59,6 +66,126 @@
   #:use-module (guix git-download)
   #:use-module (guix utils))
 
+(define-public nimf
+  (package
+    (name "nimf")
+    (version "1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/hamonikr/nimf.git")
+         (commit
+          (string-append "nimf-" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "01qi7flmaqrn2fk03sa42r0caks9d8lsv88s0bgxahhxwk1x76gc"))))
+    (build-system glib-or-gtk-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:configure-flags
+       (list
+        "--with-im-config-data"
+        "--with-imsettings-data"
+        (string-append "--with-html-dir="
+                       (assoc-ref %outputs "doc")
+                       "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-flags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "configure.ac"
+               (("-Werror")
+                "-Wno-error"))
+             #t))
+         (add-after 'patch-flags 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs"
+               (substitute* "nimf-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-after 'patch-docbook-xml 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "configure.ac"
+               (("/usr/share/anthy/anthy.dic")
+                (string-append (assoc-ref inputs "anthy")
+                               "/share/anthy/anthy.dic")))
+             (substitute* "configure.ac"
+               (("/usr/bin:\\$GTK3_LIBDIR/libgtk-3-0")
+                (string-append (assoc-ref inputs "gtk+:bin")
+                               "/bin:$GTK3_LIBDIR/libgtk-3-0"))
+               (("/usr/bin:\\$GTK2_LIBDIR/libgtk2.0-0")
+                (string-append (assoc-ref inputs "gtk+-2:bin")
+                               "/bin:$GTK2_LIBDIR/libgtk2.0-0")))
+             (substitute* "modules/clients/gtk/Makefile.am"
+               (("\\$\\(GTK3_LIBDIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib"))
+               (("\\$\\(GTK2_LIBDIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib")))
+             (substitute* "modules/clients/qt4/Makefile.am"
+               (("\\$\\(QT4_LIB_DIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib")))
+             (substitute* "modules/clients/qt5/Makefile.am"
+               (("\\$\\(QT5_IM_MODULE_DIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib/qt5/plugins/inputmethods")))
+             (substitute* '("bin/nimf-settings/Makefile.am"
+                            "data/apparmor-abstractions/Makefile.am"
+                            "data/Makefile.am" "data/im-config/Makefile.am"
+                            "data/imsettings/Makefile.am")
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc"))
+               (("/usr/share")
+                (string-append (assoc-ref outputs "out")
+                               "/share")))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("gettext" ,gettext-minimal)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+-2:bin" ,gtk+-2 "bin")
+       ("gtk+:bin" ,gtk+ "bin")
+       ("gtk-doc" ,gtk-doc)
+       ("intltool" ,intltool)
+       ("libtool" ,libtool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("which" ,which)))
+    (inputs
+     `(("anthy" ,anthy)
+       ("appindicator" ,libappindicator)
+       ("gtk+-2" ,gtk+-2)
+       ("gtk+" ,gtk+)
+       ("hangul" ,libhangul)
+       ("m17n-db" ,m17n-db)
+       ("m17n-lib" ,m17n-lib)
+       ("qt-4" ,qt-4)
+       ("qtbase" ,qtbase)
+       ("rime" ,librime)
+       ("rsvg" ,librsvg)
+       ("wayland" ,wayland)
+       ("wayland-protocols" ,wayland-protocols)
+       ("x11" ,libx11)
+       ("xkbcommon" ,libxkbcommon)
+       ("xklavier" ,libxklavier)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Korean input method framework")
+    (description "Nimf is a lightweight, fast and extensible input method
+framework.")
+    (home-page "https://github.com/hamonikr/nimf/")
+    (license lgpl3+)))
+
 (define-public libchewing
   (package
     (name "libchewing")
-- 
2.29.2


[-- Attachment #11: 0010-gnu-Add-range-v3.patch --]
[-- Type: text/x-patch, Size: 1884 bytes --]

From 7ea1a965d466de582659bc4a7f94af7cdfa8992d Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Mon, 4 Jan 2021 23:59:17 -0500
Subject: [PATCH 10/19] gnu: Add range-v3.

* gnu/packages/cpp.scm (range-v3): New variable.
---
 gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 8b15533841..491332987b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libunwind)
@@ -63,6 +64,37 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))
 
+(define-public range-v3
+  (package
+    (name "range-v3")
+    (version "0.11.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/ericniebler/range-v3.git")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("perl" ,perl)))
+    (inputs
+     `(("boost" ,boost)))
+    (synopsis "Range library for C++14/17/20")
+    (description "Range-v3 is the range library for C++14/17/20.  This code was
+the basis of a formal proposal to add range support to the C++ standard library.")
+    (home-page "https://github.com/ericniebler/range-v3/")
+    (license
+     (list
+      ;; Dual-Licensed
+      license:expat
+      license:ncsa))))
+
 (define-public gsl
   (package
     (name "gsl")
-- 
2.29.2


[-- Attachment #12: 0011-gnu-Add-rlottie.patch --]
[-- Type: text/x-patch, Size: 2155 bytes --]

From d8a64ec656a09f6075a87654da56d7cb06ca9e75 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 5 Jan 2021 00:52:37 -0500
Subject: [PATCH 11/19] gnu: Add rlottie.

* gnu/packages/cpp.scm (rlottie): New variable.
---
 gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 491332987b..f92cfe0c26 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -39,12 +39,14 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
@@ -64,6 +66,37 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))
 
+(define-public rlottie
+  (package
+    (name "rlottie")
+    (version "0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/Samsung/rlottie.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-Dlog=true"
+        "-Dtest=true")))
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Lottie Animation Library")
+    (description "Rlottie is a platform independent standalone c++ library for
+rendering vector based animations and art in realtime.")
+    (home-page "https://github.com/Samsung/rlottie/")
+    (license license:expat)))
+
 (define-public range-v3
   (package
     (name "range-v3")
-- 
2.29.2


[-- Attachment #13: 0012-gnu-Add-qt5ct.patch --]
[-- Type: text/x-patch, Size: 2312 bytes --]

From b8dcf94a21ab31c7854e08c525283224e77dde6a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 5 Jan 2021 17:50:16 -0500
Subject: [PATCH 12/19] gnu: Add qt5ct.

* gnu/packages/qt.scm (qt5ct): New variable.
---
 gnu/packages/qt.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index aea8ebeeb0..fac7831ab7 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -104,6 +104,49 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qt5ct
+  (package
+    (name "qt5ct")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
+       (sha256
+        (base32 "1lnx4wqk87lbr6lqc64w5g5ppjjv75kq2r0q0bz9gfpryzdw8xxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qt5ct.pro"
+               (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
+                (string-append (assoc-ref inputs "qttools")
+                               "/bin/lrelease")))
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (invoke "qmake"
+                       (string-append "PREFIX=" out)
+                       (string-append "BINDIR=" out "/bin")
+                       (string-append "DATADIR=" out "/share")
+                       (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
+             #t)))))
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)))
+    (synopsis "Qt5 Configuration Tool")
+    (description "Qt5CT is a program that allows users to configure Qt5 settings
+(theme, font, icons, etc.) under DE/WM without Qt integration.")
+    (home-page "https://qt5ct.sourceforge.io/")
+    (license license:bsd-2)))
+
 (define-public materialdecoration
   (package
     (name "materialdecoration")
-- 
2.29.2


[-- Attachment #14: 0013-gnu-libtgvoip-Add-support-for-pkg-config.patch --]
[-- Type: text/x-patch, Size: 4095 bytes --]

From 1acf64c77a0eb29e1c0e5a8af1013578b70901c6 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 04:39:04 -0500
Subject: [PATCH 13/19] gnu: libtgvoip: Add support for pkg-config.

* gnu/packages/telephony.scm (libtgvoip) [patches]: Add libtgvoip-pkgconfig.patch.
[native-inputs]: Add pkg-config.
* gnu/packages/patches/libtgvoip-pkgconfig.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 .../patches/libtgvoip-pkgconfig.patch         | 61 +++++++++++++++++++
 gnu/packages/telephony.scm                    |  5 +-
 3 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/libtgvoip-pkgconfig.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 82d254db19..e2e694a833 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1291,6 +1291,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtar-CVE-2013-4420.patch 		\
   %D%/packages/patches/libtgvoip-disable-sse2.patch 		\
   %D%/packages/patches/libtgvoip-disable-webrtc.patch 		\
+  %D%/packages/patches/libtgvoip-pkgconfig.patch             \
   %D%/packages/patches/libtheora-config-guess.patch		\
   %D%/packages/patches/libtirpc-hurd.patch			\
   %D%/packages/patches/libtirpc-hurd-client.patch		\
diff --git a/gnu/packages/patches/libtgvoip-pkgconfig.patch b/gnu/packages/patches/libtgvoip-pkgconfig.patch
new file mode 100644
index 0000000000..23794e8d77
--- /dev/null
+++ b/gnu/packages/patches/libtgvoip-pkgconfig.patch
@@ -0,0 +1,61 @@
+From 4ce5e22ed2dc24e9211c4874c1dd6b05faad2a87 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Sun, 5 Jan 2020 12:25:31 +0400
+Subject: [PATCH] Add support for pkg-config
+
+---
+ Makefile.am  |  2 ++
+ configure.ac |  4 +++-
+ tgvoip.pc.in | 10 ++++++++++
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+ create mode 100644 tgvoip.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 03c8866..a9c9715 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -755,6 +755,8 @@ libtgvoip_la_SOURCES = $(SRC) $(TGVOIP_HDRS)
+ tgvoipincludedir = $(includedir)/tgvoip
+ nobase_tgvoipinclude_HEADERS = $(TGVOIP_HDRS)
+ 
++pkgconfig_DATA = tgvoip.pc
++
+ CXXFLAGS += -std=gnu++0x $(CFLAGS)
+ if TARGET_OS_OSX
+ OBJCFLAGS = $(CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 222f541..e2df927 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,8 @@ AM_INIT_AUTOMAKE([subdir-objects])
+ AM_SILENT_RULES([yes])
+ LT_INIT
+ 
++PKG_INSTALLDIR
++
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CC
+@@ -109,5 +111,5 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_CHECK_FUNCS([clock_gettime floor gettimeofday inet_ntoa memmove memset select socket sqrt strcasecmp strchr strerror strncasecmp strstr strtol strtoul uname])
+ 
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile tgvoip.pc])
+ AC_OUTPUT
+diff --git a/tgvoip.pc.in b/tgvoip.pc.in
+new file mode 100644
+index 0000000..1ca7758
+--- /dev/null
++++ b/tgvoip.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: tgvoip
++Description: VoIP library for Telegram clients
++Version: 2.4.4
++Libs: -L${libdir} -ltgvoip
++Cflags: -I${includedir}/tgvoip
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 48e30abfc3..05538762c3 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -879,11 +879,14 @@ Initiation Protocol (SIP) and a multimedia framework.")
        ;; The patch for WebRTC /must/ precede the patch for SSE2.
        (patches
         (search-patches "libtgvoip-disable-webrtc.patch"
-                        "libtgvoip-disable-sse2.patch"))
+                        "libtgvoip-disable-sse2.patch"
+                        "libtgvoip-pkgconfig.patch"))
        (sha256
         (base32
          "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("libopusenc" ,libopusenc)
-- 
2.29.2


[-- Attachment #15: 0014-gnu-libtgvoip-Remove-obsolete-patches.patch --]
[-- Type: text/x-patch, Size: 6288 bytes --]

From ccacf372a3653f7c7a2ae21b94756a1215dee443 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 04:53:40 -0500
Subject: [PATCH 14/19] gnu: libtgvoip: Remove obsolete patches.

* gnu/packages/telephony.scm (libtgvoip) [patches]: Remove
libtgvoip-disable-webrtc and "libtgvoip-disable-sse2.
* gnu/packages/patches/libtgvoip-disable-webrtc.patch: Remove file.
* gnu/packages/patches/libtgvoip-disable-sse2.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove them.
---
 gnu/local.mk                                  |  2 -
 .../patches/libtgvoip-disable-sse2.patch      | 51 -------------------
 .../patches/libtgvoip-disable-webrtc.patch    | 47 -----------------
 gnu/packages/telephony.scm                    |  7 +--
 4 files changed, 1 insertion(+), 106 deletions(-)
 delete mode 100644 gnu/packages/patches/libtgvoip-disable-sse2.patch
 delete mode 100644 gnu/packages/patches/libtgvoip-disable-webrtc.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e2e694a833..bf07b820f2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1289,8 +1289,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch	\
   %D%/packages/patches/libquicktime-ffmpeg.patch 		\
   %D%/packages/patches/libtar-CVE-2013-4420.patch 		\
-  %D%/packages/patches/libtgvoip-disable-sse2.patch 		\
-  %D%/packages/patches/libtgvoip-disable-webrtc.patch 		\
   %D%/packages/patches/libtgvoip-pkgconfig.patch             \
   %D%/packages/patches/libtheora-config-guess.patch		\
   %D%/packages/patches/libtirpc-hurd.patch			\
diff --git a/gnu/packages/patches/libtgvoip-disable-sse2.patch b/gnu/packages/patches/libtgvoip-disable-sse2.patch
deleted file mode 100644
index 0e4faeab26..0000000000
--- a/gnu/packages/patches/libtgvoip-disable-sse2.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Copied from Debian.
-
-Description: Disable SSE2 code on i386
- This patch is not complete. A high-graded solution may use automatic switching
- between SSE2 and C++ implementations based on the results of runtime checks.
- The webrtc code already provides for one of them inside its GetCPUInfo function.
-Bug-Debian: https://bugs.debian.org/892823
-Author: Nicholas Guriev <guriev-ns@ya.ru>
-Last-Update: Tue, 29 Jan 2019 23:26:38 +0300
-
---- a/libtgvoip.gyp
-+++ b/libtgvoip.gyp
-@@ -871,11 +871,7 @@
-                 'WEBRTC_POSIX',
-               ],
-               'conditions': [
--                [ '"<!(uname -m)" == "i686"', {
--                  'cflags_cc': [
--                    '-msse2',
--                  ],
--                }], ['"<!(uname -s)" == "Linux"', {
-+                [ '"<!(uname -s)" == "Linux"', {
-                   'defines': [
-                     'WEBRTC_LINUX',
-                   ],
---- a/webrtc_dsp/rtc_base/system/arch.h
-+++ b/webrtc_dsp/rtc_base/system/arch.h
-@@ -28,7 +28,10 @@
- #define WEBRTC_ARCH_64_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
- #elif defined(_M_IX86) || defined(__i386__)
-+#if defined(__SSE2__)
-+// This macro is mostly used to detect SSE2 extension.
- #define WEBRTC_ARCH_X86_FAMILY
-+#endif
- #define WEBRTC_ARCH_X86
- #define WEBRTC_ARCH_32_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
---- a/webrtc_dsp/typedefs.h
-+++ b/webrtc_dsp/typedefs.h
-@@ -28,7 +28,10 @@
- #define WEBRTC_ARCH_64_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
- #elif defined(_M_IX86) || defined(__i386__)
-+#if defined(__SSE2__)
-+// This macro is mostly used to detect SSE2 extension.
- #define WEBRTC_ARCH_X86_FAMILY
-+#endif
- #define WEBRTC_ARCH_X86
- #define WEBRTC_ARCH_32_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
diff --git a/gnu/packages/patches/libtgvoip-disable-webrtc.patch b/gnu/packages/patches/libtgvoip-disable-webrtc.patch
deleted file mode 100644
index 0ca532301c..0000000000
--- a/gnu/packages/patches/libtgvoip-disable-webrtc.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Copied from Debian.
-
-Description: Fix build of  WebRTC on non-Linux systems
- * Define the WEBRTC_LINUX macro only on Linux, and not on GNU/Hurd or FreeBSD.
- * Fix type cast in the CurrentThreadId function.
-Bug-Debian: https://bugs.debian.org/920851
-Author: Nicholas Guriev <guriev-ns@ya.ru>
-Last-Update: Tue, 29 Jan 2019 23:26:44 +0300
-
---- a/libtgvoip.gyp
-+++ b/libtgvoip.gyp
-@@ -869,20 +869,18 @@
-             '"<(OS)" == "linux"', {
-               'defines': [
-                 'WEBRTC_POSIX',
--                'WEBRTC_LINUX',
-               ],
-               'conditions': [
-                 [ '"<!(uname -m)" == "i686"', {
-                   'cflags_cc': [
-                     '-msse2',
-                   ],
-+                }], ['"<!(uname -s)" == "Linux"', {
-+                  'defines': [
-+                    'WEBRTC_LINUX',
-+                  ],
-                 }]
-               ],
--              'direct_dependent_settings': {
--                'libraries': [
--
--                ],
--              },
-             },
-           ],
-         ],
---- a/webrtc_dsp/rtc_base/platform_thread_types.cc
-+++ b/webrtc_dsp/rtc_base/platform_thread_types.cc
-@@ -31,7 +31,7 @@ PlatformThreadId CurrentThreadId() {
-   return syscall(__NR_gettid);
- #else
-   // Default implementation for nacl and solaris.
--  return reinterpret_cast<pid_t>(pthread_self());
-+  return static_cast<pid_t>(pthread_self());
- #endif
- #endif  // defined(WEBRTC_POSIX)
- }
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 05538762c3..86a24f8fd8 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -874,13 +874,8 @@ Initiation Protocol (SIP) and a multimedia framework.")
              (url "https://github.com/grishka/libtgvoip")
              (commit version)))
        (file-name (git-file-name name version))
-       ;; Fix compilation on i686-linux architecture.
-       ;; NOTE: Applying these patches is order-dependent!
-       ;; The patch for WebRTC /must/ precede the patch for SSE2.
        (patches
-        (search-patches "libtgvoip-disable-webrtc.patch"
-                        "libtgvoip-disable-sse2.patch"
-                        "libtgvoip-pkgconfig.patch"))
+        (search-patches "libtgvoip-pkgconfig.patch"))
        (sha256
         (base32
          "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
-- 
2.29.2


[-- Attachment #16: 0015-gnu-libtgvoip-Remove-obsolete-phase.patch --]
[-- Type: text/x-patch, Size: 1726 bytes --]

From 5a44968a262a6770dc2e94644aacddaee0b14bec Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 04:58:53 -0500
Subject: [PATCH 15/19] gnu: libtgvoip: Remove obsolete phase.

* gnu/packages/telephony.scm (libtgvoip) [arguments]<#:phases>
['patch-dlopen]: Remove phase.
---
 gnu/packages/telephony.scm | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 86a24f8fd8..80e7c141f6 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -887,23 +887,6 @@ Initiation Protocol (SIP) and a multimedia framework.")
        ("libopusenc" ,libopusenc)
        ("openssl" ,openssl)
        ("pulseaudio" ,pulseaudio)))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where
-         ;; they are.
-         (add-after 'unpack 'patch-dlopen
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "os/linux/AudioPulse.cpp"
-               (("libpulse\\.so")
-                (string-append (assoc-ref inputs "pulseaudio")
-                              "/lib/libpulse.so")))
-             (substitute* '("os/linux/AudioInputALSA.cpp"
-                            "os/linux/AudioOutputALSA.cpp")
-               (("libasound\\.so")
-                (string-append (assoc-ref inputs "alsa-lib")
-                               "/lib/libasound.so")))
-             #t)))))
     (synopsis "VoIP library for Telegram clients")
     (description "A collection of libraries and header files for implementing
 telephony functionality into custom Telegram clients.")
-- 
2.29.2


[-- Attachment #17: 0016-gnu-libtgvoip-Bootstrap-the-source.patch --]
[-- Type: text/x-patch, Size: 1728 bytes --]

From cbfaf75570b3adc0821c37ad9d65936abeddebef Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 05:04:26 -0500
Subject: [PATCH 16/19] gnu: libtgvoip: Bootstrap the source.

* gnu/packages/telephony.scm (libtgvoip) [arguments]<#:phases>
['trigger-bootstrap]: New phase.
[native-inputs]: Add autoconf, automake and libtool.
[inputs]: Change libopusenc to opus.
---
 gnu/packages/telephony.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 80e7c141f6..a17c5188f6 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -881,12 +881,25 @@ Initiation Protocol (SIP) and a multimedia framework.")
          "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("libopusenc" ,libopusenc)
        ("openssl" ,openssl)
+       ("opus" ,opus)
        ("pulseaudio" ,pulseaudio)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'trigger-bootstrap
+           (lambda _
+             (for-each delete-file
+                       (list
+                        "configure"
+                        "Makefile.in"))
+             #t)))))
     (synopsis "VoIP library for Telegram clients")
     (description "A collection of libraries and header files for implementing
 telephony functionality into custom Telegram clients.")
-- 
2.29.2


[-- Attachment #18: 0017-gnu-libtgvoip-Disable-static-libraries.patch --]
[-- Type: text/x-patch, Size: 965 bytes --]

From e0d6b2b3ecf5b28598eee7df664c8171780fc020 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 05:07:59 -0500
Subject: [PATCH 17/19] gnu: libtgvoip: Disable static libraries.

* gnu/packages/telephony.scm (libtgvoip) [arguments]<#:configure-flags>
[--disable-static]: New flag.
---
 gnu/packages/telephony.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index a17c5188f6..ff1742366e 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -891,7 +891,10 @@ Initiation Protocol (SIP) and a multimedia framework.")
        ("opus" ,opus)
        ("pulseaudio" ,pulseaudio)))
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       (list
+        "--disable-static")
+       #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'trigger-bootstrap
            (lambda _
-- 
2.29.2


[-- Attachment #19: 0018-gnu-libtgvoip-Enable-audio-callback-feature.patch --]
[-- Type: text/x-patch, Size: 939 bytes --]

From ec2f57d9320ceeccd1345864113fa2837dd28bf1 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 05:09:51 -0500
Subject: [PATCH 18/19] gnu: libtgvoip: Enable audio-callback feature.

* gnu/packages/telephony.scm (libtgvoip) [arguments]<#:configure-flags>
[--enable-audio-callback]: New flag.
---
 gnu/packages/telephony.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index ff1742366e..79aa2abb62 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -893,7 +893,8 @@ Initiation Protocol (SIP) and a multimedia framework.")
     (arguments
      `(#:configure-flags
        (list
-        "--disable-static")
+        "--disable-static"
+        "--enable-audio-callback")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'trigger-bootstrap
-- 
2.29.2


[-- Attachment #20: 0019-gnu-libtgvoip-Update-home-page.patch --]
[-- Type: text/x-patch, Size: 956 bytes --]

From dc7ba05f38b9a53ebf94ab395655988b2f41583d Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 6 Jan 2021 05:11:49 -0500
Subject: [PATCH 19/19] gnu: libtgvoip: Update home-page.

* gnu/packages/telephony.scm (libtgvoip) [home-page]: Modify.
---
 gnu/packages/telephony.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 79aa2abb62..bdb2fc778b 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -907,5 +907,5 @@ Initiation Protocol (SIP) and a multimedia framework.")
     (synopsis "VoIP library for Telegram clients")
     (description "A collection of libraries and header files for implementing
 telephony functionality into custom Telegram clients.")
-    (home-page "https://github.com/zevlg/libtgvoip")
+    (home-page "https://github.com/grishka/libtgvoip")
     (license license:unlicense)))
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2021-01-31 19:17 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08  0:20 [bug#45721] Telegram Desktop Raghav Gururajan
2021-01-08  0:44 ` [bug#45721] Telegram Desktop (v2) Raghav Gururajan
2021-01-12  3:12 ` [bug#45721] Telegram Desktop (v3) Raghav Gururajan
2021-01-12  3:27 ` [bug#45721] Telegram Desktop (v4) Raghav Gururajan
2021-01-13 22:13 ` [bug#45721] Telegram Desktop (v5) Raghav Gururajan
2021-01-14  5:39 ` [bug#45721] Telegram Desktop (v6) Raghav Gururajan
2021-01-14  6:41 ` [bug#45721] Telegram Desktop (v7) Raghav Gururajan
2021-01-14 10:38 ` [bug#45721] Telegram Desktop (v8) Raghav Gururajan
2021-01-16 16:08 ` [bug#45721] Telegram Desktop (v9) Raghav Gururajan
2021-01-16 17:15   ` Nicolò Balzarotti
2021-01-16 21:22     ` Raghav Gururajan
2021-01-16 18:04 ` Leo Prikler
2021-01-17  0:19   ` Raghav Gururajan
2021-01-17  0:36     ` Leo Prikler
2021-01-17  1:10       ` Raghav Gururajan
2021-01-17  0:05 ` [bug#45721] Telegram Desktop (v10) Raghav Gururajan
2021-01-17  0:29 ` [bug#45721] Telegram Desktop (v11) Raghav Gururajan
2021-01-17  1:04 ` [bug#45721] Telegram Desktop (v12) Raghav Gururajan
2021-01-17  1:52 ` [bug#45721] Telegram Desktop (v13) Raghav Gururajan
2021-01-17 12:13   ` Leo Prikler
2021-01-17 14:49     ` Raghav Gururajan
2021-01-17 19:08       ` [bug#45721] [PATCH v15] Add Telegram Desktop Leo Prikler
2021-01-17 21:59         ` Raghav Gururajan
2021-01-19 10:11         ` [bug#45721] [PATCH v16] " Leo Prikler
2021-01-17 14:43 ` [bug#45721] Telegram Desktop (v14) Raghav Gururajan
2021-01-20 10:41 ` [bug#45721] Telegram Desktop (v17) Raghav Gururajan
2021-01-20 11:07   ` Leo Prikler
2021-01-20 12:32     ` Raghav Gururajan
2021-01-20 12:29 ` [bug#45721] Telegram Desktop (v18) Raghav Gururajan
2021-01-20 13:49 ` [bug#45721] Telegram Desktop (v19) Raghav Gururajan
2021-01-20 14:42 ` [bug#45721] Telegram Desktop (v20) Raghav Gururajan
2021-01-20 15:10   ` Leo Prikler
2021-01-21  3:44 ` [bug#45721] Telegram Desktop (v21) Raghav Gururajan
2021-01-21 19:11   ` [bug#45721] [PATCH v22] Add Telegram Desktop Leo Prikler
2021-01-21 19:37     ` Raghav Gururajan
2021-01-21 19:44       ` Leo Prikler
2021-01-21 19:46         ` Raghav Gururajan
2021-01-22  4:27 ` [bug#45721] Telegram Desktop (v23) Raghav Gururajan
2021-01-22  7:42   ` Leo Prikler
2021-01-28  0:41     ` Raghav Gururajan
2021-01-28  0:41 ` [bug#45721] Telegram Desktop (v24) Raghav Gururajan
2021-01-28  7:47   ` Leo Prikler
2021-01-30 17:04 ` [bug#45721] Telegram Desktop (v25) Raghav Gururajan
     [not found]   ` <e881733992b22e238f2b90149dbceac6c3467180.camel@student.tugraz.at>
     [not found]     ` <e5040a67-824f-17c8-e16f-1a68531b3d5f@raghavgururajan.name>
2021-01-30 18:24       ` Leo Prikler
2021-01-30 19:30         ` Raghav Gururajan
2021-01-30 18:02 ` [bug#45721] Telegram Desktop (v26) Raghav Gururajan
2021-01-30 19:02 ` [bug#45721] Telegram Desktop (v27) Raghav Gururajan
2021-01-31  8:37   ` bug#45721: " Leo Prikler
2021-01-31 19:11     ` [bug#45721] " Raghav Gururajan
2021-01-31 13:57   ` Jonathan Brielmaier
2021-01-31 14:10     ` Leo Prikler
2021-01-31 16:50       ` Jonathan Brielmaier
2021-01-31 16:56         ` Leo Prikler
2021-01-31 17:01           ` Jonathan Brielmaier
2021-01-31 19:14             ` Raghav Gururajan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).