commit:     0c7dd1f7d5dbf2e129b50b870a6f208a724cbaaf
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Oct  2 05:35:50 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 04:25:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c7dd1f7

app-text/calibre: avoid setting useless variables at install time

The install process does not rerun compiles, so setting variables there
is useless and does nothing. They didn't have any effect on src_compile
all this time, which means that whatever they tried to fix clearly was
not an issue. ;)

That being said, there are two things going on here:
- OVERRIDE_CFLAGS is used by the calibre build system in addition to
  CFLAGS, so it is not actually necessary to override it, and using
  both, means using -Wall and suchlike so respecting it seems reasonable
- the calibre build system respects either $PATH or $QMAKE to find the
  qmake program. Instead of using the former method in src_compile and
  the latter method in src_install, just use the latter method in
  src_compile and avoid munging $PATH.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/calibre/calibre-5.44.0-r2.ebuild | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app-text/calibre/calibre-5.44.0-r2.ebuild 
b/app-text/calibre/calibre-5.44.0-r2.ebuild
index 759f990001f0..598bb98f4356 100644
--- a/app-text/calibre/calibre-5.44.0-r2.ebuild
+++ b/app-text/calibre/calibre-5.44.0-r2.ebuild
@@ -183,8 +183,9 @@ src_compile() {
        # bug 821871
        local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
        export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" 
PODOFO_LIB_DIR="${MY_LIBDIR}"
+       export QMAKE="$(qt5_get_bindir)/qmake"
 
-       PATH="${T}/bin:$(qt5_get_bindir):${PATH}" ${EPYTHON} setup.py build || 
die
+       ${EPYTHON} setup.py build || die
 }
 
 src_test() {
@@ -202,8 +203,6 @@ src_test() {
 }
 
 src_install() {
-       export QMAKE="$(qt5_get_bindir)/qmake"
-
        # Bug #352625 - Some LANGUAGE values can trigger the following 
ValueError:
        #   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
        #    return _parse_localename(localename)
@@ -219,9 +218,6 @@ src_install() {
        export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
        mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
 
-       tc-export CC CXX
-       # Bug #334243 - respect LDFLAGS when building extensions
-       export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
        local libdir=$(get_libdir)
        [[ -n $libdir ]] || die "get_libdir returned an empty string"
 

Reply via email to