summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-02 03:52:42 +0000
committerSam James <sam@gentoo.org>2022-12-02 21:09:30 +0000
commit917200daa85d6562da1b3468941b3a2bb01ff15c (patch)
tree9a432ca8a17ca14d5dbb58824acdb70eed77b05b /app-alternatives
parentdev-ada/gprbuild: add 23.0.0 (diff)
downloadgentoo-917200daa85d6562da1b3468941b3a2bb01ff15c.tar.gz
gentoo-917200daa85d6562da1b3468941b3a2bb01ff15c.tar.bz2
gentoo-917200daa85d6562da1b3468941b3a2bb01ff15c.zip
app-alternatives/lex: New package to control lex symlinks
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-alternatives')
-rw-r--r--app-alternatives/lex/lex-0.ebuild33
-rw-r--r--app-alternatives/lex/metadata.xml20
2 files changed, 53 insertions, 0 deletions
diff --git a/app-alternatives/lex/lex-0.ebuild b/app-alternatives/lex/lex-0.ebuild
new file mode 100644
index 000000000000..260f9d0ba5f2
--- /dev/null
+++ b/app-alternatives/lex/lex-0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="lex symlinks"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
+SRC_URI=""
+S=${WORKDIR}
+
+LICENSE="CC0-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
+IUSE="+flex reflex"
+REQUIRED_USE="^^ ( flex reflex )"
+
+RDEPEND="
+ flex? ( sys-devel/flex )
+ reflex? ( sys-devel/reflex )
+ !<sys-devel/flex-2.6.4-r5
+"
+
+src_install() {
+ if use reflex; then
+ dosym reflex /bin/lex
+ newman - lex.1 <<<".so reflex.1"
+ elif use flex; then
+ dosym flex /bin/lex
+ newman - lex.1 <<<".so flex.1"
+ else
+ die "Invalid USE flag combination (broken REQUIRED_USE?)"
+ fi
+}
diff --git a/app-alternatives/lex/metadata.xml b/app-alternatives/lex/metadata.xml
new file mode 100644
index 000000000000..309f526f2b4a
--- /dev/null
+++ b/app-alternatives/lex/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="flex">
+ Symlink to <pkg>sys-devel/flex</pkg>.
+ </flag>
+ <flag name="reflex">
+ Symlink to <pkg>sys-devel/reflex</pkg>.
+ </flag>
+ </use>
+</pkgmetadata>