421dd5c
%{!?_texmf: %define _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFMAIN'`")}
421dd5c
421dd5c
%define emacs_sitelisp  %{_datadir}/emacs/site-lisp
421dd5c
%define xemacs_sitelisp %{_datadir}/xemacs/site-packages/lisp
421dd5c
421dd5c
Name:           asymptote
7223349
Version:        1.73
0ad1932
Release:        1%{?dist}
421dd5c
Summary:        Descriptive vector graphics language
421dd5c
dc986c9
Group:          Applications/Publishing
155e2d8
License:        LGPLv3+
421dd5c
URL:            http://asymptote.sourceforge.net/
841f91a
Source0:        http://dl.sourceforge.net/sourceforge/asymptote/asymptote-%{version}.src.tgz
841f91a
Source1:	asy.gif
841f91a
Source2:	xasy.desktop
c082dcf
Patch0:         asymptote-1.29-settings.patch
e5b9d2b
Patch1:		asymptote-1.63-gcc44.patch
421dd5c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
421dd5c
421dd5c
BuildRequires:  ncurses-devel
421dd5c
BuildRequires:  readline-devel
421dd5c
BuildRequires:  fftw-devel >= 3.0
4ad4b19
BuildRequires:  gc-devel >= 6.8
421dd5c
BuildRequires:  gsl-devel
421dd5c
BuildRequires:  tetex-latex
421dd5c
BuildRequires:  ghostscript
f5f72de
BuildRequires:  texinfo-tex
f5f72de
BuildRequires:  ImageMagick
841f91a
BuildRequires:  desktop-file-utils
7aa432e
BuildRequires:  freeglut-devel
7aa432e
BuildRequires:  zlib-devel
421dd5c
421dd5c
Requires:       tetex-latex
421dd5c
Requires:       tkinter
841f91a
Requires:	python-imaging-tk
e14781a
# for /usr/bin/texhash and /sbin/install-info
e14781a
Requires(post): texlive, info
e14781a
Requires(postun): texlive, info
421dd5c
421dd5c
%define texpkgdir   %{_texmf}/tex/latex/%{name}
421dd5c
421dd5c
%description
421dd5c
Asymptote is a powerful descriptive vector graphics language for technical
421dd5c
drawings, inspired by MetaPost but with an improved C++-like syntax.
421dd5c
Asymptote provides for figures the same high-quality level of typesetting
421dd5c
that LaTeX does for scientific text.
421dd5c
421dd5c
421dd5c
%prep
421dd5c
%setup -q
c082dcf
%patch0 -p1
5aad341
%patch1 -p1 -b .gcc44
a803c5d
%{__sed} -i 's/\r//' doc/CAD1.asy
421dd5c
ce7b4f4
# convert to UTF-8
ce7b4f4
iconv -f iso-8859-1 -t utf-8 -o examples/interpolate1.asy{.utf8,}
ce7b4f4
mv examples/interpolate1.asy{.utf8,}
421dd5c
421dd5c
%build
66e8dda
%configure --enable-gc=system --with-docdir=%{_defaultdocdir}/%{name}-%{version}/ --with-latex=%{_texmf}/tex/latex
421dd5c
make %{?_smp_mflags}
f2213fa
cd doc/
f2213fa
make asymptote.pdf
421dd5c
421dd5c
%install
421dd5c
rm -rf $RPM_BUILD_ROOT
f5f72de
make install-all DESTDIR=$RPM_BUILD_ROOT
421dd5c
421dd5c
install -p -m 644 BUGS ChangeLog LICENSE README ReleaseNotes TODO \
421dd5c
    $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}/
