1 |
commit: e88abf1da79f111c81842732f9dcb824d336573b |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 23 08:13:20 2015 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 23 08:20:05 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e88abf1d |
7 |
|
8 |
sci-mathematics/maxima: Update Emacs support. |
9 |
|
10 |
Consolidate "emacs" and "latex" USE flags. Remove the non-functional |
11 |
"xemacs" flag. Add a configure option to disable Emacs support in the |
12 |
upstream build system. |
13 |
|
14 |
Bug: 448242 |
15 |
|
16 |
Package-Manager: portage-2.2.26 |
17 |
|
18 |
sci-mathematics/maxima/files/emacs-0.patch | 32 +++++++++++++++ |
19 |
sci-mathematics/maxima/files/wish-2.patch | 26 ++++++++++++ |
20 |
...ma-5.37.3-r2.ebuild => maxima-5.37.3-r3.ebuild} | 46 +++++++++++----------- |
21 |
3 files changed, 81 insertions(+), 23 deletions(-) |
22 |
|
23 |
diff --git a/sci-mathematics/maxima/files/emacs-0.patch b/sci-mathematics/maxima/files/emacs-0.patch |
24 |
new file mode 100644 |
25 |
index 0000000..8c84149 |
26 |
--- /dev/null |
27 |
+++ b/sci-mathematics/maxima/files/emacs-0.patch |
28 |
@@ -0,0 +1,32 @@ |
29 |
+--- maxima-5.37.3.orig/configure.ac |
30 |
++++ maxima-5.37.3/configure.ac |
31 |
+@@ -513,6 +513,17 @@ |
32 |
+ fi |
33 |
+ fi |
34 |
+ |
35 |
++AC_ARG_ENABLE(emacs, |
36 |
++ [ --enable-emacs Emacs support], |
37 |
++ [case "${enableval}" in |
38 |
++ yes) enable_emacs=true ;; |
39 |
++ no) enable_emacs=false ;; |
40 |
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-emacs) ;; |
41 |
++ esac], |
42 |
++ [enable_emacs=true]) |
43 |
++ |
44 |
++AM_CONDITIONAL(WANT_EMACS, test x$enable_emacs = xtrue) |
45 |
++ |
46 |
+ dnl xgettext |
47 |
+ AC_ARG_ENABLE(gettext, |
48 |
+ [ --enable-gettext Locale support], |
49 |
+--- maxima-5.37.3.orig/interfaces/Makefile.am |
50 |
++++ maxima-5.37.3/interfaces/Makefile.am |
51 |
+@@ -1,5 +1,8 @@ |
52 |
++if WANT_EMACS |
53 |
++ MAYBE_EMACS = emacs |
54 |
++endif |
55 |
+ if WANT_TK |
56 |
+ MAYBE_XMAXIMA = xmaxima |
57 |
+ endif |
58 |
+-SUBDIRS = emacs $(MAYBE_XMAXIMA) |
59 |
++SUBDIRS = $(MAYBE_EMACS) $(MAYBE_XMAXIMA) |
60 |
+ EXTRA_DIST = bin/xmaxima.iss |
61 |
|
62 |
diff --git a/sci-mathematics/maxima/files/wish-2.patch b/sci-mathematics/maxima/files/wish-2.patch |
63 |
new file mode 100644 |
64 |
index 0000000..5942733 |
65 |
--- /dev/null |
66 |
+++ b/sci-mathematics/maxima/files/wish-2.patch |
67 |
@@ -0,0 +1,26 @@ |
68 |
+--- maxima-5.37.3.orig/configure.ac |
69 |
++++ maxima-5.37.3/configure.ac |
70 |
+@@ -991,6 +991,11 @@ |
71 |
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)], |
72 |
+- [WISH="${withval}"], |
73 |
+- [WISH="wish"]) |
74 |
++ [], |
75 |
++ [with_wish="wish"]) |
76 |
++case "${with_wish}" in |
77 |
++ no) WISH="none" ;; |
78 |
++ yes) WISH="wish" ;; |
79 |
++ *) WISH="${with_wish}" ;; |
80 |
++esac |
81 |
+ AC_SUBST(WISH) |
82 |
+- |
83 |
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno) |
84 |
+ |
85 |
+--- maxima-5.37.3.orig/interfaces/Makefile.am |
86 |
++++ maxima-5.37.3/interfaces/Makefile.am |
87 |
+@@ -1,2 +1,5 @@ |
88 |
+-SUBDIRS = emacs xmaxima |
89 |
++if WANT_TK |
90 |
++ MAYBE_XMAXIMA = xmaxima |
91 |
++endif |
92 |
++SUBDIRS = emacs $(MAYBE_XMAXIMA) |
93 |
+ EXTRA_DIST = bin/xmaxima.iss |
94 |
|
95 |
diff --git a/sci-mathematics/maxima/maxima-5.37.3-r2.ebuild b/sci-mathematics/maxima/maxima-5.37.3-r3.ebuild |
96 |
similarity index 86% |
97 |
rename from sci-mathematics/maxima/maxima-5.37.3-r2.ebuild |
98 |
rename to sci-mathematics/maxima/maxima-5.37.3-r3.ebuild |
99 |
index 3afffbf..7c1c8e6 100644 |
100 |
--- a/sci-mathematics/maxima/maxima-5.37.3-r2.ebuild |
101 |
+++ b/sci-mathematics/maxima/maxima-5.37.3-r3.ebuild |
102 |
@@ -23,7 +23,7 @@ CONF_FLAG=( . . . ecl ccl . ) |
103 |
# patch file version; . - no patch |
104 |
PATCH_V=( 1 1 . 2 2 1 ) |
105 |
|
106 |
-IUSE="latex emacs tk nls unicode xemacs X ${LISPS[*]}" |
107 |
+IUSE="emacs tk nls unicode X ${LISPS[*]}" |
108 |
|
109 |
# Languages |
110 |
LANGS="es pt pt_BR" |
111 |
@@ -36,13 +36,11 @@ RDEPEND="!app-emacs/imaxima |
112 |
X? ( x11-misc/xdg-utils |
113 |
sci-visualization/gnuplot[gd] |
114 |
tk? ( dev-lang/tk:0 ) ) |
115 |
- latex? ( virtual/latex-base ) |
116 |
emacs? ( virtual/emacs |
117 |
- latex? ( app-emacs/auctex |
118 |
- app-text/ghostscript-gpl |
119 |
- dev-texlive/texlive-latexrecommended ) ) |
120 |
- xemacs? ( app-editors/xemacs |
121 |
- latex? ( app-xemacs/auctex ) )" |
122 |
+ virtual/latex-base |
123 |
+ app-emacs/auctex |
124 |
+ app-text/ghostscript-gpl |
125 |
+ dev-texlive/texlive-latexrecommended )" |
126 |
|
127 |
# generating lisp dependencies |
128 |
depends() { |
129 |
@@ -97,7 +95,7 @@ pkg_setup() { |
130 |
|
131 |
src_prepare() { |
132 |
local n PATCHES v |
133 |
- PATCHES=( rmaxima-0 wish-1 xdg-utils-0 db-0 ) |
134 |
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 db-0 ) |
135 |
|
136 |
n=${#PATCHES[*]} |
137 |
for ((n--; n >= 0; n--)); do |
138 |
@@ -140,7 +138,10 @@ src_configure() { |
139 |
done |
140 |
fi |
141 |
|
142 |
- econf ${CONFS} $(use_with tk wish) --with-lispdir="${EPREFIX}/${SITELISP}"/${PN} |
143 |
+ econf ${CONFS} \ |
144 |
+ $(use_with tk wish) \ |
145 |
+ $(use_enable emacs) \ |
146 |
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}" |
147 |
} |
148 |
|
149 |
src_compile() { |
150 |
@@ -156,13 +157,6 @@ src_install() { |
151 |
/usr/share/${PN}/${PV}/xmaxima/maxima-new.png \ |
152 |
"Science;Math;Education" |
153 |
|
154 |
- rm -f "${ED}"/${SITELISP}/${PN}/emaxima.sty |
155 |
- |
156 |
- if use latex; then |
157 |
- insinto ${TEXMF}/tex/latex/emaxima |
158 |
- doins interfaces/emacs/emaxima/emaxima.sty |
159 |
- fi |
160 |
- |
161 |
# do not use dodoc because interfaces can't read compressed files |
162 |
# read COPYING before attempt to remove it from dodoc |
163 |
insinto /usr/share/${PN}/${PV}/doc |
164 |
@@ -173,12 +167,14 @@ src_install() { |
165 |
if use emacs; then |
166 |
elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp} |
167 |
elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el |
168 |
+ |
169 |
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die |
170 |
+ insinto ${TEXMF}/tex/latex/emaxima |
171 |
+ doins interfaces/emacs/emaxima/emaxima.sty |
172 |
+ |
173 |
insinto /usr/share/${PN}/${PV}/doc/imaxima |
174 |
doins interfaces/emacs/imaxima/README |
175 |
doins -r interfaces/emacs/imaxima/imath-example |
176 |
- else |
177 |
- # remove any emacs files installed by the build system |
178 |
- rm -rf "${ED}"/usr/share/emacs |
179 |
fi |
180 |
|
181 |
# if we use ecls, build an ecls library for maxima |
182 |
@@ -190,11 +186,15 @@ src_install() { |
183 |
} |
184 |
|
185 |
pkg_postinst() { |
186 |
- use emacs && elisp-site-regen |
187 |
- use latex && mktexlsr |
188 |
+ if use emacs; then |
189 |
+ elisp-site-regen |
190 |
+ mktexlsr |
191 |
+ fi |
192 |
} |
193 |
|
194 |
pkg_postrm() { |
195 |
- use emacs && elisp-site-regen |
196 |
- use latex && mktexlsr |
197 |
+ if use emacs; then |
198 |
+ lisp-site-regen |
199 |
+ mktexlsr |
200 |
+ fi |
201 |
} |