Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libvncserver/, net-libs/libvncserver/files/
Date: Sat, 27 Jun 2020 12:15:58
Message-Id: 1593260137.4917a4e4865c7854528acd1d95c7c1996aa57214.asturm@gentoo
1 commit: 4917a4e4865c7854528acd1d95c7c1996aa57214
2 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
3 AuthorDate: Thu Jun 25 11:15:54 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 27 12:15:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4917a4e4
7
8 net-libs/libvncserver: Fix tests
9
10 * Fix includetest with CMAKE_MAKEFILE_GENERATOR=ninja
11 * Do not run tjunittest with USE=-jpeg
12
13 Commiting straight to stable as only tests are affected by these
14 changes.
15
16 Closes: https://bugs.gentoo.org/729092
17 Bug: https://bugs.gentoo.org/729188
18 Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
19 Closes: https://github.com/gentoo/gentoo/pull/16411
20 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
21
22 .../libvncserver-0.9.13-test-fix-includetest.patch | 54 ++++++++++++++++++++++
23 .../libvncserver-0.9.13-test-fix-tjunittest.patch | 29 ++++++++++++
24 net-libs/libvncserver/libvncserver-0.9.13.ebuild | 5 ++
25 3 files changed, 88 insertions(+)
26
27 diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch
28 new file mode 100644
29 index 00000000000..76770828883
30 --- /dev/null
31 +++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-includetest.patch
32 @@ -0,0 +1,54 @@
33 +From 39cff3dd6b5d9ebcf86f01e2c7e0bef62abd9d6f Mon Sep 17 00:00:00 2001
34 +From: Alexander Tsoy <alexander@××××.me>
35 +Date: Thu, 25 Jun 2020 11:35:04 +0300
36 +Subject: [PATCH 1/2] test: fix includetest to use CMAKE_MAKE_PROGRAM (#431)
37 +
38 +includetest currently fais if, for example, ninja is used as a CMake
39 +generator. Fix it by using CMAKE_MAKE_PROGRAM in the test.
40 +---
41 + CMakeLists.txt | 2 +-
42 + test/includetest.sh | 7 ++++---
43 + 2 files changed, 5 insertions(+), 4 deletions(-)
44 +
45 +diff --git a/CMakeLists.txt b/CMakeLists.txt
46 +index 0b6228a2..290deb38 100644
47 +--- a/CMakeLists.txt
48 ++++ b/CMakeLists.txt
49 +@@ -680,7 +680,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS)
50 +
51 + add_test(NAME cargs COMMAND test_cargstest)
52 + if(UNIX)
53 +- add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
54 ++ add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM})
55 + endif(UNIX)
56 + if(FOUND_LIBJPEG_TURBO)
57 + add_test(NAME turbojpeg COMMAND test_tjunittest)
58 +diff --git a/test/includetest.sh b/test/includetest.sh
59 +index 23d602e6..6b064208 100755
60 +--- a/test/includetest.sh
61 ++++ b/test/includetest.sh
62 +@@ -5,10 +5,11 @@
63 +
64 + # expects install prefix like /usr as an argument
65 + PREFIX=$1
66 ++CMAKE_MAKE_PROGRAM=$2
67 +
68 + TMPDIR=$(mktemp -d)
69 +
70 +-make install DESTDIR=$TMPDIR
71 ++DESTDIR="$TMPDIR" $CMAKE_MAKE_PROGRAM install
72 +
73 + echo \
74 + "
75 +@@ -19,6 +20,6 @@ int main()
76 + {
77 + return 0;
78 + }
79 +-" > $TMPDIR/includetest.c
80 ++" > "$TMPDIR"/includetest.c
81 +
82 +-cc -I $TMPDIR/$PREFIX $TMPDIR/includetest.c
83 ++cc -I "$TMPDIR/$PREFIX" "$TMPDIR"/includetest.c
84 +--
85 +2.26.2
86 +
87
88 diff --git a/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch
89 new file mode 100644
90 index 00000000000..98e3a654b47
91 --- /dev/null
92 +++ b/net-libs/libvncserver/files/libvncserver-0.9.13-test-fix-tjunittest.patch
93 @@ -0,0 +1,29 @@
94 +From 8244fab5421fd14d4c75ce488ad18d38b7a6edb4 Mon Sep 17 00:00:00 2001
95 +From: Christian Beier <info@××××××××××××××.net>
96 +Date: Thu, 25 Jun 2020 12:21:50 +0200
97 +Subject: [PATCH 2/2] CMake: only add turbojpeg test if configured WITH_JPEG
98 +
99 +Closes #430
100 +---
101 + CMakeLists.txt | 4 ++--
102 + 1 file changed, 2 insertions(+), 2 deletions(-)
103 +
104 +diff --git a/CMakeLists.txt b/CMakeLists.txt
105 +index 290deb38..fdca4d81 100644
106 +--- a/CMakeLists.txt
107 ++++ b/CMakeLists.txt
108 +@@ -682,9 +682,9 @@ add_test(NAME cargs COMMAND test_cargstest)
109 + if(UNIX)
110 + add_test(NAME includetest COMMAND ${TESTS_DIR}/includetest.sh ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_MAKE_PROGRAM})
111 + endif(UNIX)
112 +-if(FOUND_LIBJPEG_TURBO)
113 ++if(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
114 + add_test(NAME turbojpeg COMMAND test_tjunittest)
115 +-endif(FOUND_LIBJPEG_TURBO)
116 ++endif(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
117 + if(LIBVNCSERVER_WITH_WEBSOCKETS)
118 + add_test(NAME wstest COMMAND test_wstest)
119 + endif(LIBVNCSERVER_WITH_WEBSOCKETS)
120 +--
121 +2.26.2
122 +
123
124 diff --git a/net-libs/libvncserver/libvncserver-0.9.13.ebuild b/net-libs/libvncserver/libvncserver-0.9.13.ebuild
125 index 2adb6bf71a2..a5f53103e42 100644
126 --- a/net-libs/libvncserver/libvncserver-0.9.13.ebuild
127 +++ b/net-libs/libvncserver/libvncserver-0.9.13.ebuild
128 @@ -48,6 +48,11 @@ RDEPEND="${DEPEND}"
129
130 DOCS=( AUTHORS ChangeLog NEWS.md README.md TODO.md )
131
132 +PATCHES=(
133 + "${FILESDIR}"/${P}-test-fix-includetest.patch
134 + "${FILESDIR}"/${P}-test-fix-tjunittest.patch
135 +)
136 +
137 src_configure() {
138 local mycmakeargs=(
139 -DWITH_FFMPEG=OFF