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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Fri Jun 8 23:28:02 2012 UTC (2 years, 2 months ago) by zmedico
Branch: MAIN
Changes since 1.8: +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-r1.ebuild,v 1.8 2011/10/23 19:18:57 grobian Exp $
4
5 EAPI="4"
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 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
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=${EPREFIX}/usr/bin
33 MANDIR=${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\)
34 XFIGLIBDIR=${EPREFIX}/usr/share/xfig
35 PNGINC=-I${EPREFIX}/usr/include/X11
36 XPMINC=-I${EPREFIX}/usr/include/X11
37 USEINLINE=-DUSE_INLINE
38 RGB=${EPREFIX}/usr/share/X11/rgb.txt
39 FIG2DEV_LIBDIR=${EPREFIX}/usr/share/fig2dev"
40
41 for variable in ${vars2subs} ; do
42 varname=${variable%%=*}
43 varval=${variable##*=}
44 sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@"
45 done
46 }
47
48 src_prepare() {
49 find . -type f -exec chmod a-x '{}' \;
50 find . -name Makefile -delete
51 epatch "${FILESDIR}"/${P}-fig2mpdf-r1.patch
52 epatch "${FILESDIR}"/${PN}-3.2.5c-maxfontsize.patch
53 epatch "${FILESDIR}"/${P}-leadspace.patch
54 epatch "${FILESDIR}"/${P}-precision.patch
55 epatch "${FILESDIR}"/${P}-MAXWIDTH.patch
56 epatch "${FILESDIR}"/${P}-libpng-1.5.patch #356751
57 epatch "${FILESDIR}"/${PN}-3.2.5-solaris.patch
58
59 sed -e 's:-L$(ZLIBDIR) -lz::' \
60 -e 's: -lX11::' \
61 -i fig2dev/Imakefile || die
62 sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile
63 }
64
65 src_compile() {
66 xmkmf || die "xmkmf failed"
67 emake Makefiles
68
69 emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" \
70 USRLIBDIR="${EPREFIX}/usr/$(get_libdir)"
71 }
72
73 src_install() {
74 emake DESTDIR="${D}" \
75 ${transfig_conf} install install.man
76
77 dobin "${WORKDIR}/fig2mpdf/fig2mpdf"
78 doman "${WORKDIR}/fig2mpdf/fig2mpdf.1"
79
80 insinto /usr/share/fig2dev/
81 newins "${FILESDIR}/transfig-ru_RU.CP1251.ps" ru_RU.CP1251.ps
82 newins "${FILESDIR}/transfig-ru_RU.KOI8-R.ps" ru_RU.KOI8-R.ps
83 newins "${FILESDIR}/transfig-uk_UA.KOI8-U.ps" uk_UA.KOI8-U.ps
84
85 dohtml "${WORKDIR}/fig2mpdf/doc/"* || die
86
87 mv "${ED}"/usr/bin/fig2ps2tex{.sh,} || die #338295
88
89 dodoc README CHANGES LATEX.AND.XFIG NOTES
90 }
91
92 pkg_postinst() {
93 elog "Note, that defaults are changed and now if you don't want to ship"
94 elog "personal information into output files, use fig2dev with -a option."
95 }

  ViewVC Help
Powered by ViewVC 1.1.20