1 |
commit: e6208724793683c9c07dd2741483d39797dca1a2 |
2 |
Author: Cheyenne Wills <cwills <AT> witznd <DOT> net> |
3 |
AuthorDate: Mon Oct 29 01:10:29 2018 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 2 20:32:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6208724 |
7 |
|
8 |
dev-lang/icon: Fixes compile error with glibc 2.28 |
9 |
|
10 |
Added patch pending upstream patch approval |
11 |
|
12 |
Bug: https://bugs.gentoo.org/669330 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/10288 |
14 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
15 |
Signed-off-by: Cheyenne Wills <cwills <AT> witznd.net> |
16 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
17 |
|
18 |
dev-lang/icon/files/icon-9.5.1-fpoll.patch | 27 +++++++ |
19 |
dev-lang/icon/icon-9.5.1-r2.ebuild | 114 +++++++++++++++++++++++++++++ |
20 |
2 files changed, 141 insertions(+) |
21 |
|
22 |
diff --git a/dev-lang/icon/files/icon-9.5.1-fpoll.patch b/dev-lang/icon/files/icon-9.5.1-fpoll.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..d2a4d5f33d2 |
25 |
--- /dev/null |
26 |
+++ b/dev-lang/icon/files/icon-9.5.1-fpoll.patch |
27 |
@@ -0,0 +1,27 @@ |
28 |
+diff --git a/ipl/cfuncs/fpoll.c b/ipl/cfuncs/fpoll.c |
29 |
+index 9230e18..33b8121 100644 |
30 |
+--- a/ipl/cfuncs/fpoll.c |
31 |
++++ b/ipl/cfuncs/fpoll.c |
32 |
+@@ -60,12 +60,9 @@ int fpoll(int argc, descriptor *argv) /*: await data from file */ |
33 |
+ |
34 |
+ /* check for data already in buffer */ |
35 |
+ /* there's no legal way to do this in C; we cheat */ |
36 |
+-#if defined(__GLIBC__) && defined(_STDIO_USES_IOSTREAM) /* new GCC library */ |
37 |
++#if defined(__GLIBC__) /* New GCC library */ |
38 |
+ if (f->_IO_read_ptr < f->_IO_read_end) |
39 |
+ RetArg(1); |
40 |
+-#elif defined(__GLIBC__) /* old GCC library */ |
41 |
+- if (f->__bufp < f->__get_limit) |
42 |
+- RetArg(1); |
43 |
+ #elif defined(_FSTDIO) /* new BSD library */ |
44 |
+ if (f->_r > 0) |
45 |
+ RetArg(1); |
46 |
+@@ -92,7 +89,7 @@ int fpoll(int argc, descriptor *argv) /*: await data from file */ |
47 |
+ |
48 |
+ if (r > 0) |
49 |
+ RetArg(1); /* success */ |
50 |
+- else if (r == 0) |
51 |
++ else if (r == 0) |
52 |
+ Fail; /* timeout */ |
53 |
+ else |
54 |
+ ArgError(1, 214); /* I/O error */ |
55 |
|
56 |
diff --git a/dev-lang/icon/icon-9.5.1-r2.ebuild b/dev-lang/icon/icon-9.5.1-r2.ebuild |
57 |
new file mode 100644 |
58 |
index 00000000000..5f313ed60aa |
59 |
--- /dev/null |
60 |
+++ b/dev-lang/icon/icon-9.5.1-r2.ebuild |
61 |
@@ -0,0 +1,114 @@ |
62 |
+# Copyright 1999-2018 Gentoo Authors |
63 |
+# Distributed under the terms of the GNU General Public License v2 |
64 |
+ |
65 |
+EAPI=6 |
66 |
+ |
67 |
+inherit flag-o-matic toolchain-funcs |
68 |
+ |
69 |
+DESCRIPTION="very high level language" |
70 |
+HOMEPAGE="http://www.cs.arizona.edu/icon/" |
71 |
+ |
72 |
+MY_PV=${PV//./} |
73 |
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz" |
74 |
+ |
75 |
+LICENSE="public-domain HPND" |
76 |
+SLOT="0" |
77 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
78 |
+IUSE="X iplsrc" |
79 |
+ |
80 |
+S="${WORKDIR}/icon-v${MY_PV}src" |
81 |
+ |
82 |
+RDEPEND=" |
83 |
+ X? ( x11-libs/libX11:= )" |
84 |
+DEPEND=" |
85 |
+ ${RDEPEND} |
86 |
+ X? ( |
87 |
+ x11-libs/libXpm |
88 |
+ x11-libs/libXt |
89 |
+ )" |
90 |
+ |
91 |
+PATCHES=( |
92 |
+ "${FILESDIR}"/${PN}-9.5.1-flags.patch |
93 |
+ # https://bugs.gentoo.org/669330 |
94 |
+ # Fix glibc 2.28 problem. |
95 |
+ # Patch has also been submitted for upstream approval |
96 |
+ "${FILESDIR}"/${PN}-9.5.1-fpoll.patch |
97 |
+) |
98 |
+ |
99 |
+src_prepare() { |
100 |
+ default |
101 |
+ |
102 |
+ # do not prestrip files |
103 |
+ find src -name 'Makefile' | xargs sed -i -e "/strip/d" || die |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ # select the right compile target. Note there are many platforms |
108 |
+ # available |
109 |
+ local mytarget; |
110 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
111 |
+ mytarget="macintosh" |
112 |
+ else |
113 |
+ mytarget="linux" |
114 |
+ fi |
115 |
+ |
116 |
+ # Fails if more then one make job process. |
117 |
+ # This is an upstream requirement. |
118 |
+ emake -j1 $(usex X X-Configure Configure) name=${mytarget} |
119 |
+ |
120 |
+ # sanitise the Makedefs file generated by Configure |
121 |
+ sed -i \ |
122 |
+ -e 's:-L/usr/X11R6/lib64::g' \ |
123 |
+ -e 's:-L/usr/X11R6/lib::g' \ |
124 |
+ -e 's:-I/usr/X11R6/include::g' \ |
125 |
+ Makedefs || die "sed of Makedefs failed" |
126 |
+ |
127 |
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv) |
128 |
+} |
129 |
+ |
130 |
+src_compile() { |
131 |
+ # Fails if more then one make job process. |
132 |
+ # This is an upstream requirement. |
133 |
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
134 |
+} |
135 |
+ |
136 |
+src_test() { |
137 |
+ emake Samples |
138 |
+ emake Test |
139 |
+} |
140 |
+ |
141 |
+src_install() { |
142 |
+ # Needed for make Install |
143 |
+ dodir /usr/$(get_libdir) |
144 |
+ |
145 |
+ emake Install dest="${D}/usr/$(get_libdir)/icon" |
146 |
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont |
147 |
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx |
148 |
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon |
149 |
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib |
150 |
+ |
151 |
+ cd "${S}/man/man1" || die |
152 |
+ doman "${PN}"t.1 |
153 |
+ doman "${PN}".1 |
154 |
+ |
155 |
+ cd "${S}/doc" || die |
156 |
+ DOCS=( *.txt ../README ) |
157 |
+ |
158 |
+ HTML_DOCS=( *.{htm,gif,jpg,css} ) |
159 |
+ einstalldocs |
160 |
+ |
161 |
+ # Clean up items from make Install that get installed elsewhere |
162 |
+ rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die |
163 |
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die |
164 |
+ |
165 |
+ # optional Icon Programming Library |
166 |
+ if use iplsrc; then |
167 |
+ cd "${S}" || die |
168 |
+ |
169 |
+ # Remove unneeded files before copy |
170 |
+ rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die |
171 |
+ |
172 |
+ insinto /usr/$(get_libdir)/icon |
173 |
+ doins -r ipl |
174 |
+ fi |
175 |
+} |