1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 inherit eutils flag-o-matic multilib toolchain-funcs
7 SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon.v${MY_PV}src.tgz"
8 HOMEPAGE="http://www.cs.arizona.edu/icon/"
9 DESCRIPTION="very high level language"
11 LICENSE="public-domain HPND"
13 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
16 S="${WORKDIR}/icon.v${MY_PV}src"
18 DEPEND="X? ( x11-proto/xextproto
28 epatch "${FILESDIR}"/${P}-flags.patch
30 # Patch the tests so that they do not fail
31 # The following files in tests/standard are patched..
32 # io.icn - change /etc/motd to /etc/gentoo-release
33 # io.std - change /etc/motd to /etc/gentoo-release
34 # kwds.std - add two lines for the two new added keywords
35 # nargs.std - a couple of functions picked up additional parameters
36 epatch "${FILESDIR}/tests-${MY_PV}.patch"
38 # do not prestrip files
39 find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
43 # select the right compile target. Note there are many platforms
46 if [[ ${CHOST} == *-darwin* ]]; then
53 emake X-Configure name=${mytarget} -j1 || die
55 emake Configure name=${mytarget} -j1 || die
58 echo "#define MultiThread 1" >> src/h/define.h
59 echo "#define EventMon 1" >> src/h/define.h
60 echo "#define Eve 1" >> src/h/define.h
62 append-flags $(test-flags -fno-strict-aliasing -fwrapv)
64 emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "Make Failed"
68 make Samples || die "Samples failed"
69 make Test || die "Test failed"
75 dodir /usr/$(get_libdir)
77 make Install dest="${D}/usr/$(get_libdir)/icon" || die "Make install failed"
78 dosym /usr/$(get_libdir)/icon/bin/icont /usr/bin/icont
79 dosym /usr/$(get_libdir)/icon/bin/iconx /usr/bin/iconx
80 dosym /usr/$(get_libdir)/icon/bin/icon /usr/bin/icon
81 dosym /usr/$(get_libdir)/icon/bin/vib /usr/bin/vib
86 rm -rf "${D}"/usr/$(get_libdir)/icon/man
89 dodoc *.txt *.sed ../README
90 # dohtml ignores all anything except .html files, no use here
91 mkdir -p "${D}"/usr/share/doc/${PF}/html
92 cp -dpR *.htm *.gif *.jpg *.css "${D}"/usr/share/doc/${PF}/html
93 rm -rf "${D}"/usr/$(get_libdir)/icon/{doc,README}
95 # optional Icon Programming Library
98 dodir /usr/$(get_libdir)/icon/ipl
103 insinto /usr/$(get_libdir)/icon