3 %bcond_without doc # API documentation
4 %bcond_without oiio # OpenImageIO support
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
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: 38fa6c77881a006c1b5b22f382ac8d8b
17 Patch0: %{name}-memrchr.patch
18 Patch1: %{name}-info.patch
19 Patch2: %{name}-no-env.patch
20 URL: http://asymptote.sourceforge.net/
22 BuildRequires: Mesa-libOSMesa-devel
23 BuildRequires: OpenGL-GLU-devel
24 BuildRequires: OpenGL-devel
25 BuildRequires: OpenGL-glut-devel
26 %{?with_oiio:BuildRequires: OpenImageIO-devel}
27 BuildRequires: autoconf >= 2.50
29 BuildRequires: fftw3-devel >= 3
31 BuildRequires: gc-c++-devel >= 8.0.4
32 BuildRequires: gc-devel >= 8.0.4
33 BuildRequires: ghostscript
34 BuildRequires: gsl-devel >= 1.7
35 BuildRequires: libstdc++-devel >= 6:4.7
36 BuildRequires: ncurses-devel
37 BuildRequires: readline-devel >= 4.3
38 BuildRequires: rpm-pythonprov
39 BuildRequires: sed >= 4.0
40 BuildRequires: texinfo
41 BuildRequires: texinfo-texi2dvi >= 6.7
42 BuildRequires: texlive-dvips
43 BuildRequires: texlive-fonts-ams
44 BuildRequires: texlive-format-pdflatex
45 BuildRequires: texlive-latex
46 BuildRequires: texlive-latex-ams
47 #BuildRequires: texlive-tex-babel
48 BuildRequires: zlib-devel
49 Suggests: ImageMagick-coder-dot
50 Suggests: ImageMagick-coder-jpeg
51 Suggests: ImageMagick-coder-png
52 # e.g. "label" command needs latex
53 Suggests: texlive-latex
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define texmfdist %{_datadir}/texmf-dist
59 Asymptote is a powerful descriptive vector graphics language for
60 technical drawing, inspired by MetaPost but with an improved C++-like
61 syntax. Asymptote provides for figures the same high-quality level of
62 typesetting that LaTeX does for scientific text.
64 %description -l hu.UTF-8
65 Asymptote egy leíró vektorgrafikus nyelv technikai rajzokhoz, hasonló
66 a MetaPost-hoz, de kibővítve C++-szerű szintaxissal. Asymptote még
67 képes olyan szintű szövegszedésre is, amelyre a LaTeX képes a
70 %description -l pl.UTF-8
71 Asymptote jest językiem opisu grafiki wektorowej dla rysunków
72 technicznych. Język ten jest inspirowany językiem MetaPost, ale
73 posiada bogatszą składnię w stylu C++.
76 Summary: GUI for asymptote
77 Summary(hu.UTF-8): GUI asymptote-hoz
78 Summary(pl.UTF-8): Graficzny interfejs do asymptote
79 Group: Applications/Science
80 Requires: %{name} = %{version}-%{release}
81 # rsvg-convert utility
82 Requires: librsvg >= 2.40
83 Requires: python3-PyQt5 >= 5.11
84 Requires: python3-cson >= 0.7
85 Requires: python3-numpy >= 1:1.11.0
90 %description gui -l hu.UTF-8
93 %description gui -l hu.UTF-8 -l pl.UTF-8
94 Graficzny interfejs do asymptote.
97 Summary: Asymptote documentation
98 Summary(hu.UTF-8): Asymptote dokumentáció
99 Summary(pl.UTF-8): Dokumentacja do Asymptote
101 Requires: %{name} = %{epoch}:%{version}-%{release}
104 Asymptote documentation.
106 %description doc -l hu.UTF-8
107 Asymptote dokumentációja.
109 %description doc -l pl.UTF-8
110 Dokumentacja do Asymptote.
113 Summary: Asymptote examples
114 Summary(hu.UTF-8): Asymptote példák
115 Summary(pl.UTF-8): Przykłady do Asymptote
117 Requires: %{name} = %{epoch}:%{version}-%{release}
119 %description examples
122 %description examples -l hu.UTF-8
125 %description examples -l pl.UTF-8
126 Przykładowe pliki dla asymptote.
129 Summary: LaTeX styles
130 Summary(hu.UTF-8): LaTeX stílusok
131 Summary(pl.UTF-8): Style LaTeXa
132 Group: Applications/Publishing/TeX
133 Requires(post,postun): %{_bindir}/texhash
138 %description latex -l hu.UTF-8
141 %description latex -l pl.UTF-8
145 Summary: ConTeXt color macros
146 Summary(pl.UTF-8): Makra kolorów ConTeXta
147 Group: Applications/Publishing/TeX
148 Requires(post,postun): %{_bindir}/texhash
149 Requires: texlive-context
152 ConTeXt color macros.
154 %description context -l pl.UTF-8
155 Makra kolorów ConTeXta.
157 %package -n vim-syntax-asymptote
158 Summary: Vim syntax file to asy-files
159 Summary(hu.UTF-8): Vim syntax fájl asy fájlokhoz
160 Summary(pl.UTF-8): Plik składni Vima dla plików asy
161 Group: Applications/Editors/Vim
163 %description -n vim-syntax-asymptote
164 Vim syntax file to asy files.
166 %description -n vim-syntax-asymptote -l hu.UTF-8
167 Vim syntax fájl asy fájlokhoz.
169 %description -n vim-syntax-asymptote -l pl.UTF-8
170 Plik składni Vima dla plików asy.
179 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' GUI/xasy.py
180 # actually not executable, contain bogus shebang
181 %{__sed} -i -e '1d' GUI/configs/*.py \
182 GUI/{CustMatTransform,DebugFlags,GuidesManager,InplaceAddObj,PrimitiveShape,SetCustomAnchor,Widg_*,Window1,__init__,labelEditor,xasy?*}.py
183 # only some examples to execute
184 %{__sed} -i -e '1d' GUI/UndoRedoStack.py base/asymptote.py
189 # there is "unknown option" warning for openimageio because AC_ARG_ENABLE specifies wrong name (not the one actually used)
191 %{?with_oiio:--enable-openimageio} \
194 --with-docdir=%{_docdir}/%{name}-doc
204 rm -rf $RPM_BUILD_ROOT
209 %{__make} install-asy \
211 DESTDIR=$RPM_BUILD_ROOT
214 %{__rm} $RPM_BUILD_ROOT%{_datadir}/asymptote/GUI/setup.py
216 install -d $RPM_BUILD_ROOT%{_examplesdir}
217 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
219 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
220 %{__mv} $RPM_BUILD_ROOT%{_datadir}/asymptote/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
221 %{__mv} $RPM_BUILD_ROOT%{_datadir}/texmf{,-dist}
222 %{__mv} $RPM_BUILD_ROOT%{texmfdist}/tex/context/{third,}/asymptote
223 %{__rm} -r $RPM_BUILD_ROOT%{texmfdist}/tex/context/third
226 %{__mv} $RPM_BUILD_ROOT%{_infodir}/{asymptote/*.info,}
227 rmdir $RPM_BUILD_ROOT%{_infodir}/asymptote
231 rm -rf $RPM_BUILD_ROOT
233 %post -p /sbin/postshell
234 -/usr/sbin/fix-info-dir -c %{_infodir}
236 %postun -p /sbin/postshell
237 -/usr/sbin/fix-info-dir -c %{_infodir}
240 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
243 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
246 %defattr(644,root,root,755)
247 %doc BUGS ChangeLog README ReleaseNotes TODO
248 %attr(755,root,root) %{_bindir}/asy
249 %dir %{_datadir}/%{name}
250 %{_datadir}/%{name}/*.asy
251 %{_datadir}/%{name}/asymptote.py
252 %{_datadir}/%{name}/nopapersize.ps
253 %{_datadir}/%{name}/reload.js
255 %{_datadir}/%{name}/asy*.el
257 %{_datadir}/%{name}/asy-kate.sh
258 %{_datadir}/asymptote/shaders
259 %{_datadir}/asymptote/webgl
261 %{_mandir}/man1/asy.1*
262 %{_infodir}/asy-faq.info*
263 %{_infodir}/asymptote.info*
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/xasy
269 %dir %{_datadir}/%{name}/GUI
270 %attr(755,root,root) %{_datadir}/%{name}/GUI/xasy.py
271 %{_datadir}/%{name}/GUI/[!x]*.py
272 %{_datadir}/asymptote/GUI/xasy2asy.py
273 %{_datadir}/asymptote/GUI/xasyArgs.py
274 %{_datadir}/asymptote/GUI/xasyBezierInterface.py
275 %{_datadir}/asymptote/GUI/xasyFile.py
276 %{_datadir}/asymptote/GUI/xasyOptions.py
277 %{_datadir}/asymptote/GUI/xasyStrings.py
278 %{_datadir}/asymptote/GUI/xasySvg.py
279 %{_datadir}/asymptote/GUI/xasyTransform.py
280 %{_datadir}/asymptote/GUI/xasyUtils.py
281 %{_datadir}/asymptote/GUI/xasyValidator.py
282 %{_datadir}/asymptote/GUI/xasyVersion.py
283 %dir %{_datadir}/asymptote/GUI/configs
284 %{_datadir}/asymptote/GUI/configs/xasyconfig.cson
285 %{_datadir}/asymptote/GUI/configs/xasykeymap.cson
286 %dir %{_datadir}/asymptote/GUI/pyUIClass
287 %{_datadir}/asymptote/GUI/pyUIClass/custMatTransform.py
288 %{_datadir}/asymptote/GUI/pyUIClass/labelTextEditor.py
289 %{_datadir}/asymptote/GUI/pyUIClass/setCustomAnchor.py
290 %{_datadir}/asymptote/GUI/pyUIClass/widg_addLabel.py
291 %{_datadir}/asymptote/GUI/pyUIClass/widg_addPolyOpt.py
292 %{_datadir}/asymptote/GUI/pyUIClass/widg_editBezier.py
293 %{_datadir}/asymptote/GUI/pyUIClass/widgetPointEditor.py
294 %{_datadir}/asymptote/GUI/pyUIClass/window1.py
295 %{_datadir}/asymptote/GUI/res
297 %{_mandir}/man1/xasy.1*
302 %defattr(644,root,root,755)
303 %{_docdir}/%{name}-doc
307 %defattr(644,root,root,755)
308 %{_examplesdir}/%{name}-%{version}
311 %defattr(644,root,root,755)
312 %{texmfdist}/tex/latex/asymptote
315 %defattr(644,root,root,755)
316 %{texmfdist}/tex/context/asymptote
318 %files -n vim-syntax-asymptote
319 %defattr(644,root,root,755)
320 %{_datadir}/vim/vimfiles/syntax/asy.vim
321 %{_datadir}/vim/vimfiles/syntax/asy_filetype.vim