]> git.pld-linux.org Git - packages/asymptote.git/blob - asymptote.spec
78e02e4955e062c1ee8bb65b893de81a39d30e7b
[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.61
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:  38fa6c77881a006c1b5b22f382ac8d8b
17 Patch0:         %{name}-memrchr.patch
18 Patch1:         %{name}-info.patch
19 Patch2:         %{name}-no-env.patch
20 URL:            http://asymptote.sourceforge.net/
21 BuildRequires:  GLM
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
28 BuildRequires:  bison
29 BuildRequires:  fftw3-devel >= 3
30 BuildRequires:  flex
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)
55
56 %define texmfdist %{_datadir}/texmf-dist
57
58 %description
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.
63
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
68 tudományos szöveggel.
69
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++.
74
75 %package gui
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
86
87 %description gui
88 GUI for asymptote.
89
90 %description gui -l hu.UTF-8
91 GUI asymptote-hoz.
92
93 %description gui -l hu.UTF-8 -l pl.UTF-8
94 Graficzny interfejs do asymptote.
95
96 %package doc
97 Summary:        Asymptote documentation
98 Summary(hu.UTF-8):      Asymptote dokumentáció
99 Summary(pl.UTF-8):      Dokumentacja do Asymptote
100 Group:          Documentation
101 Requires:       %{name} = %{epoch}:%{version}-%{release}
102
103 %description doc
104 Asymptote documentation.
105
106 %description doc -l hu.UTF-8
107 Asymptote dokumentációja.
108
109 %description doc -l pl.UTF-8
110 Dokumentacja do Asymptote.
111
112 %package examples
113 Summary:        Asymptote examples
114 Summary(hu.UTF-8):      Asymptote példák
115 Summary(pl.UTF-8):      Przykłady do Asymptote
116 Group:          Documentation
117 Requires:       %{name} = %{epoch}:%{version}-%{release}
118
119 %description examples
120 Asymptote examples.
121
122 %description examples -l hu.UTF-8
123 Asymptote példák.
124
125 %description examples -l pl.UTF-8
126 Przykładowe pliki dla asymptote.
127
128 %package latex
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
134
135 %description latex
136 LaTeX styles.
137
138 %description latex -l hu.UTF-8
139 LaTeX stílusok.
140
141 %description latex -l pl.UTF-8
142 Style LaTeXa.
143
144 %package context
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
150
151 %description context
152 ConTeXt color macros.
153
154 %description context -l pl.UTF-8
155 Makra kolorów ConTeXta.
156
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
162
163 %description -n vim-syntax-asymptote
164 Vim syntax file to asy files.
165
166 %description -n vim-syntax-asymptote -l hu.UTF-8
167 Vim syntax fájl asy fájlokhoz.
168
169 %description -n vim-syntax-asymptote -l pl.UTF-8
170 Plik składni Vima dla plików asy.
171
172 %prep
173 %setup -q
174 %patch0 -p1
175 %patch1 -p1
176 %patch2 -p1
177
178 # use direct shebang
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
185
186 %build
187 %{__autoconf}
188 %{__autoheader}
189 # there is "unknown option" warning for openimageio because AC_ARG_ENABLE specifies wrong name (not the one actually used)
190 %configure \
191         %{?with_oiio:--enable-openimageio} \
192         --enable-gc=system \
193         --enable-offscreen \
194         --with-docdir=%{_docdir}/%{name}-doc
195
196 %if %{with doc}
197 %{__make} all
198 %else
199 %{__make} asy
200 %{__make} faq
201 %endif
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205
206 %if %{with doc}
207 %{__make} install \
208 %else
209 %{__make} install-asy \
210 %endif
211         DESTDIR=$RPM_BUILD_ROOT
212
213 # useless at runtime
214 %{__rm} $RPM_BUILD_ROOT%{_datadir}/asymptote/GUI/setup.py
215
216 install -d $RPM_BUILD_ROOT%{_examplesdir}
217 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
218
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
224
225 %if %{with doc}
226 %{__mv} $RPM_BUILD_ROOT%{_infodir}/{asymptote/*.info,}
227 rmdir $RPM_BUILD_ROOT%{_infodir}/asymptote
228 %endif
229
230 %clean
231 rm -rf $RPM_BUILD_ROOT
232
233 %post   -p /sbin/postshell
234 -/usr/sbin/fix-info-dir -c %{_infodir}
235
236 %postun -p /sbin/postshell
237 -/usr/sbin/fix-info-dir -c %{_infodir}
238
239 %post latex
240 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
241
242 %postun latex
243 [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2
244
245 %files
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
254 # to emacs package?
255 %{_datadir}/%{name}/asy*.el
256 # kate package?
257 %{_datadir}/%{name}/asy-kate.sh
258 %{_datadir}/asymptote/shaders
259 %{_datadir}/asymptote/webgl
260 %if %{with doc}
261 %{_mandir}/man1/asy.1*
262 %{_infodir}/asy-faq.info*
263 %{_infodir}/asymptote.info*
264 %endif
265
266 %files gui
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
296 %if %{with doc}
297 %{_mandir}/man1/xasy.1*
298 %endif
299
300 %if %{with doc}
301 %files doc
302 %defattr(644,root,root,755)
303 %{_docdir}/%{name}-doc
304 %endif
305
306 %files examples
307 %defattr(644,root,root,755)
308 %{_examplesdir}/%{name}-%{version}
309
310 %files latex
311 %defattr(644,root,root,755)
312 %{texmfdist}/tex/latex/asymptote
313
314 %files context
315 %defattr(644,root,root,755)
316 %{texmfdist}/tex/context/asymptote
317
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
This page took 0.494904 seconds and 2 git commands to generate.