>From 1acf64c77a0eb29e1c0e5a8af1013578b70901c6 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Wed, 6 Jan 2021 04:39:04 -0500 Subject: [PATCH 13/20] 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 +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