/[gentoo-x86]/net-misc/suite3270/suite3270-3.3.14_p7.ebuild
Gentoo

Contents of /net-misc/suite3270/suite3270-3.3.14_p7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Thu May 8 19:39:56 2014 UTC (5 years, 5 months ago) by vapier
Branch: MAIN
Changes since 1.1: +2 -2 lines
Stabilize for all.

1 vapier 1.1 # Copyright 1999-2014 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.2 # $Header: /var/cvsroot/gentoo-x86/net-misc/suite3270/suite3270-3.3.14_p7.ebuild,v 1.1 2014/03/09 06:54:27 vapier Exp $
4 vapier 1.1
5     EAPI="4"
6    
7     MY_PV=${PV/_p/ga}
8     MY_P=${PN}-${MY_PV}
9     SUB_PV=${PV:0:3}
10    
11     S=${WORKDIR}
12    
13     # only the x3270 package installs fonts
14     FONT_PN="x3270"
15     FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
16    
17     inherit eutils font multiprocessing
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 vapier 1.2 KEYWORDS="amd64 ppc ~s390 sparc x86"
26 vapier 1.1 IUSE="cjk doc ncurses ssl tcl X"
27    
28     RDEPEND="ssl? ( dev-libs/openssl )
29     X? (
30     x11-libs/libX11
31     x11-libs/libXaw
32     x11-libs/libXmu
33     x11-libs/libXt
34     )
35     ncurses? ( sys-libs/ncurses sys-libs/readline )
36     tcl? ( dev-lang/tcl )"
37     DEPEND="${RDEPEND}
38     X? (
39     x11-misc/xbitmaps
40     x11-proto/xproto
41     app-text/rman
42     x11-apps/mkfontdir
43     x11-apps/bdftopcf
44     )"
45    
46     suite3270_makelist() {
47     echo pr3287 s3270 \
48     $(usex ncurses c3270 '') \
49     $(usex tcl tcl3270 '') \
50     $(usex X x3270 '')
51     }
52    
53     src_prepare() {
54     # Some subdirs (like c3270/x3270/s3270) install the same set of data files
55     # (they have the same contents). Wrap that in a retry to avoid errors.
56     cat <<-EOF > _install
57     #!/bin/sh
58     for n in {1..5}; do
59     install "\$@" && exit
60     echo "retrying ..."
61     done
62     EOF
63     chmod a+rx _install
64     sed -i \
65     -e "s:@INSTALL@:${S}/_install:" \
66     */Makefile.in
67    
68     sed -i \
69     -e 's:CPPFunction:rl_completion_func_t:' \
70     c3270-*/c3270.c || die #503364
71     }
72    
73     src_configure() {
74     local p myconf
75     # Run configures in parallel!
76     multijob_init
77     for p in $(suite3270_makelist) ; do
78     cd "${S}/${p}-${SUB_PV}"
79     if [[ ${p} == "x3270" ]] ; then
80     myconf=(
81     --without-xmkmf
82     $(use_with X x)
83     $(use_with X fontdir "${FONTDIR}")
84     )
85     else
86     myconf=()
87     fi
88     multijob_child_init econf \
89     --cache-file="${S}"/config.cache \
90     $(use_enable cjk dbcs) \
91     $(use_enable ssl) \
92     "${myconf[@]}"
93     done
94     sed \
95     -e "s:@SUBDIRS@:$(suite3270_makelist):" \
96     -e "s:@VER@:${SUB_PV}:" \
97     "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
98     multijob_finish
99     }
100    
101     src_install() {
102     use X && dodir "${FONTDIR}"
103     EXTRA_TARGETS='install.man' default
104     local p
105     for p in $(suite3270_makelist) ; do
106     cd "${S}/${p}-${SUB_PV}"
107     docinto ${p}
108     local d=$(echo README*)
109     [[ -n ${d} ]] && dodoc ${d}
110     use doc && dohtml html/*
111     done
112     find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
113    
114     use X && font_src_install
115     }
116    
117     pkg_postinst() { use X && font_pkg_postinst ; }
118     pkg_postrm() { use X && font_pkg_postrm ; }

  ViewVC Help
Powered by ViewVC 1.1.20