421dd5c
b2e069e
# Emacs mode and init files
b2e069e
install -dm 755 $RPM_BUILD_ROOT%{emacs_sitelisp}/site-start.d
b2e069e
cd $RPM_BUILD_ROOT%{emacs_sitelisp}
b2e069e
ln -s ../../%{name}/asy-{mode,keywords}.el .
b2e069e
cd $RPM_BUILD_ROOT%{emacs_sitelisp}/site-start.d
b2e069e
ln -s ../../../%{name}/asy-init.el .
b2e069e
b2e069e
# Xemacs mode and init files
b2e069e
install -dm 755 $RPM_BUILD_ROOT%{xemacs_sitelisp}/site-start.d
b2e069e
cd $RPM_BUILD_ROOT%{xemacs_sitelisp}
b2e069e
ln -s ../../../%{name}/asy-{mode,keywords}.el .
b2e069e
cd $RPM_BUILD_ROOT%{xemacs_sitelisp}/site-start.d
b2e069e
ln -s ../../../../%{name}/asy-init.el .
421dd5c
421dd5c
# Vim syntax file
546dd05
for vimver in 63 64 70 71 ; do
421dd5c
    install -dm 755 $RPM_BUILD_ROOT%{_datadir}/vim/vim$vimver/syntax
c082dcf
    cd $RPM_BUILD_ROOT%{_datadir}/vim/vim$vimver/syntax
c082dcf
    ln -s ../../../%{name}/asy.vim .
421dd5c
done
421dd5c
841f91a
# copy icon to pixmaps dir
841f91a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
841f91a
cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/
841f91a
841f91a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
841f91a
desktop-file-install --vendor "fedora"                  \
841f91a
        --dir $RPM_BUILD_ROOT%{_datadir}/applications   \
841f91a
        %{SOURCE2}
841f91a
ce7b4f4
# Clean up symlink
ce7b4f4
rm -rf $RPM_BUILD_ROOT%{_bindir}/xasy
ce7b4f4
cd $RPM_BUILD_ROOT%{_bindir}
ce7b4f4
ln -s ../share/%{name}/GUI/xasy.py xasy
421dd5c
841f91a
841f91a
421dd5c
%clean
421dd5c
rm -rf $RPM_BUILD_ROOT
421dd5c
421dd5c
421dd5c
%post
421dd5c
texhash >/dev/null 2>&1 || :
f5f72de
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir 2>/dev/null || :
546dd05
/sbin/install-info %{_infodir}/asy-faq.info.gz %{_infodir}/dir 2>/dev/null || :
421dd5c
421dd5c
%postun
421dd5c
texhash >/dev/null 2>&1 || :
f5f72de
if [ $1 = 0 ]; then
546dd05
    /sbin/install-info --delete %{name} %{_infodir}/dir 2>/dev/null || :
546dd05
    /sbin/install-info --delete asy-faq %{_infodir}/dir 2>/dev/null || :
