app-office/texmacs: bump to 1.99.10
[gentoo.git] / sys-devel / gnuconfig / gnuconfig-99999999.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit eutils
7 if [[ ${PV} == "99999999" ]] ; then
8         EGIT_REPO_URI="git://git.savannah.gnu.org/config.git
9                 http://git.savannah.gnu.org/r/config.git"
10
11         inherit git-r3
12 else
13         SRC_URI="mirror://gentoo/${P}.tar.bz2"
14         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
15         S="${WORKDIR}"
16 fi
17
18 DESCRIPTION="Updated config.sub and config.guess file from GNU"
19 HOMEPAGE="https://savannah.gnu.org/projects/config"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 IUSE=""
24
25 maint_pkg_create() {
26         cd "${S}"
27
28         local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
29         [[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
30
31         cp "${FILESDIR}"/${PV}/*.patch . || die
32
33         local tar="${T}/gnuconfig-${ver}.tar.bz2"
34         tar -jcf ${tar} ./* || die "creating tar failed"
35         einfo "Packaged tar now available:"
36         einfo "$(du -b ${tar})"
37 }
38
39 src_unpack() {
40         if [[ ${PV} == "99999999" ]] ; then
41                 git-r3_src_unpack
42                 maint_pkg_create
43         else
44                 unpack ${A}
45         fi
46 }
47
48 src_prepare() {
49         epatch "${S}"/*.patch
50         use elibc_uclibc && sed -i 's:linux-gnu:linux-uclibc:' testsuite/config-guess.data #180637
51 }
52
53 src_compile() { :;}
54
55 src_test() {
56         emake check
57 }
58
59 src_install() {
60         insinto /usr/share/${PN}
61         doins config.{sub,guess} || die
62         fperms +x /usr/share/${PN}/config.{sub,guess}
63         dodoc ChangeLog
64 }