Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/pamix/, media-sound/pamix/files/
Date: Tue, 02 Jan 2018 21:18:09
Message-Id: 1514927872.6979702826628b893ff22fd57079997eebfe1462.polynomial-c@gentoo
1 commit: 6979702826628b893ff22fd57079997eebfe1462
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 2 21:17:32 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 2 21:17:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69797028
7
8 media-sound/pamix: Fixed QA issues and compilation against ncurses[-tinfo].
9
10 Closes: https://bugs.gentoo.org/643148
11 Closes: https://bugs.gentoo.org/643150
12 Package-Manager: Portage-2.3.19, Repoman-2.3.6
13
14 .../pamix/files/pamix-1.6-ncurses_pkgconfig.patch | 34 ++++++++++++++++++++++
15 media-sound/pamix/pamix-1.6.ebuild | 10 ++-----
16 media-sound/pamix/pamix-9999.ebuild | 10 +------
17 3 files changed, 38 insertions(+), 16 deletions(-)
18
19 diff --git a/media-sound/pamix/files/pamix-1.6-ncurses_pkgconfig.patch b/media-sound/pamix/files/pamix-1.6-ncurses_pkgconfig.patch
20 new file mode 100644
21 index 00000000000..c0597716679
22 --- /dev/null
23 +++ b/media-sound/pamix/files/pamix-1.6-ncurses_pkgconfig.patch
24 @@ -0,0 +1,34 @@
25 +From 90bd2ead3d88b5b24093cb76f9500b69bb0221dd Mon Sep 17 00:00:00 2001
26 +From: Lars Wendler <polynomial-c@g.o>
27 +Date: Tue, 2 Jan 2018 21:24:05 +0100
28 +Subject: [PATCH] Use pkg-config to reliably find ncurses lib.
29 +
30 +Otherwise linking might fail when ncurses was built with separate tinfo lib.
31 +---
32 + CMakeLists.txt | 7 +++++--
33 + 1 file changed, 5 insertions(+), 2 deletions(-)
34 +
35 +diff --git a/CMakeLists.txt b/CMakeLists.txt
36 +index 38605f2..c7da94e 100644
37 +--- a/CMakeLists.txt
38 ++++ b/CMakeLists.txt
39 +@@ -17,11 +17,14 @@ file(GLOB_RECURSE pamix_SRC
40 + include_directories("include")
41 + link_libraries("pulse" "pthread")
42 +
43 ++find_package(PkgConfig REQUIRED QUIET)
44 + IF (WITH_UNICODE)
45 +- link_libraries("ncursesw")
46 ++ pkg_search_module(NCURSESW REQUIRED ncursesw)
47 ++ link_libraries(${NCURSESW_LDFLAGS})
48 + add_definitions(-DFEAT_UNICODE)
49 + ELSE ()
50 +- link_libraries("ncurses")
51 ++ pkg_search_module(NCURSES REQUIRED ncurses)
52 ++ link_libraries(${NCURSES_LDFLAGS})
53 + ENDIF ()
54 +
55 + add_executable(pamix ${pamix_SRC})
56 +--
57 +2.16.0.rc0
58 +
59
60 diff --git a/media-sound/pamix/pamix-1.6.ebuild b/media-sound/pamix/pamix-1.6.ebuild
61 index 19febfb88f4..dbeb0e57cc7 100644
62 --- a/media-sound/pamix/pamix-1.6.ebuild
63 +++ b/media-sound/pamix/pamix-1.6.ebuild
64 @@ -28,13 +28,9 @@ DEPEND="sys-devel/autoconf-archive
65 virtual/pkgconfig
66 ${RDEPEND}"
67
68 -src_prepare() {
69 - default
70 -
71 - # ugly hackaround for split tinfo ncurses libs
72 - sed '/link_libraries.*ncurses/s@\(")\)@" "tinfo\1@' \
73 - -i CMakeLists.txt || die
74 -}
75 +PATCHES=(
76 + "${FILESDIR}/${P}-ncurses_pkgconfig.patch"
77 +)
78
79 src_configure() {
80 local mycmakeargs=(
81
82 diff --git a/media-sound/pamix/pamix-9999.ebuild b/media-sound/pamix/pamix-9999.ebuild
83 index acdf22771d0..a3da8fcc45f 100644
84 --- a/media-sound/pamix/pamix-9999.ebuild
85 +++ b/media-sound/pamix/pamix-9999.ebuild
86 @@ -1,4 +1,4 @@
87 -# Copyright 1999-2017 Gentoo Foundation
88 +# Copyright 1999-2018 Gentoo Foundation
89 # Distributed under the terms of the GNU General Public License v2
90
91 EAPI=6
92 @@ -28,14 +28,6 @@ DEPEND="sys-devel/autoconf-archive
93 virtual/pkgconfig
94 ${RDEPEND}"
95
96 -src_prepare() {
97 - default
98 -
99 - # ugly hackaround for split tinfo ncurses libs
100 - sed '/link_libraries.*ncurses/s@\(")\)@" "tinfo\1@' \
101 - -i CMakeLists.txt || die
102 -}
103 -
104 src_configure() {
105 local mycmakeargs=(
106 -DWITH_UNICODE="$(usex unicode)"