/[gentoo-x86]/dev-tcltk/blt/blt-2.4z-r10.ebuild
Gentoo

Contents of /dev-tcltk/blt/blt-2.4z-r10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Fri Nov 2 16:54:03 2012 UTC (2 years, 10 months ago) by jlec
Branch: MAIN
Changes since 1.13: +5 -1 lines
dev-tcltk/blt: Respect AR, #440272

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 8009D6F070EB7916)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-tcltk/blt/blt-2.4z-r10.ebuild,v 1.13 2012/06/07 20:37:57 zmedico Exp $
4
5 EAPI="3"
6
7 inherit eutils flag-o-matic multilib toolchain-funcs
8
9 MY_V_SUFFIX="-8.5.2"
10
11 DESCRIPTION="Extension to Tk, adding new widgets, geometry managers, and misc commands"
12 HOMEPAGE="
13 http://blt.sourceforge.net/
14 http://jos.decoster.googlepages.com/bltfortk8.5.2"
15 SRC_URI="
16 http://dev.gentoo.org/~jlec/distfiles/${PN}${PV}${MY_V_SUFFIX}.tar.gz
17 http://jos.decoster.googlepages.com/${PN}${PV}${MY_V_SUFFIX}.tar.gz"
18
19 IUSE="jpeg static-libs X"
20 SLOT="0"
21 LICENSE="BSD"
22 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
23
24 DEPEND="
25 dev-lang/tk
26 jpeg? ( virtual/jpeg )
27 X? ( x11-libs/libX11 )"
28 RDEPEND="${DEPEND}"
29
30 S="${WORKDIR}/${PN}${PV}${MY_V_SUFFIX}"
31
32 src_prepare() {
33 epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile.patch"
34 epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile2.patch"
35 # From blt-2.4z-6mdk.src.rpm
36 epatch "${FILESDIR}"/blt2.4z-64bit.patch
37
38 #epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fix.patch
39 epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fixpkgruntime.patch
40
41 epatch "${FILESDIR}"/${P}-ldflags.patch
42
43 # Set the correct libdir and drop RPATH
44 sed \
45 -e "s:\(^libdir=\${exec_prefix}/\)lib:\1$(get_libdir):" \
46 -e 's:LD_RUN_PATH=.*$:LD_RUN_PATH="":g' \
47 -i configure* || die "sed configure* failed"
48 sed \
49 -e "/^scriptdir =/s:lib:$(get_libdir):" \
50 -i Makefile.in demos/Makefile.in || die "sed Makefile.in failed"
51
52 sed \
53 -e "/AR/s:ar:$(tc-getAR):g" \
54 -i src/Makefile.in || die
55
56 epatch "${FILESDIR}"/${P}-linking.patch
57 epatch "${FILESDIR}"/${P}-darwin.patch
58 epatch "${FILESDIR}"/${P}-gbsd.patch
59 }
60
61 src_configure() {
62 # bug 167934
63 append-flags -fPIC
64
65 LC_ALL=C \
66 econf \
67 --x-includes="${EPREFIX}/usr/include" \
68 --x-libraries="${EPREFIX}/usr/$(get_libdir)" \
69 --with-blt="${EPREFIX}/usr/$(get_libdir)" \
70 --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
71 --with-tk="${EPREFIX}/usr/$(get_libdir)" \
72 --with-tclincls="${EPREFIX}/usr/include" \
73 --with-tkincls="${EPREFIX}/usr/include" \
74 --with-tcllibs="${EPREFIX}/usr/$(get_libdir)" \
75 --with-tklibs="${EPREFIX}/usr/$(get_libdir)" \
76 --with-cc="$(tc-getCC)" \
77 --with-cflags="${CFLAGS}" \
78 --with-gnu-ld \
79 $(use_enable jpeg) \
80 $(use_with X x)
81
82 }
83
84 src_compile() {
85 # parallel borks
86 emake -j1 LDFLAGS="${LDFLAGS}" || die "emake failed"
87 }
88
89 src_install() {
90 sed \
91 -e "s:\.\./src/bltwish:${EPREFIX}/usr/bin/bltwish:g" \
92 -e "s:\.\./bltwish:${EPREFIX}/usr/bin/bltwish:g" \
93 -e "s:/usr/local/bin/bltwish:${EPREFIX}/usr/bin/bltwish:g" \
94 -e "s:/usr/local/bin/tclsh:${EPREFIX}/usr/bin/tclsh:g" \
95 -i demos/{,scripts/}*.tcl || die
96
97 dodir /usr/bin \
98 /usr/$(get_libdir)/blt2.4/demos/bitmaps \
99 /usr/share/man/mann \
100 /usr/include \
101 || die "dodir failed"
102 emake -j1 INSTALL_ROOT="${D}" install || die "make install failed"
103
104 dodoc NEWS PROBLEMS README
105 dohtml html/*.html
106 for f in `ls "${ED}"/usr/share/man/mann` ; do
107 mv "${ED}"/usr/share/man/mann/${f} "${ED}"/usr/share/man/mann/${f/.n/.nblt}
108 done
109
110 # bug 259338 - dev-tcltk/blt-2.4z-r4 provides empty pkgIndex.tcl
111 cp "${FILESDIR}"/pkgIndex.tcl "${ED}"/usr/$(get_libdir)/blt2.4/pkgIndex.tcl
112
113 # fix for linking against shared lib with -lBLT or -lBLTlite
114 dosym libBLT24$(get_libname) /usr/$(get_libdir)/libBLT$(get_libname) || die
115 dosym libBLTlite24$(get_libname) /usr/$(get_libdir)/libBLTlite$(get_libname) || die
116
117 use static-libs || \
118 find "${ED}"/usr/$(get_libdir) -name "*.a" -print0 | \
119 xargs -r -0 rm -fv
120 }

  ViewVC Help
Powered by ViewVC 1.1.20