f5f72de
fi
421dd5c
421dd5c
%files
421dd5c
%defattr(-,root,root,-)
421dd5c
%doc %{_defaultdocdir}/%{name}-%{version}/
421dd5c
%{_bindir}/*
421dd5c
%{_datadir}/%{name}/
421dd5c
%{texpkgdir}/
421dd5c
%{_mandir}/man1/*.1*
f5f72de
%{_infodir}/*.info*
ce7b4f4
%{_datadir}/vim/vim*/syntax/asy.vim
ce7b4f4
# Strictly speaking, we shouldn't own these dirs.
ce7b4f4
# However, we don't require emacs/xemacs, we just enhance them.
ce7b4f4
# Thus, its ok for dual ownership.
ce7b4f4
%{_datadir}/emacs*
ce7b4f4
%{_datadir}/xemacs/
841f91a
%{_datadir}/pixmaps/asy.gif
841f91a
%{_datadir}/applications/*.desktop
421dd5c
421dd5c
421dd5c
%changelog
7223349
* Mon May 18 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.73-1
7223349
- update to 1.73
155e2d8
- change license from GPLv3+ to LGPLv3+
7223349
8f8902d
* Mon Apr 13 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.70-1
8f8902d
- update to 1.70
8f8902d
fd381a1
* Tue Apr  7 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.69-1
fd381a1
- update to 1.69
fd381a1
0cb8900
* Wed Mar 25 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.68-1
0cb8900
- update to 1.68
0cb8900
fbe408c
* Thu Mar 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.67-1
fbe408c
- update to 1.67
fbe408c
0ad1932
* Fri Feb 27 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.66-1
0ad1932
- update to 1.66
0ad1932
248c3e1
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.63-5
248c3e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
248c3e1
5aad341
* Wed Feb 18 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.63-4
5aad341
- more gcc44 fixes with BIG_ENDIAN platforms
5aad341
e5b9d2b
* Wed Feb 18 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.63-3
e5b9d2b
- fix gcc44 issue with BIG_ENDIAN platforms
e5b9d2b
d9a824f
* Wed Feb 18 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.63-2
d9a824f
- forgot to put in new source
d9a824f
d636f1d
* Wed Feb 18 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.63-1
d636f1d
- 1.63
d636f1d
9acb189
* Fri Jan 30 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.60-1
9acb189
- 1.60
9acb189
0d9cd14
* Mon Jan 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.59-1
0d9cd14
- 1.59
0d9cd14
9c96969
* Mon Jan 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1.58-1
9c96969
- 1.58
9c96969
a777e33
* Mon Dec 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.57-1
a777e33
- 1.57
a777e33
e1829e8
* Tue Dec  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.56-1
e1829e8
- 1.56
e1829e8
75bd3e5
* Tue Dec  2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.54-1
75bd3e5
- 1.54
75bd3e5
66e8dda
* Tue Nov 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.52-1
66e8dda
- 1.52
66e8dda
2359ee9
* Tue Nov 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.51-1
2359ee9
- update to 1.51
2359ee9
2359ee9
* Mon Nov  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.49-1
2359ee9
- update to 1.49
2359ee9
0371e9d
* Sun Oct 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.47-1
0371e9d
- update to 1.47
0371e9d
b2506cb
* Mon Oct 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.46-1
b2506cb
- update to 1.46
b2506cb
7aa432e
* Mon Oct  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.44-2
7aa432e
- add missing BuildRequires
7aa432e
a7a7159
* Mon Oct  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.44-1
a7a7159
- update to 1.44
a7a7159
bd446aa
* Fri Jun 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.43-1
bd446aa
- update to 1.43
bd446aa
f2213fa
* Fri Apr 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.42-3
f2213fa
- explicitly call "make asymptote.pdf" in doc/
f2213fa
e14781a
* Fri Apr  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.42-2
e14781a
- fix build failure (use _POSIX_ARG_MAX) resolves bz 440799
e14781a
f2fa54b
* Thu Feb 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.42-1
f2fa54b
- update to 1.42
f2fa54b
841f91a
* Wed Feb  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.41-1
841f91a
- update to 1.41
841f91a
- enable desktop file for xasy
841f91a
ce7b4f4
* Thu Jan  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.37-1
ce7b4f4
- bump to 1.37
ce7b4f4
- fix gcc43 failures
ce7b4f4
- drop triggers
ce7b4f4
06953ae
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - sh: kpsewhich: command not found
06953ae
- Rebuild for selinux ppc32 issue.
06953ae
5cd7c94
* Sun Jul 29 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.33-1
5cd7c94
- Update 1.33.
5cd7c94
995d586
* Sat Jun 30 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.32-1
995d586
- Update to 1.32.
995d586
- vim-common triggers: correction and improvements (#246131).
995d586
4b80bb6
* Wed Jun 27 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.31-1
4b80bb6
- Update to 1.31.
4b80bb6
41220c6
* Sat Jun 16 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.30-1
41220c6
- Update to 1.30.
41220c6
c082dcf
* Sat Jun 16 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.29-3
c082dcf
- Using "evince" as the default PS and PDF viewers (#244151).
c082dcf
  (patch file: asymptote-1.29-settings.patch)
b2e069e
- Use relative symbolic links in the {emacs,xemacs}-common triggers (#155750).
c082dcf
- Use relative symbolic links in the vim-common triggers.
c082dcf
546dd05
* Sat Jun  2 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.29-2
546dd05
- Add asy-faq to install-info (#155750).
546dd05
- Add support for vim 7.1.
546dd05
c8f6279
* Mon May 21 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.29-1
c8f6279
- Update to 1.29.
c8f6279
e603b36
* Tue May  8 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.28-1
e603b36
- Update to 1.28.
e603b36
9d245a6
* Sat May  5 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.27-1
9d245a6
- Update to 1.27.
9d245a6
eb7229c
* Wed Apr 25 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.26-1
eb7229c
- Update to 1.26.
eb7229c
10a3ec5
* Tue Apr 10 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.25-1
10a3ec5
- Update to 1.25.
10a3ec5
d570d7a
* Sun Apr  1 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.24-1
d570d7a
- Update to 1.24.
d570d7a
00420ed
* Sun Mar 11 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.23-1
00420ed
- Update to 1.23.
00420ed
dcb40f6
* Tue Mar  6 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.22-1
dcb40f6
- Update to 1.22.
dcb40f6
565a8ab
* Sat Mar  3 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.21-1
565a8ab
- Update to 1.21.
565a8ab
227f5a7
* Fri Dec 29 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.20-1
227f5a7
- Update to 1.20.
227f5a7
82e189e
* Sat Dec 23 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.19-1
82e189e
- Update to 1.19.
82e189e
2435fde
* Sun Nov  5 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.18-1
2435fde
- Update to 1.18.
2435fde
7e1e40d
* Wed Nov  1 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.17-1
7e1e40d
- Update to 1.17.
7e1e40d
a803c5d
* Wed Oct 25 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.16-1
a803c5d
- Update to 1.16.
a803c5d
bb9bb6a
* Sun Oct 22 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.15-1
bb9bb6a
- Update to 1.15.
bb9bb6a
4ad4b19
* Wed Sep  6 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.13-1
4ad4b19
- Update to 1.13.
4ad4b19
a1ae1a1
* Thu Aug  3 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.12-1
a1ae1a1
- Update to 1.12.
a1ae1a1
ccfde26
* Thu Jul  6 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.11-1
ccfde26
- Update to 1.11.
ccfde26
9ae23e3
* Wed Jun 28 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.10-1
9ae23e3
- Update to 1.10.
9ae23e3
48a7eca
* Fri Jun 23 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.09-1
48a7eca
- Update to 1.09.
48a7eca
f5f72de
* Thu Jun 22 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.08-1
f5f72de
- Update to 1.08.
f5f72de
- Also installs the info file.
f5f72de
a3d873b
* Mon May 29 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.06-5
a3d873b
- Fedora Core 6: the texinfo package has been splitted (texinfo + texinfo-tex).
a3d873b
dc986c9
* Sat May 27 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.06-4
dc986c9
- Group: Development/Tools -> Applications/Publishing (#193154).
dc986c9
421dd5c
* Sat May 27 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.06-3
421dd5c
- Emacs/Xemacs init file (#193154 comment 6).
421dd5c
421dd5c
* Fri May 26 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.06-2
421dd5c
- Directories ownership (#193154).
421dd5c
421dd5c
* Wed May 24 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.06-1
421dd5c
- Update to 1.06.
421dd5c
- Using triggers to install the Vim syntax file and the Emacs/Xemacs mode file.
421dd5c
421dd5c
* Mon May 22 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.05-1
421dd5c
- Update to 1.05.
421dd5c
421dd5c
* Sun May  7 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.04-1
421dd5c
- Update to 1.04.
421dd5c
421dd5c
* Fri Mar 31 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.03-1
421dd5c
- Update to 1.03.
421dd5c
421dd5c
* Thu Mar 23 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.02-1
421dd5c
- First build.
421dd5c
421dd5c
# vim:set ai ts=4 sw=4 sts=4 et: