|
Lines 49-175
Link Here
|
| 49 |
# looks to have an auto-magic dep with medialibs, but not in the tree so... |
49 |
# looks to have an auto-magic dep with medialibs, but not in the tree so... |
| 50 |
# upstream bug 2794736 |
50 |
# upstream bug 2794736 |
| 51 |
|
51 |
|
| 52 |
# TODO: |
52 |
src_prepare() { |
| 53 |
# manage in a better way the conditional use flags (with eapi-3 ?) |
53 |
# move files from doc tarball into ${S} |
|
|
54 |
if use doc; then |
| 55 |
mv ../html . || die "moving doc files failed" |
| 56 |
fi |
| 57 |
|
| 58 |
# remove visual studio related files from samples/ |
| 59 |
if use examples; then |
| 60 |
rm -f samples/*/*.vcproj |
| 61 |
rm -f samples/*/*.sln |
| 62 |
rm -f samples/*/*.dsp |
| 63 |
rm -f samples/*/*.dsw |
| 64 |
fi |
| 65 |
|
| 66 |
# workaround for a compilation issue in contain.cxx, upstream bug 2794741 |
| 67 |
epatch "${FILESDIR}"/${P}-gcc-allocator.patch |
| 68 |
} |
| 54 |
|
69 |
|
| 55 |
conditional_use_error_msg() { |
70 |
conditional_use_error_msg() { |
| 56 |
eerror "To enable ${1} USE flag, you need ${2} USE flag to be enabled" |
71 |
ewarn "To enable USE=\"${1}\", you need USE=\"${2}\" as well" |
| 57 |
eerror "Please, enable ${2} or disable ${1}" |
72 |
ewarn "Please, enable ${2} or disable ${1}" |
| 58 |
} |
73 |
} |
| 59 |
|
74 |
|
| 60 |
pkg_setup() { |
75 |
use_disable() { |
| 61 |
local use_error=false |
76 |
if [ -z "$1" ]; then |
|
|
77 |
echo "!!! use_disable() called without a parameter." >&2 |
| 78 |
echo "!!! use_disable <USEFLAG> [<flagname> [value]]" >&2 |
| 79 |
return 1 |
| 80 |
fi |
| 81 |
|
| 82 |
local UE_SUFFIX="" |
| 83 |
if [ ! -z "${3}" ]; then |
| 84 |
UE_SUFFIX="=${3}" |
| 85 |
fi |
| 86 |
|
| 87 |
local UWORD="$2" |
| 88 |
if [ -z "${UWORD}" ]; then |
| 89 |
UWORD="$1" |
| 90 |
fi |
| 62 |
|
91 |
|
| 63 |
# stop emerge if a conditional use flag is not respected |
92 |
echo "--disable-${UWORD}" |
|
|
93 |
return 0 |
| 94 |
} |
| 95 |
|
| 96 |
src_configure() { |
| 97 |
local myconf="" |
| 64 |
|
98 |
|
| 65 |
if ! use video; then |
99 |
if ! use video; then |
| 66 |
if use sdl; then |
100 |
if use sdl; then |
| 67 |
conditional_use_error_msg "sdl" "video" |
101 |
conditional_use_error_msg "sdl" "video" |
| 68 |
use_error=true |
102 |
myconf="${myconf} $(use_disable sdl)" |
|
|
103 |
else |
| 104 |
myconf="${myconf} $(use_enable sdl)" |
| 69 |
fi |
105 |
fi |
| 70 |
if use video-file; then |
106 |
if use video-file; then |
| 71 |
conditional_use_error_msg "video-file" "video" |
107 |
conditional_use_error_msg "video-file" "video" |
| 72 |
use_error=true |
108 |
myconf="${myconf} $(use_disable video-file vidfile)" |
|
|
109 |
else |
| 110 |
myconf="${myconf} $(use_enable video-file vidfile)" |
| 73 |
fi |
111 |
fi |
| 74 |
fi |
112 |
fi |
| 75 |
|
113 |
|
| 76 |
if use jabber && ! use xml; then |
114 |
if use jabber && ! use xml; then |
| 77 |
conditional_use_error_msg "jabber" "xml" |
115 |
conditional_use_error_msg "jabber" "xml" |
| 78 |
use_error=true |
116 |
myconf="${myconf} $(use_disable jabber)" |
|
|
117 |
else |
| 118 |
myconf="${myconf} $(use_enable jabber)" |
| 79 |
fi |
119 |
fi |
| 80 |
|
120 |
|
| 81 |
if use ldap && ! use dns; then |
121 |
if use ldap && ! use dns; then |
| 82 |
conditional_use_error_msg "ldap" "dns" |
122 |
conditional_use_error_msg "ldap" "dns" |
| 83 |
use_error=true |
123 |
myconf="${myconf} $(use_disable ldap openldap)" |
|
|
124 |
else |
| 125 |
myconf="${myconf} $(use_enable ldap openldap)" |
| 84 |
fi |
126 |
fi |
| 85 |
|
127 |
|
| 86 |
if use ffmpeg && ! use pipechan; then |
128 |
if use ffmpeg && ! use pipechan; then |
| 87 |
conditional_use_error_msg "ffmpeg" "pipechan" |
129 |
conditional_use_error_msg "ffmpeg" "pipechan" |
| 88 |
use_error=true |
130 |
myconf="${myconf} $(use_disable ffmpeg ffvdev)" |
|
|
131 |
else |
| 132 |
myconf="${myconf} $(use_enable ffmpeg ffvdev)" |
| 89 |
fi |
133 |
fi |
| 90 |
|
134 |
|
| 91 |
if use http && ! use url; then |
135 |
if use http && ! use url; then |
| 92 |
conditional_use_error_msg "http" "url" |
136 |
conditional_use_error_msg "http" "url" |
| 93 |
use_error=true |
137 |
myconf="${myconf} $(use_disable http)" |
|
|
138 |
else |
| 139 |
myconf="${myconf} $(use_enable http)" |
| 94 |
fi |
140 |
fi |
| 95 |
|
141 |
|
| 96 |
if use http-forms; then |
142 |
if use http-forms; then |
| 97 |
if ! use http; then |
143 |
if ! use http; then |
| 98 |
conditional_use_error_msg "http-forms" "http" |
144 |
conditional_use_error_msg "http-forms" "http" |
| 99 |
use_error=true |
145 |
myconf="${myconf} $(use_disable http-forms httpforms)" |
|
|
146 |
else |
| 147 |
myconf="${myconf} $(use_enable http-forms httpforms)" |
| 100 |
fi |
148 |
fi |
| 101 |
if ! use config-file; then |
149 |
if ! use config-file; then |
| 102 |
conditional_use_error_msg "http-forms" "config-file" |
150 |
conditional_use_error_msg "http-forms" "config-file" |
| 103 |
use_error=true |
151 |
myconf="${myconf} $(use_disable http-forms httpforms)" |
|
|
152 |
else |
| 153 |
myconf="${myconf} $(use_enable http-forms httpforms)" |
| 104 |
fi |
154 |
fi |
| 105 |
fi |
155 |
fi |
| 106 |
|
156 |
|
| 107 |
if use http-server && ! use http-forms; then |
157 |
if use http-server && ! use http-forms; then |
| 108 |
conditional_use_error_msg "http-server" "http-forms" |
158 |
conditional_use_error_msg "http-server" "http-forms" |
| 109 |
use_error=true |
159 |
myconf="${myconf} $(use_disable http-server httpserver)" |
|
|
160 |
else |
| 161 |
myconf="${myconf} $(use_enable http-server httpserver)" |
| 110 |
fi |
162 |
fi |
| 111 |
|
163 |
|
| 112 |
if use vxml; then |
164 |
if use vxml; then |
| 113 |
if ! use xml; then |
165 |
if ! use xml; then |
| 114 |
conditional_use_error_msg "vxml" "xml" |
166 |
conditional_use_error_msg "vxml" "xml" |
| 115 |
use_error=true |
167 |
myconf="${myconf} $(use_disable vxml)" |
|
|
168 |
else |
| 169 |
myconf="${myconf} $(use_enable vxml)" |
| 116 |
fi |
170 |
fi |
| 117 |
if ! use http; then |
171 |
if ! use http; then |
| 118 |
conditional_use_error_msg "vxml" "http" |
172 |
conditional_use_error_msg "vxml" "http" |
| 119 |
use_error=true |
173 |
myconf="${myconf} $(use_disable vxml)" |
|
|
174 |
else |
| 175 |
myconf="${myconf} $(use_enable vxml)" |
| 120 |
fi |
176 |
fi |
| 121 |
fi |
177 |
fi |
| 122 |
|
178 |
|
| 123 |
if use xmlrpc; then |
179 |
if use xmlrpc; then |
| 124 |
if ! use xml; then |
180 |
if ! use xml; then |
| 125 |
conditional_use_error_msg "xmlrpc" "xml" |
181 |
conditional_use_error_msg "xmlrpc" "xml" |
| 126 |
use_error=true |
182 |
myconf="${myconf} $(use_disable xmlrpc)" |
|
|
183 |
else |
| 184 |
myconf="${myconf} $(use_enable xmlrpc)" |
| 127 |
fi |
185 |
fi |
| 128 |
if ! use http; then |
186 |
if ! use http; then |
| 129 |
conditional_use_error_msg "xmlrpc" "http" |
187 |
conditional_use_error_msg "xmlrpc" "http" |
| 130 |
use_error=true |
188 |
myconf="${myconf} $(use_disable xmlrpc)" |
|
|
189 |
else |
| 190 |
myconf="${myconf} $(use_enable xmlrpc)" |
| 131 |
fi |
191 |
fi |
| 132 |
fi |
192 |
fi |
| 133 |
|
193 |
|
| 134 |
if use soap; then |
194 |
if use soap; then |
| 135 |
if ! use xml; then |
195 |
if ! use xml; then |
| 136 |
conditional_use_error_msg "soap" "xml" |
196 |
conditional_use_error_msg "soap" "xml" |
| 137 |
use_error=true |
197 |
myconf="${myconf} $(use_disable soap)" |
|
|
198 |
else |
| 199 |
myconf="${myconf} $(use_enable soap)" |
| 138 |
fi |
200 |
fi |
| 139 |
if ! use http; then |
201 |
if ! use http; then |
| 140 |
conditional_use_error_msg "soap" "http" |
202 |
conditional_use_error_msg "soap" "http" |
| 141 |
use_error=true |
203 |
myconf="${myconf} $(use_disable soap)" |
|
|
204 |
else |
| 205 |
myconf="${myconf} $(use_enable soap)" |
| 142 |
fi |
206 |
fi |
| 143 |
fi |
207 |
fi |
| 144 |
|
208 |
|
| 145 |
if ${use_error}; then |
|
|
| 146 |
echo |
| 147 |
eerror "Please see messages above and re-emerge ${PN} accordingly." |
| 148 |
die |
| 149 |
fi |
| 150 |
} |
| 151 |
|
| 152 |
src_prepare() { |
| 153 |
# move files from doc tarball into ${S} |
| 154 |
if use doc; then |
| 155 |
mv ../html . || die "moving doc files failed" |
| 156 |
fi |
| 157 |
|
| 158 |
# remove visual studio related files from samples/ |
| 159 |
if use examples; then |
| 160 |
rm -f samples/*/*.vcproj |
| 161 |
rm -f samples/*/*.sln |
| 162 |
rm -f samples/*/*.dsp |
| 163 |
rm -f samples/*/*.dsw |
| 164 |
fi |
| 165 |
|
| 166 |
# workaround for a compilation issue in contain.cxx, upstream bug 2794741 |
| 167 |
epatch "${FILESDIR}"/${P}-gcc-allocator.patch |
| 168 |
} |
| 169 |
|
| 170 |
src_configure() { |
| 171 |
local myconf="" |
| 172 |
|
| 173 |
# plugins are disabled only if ! audio and ! video |
209 |
# plugins are disabled only if ! audio and ! video |
| 174 |
if ! use audio && ! use video; then |
210 |
if ! use audio && ! use video; then |
| 175 |
myconf="${myconf} --disable-plugins" |
211 |
myconf="${myconf} --disable-plugins" |
|
Lines 207-222
Link Here
|
| 207 |
$(use_enable dns resolver) \ |
243 |
$(use_enable dns resolver) \ |
| 208 |
$(use_enable dtmf) \ |
244 |
$(use_enable dtmf) \ |
| 209 |
$(use_enable esd) \ |
245 |
$(use_enable esd) \ |
| 210 |
$(use_enable ffmpeg ffvdev) \ |
|
|
| 211 |
$(use_enable ftp) \ |
246 |
$(use_enable ftp) \ |
| 212 |
$(use_enable http) \ |
|
|
| 213 |
$(use_enable http-forms httpforms) \ |
| 214 |
$(use_enable http-server httpsvc) \ |
| 215 |
$(use_enable ieee1394 avc) \ |
247 |
$(use_enable ieee1394 avc) \ |
| 216 |
$(use_enable ieee1394 dc) \ |
248 |
$(use_enable ieee1394 dc) \ |
| 217 |
$(use_enable ipv6) \ |
249 |
$(use_enable ipv6) \ |
| 218 |
$(use_enable jabber) \ |
|
|
| 219 |
$(use_enable ldap openldap) \ |
| 220 |
$(use_enable mail pop3smtp) \ |
250 |
$(use_enable mail pop3smtp) \ |
| 221 |
$(use_enable odbc) \ |
251 |
$(use_enable odbc) \ |
| 222 |
$(use_enable oss) \ |
252 |
$(use_enable oss) \ |
|
Lines 225-235
Link Here
|
| 225 |
$(use_enable qos) \ |
255 |
$(use_enable qos) \ |
| 226 |
$(use_enable remote remconn) \ |
256 |
$(use_enable remote remconn) \ |
| 227 |
$(use_enable sasl) \ |
257 |
$(use_enable sasl) \ |
| 228 |
$(use_enable sdl) \ |
|
|
| 229 |
$(use_enable serial) \ |
258 |
$(use_enable serial) \ |
| 230 |
$(use_enable shmvideo) \ |
259 |
$(use_enable shmvideo) \ |
| 231 |
$(use_enable snmp) \ |
260 |
$(use_enable snmp) \ |
| 232 |
$(use_enable soap) \ |
|
|
| 233 |
$(use_enable socks) \ |
261 |
$(use_enable socks) \ |
| 234 |
$(use_enable ssl openssl) \ |
262 |
$(use_enable ssl openssl) \ |
| 235 |
$(use_enable stun) \ |
263 |
$(use_enable stun) \ |
|
Lines 239-249
Link Here
|
| 239 |
$(use_enable v4l) \ |
267 |
$(use_enable v4l) \ |
| 240 |
$(use_enable v4l2) \ |
268 |
$(use_enable v4l2) \ |
| 241 |
$(use_enable video) \ |
269 |
$(use_enable video) \ |
| 242 |
$(use_enable video-file vidfile) \ |
|
|
| 243 |
$(use_enable vxml) \ |
| 244 |
$(use_enable wav wavfile) \ |
270 |
$(use_enable wav wavfile) \ |
| 245 |
$(use_enable xml expat) \ |
271 |
$(use_enable xml expat) |
| 246 |
$(use_enable xmlrpc) |
|
|
| 247 |
} |
272 |
} |
| 248 |
|
273 |
|
| 249 |
src_compile() { |
274 |
src_compile() { |