1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic toolchain-funcs
8 DESCRIPTION="very high level language"
9 HOMEPAGE="http://www.cs.arizona.edu/icon/"
12 SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
14 LICENSE="public-domain HPND"
16 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
19 S="${WORKDIR}/icon-v${MY_PV}src"
22 X? ( x11-libs/libX11:= )"
31 "${FILESDIR}"/${PN}-9.5.1-flags.patch
32 # https://bugs.gentoo.org/669330
33 # Fix glibc 2.28 problem.
34 # Patch has also been submitted for upstream approval
35 "${FILESDIR}"/${PN}-9.5.1-fpoll.patch
41 # do not prestrip files
42 find src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
46 # select the right compile target. Note there are many platforms
49 if [[ ${CHOST} == *-darwin* ]]; then
55 # Fails if more then one make job process.
56 # This is an upstream requirement.
57 emake -j1 $(usex X X-Configure Configure) name=${mytarget}
59 # sanitise the Makedefs file generated by Configure
61 -e 's:-L/usr/X11R6/lib64::g' \
62 -e 's:-L/usr/X11R6/lib::g' \
63 -e 's:-I/usr/X11R6/include::g' \
64 Makedefs || die "sed of Makedefs failed"
66 append-flags $(test-flags -fno-strict-aliasing -fwrapv)
70 # Fails if more then one make job process.
71 # This is an upstream requirement.
72 emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
81 # Needed for make Install
82 dodir /usr/$(get_libdir)
84 emake Install dest="${D}/usr/$(get_libdir)/icon"
85 dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
86 dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
87 dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
88 dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
90 cd "${S}/man/man1" || die
95 DOCS=( *.txt ../README )
97 HTML_DOCS=( *.{htm,gif,jpg,css} )
100 # Clean up items from make Install that get installed elsewhere
101 rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die
102 rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
104 # optional Icon Programming Library
108 # Remove unneeded files before copy
109 rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die
111 insinto /usr/$(get_libdir)/icon