1 |
commit: d0e66653adf576e5b1b390df8424ea7ff473d8e5 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 29 10:10:32 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 29 10:23:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0e66653 |
7 |
|
8 |
sys-apps/gawk: make gmp dependency conditional; fix configure typo |
9 |
|
10 |
- Fix GMP dependency (it's only needed for MPFR support) |
11 |
- Fix "AR_FLAGS" typo in configure |
12 |
|
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
sys-apps/gawk/gawk-5.1.1-r1.ebuild | 101 +++++++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 101 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/gawk/gawk-5.1.1-r1.ebuild b/sys-apps/gawk/gawk-5.1.1-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..c22e4e5e373 |
21 |
--- /dev/null |
22 |
+++ b/sys-apps/gawk/gawk-5.1.1-r1.ebuild |
23 |
@@ -0,0 +1,101 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+DESCRIPTION="GNU awk pattern-matching language" |
30 |
+HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html" |
31 |
+SRC_URI="mirror://gnu/gawk/${P}.tar.xz" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
36 |
+IUSE="mpfr nls readline" |
37 |
+ |
38 |
+RDEPEND=" |
39 |
+ mpfr? ( |
40 |
+ dev-libs/gmp:= |
41 |
+ dev-libs/mpfr:= |
42 |
+ ) |
43 |
+ readline? ( sys-libs/readline:= ) |
44 |
+" |
45 |
+DEPEND="${RDEPEND}" |
46 |
+BDEPEND=" |
47 |
+ >=sys-apps/texinfo-6.7 |
48 |
+ >=sys-devel/bison-3.5.4 |
49 |
+ nls? ( sys-devel/gettext ) |
50 |
+" |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ default |
54 |
+ |
55 |
+ # Use symlinks rather than hardlinks, and disable version links |
56 |
+ sed -i \ |
57 |
+ -e '/^LN =/s:=.*:= $(LN_S):' \ |
58 |
+ -e '/install-exec-hook:/s|$|\nfoo:|' \ |
59 |
+ Makefile.in doc/Makefile.in || die |
60 |
+ |
61 |
+ # bug #413327 |
62 |
+ sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in || die |
63 |
+ |
64 |
+ # Fix typo in configure |
65 |
+ sed -i -e 's/AR_FLAGS = /AR_FLAGS=/' configure || die |
66 |
+ |
67 |
+ # Fix standards conflict on Solaris |
68 |
+ if [[ ${CHOST} == *-solaris* ]] ; then |
69 |
+ sed -i \ |
70 |
+ -e '/\<_XOPEN_SOURCE\>/s/1$/600/' \ |
71 |
+ -e '/\<_XOPEN_SOURCE_EXTENDED\>/s/1//' \ |
72 |
+ extension/inplace.c || die |
73 |
+ fi |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ # Avoid automagic dependency on libsigsegv |
78 |
+ export ac_cv_libsigsegv=no |
79 |
+ |
80 |
+ local myeconfargs=( |
81 |
+ --libexec='$(libdir)/misc' |
82 |
+ $(use_with mpfr) |
83 |
+ $(use_enable nls) |
84 |
+ $(use_with readline) |
85 |
+ ) |
86 |
+ |
87 |
+ econf "${myeconfargs[@]}" |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ # Automatic dodocs barfs |
92 |
+ rm -rf README_d || die |
93 |
+ |
94 |
+ default |
95 |
+ |
96 |
+ # Install headers |
97 |
+ insinto /usr/include/awk |
98 |
+ doins *.h |
99 |
+ rm "${ED}"/usr/include/awk/config.h || die |
100 |
+} |
101 |
+ |
102 |
+pkg_postinst() { |
103 |
+ # Symlink creation here as the links do not belong to gawk, but to any awk |
104 |
+ if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then |
105 |
+ eselect awk update ifunset |
106 |
+ else |
107 |
+ local l |
108 |
+ for l in "${EROOT}"/usr/share/man/man1/gawk.1* "${EROOT}"/usr/bin/gawk ; do |
109 |
+ if [[ -e ${l} ]] && ! [[ -e ${l/gawk/awk} ]] ; then |
110 |
+ ln -s "${l##*/}" "${l/gawk/awk}" || die |
111 |
+ fi |
112 |
+ done |
113 |
+ |
114 |
+ if ! [[ -e ${EROOT}/bin/awk ]] ; then |
115 |
+ ln -s "../usr/bin/gawk" "${EROOT}/bin/awk" || die |
116 |
+ fi |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+pkg_postrm() { |
121 |
+ if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then |
122 |
+ eselect awk update ifunset |
123 |
+ fi |
124 |
+} |