net-im/zoom: New use flag bundled-libjpeg-turbo.
authorUlrich Müller <ulm@gentoo.org>
Wed, 8 Apr 2020 12:47:26 +0000 (14:47 +0200)
committerUlrich Müller <ulm@gentoo.org>
Wed, 8 Apr 2020 12:56:50 +0000 (14:56 +0200)
Bug: https://bugs.gentoo.org/715106
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
net-im/zoom/metadata.xml
net-im/zoom/zoom-3.5.382995.0407.ebuild

index cef6d2567e165d4583013fd5a09f9d15daf71921..df9fc1aee0d071a0fbe7daa9c44f63958830c95e 100644 (file)
@@ -10,4 +10,8 @@
   <maintainer type="person">
     <email>mva@gentoo.org</email>
   </maintainer>
+  <use>
+    <flag name="bundled-libjpeg-turbo">Use bundled libturbojpeg
+      instead of <pkg>media-libs/libjpeg-turbo</pkg></flag>
+  </use>
 </pkgmetadata>
index 15de2f97fc139d05d054767b5aa66afa0638f17c..c0591aa26637cf61dc7904504face186a5afd26b 100644 (file)
@@ -14,7 +14,7 @@ S="${WORKDIR}/${PN}"
 LICENSE="all-rights-reserved Apache-2.0" # Apache-2.0 for icon
 SLOT="0"
 KEYWORDS="-* ~amd64 ~x86"
-IUSE="pulseaudio"
+IUSE="bundled-libjpeg-turbo pulseaudio"
 RESTRICT="mirror bindist strip"
 
 RDEPEND="dev-libs/glib:2
@@ -29,7 +29,6 @@ RDEPEND="dev-libs/glib:2
        dev-qt/qtscript:5
        dev-qt/qtwidgets:5
        media-libs/libglvnd
-       media-libs/libjpeg-turbo
        media-sound/mpg123
        sys-apps/dbus
        sys-apps/util-linux
@@ -49,6 +48,7 @@ RDEPEND="dev-libs/glib:2
        x86? (
                dev-qt/qtwebkit:5
        )
+       !bundled-libjpeg-turbo? ( media-libs/libjpeg-turbo )
        pulseaudio? ( media-sound/pulseaudio )
        !pulseaudio? ( media-libs/alsa-lib )"
 
@@ -75,7 +75,13 @@ src_install() {
        use amd64 && doins icudtl.dat
        doexe zoom{,.sh,linux} zopen ZoomLauncher
        dosym {"../../usr/$(get_libdir)",/opt/zoom}/libmpg123.so
-       dosym {"../../usr/$(get_libdir)",/opt/zoom}/libturbojpeg.so #715106
+
+       if use bundled-libjpeg-turbo; then
+               doexe libturbojpeg.so.0.1.0
+               dosym libturbojpeg.so.0.1.0 /opt/zoom/libturbojpeg.so
+       else
+               dosym {"../../usr/$(get_libdir)",/opt/zoom}/libturbojpeg.so #715106
+       fi
 
        make_wrapper zoom ./zoom /opt/zoom
        make_desktop_entry "zoom %U" Zoom zoom-videocam "" \