1 |
commit: aafe737392a43a92dac2cd87ca068937d9d9df61 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 29 12:30:09 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 29 12:30:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aafe7373 |
7 |
|
8 |
sci-chemistry/chemtool: Port to EAPI 7 |
9 |
|
10 |
* fix `-fno-common`/GCC 10 |
11 |
* fix broken check target |
12 |
|
13 |
Closes: https://bugs.gentoo.org/708234 |
14 |
Closes: https://bugs.gentoo.org/728954 |
15 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
16 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
17 |
|
18 |
sci-chemistry/chemtool/chemtool-1.6.14.ebuild | 49 ++++++++++++---------- |
19 |
.../chemtool/files/chemtool-1.6.14-fix-tests.patch | 6 +++ |
20 |
.../files/chemtool-1.6.14-fno-common.patch | 37 ++++++++++++++++ |
21 |
...patch => chemtool-1.6.14-no-underlinking.patch} | 0 |
22 |
4 files changed, 70 insertions(+), 22 deletions(-) |
23 |
|
24 |
diff --git a/sci-chemistry/chemtool/chemtool-1.6.14.ebuild b/sci-chemistry/chemtool/chemtool-1.6.14.ebuild |
25 |
index 58a5d56b105..3d2d12c9a70 100644 |
26 |
--- a/sci-chemistry/chemtool/chemtool-1.6.14.ebuild |
27 |
+++ b/sci-chemistry/chemtool/chemtool-1.6.14.ebuild |
28 |
@@ -1,11 +1,9 @@ |
29 |
-# Copyright 1999-2014 Gentoo Foundation |
30 |
+# Copyright 1999-2020 Gentoo Authors |
31 |
# Distributed under the terms of the GNU General Public License v2 |
32 |
|
33 |
-EAPI=5 |
34 |
+EAPI=7 |
35 |
|
36 |
-AUTOTOOLS_AUTORECONF=true |
37 |
- |
38 |
-inherit autotools-utils eutils |
39 |
+inherit autotools desktop |
40 |
|
41 |
DESCRIPTION="A GTK program for drawing organic molecules" |
42 |
HOMEPAGE="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/" |
43 |
@@ -23,34 +21,41 @@ RDEPEND=" |
44 |
x11-libs/libX11 |
45 |
x11-libs/pango |
46 |
emf? ( media-libs/libemf )" |
47 |
-DEPEND="${RDEPEND} |
48 |
- virtual/pkgconfig" |
49 |
- |
50 |
-AUTOTOOLS_IN_SOURCE_BUILD=1 |
51 |
+DEPEND="${RDEPEND}" |
52 |
+BDEPEND="virtual/pkgconfig" |
53 |
|
54 |
PATCHES=( |
55 |
- "${FILESDIR}"/1.6.13-no-underlinking.patch |
56 |
+ "${FILESDIR}"/${P}-no-underlinking.patch |
57 |
+ "${FILESDIR}"/${P}-fno-common.patch |
58 |
+ "${FILESDIR}"/${P}-fix-tests.patch |
59 |
) |
60 |
|
61 |
+src_prepare() { |
62 |
+ default |
63 |
+ eautoreconf |
64 |
+} |
65 |
+ |
66 |
src_configure() { |
67 |
- local myeconfargs=( |
68 |
- --without-kdedir |
69 |
- $(use_with gnome gnomedir /usr) |
70 |
+ econf \ |
71 |
+ --enable-undo \ |
72 |
+ --enable-menu \ |
73 |
+ --without-kdedir \ |
74 |
+ $(use_with gnome gnomedir "${EPREFIX}"/usr) \ |
75 |
$(use_enable emf) |
76 |
- --enable-undo |
77 |
- --enable-menu |
78 |
- ) |
79 |
- autotools-utils_src_configure |
80 |
} |
81 |
|
82 |
src_install() { |
83 |
- autotools-utils_src_install |
84 |
+ default |
85 |
|
86 |
- insinto /usr/share/${PN}/examples |
87 |
- doins "${S}"/examples/* |
88 |
- if ! use nls; then rm -rf "${ED}"/usr/share/locale || die; fi |
89 |
+ insinto /usr/share/chemtool/examples |
90 |
+ doins -r examples/. |
91 |
|
92 |
insinto /usr/share/pixmaps |
93 |
doins chemtool.xpm |
94 |
- make_desktop_entry ${PN} Chemtool ${PN} "Education;Science;Chemistry" |
95 |
+ |
96 |
+ if ! use nls; then |
97 |
+ rm -rf "${ED}"/usr/share/locale || die |
98 |
+ fi |
99 |
+ |
100 |
+ make_desktop_entry chemtool Chemtool chemtool "Education;Science;Chemistry" |
101 |
} |
102 |
|
103 |
diff --git a/sci-chemistry/chemtool/files/chemtool-1.6.14-fix-tests.patch b/sci-chemistry/chemtool/files/chemtool-1.6.14-fix-tests.patch |
104 |
new file mode 100644 |
105 |
index 00000000000..755ae3f0191 |
106 |
--- /dev/null |
107 |
+++ b/sci-chemistry/chemtool/files/chemtool-1.6.14-fix-tests.patch |
108 |
@@ -0,0 +1,6 @@ |
109 |
+--- /dev/null |
110 |
++++ b/src-cht/Makefile.am |
111 |
+@@ -0,0 +1,3 @@ |
112 |
++bin_PROGRAMS = cht |
113 |
++ |
114 |
++cht_SOURCES = cht.c |
115 |
|
116 |
diff --git a/sci-chemistry/chemtool/files/chemtool-1.6.14-fno-common.patch b/sci-chemistry/chemtool/files/chemtool-1.6.14-fno-common.patch |
117 |
new file mode 100644 |
118 |
index 00000000000..d782f8e4a62 |
119 |
--- /dev/null |
120 |
+++ b/sci-chemistry/chemtool/files/chemtool-1.6.14-fno-common.patch |
121 |
@@ -0,0 +1,37 @@ |
122 |
+--- a/ct1.h |
123 |
++++ b/ct1.h |
124 |
+@@ -273,12 +273,12 @@ |
125 |
+ extern float importfactor; |
126 |
+ extern int importoffset; |
127 |
+ |
128 |
+-char **intype; |
129 |
+-char **inmode; |
130 |
+-int babelin; |
131 |
+-char **outtype; |
132 |
+-char **outmode; |
133 |
+-int babelout; |
134 |
++extern char **intype; |
135 |
++extern char **inmode; |
136 |
++extern int babelin; |
137 |
++extern char **outtype; |
138 |
++extern char **outmode; |
139 |
++extern int babelout; |
140 |
+ extern char *babel; |
141 |
+ extern GdkGC *mygc[8],*background_gc,*hlgc; |
142 |
+ extern int curpen; |
143 |
+--- a/inout.c |
144 |
++++ b/inout.c |
145 |
+@@ -30,6 +30,13 @@ |
146 |
+ extern GdkFont *font[7],*smallfont[7],*symbfont[7],*boldfont[7],*slfont[7]; |
147 |
+ #endif |
148 |
+ |
149 |
++char **intype; |
150 |
++char **inmode; |
151 |
++int babelin; |
152 |
++char **outtype; |
153 |
++char **outmode; |
154 |
++int babelout; |
155 |
++ |
156 |
+ static char babeloutp[4]; |
157 |
+ |
158 |
+ int |
159 |
|
160 |
diff --git a/sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch b/sci-chemistry/chemtool/files/chemtool-1.6.14-no-underlinking.patch |
161 |
similarity index 100% |
162 |
rename from sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch |
163 |
rename to sci-chemistry/chemtool/files/chemtool-1.6.14-no-underlinking.patch |