media-video/vlc: fix compiler type check
authorAmy Winston <amynka@gentoo.org>
Mon, 25 Jul 2016 20:30:51 +0000 (22:30 +0200)
committerAmy Winston <amynka@gentoo.org>
Mon, 25 Jul 2016 20:30:51 +0000 (22:30 +0200)
Package-Manager: portage-2.2.28

media-video/vlc/vlc-2.2.1-r1.ebuild
media-video/vlc/vlc-2.2.4.ebuild
media-video/vlc/vlc-2.2.9999.ebuild
media-video/vlc/vlc-9999.ebuild

index b2dbdf0af4ced9d9bfaf79c0befc227842dd019e..119a8244ece4d38186a29bda2041d86ccbb9edd7 100644 (file)
@@ -15,7 +15,7 @@ if [ "${PV%9999}" != "${PV}" ] ; then
        fi
 fi
 
-inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+inherit eutils multilib autotools toolchain-funcs flag-o-matic versionator virtualx ${SCM}
 
 MY_PV="${PV/_/-}"
 MY_PV="${MY_PV/-beta/-test}"
@@ -213,8 +213,8 @@ REQUIRED_USE="
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
-       if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
-               if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+       if [[ "${MERGE_TYPE}" != "binary" ]] && tc-is-gcc ; then
+               if ! version_is_at_least 4.5 $(gcc-version) ; then
                        die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
                fi
        fi
@@ -236,7 +236,7 @@ src_prepare() {
        # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
        #
        # https://gcc.gnu.org/c99status.html
-       if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+       if tc-is-gcc ; then
                sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
        fi
 
index e874b8c647aa48cfb91fda7f2e3c9e267d93cebc..1ae2aa526c4032c2b149a81ab28d2a8cfefe7068 100644 (file)
@@ -15,7 +15,7 @@ if [ "${PV%9999}" != "${PV}" ] ; then
        fi
 fi
 
-inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+inherit eutils multilib autotools toolchain-funcs flag-o-matic versionator virtualx ${SCM}
 
 MY_PV="${PV/_/-}"
 MY_PV="${MY_PV/-beta/-test}"
@@ -239,8 +239,8 @@ PATCHES=(
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
-       if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
-               if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+       if [[ "${MERGE_TYPE}" != "binary" ]] && tc-is-gcc ; then
+               if ! version_is_at_least 4.5 $(gcc-version) ; then
                        die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
                fi
        fi
@@ -262,7 +262,7 @@ src_prepare() {
        # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
        #
        # https://gcc.gnu.org/c99status.html
-       if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+       if tc-is-gcc ; then
                sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
        fi
 
index 2ca5cafb01e342a822d82ce6c1dd7156267dc922..a68d243f0324e46d1a58fc5538c80d3f2e9bb618 100644 (file)
@@ -15,7 +15,7 @@ if [ "${PV%9999}" != "${PV}" ] ; then
        fi
 fi
 
-inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+inherit eutils multilib autotools toolchain-funcs flag-o-matic versionator virtualx ${SCM}
 
 MY_PV="${PV/_/-}"
 MY_PV="${MY_PV/-beta/-test}"
@@ -209,8 +209,8 @@ REQUIRED_USE="
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
-       if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
-               if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+       if [[ "${MERGE_TYPE}" != "binary" ]] && tc-is-gcc ; then
+               if ! version_is_at_least 4.5 $(gcc-version) ; then
                        die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
                fi
        fi
@@ -232,7 +232,7 @@ src_prepare() {
        # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
        #
        # https://gcc.gnu.org/c99status.html
-       if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+       if tc-is-gcc ; then
                sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
        fi
 
index 0ad493800418766bd9a8f0e567fe44f9abafa44a..ebcd381fa1bd905404e832a27321cc21dd28fcd4 100644 (file)
@@ -15,7 +15,7 @@ if [ "${PV%9999}" != "${PV}" ] ; then
        fi
 fi
 
-inherit eutils multilib autotools toolchain-funcs flag-o-matic virtualx ${SCM}
+inherit eutils multilib autotools toolchain-funcs flag-o-matic versionator virtualx ${SCM}
 
 MY_PV="${PV/_/-}"
 MY_PV="${MY_PV/-beta/-test}"
@@ -212,8 +212,8 @@ REQUIRED_USE="
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
-       if [[ "${MERGE_TYPE}" != "binary" && "$(tc-getCC)" == *"gcc"* ]] ; then
-               if [[ $(gcc-major-version) < 4 || ( $(gcc-major-version) == 4 && $(gcc-minor-version) < 5 ) ]] ; then
+       if [[ "${MERGE_TYPE}" != "binary" ]] && tc-is-gcc ; then
+               if ! version_is_at_least 4.5 $(gcc-version) ; then
                        die "You need to have at least >=sys-devel/gcc-4.5 to build and/or have a working vlc, see bug #426754."
                fi
        fi
@@ -235,7 +235,7 @@ src_prepare() {
        # config.h:793: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas]
        #
        # https://gcc.gnu.org/c99status.html
-       if [[ "$(tc-getCC)" == *"gcc"* ]] ; then
+       if tc-is-gcc ; then
                sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die
        fi