]> git.pld-linux.org Git - packages/asymptote.git/blob - asymptote.spec
- up to 2.70
[packages/asymptote.git] / asymptote.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # API documentation
4 %bcond_without  oiio    # OpenImageIO support
5 #
6 Summary:        Asymptote is a powerful descriptive vector graphics language for technical drawing
7 Summary(hu.UTF-8):      Asymptote egy leíró vektorgrafikus nyelv technikai rajzokhoz
8 Summary(pl.UTF-8):      Język opisu grafiki wektorowej do rysunków technicznych
9 Name:           asymptote
10 Version:        2.70
11 Release:        1
12 # uses GPL libraries (gsl, readline), so final license is GPL
13 License:        GPL v3+ (LGPL v3+ code)
14 Group:          Applications/Science
15 Source0:        http://downloads.sourceforge.net/asymptote/%{name}-%{version}.src.tgz
16 # Source0-md5:  b57e685568a7cca69024a86c7276eb6d
17 Patch0:         %{name}-memrchr.patch
18 Patch1:         %{name}-info.patch
19 Patch2:         %{name}-no-env.patch
20 Patch3:         texinfo.patch
21 URL:            http://asymptote.sourceforge.net/
22 BuildRequires:  GLM
23 BuildRequires:  Mesa-libOSMesa-devel
24 BuildRequires:  OpenGL-GLU-devel
25 BuildRequires:  OpenGL-devel
26 BuildRequires:  OpenGL-glut-devel
27 %{?with_oiio:BuildRequires:     OpenImageIO-devel}
28 BuildRequires:  autoconf >= 2.50
29 BuildRequires:  bison
30 BuildRequires:  fftw3-devel >= 3
31 BuildRequires:  flex
32 BuildRequires:  gc-c++-devel >= 8.0.4
33 BuildRequires:  gc-devel >= 8.0.4
34 BuildRequires:  ghostscript
35 BuildRequires:  gsl-devel >= 1.7
36 BuildRequires:  libstdc++-devel >= 6:4.7
37 BuildRequires:  ncurses-devel
38 BuildRequires:  readline-devel >= 4.3
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  sed >= 4.0
41 BuildRequires:  texinfo
42 BuildRequires:  texinfo-texi2dvi >= 6.7
43 BuildRequires:  texlive-dvips
44 BuildRequires:  texlive-fonts-ams
45 BuildRequires:  texlive-format-pdflatex
46 BuildRequires:  texlive-latex
47 BuildRequires:  texlive-latex-ams
48 #BuildRequires: texlive-tex-babel
49 BuildRequires:  zlib-devel
50 Suggests:       ImageMagick-coder-dot
51 Suggests:       ImageMagick-coder-jpeg
52 Suggests:       ImageMagick-coder-png
53 # e.g. "label" command needs latex
54 Suggests:       texlive-latex
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %define texmfdist %{_datadir}/texmf-dist
58
59 %description
60 Asymptote is a powerful descriptive vector graphics language for
61 technical drawing, inspired by MetaPost but with an improved C++-like
62 syntax. Asymptote provides for figures the same high-quality level of
63 typesetting that LaTeX does for scientific text.
64
65 %description -l hu.UTF-8
66 Asymptote egy leíró vektorgrafikus nyelv technikai rajzokhoz, hasonló
67 a MetaPost-hoz, de kibővítve C++-szerű szintaxissal. Asymptote még
68 képes olyan szintű szövegszedésre is, amelyre a LaTeX képes a
69 tudományos szöveggel.
70
71 %description -l pl.UTF-8
72 Asymptote jest językiem opisu grafiki wektorowej dla rysunków
73 technicznych. Język ten jest inspirowany językiem MetaPost, ale
74 posiada bogatszą składnię w stylu C++.
75
76 %package gui
77 Summary:        GUI for asymptote
78 Summary(hu.UTF-8):      GUI asymptote-hoz
79 Summary(pl.UTF-8):      Graficzny interfejs do asymptote
80 Group:          Applications/Science
81 Requires:       %{name} = %{version}-%{release}
82 # rsvg-convert utility
83 Requires:       librsvg >= 2.40
84 Requires:       python3-PyQt5 >= 5.11
85 Requires:       python3-cson >= 0.7
86 Requires:       python3-numpy >= 1:1.11.0
87
88 %description gui
89 GUI for asymptote.
90
91 %description gui -l hu.UTF-8
92 GUI asymptote-hoz.
93
94 %description gui -l hu.UTF-8 -l pl.UTF-8
95 Graficzny interfejs do asymptote.
96
97 %package doc
98 Summary:        Asymptote documentation
99 Summary(hu.UTF-8):      Asymptote dokumentáció
100 Summary(pl.UTF-8):      Dokumentacja do Asymptote
101 Group:          Documentation
102 Requires:       %{name} = %{epoch}:%{version}-%{release}
103
104 %description doc
105 Asymptote documentation.
106
107 %description doc -l hu.UTF-8
108 Asymptote dokumentációja.
109
110 %description doc -l pl.UTF-8
111 Dokumentacja do Asymptote.
112
113 %package examples
114 Summary:        Asymptote examples
115 Summary(hu.UTF-8):      Asymptote példák
116 Summary(pl.UTF-8):      Przykłady do Asymptote
117 Group:          Documentation
118 Requires:       %{name} = %{epoch}:%{version}-%{release}
119
120 %description examples
121 Asymptote examples.
122
123 %description examples -l hu.UTF-8
124 Asymptote példák.
125
126 %description examples -l pl.UTF-8
127 Przykładowe pliki dla asymptote.
128
129 %package latex
130 Summary:        LaTeX styles
131 Summary(hu.UTF-8):      LaTeX stílusok
132 Summary(pl.UTF-8):      Style LaTeXa
133 Group:          Applications/Publishing/TeX
134 Requires(post,postun):  %{_bindir}/texhash
135
136 %description latex
137 LaTeX styles.
138
139 %description latex -l hu.UTF-8
140 LaTeX stílusok.
141
142 %description latex -l pl.UTF-8
143 Style LaTeXa.
144
145 %package context
146 Summary:        ConTeXt color macros
147 Summary(pl.UTF-8):      Makra kolorów ConTeXta
148 Group:          Applications/Publishing/TeX
149 Requires(post,postun):  %{_bindir}/texhash
150 Requires:       texlive-context
151
152 %description context
153 ConTeXt color macros.
154
155 %description context -l pl.UTF-8
156 Makra kolorów ConTeXta.
157
158 %package -n vim-syntax-asymptote
159 Summary:        Vim syntax file to asy-files
160 Summary(hu.UTF-8):      Vim syntax fájl asy fájlokhoz
161 Summary(pl.UTF-8):      Plik składni Vima dla plików asy
162 Group:          Applications/Editors/Vim
163
164 %description -n vim-syntax-asymptote
165 Vim syntax file to asy files.
166
167 %description -n vim-syntax-asymptote -l hu.UTF-8
168 Vim syntax fájl asy fájlokhoz.
169
170 %description -n vim-syntax-asymptote -l pl.UTF-8
171 Plik składni Vima dla plików asy.
172
173 %prep
174 %setup -q
175 %patch0 -p1
176 %patch1 -p1
177 %patch2 -p1
178 %patch3 -p1
179
180 # use direct shebang
181 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' GUI/xasy.py
182 # actually not executable, contain bogus shebang
183 %{__sed} -i -e '1d' GUI/configs/*.py \
184         GUI/{CustMatTransform,DebugFlags,GuidesManager,InplaceAddObj,PrimitiveShape,SetCustomAnchor,Widg_*,Window1,__init__,labelEditor,xasy?*}.py
185 # only some examples to execute
186 %{__sed} -i -e '1d' GUI/UndoRedoStack.py base/asymptote.py
187
188 %build
189 %{__autoconf}
190 %{__autoheader}
191 # there is "unknown option" warning for openimageio because AC_ARG_ENABLE specifies wrong name (not the one actually used)
192 %configure \
193         %{?with_oiio:--enable-openimageio} \
194         --enable-gc=system \
195         --enable-offscreen \
196         --with-docdir=%{_docdir}/%{name}-doc
197
198 %if %{with doc}
199 %{__make} all
200 %else
201 %{__make} asy
202 %{__make} faq
203 %endif
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207
208 %if %{with doc}
209 %{__make} install \
210 %else
211 %{__make} install-asy \
212 %endif
213         DESTDIR=$RPM_BUILD_ROOT
214
215 # useless at runtime
216 %{__rm} $RPM_BUILD_ROOT%{_datadir}/asymptote/GUI/setup.py
217
218 install -d $RPM_BUILD_ROOT%{_examplesdir}
219 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
220
221 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
222 %{__mv} $RPM_BUILD_ROOT%{_datadir}/asymptote/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
223 %{__mv} $RPM_BUILD_ROOT%{_datadir}/texmf{,-dist}
224 %{__mv} $RPM_BUILD_ROOT%{texmfdist}/tex/context/{third,}/asymptote
225 %{__rm} -r $RPM_BUILD_ROOT%{texmfdist}/tex/context/third
226
227 %if %{with doc}
228 %{__mv} $RPM_BUILD_ROOT%{_infodir}/{asymptote/*.info,}
229 rmdir $RPM_BUILD_ROOT%{_infodir}/asymptote
230 %endif
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post   -p /sbin/postshell
236 -/usr/sbin/fix-info-dir -c %{_infodir}
237
238 %postun -p /sbin/postshell
239 -/usr/sbin/fix-info-dir -c %{_infodir}
240
241 %post latex
242 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
243
244 %postun latex
245 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
246
247 %files
248 %defattr(644,root,root,755)
249 %doc BUGS ChangeLog README ReleaseNotes TODO
250 %attr(755,root,root) %{_bindir}/asy
251 %dir %{_datadir}/%{name}
252 %{_datadir}/%{name}/*.asy
253 %{_datadir}/%{name}/asymptote.py
254 %{_datadir}/%{name}/nopapersize.ps
255 %{_datadir}/%{name}/reload.js
256 # to emacs package?
257 %{_datadir}/%{name}/asy*.el
258 # kate package?
259 %{_datadir}/%{name}/asy-kate.sh
260 %{_datadir}/asymptote/shaders
261 %{_datadir}/asymptote/webgl
262 %if %{with doc}
263 %{_mandir}/man1/asy.1*
264 %{_infodir}/asy-faq.info*
265 %{_infodir}/asymptote.info*
266 %endif
267
268 %files gui
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{_bindir}/xasy
271 %dir %{_datadir}/%{name}/GUI
272 %attr(755,root,root) %{_datadir}/%{name}/GUI/xasy.py
273 %{_datadir}/%{name}/GUI/[!x]*.py
274 %{_datadir}/asymptote/GUI/xasy2asy.py
275 %{_datadir}/asymptote/GUI/xasyArgs.py
276 %{_datadir}/asymptote/GUI/xasyBezierInterface.py
277 %{_datadir}/asymptote/GUI/xasyFile.py
278 %{_datadir}/asymptote/GUI/xasyOptions.py
279 %{_datadir}/asymptote/GUI/xasyStrings.py
280 %{_datadir}/asymptote/GUI/xasySvg.py
281 %{_datadir}/asymptote/GUI/xasyTransform.py
282 %{_datadir}/asymptote/GUI/xasyUtils.py
283 %{_datadir}/asymptote/GUI/xasyValidator.py
284 %{_datadir}/asymptote/GUI/xasyVersion.py
285 %dir %{_datadir}/asymptote/GUI/configs
286 %{_datadir}/asymptote/GUI/configs/xasyconfig.cson
287 %{_datadir}/asymptote/GUI/configs/xasykeymap.cson
288 %dir %{_datadir}/asymptote/GUI/pyUIClass
289 %{_datadir}/asymptote/GUI/pyUIClass/custMatTransform.py
290 %{_datadir}/asymptote/GUI/pyUIClass/labelTextEditor.py
291 %{_datadir}/asymptote/GUI/pyUIClass/setCustomAnchor.py
292 %{_datadir}/asymptote/GUI/pyUIClass/widg_addLabel.py
293 %{_datadir}/asymptote/GUI/pyUIClass/widg_addPolyOpt.py
294 %{_datadir}/asymptote/GUI/pyUIClass/widg_editBezier.py
295 %{_datadir}/asymptote/GUI/pyUIClass/widgetPointEditor.py
296 %{_datadir}/asymptote/GUI/pyUIClass/window1.py
297 %{_datadir}/asymptote/GUI/res
298 %if %{with doc}
299 %{_mandir}/man1/xasy.1*
300 %endif
301
302 %if %{with doc}
303 %files doc
304 %defattr(644,root,root,755)
305 %{_docdir}/%{name}-doc
306 %endif
307
308 %files examples
309 %defattr(644,root,root,755)
310 %{_examplesdir}/%{name}-%{version}
311
312 %files latex
313 %defattr(644,root,root,755)
314 %{texmfdist}/tex/latex/asymptote
315
316 %files context
317 %defattr(644,root,root,755)
318 %{texmfdist}/tex/context/asymptote
319
320 %files -n vim-syntax-asymptote
321 %defattr(644,root,root,755)
322 %{_datadir}/vim/vimfiles/syntax/asy.vim
323 %{_datadir}/vim/vimfiles/syntax/asy_filetype.vim
This page took 0.080815 seconds and 3 git commands to generate.