ChangeLog

# ChangeLog for media-gfx/asymptote
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/ChangeLog,v 1.16 2008/07/04 04:20:30 grozin Exp $

*asymptote-1.43 (04 Jul 2008)

04 Jul 2008; Andrey Grozin
+files/asymptote-1.43-configure-ac.patch,
+files/asymptote-1.43-xdg-utils.patch, metadata.xml,
-asymptote-1.33-r1.ebuild, -asymptote-1.36.ebuild, +asymptote-1.43.ebuild:
Version bump. New USE flags. Dependence on virtual/tetex removed. Various
ebuild improvements. Cleaning up old versions.

28 May 2008; Christian Heim metadata.xml:
Removing Dominik Stadler (centic) from metadata.xml (as per #40994).
Assigning to maintainer-needed.

*asymptote-1.41 (10 Feb 2008)

10 Feb 2008; Dominik Stadler
+files/asymptote-1.41-configure-ac.patch,
+files/asymptote-1.41-makefile.patch,
+files/asymptote-1.41-xdg-utils.patch, +asymptote-1.41.ebuild:
Bump to version 1.41, fixes Bug 208817, thanks to Andrey Grocin
for updating the patches.

*asymptote-1.36 (27 Oct 2007)

27 Oct 2007; Dominik Stadler
+files/asymptote-1.36-configure-ac.patch,
+files/asymptote-1.36-makefile.patch, asymptote-1.29.ebuild,
+asymptote-1.36.ebuild:
Add 1.36, fixes Bug 196913
Fix repoman reports in 1.29

*asymptote-1.33-r1 (07 Oct 2007)

07 Oct 2007; Christian Faulhammer
-files/asymptote-1.20-configure-ac.patch,
-files/asymptote-1.20-makefile.patch,
-files/asymptote-1.21-configure-ac.patch,
-files/asymptote-1.21-makefile.patch,
-files/asymptote-1.26-configure-ac.patch,
-files/asymptote-1.26-makefile.patch, +files/64asymptote-gentoo.el,
+files/asy-ftd.vim, -asymptote-1.20.ebuild, -asymptote-1.21.ebuild,
-asymptote-1.26.ebuild, -asymptote-1.33.ebuild, +asymptote-1.33-r1.ebuild:
clean up; fix Emacs and Vim support (bugs 191008 and 193402); do some
quoting; use latex_rehash from latex-package

*asymptote-1.33 (28 Aug 2007)

28 Aug 2007; Dominik Stadler
+files/asymptote-1.33-configure-ac.patch,
+files/asymptote-1.33-makefile.patch, asymptote-1.29.ebuild,
+asymptote-1.33.ebuild:
Add version 1.33 including fix for boehm-gc 7.0, fixes Bug 188518, thanks to
Peter Ansell for the patches. Also stated boehm-gc < 7.0 for 1.29

03 Aug 2007; Dominik Stadler asymptote-1.26.ebuild,
asymptote-1.29.ebuild:
Mark stable on x86

*asymptote-1.29 (01 Jun 2007)

01 Jun 2007;
+files/asymptote-1.29-configure-ac.patch,
+files/asymptote-1.29-makefile.patch, +asymptote-1.29.ebuild:
Version bump to 1.29, fixes Bug 178464, thanks to Gerhard D and Neil Alldrin
for providing the updated ebuilds

30 Apr 2007; Marius Mauch asymptote-1.20.ebuild,
asymptote-1.21.ebuild, asymptote-1.26.ebuild:
Replacing einfo with elog

29 Apr 2007; Dominik Stadler
+files/asymptote-1.26-configure-ac.patch,
+files/asymptote-1.26-makefile.patch, asymptote-1.21.ebuild,
+asymptote-1.26.ebuild:
Mark 1.21 stable on x86

*asymptote-1.26 (27 Apr 2007)

27 Apr 2007; Dominik Stadler
+files/asymptote-1.26-configure-ac.patch,
+files/asymptote-1.26-makefile.patch, +asymptote-1.26.ebuild:
Add latest version 1.26

10 Apr 2007; Marcus D. Hanwell asymptote-1.21.ebuild:
Marked ~amd64.

*asymptote-1.21 (03 Mar 2007)

03 Mar 2007; Dominik Stadler
+files/asymptote-1.21-configure-ac.patch,
+files/asymptote-1.21-makefile.patch, +asymptote-1.21.ebuild:
Bump to version 1.21

02 Mar 2007; Dominik Stadler +files/64asy-gentoo.el,
asymptote-1.20.ebuild:
Add missing file 64asy-gentoo.el, add check for tk in python, add workaround
for problems with types.h and pid_t, fixes Bug 82871, thanks to Andrey
Grozin and Emiliano Vavassori for patches and suggestions.

21 Feb 2007; Dominik Stadler asymptote-1.20.ebuild:
Fix use-flags again, fixes Bug 167405

18 Feb 2007; Dominik Stadler asymptote-1.20.ebuild:
Use vim-syntax instead of vim, fixes Bug 167405

*asymptote-1.20 (17 Feb 2007)

17 Feb 2007; Dominik Stadler
+files/asymptote-1.20-configure-ac.patch,
+files/asymptote-1.20-makefile.patch, +metadata.xml,
+asymptote-1.20.ebuild:
Initial version, fixes Bug 82871, thanks to
Emiliano Vavassori for the ebuild and patches.

Manifest

AUX 64asy-gentoo.el 168 RMD160 ce644cf20e9d57918cb0f983a2e6fed729132664 SHA1 4f935343e996ce19696e979609e0873326aa5c0e SHA256 336e53de3b83eaad0c8c1c9151cb34c78a236e7aac55e1a85d72428d47970e58
AUX 64asymptote-gentoo.el 337 RMD160 423330249638e628cb0f7d0b8196042a34cffa03 SHA1 0ab1578ba7989941567f3f855481b8e9805420c2 SHA256 28dde57a1b6b39e583739c387eaef205dc16eea97c5980fddd2e3d0dd7023ed3
AUX asy-ftd.vim 60 RMD160 a08d3dbd7535d3de0897dd73b00f8866a72db731 SHA1 426086e8ed8d9f45518df1380ab62703cd5f1e0d SHA256 c766fccb0e3e43a6fb78eaa56cf6c45398d48b08566ea4794726f4a6ae3c9dc1
AUX asymptote-1.29-configure-ac.patch 1443 RMD160 497a336b5b4155f7fb4f36f71f96c8a5a0ef3681 SHA1 d108963f7b75a9d8a185ff54e6eb40cf7d3d58ef SHA256 49109223e505d778a58824a30c3d58775b0ab47f653821e7ca262b22b566df4d
AUX asymptote-1.29-makefile.patch 1932 RMD160 8461c1f74ced939209803b0e88aaad6022942cc1 SHA1 6d3c4d4618293776722dd351d3cbf3a644dddff4 SHA256 206b2c548627ba5bd40c9ab9278851834dbac99d10844bc7444bb7ad21ddf816
AUX asymptote-1.33-configure-ac.patch 1792 RMD160 5cc2aca83524e7a9129fb562635a4110504d26e0 SHA1 6dff40e533dd7ca0547fc1c450806163bc1bbb6c SHA256 a1ae42911d321d7aa77e0e8e8a974f590a458f34a8313efef158ad2a8cdbea51
AUX asymptote-1.33-makefile.patch 1976 RMD160 aa8e1b06ba180939526ff6a937a7cc7c64625775 SHA1 33a411b1701e9c2904a366a72e50e9a8ebc1ec60 SHA256 98cd1a3b4598672224f03865203f475988f1971347d47b5378864a40421b9ce0
AUX asymptote-1.36-configure-ac.patch 1792 RMD160 5cc2aca83524e7a9129fb562635a4110504d26e0 SHA1 6dff40e533dd7ca0547fc1c450806163bc1bbb6c SHA256 a1ae42911d321d7aa77e0e8e8a974f590a458f34a8313efef158ad2a8cdbea51
AUX asymptote-1.36-makefile.patch 1976 RMD160 aa8e1b06ba180939526ff6a937a7cc7c64625775 SHA1 33a411b1701e9c2904a366a72e50e9a8ebc1ec60 SHA256 98cd1a3b4598672224f03865203f475988f1971347d47b5378864a40421b9ce0
AUX asymptote-1.41-configure-ac.patch 1710 RMD160 66d13274afd490b1b89608739572b25363db7a2d SHA1 dd8ff34a46f23c5592318c06a33f401f4f10d017 SHA256 0295c2da8bddc9ec42a41f879660be8854c2753d7609b2d1e52c6f44bdb49826
AUX asymptote-1.41-makefile.patch 1863 RMD160 8fc8ce5426f972cfe556139e278f9b1493410bda SHA1 00204b46d5d55cefa3319f0d6a4bf6a4e61b758e SHA256 ccc4cc5fde6cca905cf1dad5ff229240c1c7cddf233802b6d2150ff14241d072
AUX asymptote-1.41-xdg-utils.patch 670 RMD160 547cc51966119ced3f0455519285556332b7e2ab SHA1 7fb8d7df077ea7f832d1a24b86917cc430c5f266 SHA256 d7c98af5e06bb10ae1872d371c8508d24d30994d365b1cc0be06785cbabffb39
AUX asymptote-1.43-configure-ac.patch 1663 RMD160 9efb5fc074dee95b9c2fb12e603662445fbfed87 SHA1 75279eb6f6d56816b3a3085022832c5925819373 SHA256 788bb48c9764a8aee40099a1edfdd5935f50e68025b63dba50c02b5a37045373
AUX asymptote-1.43-xdg-utils.patch 670 RMD160 cba5d67c5f0c1c11ce8e0fa87b9580e20ec6df8c SHA1 97c400dfec31c733a10b01d7327b7bf720b21fe7 SHA256 760cf4f49d9a42a66145f9cd8a929fd29fdc0fd3d29ade1fe9bc36c9e6106ad1
DIST asymptote-1.29.src.tgz 933266 RMD160 013a5f8f706159ea564811cd044a12fe4b6e58da SHA1 366a42e95796fe88863a2d82624e25630be8619e SHA256 2b4eea7b3a016295b4543e3d3c9fca80fa278fc2fb7824306130a2c37e602366
DIST asymptote-1.41.src.tgz 0 RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
DIST asymptote-1.43.src.tgz 1070973 RMD160 f83223f953032695b6dc45f483d0ad14c9e62349 SHA1 07b98fb4bba37cfebcc9fe926f5f767ed6de7787 SHA256 df010dca6cb0090cf677c45f89fa415c0c0aba8518fbbd3ae4839e597fa8ed74
EBUILD asymptote-1.29.ebuild 3487 RMD160 6b3be9ad553857ff582ee6d744a3d35dd72347dd SHA1 68e39bf79607dc84d1771ace2e2517a35e8ce0fd SHA256 5c81c778b02b48a305aa2b6337d4cc066ccc6c8135a5195917fe865f0576ef9a
EBUILD asymptote-1.41.ebuild 3666 RMD160 384cc8abae2016dfee558b2353158d4fec768c66 SHA1 9a590918c4298a7b273e825fad842d7ffe0081b7 SHA256 cf6b01f5678c546d6812b84a88f53acb5579c62568be9100b6ec812c88a0e158
EBUILD asymptote-1.43.ebuild 6179 RMD160 8fd9848826d99ad7ff2ace1f9826ed37ce8995a9 SHA1 7c1866e80e87dcc96108116f3322a232c7b0d001 SHA256 b71cb47438390fe221b49b0d7ac307a84a4e7c7985523a137ac2de7043750ab1
MISC ChangeLog 4520 RMD160 6f34b0d06cde72022b3a9ef2bddd86f90801b60f SHA1 96fa3b704282a309a46a2ea412f5dc4393bf0801 SHA256 6d6c5d7a049228d37b4e102fd5a5c47a339a6ecaadaa52a08aadfa4a10f0b604
MISC metadata.xml 665 RMD160 01bb3907b547b8adb4ff5964b6ebbdbc62b62516 SHA1 a054e337e73da639d43e455e8676186e1a377603 SHA256 7252f1f049b9bd140041c68719cefa0a8f8774abaa2093f141f2343a61f0d843

asymptote-1.29.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/asymptote-1.29.ebuild,v 1.4 2007/10/27 20:15:58 centic Exp $

inherit eutils elisp-common

DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
HOMEPAGE="http://asymptote.sourceforge.net"
SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 x86"

IUSE="boehm-gc doc fftw emacs gsl vim-syntax"

RDEPEND=">=sys-libs/readline-4.3-r5
>=sys-libs/ncurses-5.4-r5
dev-libs/libsigsegv
boehm-gc? ( >=dev-libs/boehm-gc-6.7 virtual/tetex
fftw? ( >=sci-libs/fftw-3.0.1 )
emacs? ( virtual/emacs )
gsl? ( sci-libs/gsl )
vim-syntax? ( app-editors/vim )"
DEPEND="${RDEPEND}
>=sys-devel/autoconf-2.5
>=sys-devel/bison-1.875
>=sys-devel/flex-2.5.4a-r5
doc? ( >=media-gfx/imagemagick-6.1.3.2
virtual/ghostscript
>=sys-apps/texinfo-4.7-r1 )"

pkg_setup() {
# checking if Boehm garbage collector was compiled with c++ support
if use boehm-gc ; then
if ! built_with_use dev-libs/boehm-gc nocxx ; then
einfo "dev-libs/boehm-gc has been compiled with nocxx use flag disabled"
else
echo
eerror "You have to rebuild dev-libs/boehm-gc enabling c++ support"
die
fi
fi

if ! built_with_use dev-lang/python tk; then
eerror "Please reemerge dev-lang/python with 'tk' support or xasy will"
eerror "not work. In order to fix this, execute the following:"
eerror "echo \"dev-lang/python tk\" >> /etc/portage/package.use"
eerror "and reemerge dev-lang/python before emerging asymptote."
die "requires dev-lang/python with use-flag 'tk'!!"
fi
}

src_unpack() {
unpack ${A}

cd "${S}"

# Fixing fftw and gsl enabling
epatch "${FILESDIR}/${P}-configure-ac.patch"
einfo "Patching configure.ac"
sed -i \
-e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
configure.ac || die "sed configure.ac failed"

einfo "Building configure"
WANT_AUTOCONF=2.5 autoconf

epatch "${FILESDIR}/${P}-makefile.patch"
}

src_compile() {
for dir in `find /var/cache/fonts -type d`; do addwrite ${dir}; done

# for the CPPFLAGS see http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
myconf="--with-latex=/usr/share/texmf/tex/latex --disable-gc-debug CPPFLAGS=-DHAVE_SYS_TYPES_H"
if use boehm-gc; then
myconf="${myconf} --enable-gc=system"
else
myconf="${myconf} --disable-gc"
fi

econf ${myconf} $(use_with fftw) $(use_with gsl) || die "econf failed"
emake || die "emake failed"
}

src_install() {
for dir in `find /var/cache/fonts -type d`; do addwrite ${dir}; done

if use doc; then
target="install-all"
else
target="install"
fi

make DESTDIR="${D}" ${target} || die "make install failed"

dodoc BUGS ChangeLog README ReleaseNotes TODO

if use emacs ; then
elisp-site-file-install base/asy-mode.el
elisp-site-file-install base/asy-keywords.el
elisp-site-file-install "${FILESDIR}"/64asy-gentoo.el
fi

if use vim-syntax ; then
insinto /usr/share/vim/vimfiles/syntax
doins base/asy.vim
fi
}

pkg_postinst() {
einfo 'Updating TeX tree...'
texhash &> /dev/null

elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'

use emacs && elisp-site-regen
}

pkg_postrm() {
einfo 'Updating TeX tree...'
texhash &> /dev/null

[ -f "${SITELISP}"/site-gentoo.el ] && elisp-site-regen
}

asymptote-1.41.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/asymptote-1.41.ebuild,v 1.1 2008/02/10 20:41:34 centic Exp $

inherit eutils elisp-common latex-package

DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
HOMEPAGE="http://asymptote.sourceforge.net/"
SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="boehm-gc doc fftw emacs gsl vim-syntax"

RDEPEND=">=sys-libs/readline-4.3-r5
>=sys-libs/ncurses-5.4-r5
dev-libs/libsigsegv
x11-misc/xdg-utils
boehm-gc? ( >=dev-libs/boehm-gc-7.0 )
virtual/tetex
fftw? ( >=sci-libs/fftw-3.0.1 )
emacs? ( virtual/emacs )
gsl? ( sci-libs/gsl )
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
DEPEND="${RDEPEND}
>=sys-devel/autoconf-2.5
>=sys-devel/bison-1.875
>=sys-devel/flex-2.5.4a-r5
doc? ( >=media-gfx/imagemagick-6.1.3.2
virtual/ghostscript
>=sys-apps/texinfo-4.7-r1 )"

SITEFILE=64${PN}-gentoo.el

pkg_setup() {
# checking if Boehm garbage collector was compiled with c++ support
if use boehm-gc ; then
if ! built_with_use dev-libs/boehm-gc nocxx ; then
einfo "dev-libs/boehm-gc has been compiled with nocxx use flag disabled"
else
echo
eerror "You have to rebuild dev-libs/boehm-gc enabling c++ support"
die
fi
fi

if ! built_with_use dev-lang/python tk; then
eerror "Please reemerge dev-lang/python with 'tk' support or xasy will"
eerror "not work. In order to fix this, execute the following:"
eerror "echo \"dev-lang/python tk\" >> /etc/portage/package.use"
eerror "and reemerge dev-lang/python before emerging asymptote."
die "requires dev-lang/python with use-flag 'tk'!!"
fi
}

src_unpack() {
unpack ${A}

cd "${S}"

# Fixing fftw and gsl enabling
epatch "${FILESDIR}/${P}-configure-ac.patch"
einfo "Patching configure.ac"
sed -i \
-e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
configure.ac || die "sed configure.ac failed"

einfo "Building configure"
WANT_AUTOCONF=2.5 autoconf

epatch "${FILESDIR}/${P}-makefile.patch"

# Changing pdf, ps, image viewers to xdg-open
epatch "${FILESDIR}/${P}-xdg-utils.patch"
}

src_compile() {
for dir in `find /var/cache/fonts -type d`; do addwrite ${dir}; done

# for the CPPFLAGS see http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
myconf="--with-latex=/usr/share/texmf/tex/latex --disable-gc-debug CPPFLAGS=-DHAVE_SYS_TYPES_H"
if use boehm-gc; then
myconf="${myconf} --enable-gc=system"
else
myconf="${myconf} --disable-gc"
fi

econf ${myconf} $(use_with fftw) $(use_with gsl) || die "econf failed"
emake || die "emake failed"

if use emacs ; then
elisp-compile base/*.el || die "elisp-compile failed"
fi
}

src_install() {
for dir in `find /var/cache/fonts -type d`; do addwrite ${dir}; done

if use doc; then
target="install-all"
else
target="install"
fi

emake DESTDIR="${D}" ${target} || die "emake install failed"

dodoc BUGS ChangeLog README ReleaseNotes TODO

if use emacs ; then
elisp-install ${PN} base/*.el base/*.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi

if use vim-syntax ; then
insinto /usr/share/vim/vimfiles/syntax
doins base/asy.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}/asy-ftd.vim"
fi
}

pkg_postinst() {
latex-package_rehash

elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'

use emacs && elisp-site-regen
}

pkg_postrm() {
latex-package_rehash
use emacs && elisp-site-regen
}

asymptote-1.43.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/asymptote-1.43.ebuild,v 1.1 2008/07/04 04:20:31 grozin Exp $

inherit eutils autotools elisp-common latex-package multilib python

DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
HOMEPAGE="http://asymptote.sourceforge.net/"
SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="boehm-gc doc emacs examples fftw gsl latex python vim-syntax X"

RDEPEND=">=sys-libs/readline-4.3-r5
>=sys-libs/ncurses-5.4-r5
dev-libs/libsigsegv
x11-misc/xdg-utils
boehm-gc? ( >=dev-libs/boehm-gc-7.0 )
fftw? ( >=sci-libs/fftw-3.0.1 )
gsl? ( sci-libs/gsl )
X? ( dev-lang/python )
python? ( dev-lang/python )
latex? ( virtual/latex-base )
emacs? ( virtual/emacs )
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
DEPEND="${RDEPEND}
doc? ( dev-lang/perl
virtual/latex-base
|| ( dev-texlive/texlive-texinfo app-text/tetex app-text/ptex ) )"

pkg_setup() {
# checking if Boehm garbage collector was compiled with c++ support
if use boehm-gc; then
if ! built_with_use dev-libs/boehm-gc nocxx; then
einfo "dev-libs/boehm-gc has been compiled with nocxx use flag disabled"
else
echo
eerror "You have to rebuild dev-libs/boehm-gc enabling c++ support"
die
fi
fi

if use X; then
python_tkinter_exists
fi

if use latex; then
# Calculating ASY_TEXMFDIR
local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)"
local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)"

if [ -z "${TEXMFPATH}" ]; then
eerror "You haven't defined the TEXMFSITE variable in your TeX config."
eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}"
die "Define TEXMFSITE in TeX configuration!"
else
# go through the colon separated list of directories
# (maybe only one) provided in the variable
# TEXMFPATH (generated from TEXMFSITE from TeX's config)
# and choose only the first entry.
# All entries are separated by colons, even when defined
# with semi-colons, kpsewhich changes
# the output to a generic format, so IFS has to be redefined.
local IFS="${IFS}:"

for strippedpath in ${TEXMFPATH}; do
if [ -d ${strippedpath} ]; then
ASY_TEXMFDIR="${strippedpath}"
break
fi
done

# verify if an existing path was chosen to prevent from
# installing into the wrong directory
if [ -z ${ASY_TEXMFDIR} ]; then
eerror "TEXMFSITE does not contain any existing directory."
eerror "Please define an existing directory in your TeX config file"
eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories"
die "TEXMFSITE variable did not contain an existing directory"
fi
fi
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

# Fixing fftw and gsl enabling
epatch "${FILESDIR}/${P}-configure-ac.patch"
einfo "Patching configure.ac"
sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
-i configure.ac \
|| die "sed configure.ac failed"

# Changing pdf, ps, image viewers to xdg-open
epatch "${FILESDIR}/${P}-xdg-utils.patch"

eautoreconf
}

src_compile() {
# for the CPPFLAGS see
# http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
local myconf="--disable-gc-debug CPPFLAGS=-DHAVE_SYS_TYPES_H"

if use boehm-gc; then
myconf="${myconf} --enable-gc=system"
else
myconf="${myconf} --disable-gc"
fi

econf ${myconf} \
$(use_with fftw) \
$(use_with gsl) \
|| die "econf failed"

emake || die "emake failed"

cd doc
emake asy.1 || die "emake asy.1 failed"
emake ${PN}.info || die "emake ${PN}.info failed"
if use doc; then
einfo "Making html docs"
emake ${PN}/index.html
einfo "Making FAQ"
cd FAQ
emake
cd ..
# pdf files
einfo "Making pdf docs"
export VARTEXFONTS="${T}"/fonts
emake asymptote.pdf
emake CAD.pdf
fi
cd ..

if use emacs; then
einfo "Compiling emacs lisp files"
elisp-compile base/*.el || die "elisp-compile failed"
fi
}

src_install() {
# the program
exeinto /usr/bin
doexe asy

# .asy files
insinto /usr/share/${PN}
doins base/*.asy

# documentation
dodoc BUGS ChangeLog README ReleaseNotes TODO
cd doc
doman asy.1
doinfo ${PN}.info*
cd ..

# X GUI
if use X; then
insinto /usr/share/${PN}/GUI
doins GUI/*.py
dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
doman doc/xasy.1x
fi

# examples
if use examples; then
insinto /usr/share/${PN}/examples
doins examples/*.asy \
examples/*.eps \
doc/*.asy \
doc/*.csv \
doc/*.dat \
doc/extra/*.asy
insinto /usr/share/${PN}/examples/animations
doins examples/animations/*.asy
fi

# LaTeX style
if use latex; then
cd doc
insinto "${ASY_TEXMFDIR}"/tex/latex
doins ${PN}.sty asycolors.sty
if use examples; then
insinto /usr/share/${PN}/examples
doins latexusage.tex
fi
cd ..
fi

# asymptote.py
if use python; then
python_version
insinto /usr/$(get_libdir)/python${PYVER}/site-packages
doins base/${PN}.py
fi

# emacs mode
if use emacs; then
elisp-install ${PN} base/*.el base/*.elc
elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
fi

# vim syntax
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
doins base/asy.vim
insinto /usr/share/vim/vimfiles/ftdetect
doins "${FILESDIR}"/asy-ftd.vim
fi

# extra documentation
if use doc; then
cd doc
dohtml ${PN}/*
cd FAQ
dodoc asy-faq.ascii
doinfo asy-faq.info
insinto /usr/share/doc/${PF}/html/FAQ
doins asy-faq.html/*
cd ..
insinto /usr/share/doc/${PF}
doins ${PN}.pdf CAD.pdf
fi
}

pkg_postinst() {
if use python; then
python_version
python_mod_compile \
/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}.py
fi

use latex && latex-package_rehash

use emacs && elisp-site-regen

elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
}

pkg_postrm() {
use latex && latex-package_rehash
use emacs && elisp-site-regen
use python && python_mod_cleanup
}

files

metadata.xml




sci

grozin@gentoo.org
Andrey Grozin


Asymptote is a powerful descriptive vector graphics language that
provides a natural coordinate-based framework for technical drawing.
Labels and equations are typeset with LaTeX, for high-quality PostScript
output.

A major advantage of Asymptote over other graphics packages is that it
is a programming language, as opposed to just a graphics program.