1 |
commit: 8124fadf4a2b629eecb56a06edd6f2f383beb233 |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 23 21:44:26 2020 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 23 21:55:47 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8124fadf |
7 |
|
8 |
app-misc/linux-logo: set CC and flags directly in configure |
9 |
|
10 |
Previously, this was set only from src_compile(), which can cause |
11 |
incorrcet flags being added at configure run (custom script) |
12 |
|
13 |
Closes: https://bugs.gentoo.org/718370 |
14 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
15 |
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> |
16 |
|
17 |
.../files/linux-logo-5.11-configure.patch | 78 +++++++++++++++++++++ |
18 |
app-misc/linux-logo/linux-logo-5.11-r5.ebuild | 80 ++++++++++++++++++++++ |
19 |
2 files changed, 158 insertions(+) |
20 |
|
21 |
diff --git a/app-misc/linux-logo/files/linux-logo-5.11-configure.patch b/app-misc/linux-logo/files/linux-logo-5.11-configure.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..a699db0485e |
24 |
--- /dev/null |
25 |
+++ b/app-misc/linux-logo/files/linux-logo-5.11-configure.patch |
26 |
@@ -0,0 +1,78 @@ |
27 |
+diff -Naur linux_logo-5.11.orig/configure linux_logo-5.11/configure |
28 |
+--- linux_logo-5.11.orig/configure 2010-02-19 23:47:46.000000000 +0100 |
29 |
++++ linux_logo-5.11/configure 2020-04-23 23:35:47.468728737 +0200 |
30 |
+@@ -41,31 +41,8 @@ |
31 |
+ XGETTEXT=xgettext |
32 |
+ fi |
33 |
+ |
34 |
+-which gcc |
35 |
+-GCC_MISSING=$? |
36 |
+- |
37 |
+-if [ $GCC_MISSING -eq 1 ]; then |
38 |
+- which cc |
39 |
+- CC_MISSING=$? |
40 |
+- if [ $CC_MISSING -eq 1 ]; then |
41 |
+- echo "C compiler not found!" |
42 |
+- else |
43 |
+- CC=cc |
44 |
+- fi |
45 |
+-else |
46 |
+- CC=gcc |
47 |
+-fi |
48 |
+- |
49 |
+ LIBSYSINFO=libsysinfo-0.2.2 |
50 |
+ |
51 |
+-LDFLAGS="" |
52 |
+- |
53 |
+-if [ $CC = gcc ]; then |
54 |
+- CFLAGS="-Wall -O2" |
55 |
+-else |
56 |
+- CFLAGS="-O2" |
57 |
+-fi |
58 |
+- |
59 |
+ $CROSS$CC $CFLAGS -c intl_test.c |
60 |
+ INTL_MISSING=$? |
61 |
+ |
62 |
+diff -Naur linux_logo-5.11.orig/libsysinfo-0.2.2/configure linux_logo-5.11/libsysinfo-0.2.2/configure |
63 |
+--- linux_logo-5.11.orig/libsysinfo-0.2.2/configure 2009-06-05 20:53:44.000000000 +0200 |
64 |
++++ linux_logo-5.11/libsysinfo-0.2.2/configure 2020-04-23 23:39:32.874812532 +0200 |
65 |
+@@ -15,39 +15,6 @@ |
66 |
+ PREFIX=/usr/local |
67 |
+ INSTALL=`which install` |
68 |
+ |
69 |
+-which gcc |
70 |
+-GCC_MISSING=$? |
71 |
+- |
72 |
+-if [ $GCC_MISSING -eq 1 ]; then |
73 |
+- which cc |
74 |
+- CC_MISSING=$? |
75 |
+- if [ $CC_MISSING -eq 1 ]; then |
76 |
+- echo "C compiler not found!" |
77 |
+- else |
78 |
+- CC=cc |
79 |
+- fi |
80 |
+-else |
81 |
+- CC=gcc |
82 |
+-fi |
83 |
+- |
84 |
+-which ar |
85 |
+-AR_MISSING=$? |
86 |
+- |
87 |
+-if [ $AR_MISSING -eq 0 ]; then |
88 |
+- AR=ar |
89 |
+-fi |
90 |
+- |
91 |
+- |
92 |
+-if [ $OS = SunOS ]; then |
93 |
+- AR=/usr/ccs/bin/ar |
94 |
+-fi |
95 |
+- |
96 |
+-if [ $CC = gcc ]; then |
97 |
+- CFLAGS="-Wall -O2" |
98 |
+-else |
99 |
+- CFLAGS="-O2" |
100 |
+-fi |
101 |
+- |
102 |
+ LIBSYSINFO_INCLUDE="-I.." |
103 |
+ LFLAGS="" |
104 |
+ |
105 |
|
106 |
diff --git a/app-misc/linux-logo/linux-logo-5.11-r5.ebuild b/app-misc/linux-logo/linux-logo-5.11-r5.ebuild |
107 |
new file mode 100644 |
108 |
index 00000000000..f63e15d1e14 |
109 |
--- /dev/null |
110 |
+++ b/app-misc/linux-logo/linux-logo-5.11-r5.ebuild |
111 |
@@ -0,0 +1,80 @@ |
112 |
+# Copyright 1999-2020 Gentoo Authors |
113 |
+# Distributed under the terms of the GNU General Public License v2 |
114 |
+ |
115 |
+EAPI=7 |
116 |
+ |
117 |
+inherit toolchain-funcs systemd |
118 |
+ |
119 |
+MY_P=${PN/-/_}-${PV} |
120 |
+DESCRIPTION="A utility that displays an ANSI/ASCII logo and some system information" |
121 |
+HOMEPAGE="http://www.deater.net/weave/vmwprod/linux_logo/" |
122 |
+SRC_URI="http://www.deater.net/weave/vmwprod/linux_logo/${MY_P}.tar.gz" |
123 |
+ |
124 |
+LICENSE="GPL-2" |
125 |
+SLOT="0" |
126 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" |
127 |
+IUSE="nls" |
128 |
+ |
129 |
+RDEPEND="nls? ( virtual/libintl )" |
130 |
+DEPEND="${RDEPEND}" |
131 |
+BDEPEND="nls? ( sys-devel/gettext )" |
132 |
+ |
133 |
+PATCHES=( |
134 |
+ "${FILESDIR}"/"${P}"-add-aarch64-support.patch |
135 |
+ "${FILESDIR}"/"${P}"-configure.patch |
136 |
+) |
137 |
+ |
138 |
+DOCS=( BUGS README README.CUSTOM_LOGOS TODO USAGE LINUX_LOGO.FAQ ) |
139 |
+ |
140 |
+S=${WORKDIR}/${MY_P} |
141 |
+ |
142 |
+src_prepare() { |
143 |
+ cp "${FILESDIR}"/logo-config "${S}/logo_config" || die |
144 |
+ cp "${FILESDIR}"/linux_logo_creator "${S}/" || die |
145 |
+ cp "${FILESDIR}"/linux-logo.service "${S}/" || die |
146 |
+ cp "${FILESDIR}"/gentoo-*.logo "${S}"/logos/ || die |
147 |
+ |
148 |
+ # Remove warn_unused_result warning |
149 |
+ sed -i -e 's/FILE \*fff;/FILE \*fff;\n char *stemp;/' \ |
150 |
+ -e 's/fgets/stemp=fgets/' "${S}"/load_logo.c || die |
151 |
+ default |
152 |
+} |
153 |
+ |
154 |
+src_configure() { |
155 |
+ ARCH="" CC="$(tc-getCC)" AR="$(tc-getAR)" LDFLAGS="${LDFLAGS}" \ |
156 |
+ ./configure --prefix="${ED}"/usr || die |
157 |
+} |
158 |
+ |
159 |
+src_install() { |
160 |
+ default |
161 |
+ |
162 |
+ dobin "${FILESDIR}"/linux_logo_creator |
163 |
+ newinitd "${FILESDIR}"/${PN}.init.d ${PN} |
164 |
+ newconfd "${FILESDIR}"/${P}.conf ${PN} |
165 |
+ |
166 |
+ # systemd support |
167 |
+ systemd_newunit "${FILESDIR}/linux-logo.service" "linux-logo.service" |
168 |
+} |
169 |
+ |
170 |
+pkg_postinst() { |
171 |
+ echo |
172 |
+ elog "Linux_logo ebuild for Gentoo comes with two Gentoo logos." |
173 |
+ elog "" |
174 |
+ elog "To display the first Gentoo logo type: linux_logo -L gentoo" |
175 |
+ elog "To display the second Gentoo logo type: linux_logo -L gentoo-alt" |
176 |
+ elog "To display all the logos available type: linux_logo -L list." |
177 |
+ elog "" |
178 |
+ elog "To start linux_logo on boot, please type:" |
179 |
+ elog " rc-update add linux-logo default" |
180 |
+ elog "or for systemd" |
181 |
+ elog " systemctl enable linux-logo.service" |
182 |
+ elog "which uses the settings found in" |
183 |
+ elog " /etc/conf.d/linux-logo" |
184 |
+ echo |
185 |
+} |
186 |
+ |
187 |
+pkg_prerm() { |
188 |
+ # Restore issue files |
189 |
+ mv /etc/issue.linux-logo.backup /etc/issue 2> /dev/null |
190 |
+ mv /etc/issue.net.linux-logo.backup /etc/issue.net 2> /dev/null |
191 |
+} |