commit:     f34f1d2975c24e6edcf644bd829bbf2254bcf897
Author:     Herb Miller Jr <herb <AT> hlmjr <DOT> com>
AuthorDate: Sat Mar 24 17:39:42 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar 24 19:57:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f34f1d29

app-misc/gramps: Don't compress man pages during compile.

Closes: https://github.com/gentoo/gentoo/pull/7346
Package-Manager: Portage[mgorny]-2.3.24.1

 .../files/gramps-4.2.8-uncompressed-docs.patch     | 33 ++++++++++++++++++++++
 app-misc/gramps/gramps-4.2.8.ebuild                |  9 +++---
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/app-misc/gramps/files/gramps-4.2.8-uncompressed-docs.patch 
b/app-misc/gramps/files/gramps-4.2.8-uncompressed-docs.patch
new file mode 100644
index 00000000000..8d43447027d
--- /dev/null
+++ b/app-misc/gramps/files/gramps-4.2.8-uncompressed-docs.patch
@@ -0,0 +1,33 @@
+diff --git a/setup.py b/setup.py
+index 0177ce7..7aaa681 100644
+--- a/setup.py
++++ b/setup.py
+@@ -160,27 +160,8 @@ def build_man(build_cmd):
+             subst_vars = (('@VERSION@', VERSION), )
+             substitute_variables(filename, newfile, subst_vars)
+ 
+-            import gzip
+-            man_file_gz = os.path.join(newdir, 'gramps.1.gz')
+-            if os.path.exists(man_file_gz):
+-                if newer(filename, man_file_gz):
+-                    os.remove(man_file_gz)
+-                else:
+-                    filename = False
+-                    os.remove(newfile)
+-
+-            if filename:
+-                #Binary io, so open is OK
+-                with open(newfile, 'rb') as f_in,\
+-                        gzip.open(man_file_gz, 'wb') as f_out:
+-                    f_out.writelines(f_in)
+-                    log.info('Compiling %s >> %s', filename, man_file_gz)
+-
+-                os.remove(newfile)
+-                filename = False
+-
+             lang = man_dir[8:]
+-            src = build_cmd.build_base  + '/data/man/' + lang  + 
'/gramps.1.gz'
++            src = build_cmd.build_base  + '/data/man/' + lang  + '/gramps.1'
+             target = 'share/man/' + lang + '/man1'
+             data_files.append((target, [src]))
+ 

diff --git a/app-misc/gramps/gramps-4.2.8.ebuild 
b/app-misc/gramps/gramps-4.2.8.ebuild
index 556bb44410a..d9142b2bb5c 100644
--- a/app-misc/gramps/gramps-4.2.8.ebuild
+++ b/app-misc/gramps/gramps-4.2.8.ebuild
@@ -33,18 +33,19 @@ RDEPEND="
        rcs? ( dev-vcs/rcs )
 "
 
-python_configure_all() {
-       mydistutilsargs=( --resourcepath=/usr/share )
-}
-
 python_prepare_all() {
        # Install documentation to the proper location. This can't be done
        # easily with a patch because we substitute in the $PF variable,
        # and that changes with every revision.
        sed -i "s:share/doc/gramps:share/doc/${PF}:g" setup.py || die
+       eapply "${FILESDIR}/${P}-uncompressed-docs.patch"
        distutils-r1_python_prepare_all
 }
 
+python_configure_all() {
+       mydistutilsargs=( --resourcepath=/usr/share )
+}
+
 pkg_postinst() {
        xdg_desktop_database_update
        xdg_mimeinfo_database_update

Reply via email to