Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/gramps/, app-misc/gramps/files/
Date: Sat, 24 Mar 2018 19:58:05
Message-Id: 1521921420.f34f1d2975c24e6edcf644bd829bbf2254bcf897.mgorny@gentoo
1 commit: f34f1d2975c24e6edcf644bd829bbf2254bcf897
2 Author: Herb Miller Jr <herb <AT> hlmjr <DOT> com>
3 AuthorDate: Sat Mar 24 17:39:42 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 24 19:57:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f34f1d29
7
8 app-misc/gramps: Don't compress man pages during compile.
9
10 Closes: https://github.com/gentoo/gentoo/pull/7346
11 Package-Manager: Portage[mgorny]-2.3.24.1
12
13 .../files/gramps-4.2.8-uncompressed-docs.patch | 33 ++++++++++++++++++++++
14 app-misc/gramps/gramps-4.2.8.ebuild | 9 +++---
15 2 files changed, 38 insertions(+), 4 deletions(-)
16
17 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
18 new file mode 100644
19 index 00000000000..8d43447027d
20 --- /dev/null
21 +++ b/app-misc/gramps/files/gramps-4.2.8-uncompressed-docs.patch
22 @@ -0,0 +1,33 @@
23 +diff --git a/setup.py b/setup.py
24 +index 0177ce7..7aaa681 100644
25 +--- a/setup.py
26 ++++ b/setup.py
27 +@@ -160,27 +160,8 @@ def build_man(build_cmd):
28 + subst_vars = (('@VERSION@', VERSION), )
29 + substitute_variables(filename, newfile, subst_vars)
30 +
31 +- import gzip
32 +- man_file_gz = os.path.join(newdir, 'gramps.1.gz')
33 +- if os.path.exists(man_file_gz):
34 +- if newer(filename, man_file_gz):
35 +- os.remove(man_file_gz)
36 +- else:
37 +- filename = False
38 +- os.remove(newfile)
39 +-
40 +- if filename:
41 +- #Binary io, so open is OK
42 +- with open(newfile, 'rb') as f_in,\
43 +- gzip.open(man_file_gz, 'wb') as f_out:
44 +- f_out.writelines(f_in)
45 +- log.info('Compiling %s >> %s', filename, man_file_gz)
46 +-
47 +- os.remove(newfile)
48 +- filename = False
49 +-
50 + lang = man_dir[8:]
51 +- src = build_cmd.build_base + '/data/man/' + lang + '/gramps.1.gz'
52 ++ src = build_cmd.build_base + '/data/man/' + lang + '/gramps.1'
53 + target = 'share/man/' + lang + '/man1'
54 + data_files.append((target, [src]))
55 +
56
57 diff --git a/app-misc/gramps/gramps-4.2.8.ebuild b/app-misc/gramps/gramps-4.2.8.ebuild
58 index 556bb44410a..d9142b2bb5c 100644
59 --- a/app-misc/gramps/gramps-4.2.8.ebuild
60 +++ b/app-misc/gramps/gramps-4.2.8.ebuild
61 @@ -33,18 +33,19 @@ RDEPEND="
62 rcs? ( dev-vcs/rcs )
63 "
64
65 -python_configure_all() {
66 - mydistutilsargs=( --resourcepath=/usr/share )
67 -}
68 -
69 python_prepare_all() {
70 # Install documentation to the proper location. This can't be done
71 # easily with a patch because we substitute in the $PF variable,
72 # and that changes with every revision.
73 sed -i "s:share/doc/gramps:share/doc/${PF}:g" setup.py || die
74 + eapply "${FILESDIR}/${P}-uncompressed-docs.patch"
75 distutils-r1_python_prepare_all
76 }
77
78 +python_configure_all() {
79 + mydistutilsargs=( --resourcepath=/usr/share )
80 +}
81 +
82 pkg_postinst() {
83 xdg_desktop_database_update
84 xdg_mimeinfo_database_update