/[gentoo-x86]/net-misc/suite3270/suite3270-3.3.4_p6.ebuild
Gentoo

Contents of /net-misc/suite3270/suite3270-3.3.4_p6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Oct 20 04:27:02 2008 UTC (11 years, 1 month ago) by robbat2
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Trim old versions.
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-rc1-10246-gca5de40 x86_64)

1 # Copyright 1999-2008 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.3.4_p6.ebuild,v 1.6 2008/10/10 08:14:28 robbat2 Exp $
4
5 IUSE="tcl X cjk ssl debug"
6
7 S="${WORKDIR}"
8 DESCRIPTION="Complete 3270 access package"
9 MY_PV_tmp="${PV//.}"
10 MY_PV="${MY_PV_tmp//_}"
11 SRC_URI="http://x3270.bgp.nu/download/${PN}-${MY_PV}.tgz"
12 HOMEPAGE="http://www.geocities.com/SiliconValley/Peaks/7814/"
13
14 SLOT="0"
15 LICENSE="GPL-2"
16 KEYWORDS="~amd64 ~ppc s390 ~sparc x86"
17
18 RDEPEND="X? ( x11-libs/libXaw )
19 tcl? ( dev-lang/tcl )
20 sys-libs/ncurses
21 sys-libs/readline
22 ssl? ( dev-libs/openssl )
23 cjk? ( dev-libs/icu )"
24 DEPEND="${RDEPEND}
25 X? ( app-text/rman
26 x11-misc/imake
27 x11-misc/xbitmaps
28 x11-proto/xproto )
29 sys-apps/sed
30 sys-apps/grep"
31
32 # for each subitem
33 SUB_PV="3.3"
34
35 suite3270_src_compile() {
36 [ -z "${1}" ] && die "Need a parameter of the item to build!"
37 local MY_PN="${1}"
38 shift
39 cd ${S}/${MY_PN}-${SUB_PV}
40 local myconf_tmp="${*}"
41 local myconf=""
42 for i in ${myconf_tmp}; do
43 tmpexpr=`echo ${i} | sed -re 's:--([[:alnum:]]+)-([-[:alnum:]]+)(=.*)?:\2:g'`
44 use debug && einfo "Testing ${MY_PN}: ${i} => ${tmpexpr}"
45 grep -q -- ${tmpexpr} configure
46 [ "$?" -eq "0" ] && myconf="${myconf} ${i}"
47 done
48 echo
49 einfo "Compiling ${MY_PN} with ${myconf}"
50 econf ${myconf} || die
51 emake || die
52 cd ${S}
53 }
54
55 suite3270_src_install() {
56 [ -z "${1}" ] && die "Need a parameter of the item to build!"
57 local MY_PN="${1}"
58 shift
59 cd ${S}/${MY_PN}-${SUB_PV}
60 local myconf="${*}"
61 make DESTDIR=${D} ${myconf} install install.man || die
62 docinto ${MY_PN}
63 dohtml html/*
64 }
65
66 suite3270_makelist() {
67 MY_PLIST="c3270 pr3287 s3270"
68 use tcl && MY_PLIST="${MY_PLIST} tcl3270"
69 use X && MY_PLIST="${MY_PLIST} x3270"
70 }
71
72 src_compile() {
73 suite3270_makelist
74 local myconf_common
75 myconf_common="--without-pr3287 --cache-file=${S}/config.cache"
76 #use X && myconf_common="${myconf_common} --with-x"
77 myconf_common="${myconf_common} `use_with X x`"
78 #myconf_common="${myconf_common} `use_with ssl`"
79 myconf_common="${myconf_common} `use_enable ssl`"
80 if use cjk; then
81 myconf_common="${myconf_common} --with-icu=/usr --enable-dbcs"
82 else
83 myconf_common="${myconf_common} --without-icu --disable-dbcs"
84 fi
85 if use tcl; then
86 local tclinc
87 for j in `seq 1 5`; do
88 if has_version "=dev-lang/tcl-8.${j}*"; then
89 einfo "Found TCL-8.${j}"
90 tclinc="--with-tcl=8.${j}"
91 fi
92 done
93 if [ -z "${tclinc}" ]; then
94 die "USE=tcl, but cannot find dev-lang/tcl!"
95 fi
96 myconf_common="${myconf_common} ${tclinc}"
97 else
98 myconf_common="${myconf_common} --without-tcl"
99 fi
100 for i in ${MY_PLIST}; do
101 suite3270_src_compile ${i} "${myconf_common}"
102 done
103 }
104
105 src_install () {
106 suite3270_makelist
107 for i in ${MY_PLIST}; do
108 suite3270_src_install ${i}
109 done
110 prepalldocs
111
112 use X && rm ${D}/usr/X11R6/lib/X11/fonts/misc/fonts.dir
113 }
114
115 pkg_postinst() {
116 if use X; then
117 einfo ">>> Running mkfontdir on /usr/X11R6/lib/X11/fonts/misc"
118 mkfontdir /usr/lib/X11/fonts/misc
119 fi
120 }
121
122 pkg_postrm() {
123 if use X; then
124 einfo ">>> Running mkfontdir on /usr/X11R6/lib/X11/fonts/misc"
125 mkfontdir /usr/lib/X11/fonts/misc
126 fi
127 }

  ViewVC Help
Powered by ViewVC 1.1.20