]>
Commit | Line | Data |
---|---|---|
73d12111 JR |
1 | # |
2 | # Conditional build: | |
d31a944f JB |
3 | %bcond_without doc # API documentation |
4 | %bcond_without oiio # OpenImageIO support | |
73d12111 | 5 | # |
67493c5f | 6 | Summary: Asymptote is a powerful descriptive vector graphics language for technical drawing |
574b04f2 | 7 | Summary(hu.UTF-8): Asymptote egy leíró vektorgrafikus nyelv technikai rajzokhoz |
e4f2efd9 | 8 | Summary(pl.UTF-8): Język opisu grafiki wektorowej do rysunków technicznych |
67493c5f | 9 | Name: asymptote |
0c37749f | 10 | Version: 2.70 |
d31a944f | 11 | Release: 1 |
bc622240 JB |
12 | # uses GPL libraries (gsl, readline), so final license is GPL |
13 | License: GPL v3+ (LGPL v3+ code) | |
67493c5f | 14 | Group: Applications/Science |
aa974d1c | 15 | Source0: http://downloads.sourceforge.net/asymptote/%{name}-%{version}.src.tgz |
0c37749f | 16 | # Source0-md5: b57e685568a7cca69024a86c7276eb6d |
f575f05d | 17 | Patch0: %{name}-memrchr.patch |
c83c549d | 18 | Patch1: %{name}-info.patch |
d31a944f | 19 | Patch2: %{name}-no-env.patch |
0c37749f | 20 | Patch3: texinfo.patch |
e4f2efd9 | 21 | URL: http://asymptote.sourceforge.net/ |
c83c549d | 22 | BuildRequires: GLM |
bc622240 JB |
23 | BuildRequires: Mesa-libOSMesa-devel |
24 | BuildRequires: OpenGL-GLU-devel | |
25 | BuildRequires: OpenGL-devel | |
26 | BuildRequires: OpenGL-glut-devel | |
d31a944f | 27 | %{?with_oiio:BuildRequires: OpenImageIO-devel} |
bc622240 JB |
28 | BuildRequires: autoconf >= 2.50 |
29 | BuildRequires: bison | |
30 | BuildRequires: fftw3-devel >= 3 | |
31 | BuildRequires: flex | |
c83c549d JB |
32 | BuildRequires: gc-c++-devel >= 8.0.4 |
33 | BuildRequires: gc-devel >= 8.0.4 | |
6f19eac0 | 34 | BuildRequires: ghostscript |
67493c5f | 35 | BuildRequires: gsl-devel >= 1.7 |
bc622240 | 36 | BuildRequires: libstdc++-devel >= 6:4.7 |
67493c5f | 37 | BuildRequires: ncurses-devel |
bc622240 | 38 | BuildRequires: readline-devel >= 4.3 |
67493c5f | 39 | BuildRequires: rpm-pythonprov |
d31a944f | 40 | BuildRequires: sed >= 4.0 |
c83c549d | 41 | BuildRequires: texinfo |
7586670c | 42 | BuildRequires: texinfo-texi2dvi >= 6.7 |
73995274 | 43 | BuildRequires: texlive-dvips |
456b8bea | 44 | BuildRequires: texlive-fonts-ams |
a3caeacc | 45 | BuildRequires: texlive-format-pdflatex |
73995274 | 46 | BuildRequires: texlive-latex |
1a3867c7 | 47 | BuildRequires: texlive-latex-ams |
f03a555d | 48 | #BuildRequires: texlive-tex-babel |
49 | BuildRequires: zlib-devel | |
56a71b6d ZU |
50 | Suggests: ImageMagick-coder-dot |
51 | Suggests: ImageMagick-coder-jpeg | |
52 | Suggests: ImageMagick-coder-png | |
62cedd45 ZU |
53 | # e.g. "label" command needs latex |
54 | Suggests: texlive-latex | |
67493c5f | 55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
df810fe2 ZU |
57 | %define texmfdist %{_datadir}/texmf-dist |
58 | ||
67493c5f | 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 | |
7df42c97 ZU |
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. | |
67493c5f | 70 | |
574b04f2 | 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 | ||
69badf0e JB |
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} | |
13b8bb6c JB |
82 | # rsvg-convert utility |
83 | Requires: librsvg >= 2.40 | |
d31a944f JB |
84 | Requires: python3-PyQt5 >= 5.11 |
85 | Requires: python3-cson >= 0.7 | |
86 | Requires: python3-numpy >= 1:1.11.0 | |
69badf0e JB |
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 | ||
67493c5f | 97 | %package doc |
98 | Summary: Asymptote documentation | |
87e88524 | 99 | Summary(hu.UTF-8): Asymptote dokumentáció |
e4f2efd9 | 100 | Summary(pl.UTF-8): Dokumentacja do Asymptote |
67493c5f | 101 | Group: Documentation |
102 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
103 | ||
104 | %description doc | |
105 | Asymptote documentation. | |
106 | ||
87e88524 ZU |
107 | %description doc -l hu.UTF-8 |
108 | Asymptote dokumentációja. | |
109 | ||
574b04f2 | 110 | %description doc -l pl.UTF-8 |
e4f2efd9 | 111 | Dokumentacja do Asymptote. |
574b04f2 | 112 | |
67493c5f | 113 | %package examples |
114 | Summary: Asymptote examples | |
87e88524 | 115 | Summary(hu.UTF-8): Asymptote példák |
e4f2efd9 | 116 | Summary(pl.UTF-8): Przykłady do Asymptote |
67493c5f | 117 | Group: Documentation |
118 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
119 | ||
120 | %description examples | |
574b04f2 | 121 | Asymptote examples. |
122 | ||
87e88524 ZU |
123 | %description examples -l hu.UTF-8 |
124 | Asymptote példák. | |
125 | ||
574b04f2 | 126 | %description examples -l pl.UTF-8 |
127 | Przykładowe pliki dla asymptote. | |
67493c5f | 128 | |
811998fe ZU |
129 | %package latex |
130 | Summary: LaTeX styles | |
131 | Summary(hu.UTF-8): LaTeX stílusok | |
69badf0e | 132 | Summary(pl.UTF-8): Style LaTeXa |
811998fe | 133 | Group: Applications/Publishing/TeX |
09cdfb34 | 134 | Requires(post,postun): %{_bindir}/texhash |
811998fe ZU |
135 | |
136 | %description latex | |
137 | LaTeX styles. | |
138 | ||
139 | %description latex -l hu.UTF-8 | |
140 | LaTeX stílusok. | |
141 | ||
69badf0e JB |
142 | %description latex -l pl.UTF-8 |
143 | Style LaTeXa. | |
09cdfb34 | 144 | |
eb37b2fc ZU |
145 | %package context |
146 | Summary: ConTeXt color macros | |
bc622240 | 147 | Summary(pl.UTF-8): Makra kolorów ConTeXta |
eb37b2fc | 148 | Group: Applications/Publishing/TeX |
df810fe2 ZU |
149 | Requires(post,postun): %{_bindir}/texhash |
150 | Requires: texlive-context | |
eb37b2fc ZU |
151 | |
152 | %description context | |
153 | ConTeXt color macros. | |
154 | ||
bc622240 JB |
155 | %description context -l pl.UTF-8 |
156 | Makra kolorów ConTeXta. | |
157 | ||
0428895c ZU |
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 | |
bc622240 | 161 | Summary(pl.UTF-8): Plik składni Vima dla plików asy |
0428895c ZU |
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 | ||
bc622240 JB |
170 | %description -n vim-syntax-asymptote -l pl.UTF-8 |
171 | Plik składni Vima dla plików asy. | |
172 | ||
67493c5f | 173 | %prep |
174 | %setup -q | |
f575f05d | 175 | %patch0 -p1 |
c83c549d | 176 | %patch1 -p1 |
d31a944f | 177 | %patch2 -p1 |
0c37749f | 178 | %patch3 -p1 |
d31a944f JB |
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 | |
67493c5f | 187 | |
188 | %build | |
5aafd215 | 189 | %{__autoconf} |
bc622240 | 190 | %{__autoheader} |
d31a944f | 191 | # there is "unknown option" warning for openimageio because AC_ARG_ENABLE specifies wrong name (not the one actually used) |
67493c5f | 192 | %configure \ |
d31a944f | 193 | %{?with_oiio:--enable-openimageio} \ |
bc622240 | 194 | --enable-gc=system \ |
c83c549d | 195 | --enable-offscreen \ |
67493c5f | 196 | --with-docdir=%{_docdir}/%{name}-doc |
197 | ||
73d12111 JR |
198 | %if %{with doc} |
199 | %{__make} all | |
200 | %else | |
259d854e ZU |
201 | %{__make} asy |
202 | %{__make} faq | |
259d854e | 203 | %endif |
67493c5f | 204 | |
205 | %install | |
206 | rm -rf $RPM_BUILD_ROOT | |
207 | ||
73d12111 | 208 | %if %{with doc} |
67493c5f | 209 | %{__make} install \ |
73d12111 JR |
210 | %else |
211 | %{__make} install-asy \ | |
ddbcf2cf | 212 | %endif |
67493c5f | 213 | DESTDIR=$RPM_BUILD_ROOT |
e4f2efd9 | 214 | |
d31a944f JB |
215 | # useless at runtime |
216 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/asymptote/GUI/setup.py | |
217 | ||
67493c5f | 218 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
bc622240 | 219 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
67493c5f | 220 | |
0428895c | 221 | install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax |
bc622240 | 222 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/asymptote/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax |
eb37b2fc | 223 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/texmf{,-dist} |
df810fe2 | 224 | %{__mv} $RPM_BUILD_ROOT%{texmfdist}/tex/context/{third,}/asymptote |
9425d432 | 225 | %{__rm} -r $RPM_BUILD_ROOT%{texmfdist}/tex/context/third |
0428895c | 226 | |
73d12111 | 227 | %if %{with doc} |
bc622240 JB |
228 | %{__mv} $RPM_BUILD_ROOT%{_infodir}/{asymptote/*.info,} |
229 | rmdir $RPM_BUILD_ROOT%{_infodir}/asymptote | |
d375e5d6 | 230 | %endif |
94b3e541 | 231 | |
67493c5f | 232 | %clean |
233 | rm -rf $RPM_BUILD_ROOT | |
234 | ||
c854ad4f ER |
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 | ||
69badf0e JB |
241 | %post latex |
242 | [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2 | |
243 | ||
244 | %postun latex | |
245 | [ ! -x %{_bindir}/texhash ] || %{_bindir}/texhash 1>&2 | |
246 | ||
67493c5f | 247 | %files |
248 | %defattr(644,root,root,755) | |
bc622240 | 249 | %doc BUGS ChangeLog README ReleaseNotes TODO |
67493c5f | 250 | %attr(755,root,root) %{_bindir}/asy |
bc622240 JB |
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 | |
7586670c JR |
260 | %{_datadir}/asymptote/shaders |
261 | %{_datadir}/asymptote/webgl | |
73d12111 | 262 | %if %{with doc} |
0016879a | 263 | %{_mandir}/man1/asy.1* |
bc622240 JB |
264 | %{_infodir}/asy-faq.info* |
265 | %{_infodir}/asymptote.info* | |
d375e5d6 | 266 | %endif |
811998fe ZU |
267 | |
268 | %files gui | |
269 | %defattr(644,root,root,755) | |
270 | %attr(755,root,root) %{_bindir}/xasy | |
be68a45d | 271 | %dir %{_datadir}/%{name}/GUI |
811998fe | 272 | %attr(755,root,root) %{_datadir}/%{name}/GUI/xasy.py |
0016879a | 273 | %{_datadir}/%{name}/GUI/[!x]*.py |
7586670c JR |
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 | |
73d12111 | 298 | %if %{with doc} |
0016879a | 299 | %{_mandir}/man1/xasy.1* |
7acb5d56 | 300 | %endif |
67493c5f | 301 | |
73d12111 | 302 | %if %{with doc} |
67493c5f | 303 | %files doc |
304 | %defattr(644,root,root,755) | |
305 | %{_docdir}/%{name}-doc | |
259d854e | 306 | %endif |
811998fe | 307 | |
69badf0e JB |
308 | %files examples |
309 | %defattr(644,root,root,755) | |
310 | %{_examplesdir}/%{name}-%{version} | |
311 | ||
811998fe ZU |
312 | %files latex |
313 | %defattr(644,root,root,755) | |
df810fe2 | 314 | %{texmfdist}/tex/latex/asymptote |
eb37b2fc ZU |
315 | |
316 | %files context | |
317 | %defattr(644,root,root,755) | |
df810fe2 | 318 | %{texmfdist}/tex/context/asymptote |
0428895c ZU |
319 | |
320 | %files -n vim-syntax-asymptote | |
321 | %defattr(644,root,root,755) | |
bc622240 JB |
322 | %{_datadir}/vim/vimfiles/syntax/asy.vim |
323 | %{_datadir}/vim/vimfiles/syntax/asy_filetype.vim |