/[gentoo-x86]/net-misc/suite3270/suite3270-3.4_p5.ebuild
Gentoo

Contents of /net-misc/suite3270/suite3270-3.4_p5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jul 13 04:52:44 2015 UTC (4 years, 6 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Version bump.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 vapier 1.1 # Copyright 1999-2015 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/net-misc/suite3270/suite3270-3.4_p4.ebuild,v 1.1 2015/06/22 05:46:20 vapier Exp $
4    
5     EAPI="5"
6    
7     MY_PV=${PV/_p/ga}
8     MY_P=${PN}-${MY_PV}
9     SUB_PV=${PV:0:3}
10    
11     S=${WORKDIR}/${PN}-${SUB_PV}
12    
13     # only the x3270 package installs fonts
14     FONT_PN="x3270"
15     FONT_S=${WORKDIR}/${FONT_PN}
16    
17     inherit eutils font
18    
19     DESCRIPTION="Complete 3270 access package"
20     HOMEPAGE="http://x3270.bgp.nu/"
21     SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
22    
23     LICENSE="GPL-2"
24     SLOT="0"
25     KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
26     IUSE="cjk doc ncurses ssl tcl X"
27    
28     RDEPEND="ssl? ( dev-libs/openssl:0= )
29     X? (
30     x11-libs/libX11
31     x11-libs/libXaw
32     x11-libs/libXmu
33     x11-libs/libXt
34     )
35     ncurses? (
36     sys-libs/ncurses:=
37     sys-libs/readline:0=
38     )
39     tcl? ( dev-lang/tcl:0 )"
40     DEPEND="${RDEPEND}
41     X? (
42     x11-misc/xbitmaps
43     x11-proto/xproto
44     app-text/rman
45     x11-apps/mkfontdir
46     x11-apps/bdftopcf
47     )"
48    
49     suite3270_makelist() {
50     echo pr3287 s3270 \
51     $(usex ncurses c3270 '') \
52     $(usex tcl tcl3270 '') \
53     $(usex X x3270 '')
54     }
55    
56     src_prepare() {
57     # Some subdirs (like c3270/x3270/s3270) install the same set of data files
58     # (they have the same contents). Wrap that in a retry to avoid errors.
59     cat <<-EOF > _install
60     #!/bin/sh
61     for n in {1..5}; do
62     install "\$@" && exit
63     echo "retrying ..."
64     done
65     EOF
66     chmod a+rx _install
67     sed -i \
68     -e "s:@INSTALL@:${S}/_install:" \
69     */Makefile.in
70    
71     # https://sourceforge.net/p/x3270/bugs/13/
72     sed -i \
73     -e '/pr3287.man/s:$(INSTALL):@INSTALL_DATA@:' \
74     pr3287/Makefile.in || die
75    
76     # https://sourceforge.net/p/x3270/bugs/12/
77     if has_version '>=sys-libs/glibc-2.20' ; then
78     sed -i \
79     -e "s:-D_BSD_SOURCE:-D_DEFAULT_SOURCE:" \
80     */configure || die
81     fi
82     }
83    
84     src_configure() {
85     econf \
86     --cache-file="${S}"/config.cache \
87     --enable-s3270 \
88     --enable-pr3287 \
89     $(use_enable ncurses c3270) \
90     $(use_enable tcl tcl3270) \
91     $(use_enable X x3270) \
92     $(use_with X x) \
93     $(use_with X fontdir "${FONTDIR}")
94     }
95    
96     src_install() {
97     use X && dodir "${FONTDIR}"
98     emake DESTDIR="${D}" install{,.man}
99    
100     local p
101     for p in $(suite3270_makelist) ; do
102     cd "${S}/${p}"
103     docinto ${p}
104     dodoc README*
105     use doc && dohtml html/*
106     done
107    
108     use X && font_src_install
109     }
110    
111     pkg_postinst() { use X && font_pkg_postinst ; }
112     pkg_postrm() { use X && font_pkg_postrm ; }

  ViewVC Help
Powered by ViewVC 1.1.20