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: b57e685568a7cca69024a86c7276eb6d
17 Patch0: %{name}-memrchr.patch
18 Patch1: %{name}-info.patch
19 Patch2: %{name}-no-env.patch
21 URL: http://asymptote.sourceforge.net/
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
30 BuildRequires: fftw3-devel >= 3
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)
57 %define texmfdist %{_datadir}/texmf-dist
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.
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
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++.
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
91 %description gui -l hu.UTF-8
94 %description gui -l hu.UTF-8 -l pl.UTF-8
95 Graficzny interfejs do asymptote.
98 Summary: Asymptote documentation
99 Summary(hu.UTF-8): Asymptote dokumentáció
100 Summary(pl.UTF-8): Dokumentacja do Asymptote
102 Requires: %{name} = %{epoch}:%{version}-%{release}
105 Asymptote documentation.
107 %description doc -l hu.UTF-8
108 Asymptote dokumentációja.
110 %description doc -l pl.UTF-8
111 Dokumentacja do Asymptote.
114 Summary: Asymptote examples
115 Summary(hu.UTF-8): Asymptote példák
116 Summary(pl.UTF-8): Przykłady do Asymptote
118 Requires: %{name} = %{epoch}:%{version}-%{release}
120 %description examples
123 %description examples -l hu.UTF-8
126 %description examples -l pl.UTF-8
127 Przykładowe pliki dla asymptote.
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
139 %description latex -l hu.UTF-8
142 %description latex -l pl.UTF-8
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
153 ConTeXt color macros.
155 %description context -l pl.UTF-8
156 Makra kolorów ConTeXta.
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
164 %description -n vim-syntax-asymptote
165 Vim syntax file to asy files.
167 %description -n vim-syntax-asymptote -l hu.UTF-8
168 Vim syntax fájl asy fájlokhoz.
170 %description -n vim-syntax-asymptote -l pl.UTF-8
171 Plik składni Vima dla plików asy.
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
191 # there is "unknown option" warning for openimageio because AC_ARG_ENABLE specifies wrong name (not the one actually used)
193 %{?with_oiio:--enable-openimageio} \
196 --with-docdir=%{_docdir}/%{name}-doc
206 rm -rf $RPM_BUILD_ROOT
211 %{__make} install-asy \
213 DESTDIR=$RPM_BUILD_ROOT
216 %{__rm} $RPM_BUILD_ROOT%{_datadir}/asymptote/GUI/setup.py
218 install -d $RPM_BUILD_ROOT%{_examplesdir}
219 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
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
228 %{__mv} $RPM_BUILD_ROOT%{_infodir}/{asymptote/*.info,}
229 rmdir $RPM_BUILD_ROOT%{_infodir}/asymptote
233 rm -rf $RPM_BUILD_ROOT
235 %post -p /sbin/postshell
236 -/usr/sbin/fix-info-dir -c %{_infodir}
238 %postun -p /sbin/postshell
239 -/usr/sbin/fix-info-dir -c %{_infodir}
242 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
245 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
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
257 %{_datadir}/%{name}/asy*.el
259 %{_datadir}/%{name}/asy-kate.sh
260 %{_datadir}/asymptote/shaders
261 %{_datadir}/asymptote/webgl
263 %{_mandir}/man1/asy.1*
264 %{_infodir}/asy-faq.info*
265 %{_infodir}/asymptote.info*
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
299 %{_mandir}/man1/xasy.1*
304 %defattr(644,root,root,755)
305 %{_docdir}/%{name}-doc
309 %defattr(644,root,root,755)
310 %{_examplesdir}/%{name}-%{version}
313 %defattr(644,root,root,755)
314 %{texmfdist}/tex/latex/asymptote
317 %defattr(644,root,root,755)
318 %{texmfdist}/tex/context/asymptote
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