/[gentoo-x86]/media-gfx/transfig/transfig-3.2.5d.ebuild
Gentoo

Contents of /media-gfx/transfig/transfig-3.2.5d.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Fri Jun 8 23:28:02 2012 UTC (2 years, 3 months ago) by zmedico
Branch: MAIN
Changes since 1.9: +3 -3 lines
inherit multilib for get_libdir

(Portage version: 2.2.0_alpha110_p4/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/transfig/transfig-3.2.5d.ebuild,v 1.9 2011/01/09 13:58:23 ranger Exp $
4
5 EAPI="2"
6 inherit toolchain-funcs eutils flag-o-matic multilib
7
8 MY_P=${PN}.${PV}
9
10 DESCRIPTION="A set of tools for creating TeX documents with graphics"
11 HOMEPAGE="http://www.xfig.org/"
12 SRC_URI="mirror://sourceforge/mcj/${MY_P}.tar.gz
13 mirror://gentoo/fig2mpdf-1.1.2.tar.bz2"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
18 IUSE=""
19
20 RDEPEND="x11-libs/libXpm
21 virtual/jpeg
22 media-libs/libpng
23 x11-apps/rgb"
24 DEPEND="${RDEPEND}
25 x11-misc/imake
26 app-text/rman"
27
28 S=${WORKDIR}/${MY_P}
29
30 sed_Imakefile() {
31 # see fig2dev/Imakefile for details
32 vars2subs="BINDIR=/usr/bin
33 MANDIR=/usr/share/man/man\$\(MANSUFFIX\)
34 XFIGLIBDIR=/usr/share/xfig
35 USEINLINE=-DUSE_INLINE
36 RGB=/usr/share/X11/rgb.txt
37 FIG2DEV_LIBDIR=/usr/share/fig2dev"
38
39 for variable in ${vars2subs} ; do
40 varname=${variable%%=*}
41 varval=${variable##*=}
42 sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@"
43 done
44 }
45
46 src_prepare() {
47 find . -type f -exec chmod a-x '{}' \;
48 find . -name Makefile -delete
49 epatch "${FILESDIR}"/${P}-fig2mpdf.patch
50 epatch "${FILESDIR}"/${PN}-3.2.5c-maxfontsize.patch
51 sed -e 's:-L$(ZLIBDIR) -lz::' \
52 -e 's: -lX11::' \
53 -i fig2dev/Imakefile || die
54 sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile
55 }
56
57 src_compile() {
58 xmkmf || die "xmkmf failed"
59 emake Makefiles || die "make Makefiles failed"
60
61 emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" \
62 USRLIBDIR=/usr/$(get_libdir) || die "emake failed"
63 }
64
65 src_install() {
66 emake DESTDIR="${D}" \
67 ${transfig_conf} install install.man || die
68
69 dobin "${WORKDIR}/fig2mpdf/fig2mpdf" || die
70 doman "${WORKDIR}/fig2mpdf/fig2mpdf.1" || die
71
72 insinto /usr/share/fig2dev/
73 newins "${FILESDIR}/transfig-ru_RU.CP1251.ps" ru_RU.CP1251.ps || die
74 newins "${FILESDIR}/transfig-ru_RU.KOI8-R.ps" ru_RU.KOI8-R.ps || die
75 newins "${FILESDIR}/transfig-uk_UA.KOI8-U.ps" uk_UA.KOI8-U.ps || die
76
77 dohtml "${WORKDIR}/fig2mpdf/doc/"* || die
78
79 mv "${D}"/usr/bin/fig2ps2tex{.sh,} || die #338295
80
81 dodoc README CHANGES LATEX.AND.XFIG NOTES || die
82 }
83
84 pkg_postinst() {
85 elog "Note, that defaults are changed and now if you don't want to ship"
86 elog "personal information into output files, use fig2dev with -a option."
87 }

  ViewVC Help
Powered by ViewVC 1.1.20