Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/coturn/, net-im/coturn/files/
Date: Thu, 19 May 2022 03:43:33
Message-Id: 1652931696.23af4fed2d7cc961e7df0ccb0765e590e673f9ab.sam@gentoo
1 commit: 23af4fed2d7cc961e7df0ccb0765e590e673f9ab
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 19 03:41:36 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu May 19 03:41:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23af4fed
7
8 net-im/coturn: fix automagic OpenSSL dep
9
10 Also:
11 - Fix calling AR, CC directly
12 - Fix TMPDIR usage
13
14 Bug: https://bugs.gentoo.org/729820
15 Closes: https://bugs.gentoo.org/835652
16 Closes: https://bugs.gentoo.org/724918
17 Signed-off-by: Sam James <sam <AT> gentoo.org>
18
19 net-im/coturn/coturn-4.5.2-r1.ebuild | 17 +++++++++---
20 net-im/coturn/coturn-9999.ebuild | 31 +++++++++++++++-------
21 .../coturn/files/coturn-4.5.2-respect-TMPDIR.patch | 24 +++++++++++++++++
22 3 files changed, 59 insertions(+), 13 deletions(-)
23
24 diff --git a/net-im/coturn/coturn-4.5.2-r1.ebuild b/net-im/coturn/coturn-4.5.2-r1.ebuild
25 index 37dde1c42c28..d3a3c8813604 100644
26 --- a/net-im/coturn/coturn-4.5.2-r1.ebuild
27 +++ b/net-im/coturn/coturn-4.5.2-r1.ebuild
28 @@ -2,14 +2,14 @@
29 # Distributed under the terms of the GNU General Public License v2
30
31 EAPI=7
32 -inherit systemd tmpfiles
33 +
34 +inherit toolchain-funcs systemd tmpfiles
35 DESCRIPTION="coturn TURN server project"
36 HOMEPAGE="https://github.com/coturn/coturn"
37
38 if [ ${PV} = 9999 ]; then
39 EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
40 inherit git-r3
41 - DEPEND="dev-vcs/git"
42 # S="${WORKDIR}/${PN}-master"
43 else
44 KEYWORDS="~amd64 ~x86"
45 @@ -22,13 +22,18 @@ IUSE="mongodb mysql postgres redis sqlite"
46 RDEPEND="acct-group/turnserver
47 acct-user/turnserver
48 >dev-libs/libevent-2.1.8:=
49 + dev-libs/openssl:=
50 mongodb? ( dev-libs/mongo-c-driver )
51 mysql? ( dev-db/mysql-connector-c:= )
52 postgres? ( dev-db/postgresql:* )
53 redis? ( dev-libs/hiredis:= )
54 sqlite? ( dev-db/sqlite )"
55 -
56 DEPEND="${RDEPEND}"
57 +BDEPEND="virtual/pkgconfig"
58 +
59 +PATCHES=(
60 + "${FILESDIR}"/${PN}-4.5.2-respect-TMPDIR.patch
61 +)
62
63 src_configure() {
64 if [ -n "${AR}" ]; then
65 @@ -56,7 +61,13 @@ src_configure() {
66 if ! use sqlite; then
67 export TURN_NO_SQLITE=yes
68 fi
69 +
70 + tc-export CC
71 +
72 + export ARCHIVERCMD="$(tc-getAR) -r"
73 + export PKGCONFIG="$(tc-getPKG_CONFIG)"
74 export DOCSDIR="/usr/share/doc/${PN}-${PV}"
75 +
76 econf $(use_with sqlite)
77 }
78
79
80 diff --git a/net-im/coturn/coturn-9999.ebuild b/net-im/coturn/coturn-9999.ebuild
81 index 4f65686782b4..d3a3c8813604 100644
82 --- a/net-im/coturn/coturn-9999.ebuild
83 +++ b/net-im/coturn/coturn-9999.ebuild
84 @@ -2,14 +2,14 @@
85 # Distributed under the terms of the GNU General Public License v2
86
87 EAPI=7
88 -inherit systemd tmpfiles
89 +
90 +inherit toolchain-funcs systemd tmpfiles
91 DESCRIPTION="coturn TURN server project"
92 HOMEPAGE="https://github.com/coturn/coturn"
93
94 if [ ${PV} = 9999 ]; then
95 EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
96 inherit git-r3
97 - DEPEND="dev-vcs/git"
98 # S="${WORKDIR}/${PN}-master"
99 else
100 KEYWORDS="~amd64 ~x86"
101 @@ -20,15 +20,20 @@ LICENSE="BSD"
102 SLOT="0"
103 IUSE="mongodb mysql postgres redis sqlite"
104 RDEPEND="acct-group/turnserver
105 - acct-user/turnserver
106 - >dev-libs/libevent-2.1.8:=
107 - mongodb? ( dev-libs/mongo-c-driver )
108 - mysql? ( dev-db/mysql-connector-c:= )
109 - postgres? ( dev-db/postgresql:* )
110 - redis? ( dev-libs/hiredis:= )
111 - sqlite? ( dev-db/sqlite )"
112 -
113 + acct-user/turnserver
114 + >dev-libs/libevent-2.1.8:=
115 + dev-libs/openssl:=
116 + mongodb? ( dev-libs/mongo-c-driver )
117 + mysql? ( dev-db/mysql-connector-c:= )
118 + postgres? ( dev-db/postgresql:* )
119 + redis? ( dev-libs/hiredis:= )
120 + sqlite? ( dev-db/sqlite )"
121 DEPEND="${RDEPEND}"
122 +BDEPEND="virtual/pkgconfig"
123 +
124 +PATCHES=(
125 + "${FILESDIR}"/${PN}-4.5.2-respect-TMPDIR.patch
126 +)
127
128 src_configure() {
129 if [ -n "${AR}" ]; then
130 @@ -56,7 +61,13 @@ src_configure() {
131 if ! use sqlite; then
132 export TURN_NO_SQLITE=yes
133 fi
134 +
135 + tc-export CC
136 +
137 + export ARCHIVERCMD="$(tc-getAR) -r"
138 + export PKGCONFIG="$(tc-getPKG_CONFIG)"
139 export DOCSDIR="/usr/share/doc/${PN}-${PV}"
140 +
141 econf $(use_with sqlite)
142 }
143
144
145 diff --git a/net-im/coturn/files/coturn-4.5.2-respect-TMPDIR.patch b/net-im/coturn/files/coturn-4.5.2-respect-TMPDIR.patch
146 new file mode 100644
147 index 000000000000..036705afc1f2
148 --- /dev/null
149 +++ b/net-im/coturn/files/coturn-4.5.2-respect-TMPDIR.patch
150 @@ -0,0 +1,24 @@
151 +diff --git a/configure b/configure
152 +index caf11f5..003da8d 100755
153 +--- a/configure
154 ++++ b/configure
155 +@@ -513,12 +513,13 @@ fi
156 + # Temporary DIR location:
157 + #########################
158 +
159 +-TMPDIR="."
160 +-
161 +-if [ -d /var/tmp ] ; then
162 +- TMPDIR="/var/tmp"
163 +-elif [ -d /tmp ] ; then
164 +- TMPDIR=/tmp
165 ++TMPDIR=${TMPDIR:-.}
166 ++if test x"${TMPDIR}" = "." ; then
167 ++ if [ -d /var/tmp ] ; then
168 ++ TMPDIR="/var/tmp"
169 ++ elif [ -d /tmp ] ; then
170 ++ TMPDIR=/tmp
171 ++ fi
172 + fi
173 +
174 + ${ECHO_CMD} Use TMP dir ${TMPDIR}