summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2020-04-23 23:44:26 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2020-04-23 23:55:47 +0200
commit8124fadf4a2b629eecb56a06edd6f2f383beb233 (patch)
tree5f7c57bc6f8b48f5e49a205a52a4d78bb2ebcf2e /app-misc/linux-logo/linux-logo-5.11-r5.ebuild
parentapp-admin/github-backup-utils: 2.20.2 bump (diff)
downloadgentoo-8124fadf4a2b629eecb56a06edd6f2f383beb233.tar.gz
gentoo-8124fadf4a2b629eecb56a06edd6f2f383beb233.tar.bz2
gentoo-8124fadf4a2b629eecb56a06edd6f2f383beb233.zip
app-misc/linux-logo: set CC and flags directly in configure
Previously, this was set only from src_compile(), which can cause incorrcet flags being added at configure run (custom script) Closes: https://bugs.gentoo.org/718370 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'app-misc/linux-logo/linux-logo-5.11-r5.ebuild')
-rw-r--r--app-misc/linux-logo/linux-logo-5.11-r5.ebuild80
1 files changed, 80 insertions, 0 deletions
diff --git a/app-misc/linux-logo/linux-logo-5.11-r5.ebuild b/app-misc/linux-logo/linux-logo-5.11-r5.ebuild
new file mode 100644
index 000000000000..f63e15d1e14c
--- /dev/null
+++ b/app-misc/linux-logo/linux-logo-5.11-r5.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs systemd
+
+MY_P=${PN/-/_}-${PV}
+DESCRIPTION="A utility that displays an ANSI/ASCII logo and some system information"
+HOMEPAGE="http://www.deater.net/weave/vmwprod/linux_logo/"
+SRC_URI="http://www.deater.net/weave/vmwprod/linux_logo/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/"${P}"-add-aarch64-support.patch
+ "${FILESDIR}"/"${P}"-configure.patch
+)
+
+DOCS=( BUGS README README.CUSTOM_LOGOS TODO USAGE LINUX_LOGO.FAQ )
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ cp "${FILESDIR}"/logo-config "${S}/logo_config" || die
+ cp "${FILESDIR}"/linux_logo_creator "${S}/" || die
+ cp "${FILESDIR}"/linux-logo.service "${S}/" || die
+ cp "${FILESDIR}"/gentoo-*.logo "${S}"/logos/ || die
+
+ # Remove warn_unused_result warning
+ sed -i -e 's/FILE \*fff;/FILE \*fff;\n char *stemp;/' \
+ -e 's/fgets/stemp=fgets/' "${S}"/load_logo.c || die
+ default
+}
+
+src_configure() {
+ ARCH="" CC="$(tc-getCC)" AR="$(tc-getAR)" LDFLAGS="${LDFLAGS}" \
+ ./configure --prefix="${ED}"/usr || die
+}
+
+src_install() {
+ default
+
+ dobin "${FILESDIR}"/linux_logo_creator
+ newinitd "${FILESDIR}"/${PN}.init.d ${PN}
+ newconfd "${FILESDIR}"/${P}.conf ${PN}
+
+ # systemd support
+ systemd_newunit "${FILESDIR}/linux-logo.service" "linux-logo.service"
+}
+
+pkg_postinst() {
+ echo
+ elog "Linux_logo ebuild for Gentoo comes with two Gentoo logos."
+ elog ""
+ elog "To display the first Gentoo logo type: linux_logo -L gentoo"
+ elog "To display the second Gentoo logo type: linux_logo -L gentoo-alt"
+ elog "To display all the logos available type: linux_logo -L list."
+ elog ""
+ elog "To start linux_logo on boot, please type:"
+ elog " rc-update add linux-logo default"
+ elog "or for systemd"
+ elog " systemctl enable linux-logo.service"
+ elog "which uses the settings found in"
+ elog " /etc/conf.d/linux-logo"
+ echo
+}
+
+pkg_prerm() {
+ # Restore issue files
+ mv /etc/issue.linux-logo.backup /etc/issue 2> /dev/null
+ mv /etc/issue.net.linux-logo.backup /etc/issue.net 2> /dev/null
+}