media-tv/mythtv: ebuild enhancements
authorWilson Michaels <thebitpit@earthlink.net>
Thu, 20 Feb 2020 20:10:54 +0000 (14:10 -0600)
committerJoonas Niilola <juippis@gentoo.org>
Fri, 21 Feb 2020 05:30:03 +0000 (07:30 +0200)
Closes: https://bugs.gentoo.org/710136
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Wilson Michaels <thebitpit@earthlink.net>
Closes: https://github.com/gentoo/gentoo/pull/14719
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
media-tv/mythtv/mythtv-30.0_p20190808-r2.ebuild

index 59f2710c139789ccb422041fc32a08a0a83b14ce..b09dc0235f971601d202ee5e3a99b15b7ff91359 100644 (file)
@@ -33,7 +33,7 @@ REQUIRED_USE="
        bluray? ( xml )
        cdr? ( cdda )
 "
-COMMON="
+COMMON_DEPEND="
        acct-user/mythtv
        dev-libs/glib:2
        dev-libs/lzo
@@ -110,7 +110,7 @@ COMMON="
                net-dns/avahi[mdnsresponder-compat]
        )
 "
-RDEPEND="${COMMON}
+RDEPEND="${COMMON_DEPEND}
        python? (
                ${PYTHON_DEPS}
                $(python_gen_cond_dep '
@@ -134,7 +134,7 @@ RDEPEND="${COMMON}
        xmltv? ( >=media-tv/xmltv-0.5.43 )
 "
 DEPEND="
-       ${COMMON}
+       ${COMMON_DEPEND}
        dev-lang/yasm
        x11-base/xorg-proto
 "
@@ -348,6 +348,9 @@ src_configure() {
                --cxx="$(tc-getCXX)" \
                --ar="$(tc-getAR)" \
                --optflags="${CFLAGS}" \
+               --extra-cflags="${CFLAGS}" \
+               --extra-cxxflags="${CXXFLAGS}" \
+               --extra-ldflags="${LDFLAGS}" \
                --qmake=$(qt5_get_bindir)/qmake \
                "${myconf[@]}"
 }
@@ -400,21 +403,15 @@ src_install() {
                newins "${FILESDIR}"/xinitrc-r1 .xinitrc
        fi
 
-       # Make Python files executable
-       find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do
-               if [[ ! "${file##*/}" = "__init__.py" ]]; then
-                       chmod a+x "${file}" || die "Failed to make python file $(basename ${file}) executable"
-               fi
-       done
+       # Make Python files executable but not files named "__init__.py"
+       find "${ED}/usr/share/mythtv" -type f -name '*.py' -exec expr \( {} : '.*__init__.py' \) = 0 \; \
+               -exec chmod a+x {} \; || die "Failed to make python file $(basename ${file}) executable"
 
        # Ensure that Python scripts are executed by Python 2
        python_fix_shebang "${ED}/usr/share/mythtv"
 
        # Make shell & perl scripts executable
-       find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \
-               while read file; do
-               chmod a+x "${file}" || die
-       done
+       find "${ED}" -type f \( -name '*.sh' -o -name '*.pl' \) -exec chmod a+x {} \; || die "Failed to make script executable"
 }
 
 pkg_postinst() {