media-video/vlc: add Prefix support.
authorBenda Xu <heroxbd@gentoo.org>
Wed, 21 Jun 2017 11:41:02 +0000 (20:41 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Mon, 3 Jul 2017 08:29:27 +0000 (17:29 +0900)
Bug: 612516
Credit: WGH

Package-Manager: Portage-2.3.3, Repoman-2.3.1

media-video/vlc/vlc-2.2.4-r1.ebuild

index 053118f3d865b6983062c392cae4c36f1c3026bf..94e5b998c2981c7a7c8d655f47d68f95f43bcb82 100644 (file)
@@ -21,13 +21,13 @@ MY_PV="${MY_PV/-beta/-test}"
 MY_P="${PN}-${MY_PV}"
 
 DESCRIPTION="VLC media player - Video player and streamer"
-HOMEPAGE="https://www.videolan.org/vlc/"
+HOMEPAGE="http://www.videolan.org/vlc/"
 if [[ ${PV} = *9999 ]] ; then # Live ebuild
        SRC_URI=""
 elif [[ "${MY_P}" == "${P}" ]]; then
-       SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
+       SRC_URI="http://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
 else
-       SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
+       SRC_URI="http://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
 fi
 
 LICENSE="LGPL-2.1 GPL-2"
@@ -307,7 +307,7 @@ src_configure() {
        local myconf
 
        # Compatibility fix for Samba 4.
-       use samba && append-cppflags "-I/usr/include/samba-4.0"
+       use samba && append-cppflags "-I${EPREFIX}/usr/include/samba-4.0"
 
        # We need to disable -fstack-check if use >=gcc 4.8.0.
        # See bug #499996
@@ -315,10 +315,10 @@ src_configure() {
 
        # Needs libresid-builder from libsidplay:2 which is in another directory...
        # FIXME!
-       append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
+       append-ldflags "-L${EPREFIX}/usr/$(get_libdir)/sidplay/builders/"
 
        if use truetype || use projectm ; then
-               local dejavu="/usr/share/fonts/dejavu/"
+               local dejavu="${EPREFIX}/usr/share/fonts/dejavu/"
                myconf="--with-default-font=${dejavu}/DejaVuSans.ttf \
                                --with-default-font-family=Sans \
                                --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
@@ -339,7 +339,7 @@ src_configure() {
        econf \
                ${myconf} \
                --enable-vlc \
-               --docdir=/usr/share/doc/${PF} \
+               --docdir='$(datarootdir)'/doc/${PF} \
                --disable-dependency-tracking \
                --disable-optimizations \
                --disable-update-check \