]> git.draconx.ca Git - gentoo-fixes.git/blob - sys-devel/heirloom-devtools/heirloom-devtools-070527-r3.ebuild
heirloom-devtools: Fix build on new glibc.
[gentoo-fixes.git] / sys-devel / heirloom-devtools / heirloom-devtools-070527-r3.ebuild
1 # Copyright © 2018, 2020-2021 Nick Bowler
2 # License GPLv2+: GNU General Public License version 2 or any later version.
3 # This is free software: you are free to change and distribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5 #
6 # This a modified version of the original ebuild from Gentoo GNU/Linux,
7 # covered by the following copyright and permission notice:
8 #
9 #   Copyright 1999-2017 Gentoo Foundation
10 #   Distributed under the terms of the GNU General Public License v2
11
12 EAPI=7
13 inherit flag-o-matic readme.gentoo-r1 toolchain-funcs
14
15 DESCRIPTION="Original UNIX development tools"
16 HOMEPAGE="http://heirloom.sourceforge.net/devtools.html"
17 SRC_URI="http://downloads.sourceforge.net/project/heirloom/${PN}/${PV}/${P}.tar.bz2"
18
19 LICENSE="BSD BSD-4 CDDL"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x64-solaris"
22 IUSE=""
23
24 RDEPEND="app-shells/heirloom-sh
25         net-libs/libtirpc"
26 DEPEND="$RDEPEND
27         virtual/pkgconfig"
28
29 PATCHES=(
30         "$FILESDIR/$P-solaris.patch"
31         "$FILESDIR/$P-64-bit.patch"
32         "$FILESDIR/$P-gcc6.patch"
33         "$FILESDIR/$P-no-stropts.patch"
34 )
35
36 DOC_CONTENTS="
37         You may want to add /usr/5bin or /usr/ucb to \$PATH
38         to enable using the apps of heirloom toolchest by default.
39         Man pages are installed in /usr/share/man/5man/
40         You may need to set \$MANPATH to access them.
41 "
42
43 src_configure() {
44         pkgconfig=`tc-getPKG_CONFIG`
45         rpc_cppflags=`$pkgconfig --cflags libtirpc`
46         rpc_libs=`$pkgconfig --libs libtirpc`
47
48         sed -i \
49                 -e 's:^\(SHELL =\) \(.*\):\1 /bin/jsh:' \
50                 -e 's:^\(POSIX_SHELL =\) \(.*\):\1 /bin/sh:' \
51                 -e "s:^\(PREFIX=\)\(.*\):\1${EPREFIX}\2:" \
52                 -e "s:^\(SUSBIN=\)\(.*\):\1${EPREFIX}\2:" \
53                 -e "s:^\(LDFLAGS=\):\1${LDFLAGS}:" \
54                 -e "s:^\(CFLAGS=\)\(.*\):\1${CFLAGS}:" \
55                 -e 's:^\(STRIP=\)\(.*\):\1true:' \
56                 -e "s:^\(CXX = \)\(.*\):\1$(tc-getCXX) -fpermissive:" \
57                 -e "s:^\(INSTALL=\)\(.*\):\1$(which install):" \
58                 -e "/^CPPFLAGS *=/s:$: $rpc_cppflags:" \
59                 -e "/^LIBS *=/s:$: $rpc_libs:" \
60                 ./mk.config
61
62         echo "CC=$(tc-getCC)" >> "./mk.config"
63 }
64
65 src_compile() {
66         emake -j1
67 }
68
69 src_install() {
70         emake ROOT="${D}" install
71         readme.gentoo_create_doc
72 }
73
74 pkg_postinst() {
75         readme.gentoo_print_elog
76 }