diff options
author | Cheyenne Wills <cwills@witznd.net> | 2020-08-05 23:07:17 -0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-08-15 00:46:27 +0000 |
commit | 0050f8dfda95f7da8f70a46b1ac3218d1e3daef5 (patch) | |
tree | 7aacf2146c68dbb45830ff7bd9834fd2ac7f4b3f /dev-lang/icon/icon-9.5.20h.ebuild | |
parent | dev-ml/cryptokit: Stabilize 1.11 amd64, #737156 (diff) | |
download | gentoo-0050f8dfda95f7da8f70a46b1ac3218d1e3daef5.tar.gz gentoo-0050f8dfda95f7da8f70a46b1ac3218d1e3daef5.tar.bz2 gentoo-0050f8dfda95f7da8f70a46b1ac3218d1e3daef5.zip |
dev-lang/icon bump to 9.5.20h
Upstream has switched over from an "infrequent formal release to a
system of continual modifications that are immediately available
publicly through Github".
Going forward upstream will tag the repo and set the version number to
"9.5.yyx" where yy is the last two digits of the year and x is an
alphabetic sequence character within the year (e.g. 9.5.20h).
Create a new ebuild for icon-9.5.20h that supports the new upstream
source and follows upstream versioning.
Replace the use of the patches and use inline sed commands to modify the
Makefiles to follow Gentoo's CFLAGS/LDFLAGS policies.
The changes associated with #669330, #716212 and #732507 are included in
the upstream source.
Bug:https://bugs.gentoo.org/736096
Signed-off-by: Cheyenne Wills <cwills@witznd.net>
Closes: https://github.com/gentoo/gentoo/pull/17026
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/icon/icon-9.5.20h.ebuild')
-rw-r--r-- | dev-lang/icon/icon-9.5.20h.ebuild | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/dev-lang/icon/icon-9.5.20h.ebuild b/dev-lang/icon/icon-9.5.20h.ebuild new file mode 100644 index 000000000000..1c915dca803b --- /dev/null +++ b/dev-lang/icon/icon-9.5.20h.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="very high level language" +HOMEPAGE="http://www.cs.arizona.edu/icon/" + +SRC_URI="https://github.com/gtownsend/icon/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain HPND" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="X iplsrc" + +S="${WORKDIR}/icon-${PV}" + +RDEPEND=" + X? ( x11-libs/libX11:= )" +DEPEND=" + ${RDEPEND} + X? ( + x11-libs/libXpm + x11-libs/libXt + )" + +src_prepare() { + default + # Add CFLAGS and LDFLAGS to Makefiles as needed + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/cfuncs/Makefile || die + sed -i -e 's/^CFLAGS = \(.*\)/CFLAGS = $(CFLAGS) \1/g' ipl/packs/loadfunc/Makefile || die + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/packs/loadfunc/Makefile || die + sed -i -e 's/-o $LIBNAME $CFLAGS/& $LDFLAGS/g' ipl/cfuncs/mklib.sh || die + sed -i -e 's/$(RLINK)/& $(LDFLAGS)/g' src/runtime/Makefile || die + + # executables in src/common are only used to prep the build + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/common/Makefile || die + # executables in src/rtt are only used to perform the build + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/rtt/Makefile || die + + # do not prestrip files + find src -name 'Makefile' | xargs sed -i -e "/strip/d" || die +} + +src_configure() { + # select the right compile target. Note there are many platforms + # available + local mytarget; + if [[ ${CHOST} == *-darwin* ]]; then + mytarget="macintosh" + else + mytarget="linux" + fi + + # Fails if more then one make job process. + # This is an upstream requirement. + emake -j1 $(usex X X-Configure Configure) name=${mytarget} + + # sanitise the Makedefs file generated by Configure + sed -i \ + -e 's:-L/usr/X11R6/lib64::g' \ + -e 's:-L/usr/X11R6/lib::g' \ + -e 's:-I/usr/X11R6/include::g' \ + -e 's:-I/usr/X11R6/include::g' \ + -e '/^CFLAGS/d' \ + Makedefs || die "sed of Makedefs failed" + + if use elibc_musl; then + append-flags "-D_MUSL" + fi + append-flags $(test-flags -fno-strict-aliasing -fwrapv) +} + +src_compile() { + # Fails if more then one make job process. + # This is an upstream requirement. + emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_test() { + emake Samples + emake Test +} + +src_install() { + # Needed for make Install + dodir /usr/$(get_libdir) + + emake Install dest="${D}/usr/$(get_libdir)/icon" + dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont + dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx + dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon + if use X; then + dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib + fi + + cd "${S}/man/man1" || die + doman "${PN}"t.1 + doman "${PN}".1 + + cd "${S}/doc" || die + DOCS=( *.txt ../README ) + + HTML_DOCS=( *.{htm,gif,jpg,css} ) + einstalldocs + + # Clean up items from make Install that get installed elsewhere + rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die + rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die + + # optional Icon Programming Library + if use iplsrc; then + cd "${S}" || die + + # Remove unneeded files before copy + rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die + + insinto /usr/$(get_libdir)/icon + doins -r ipl + fi +} |