commit:     d42240c609ffabe432f77cb7ac646e1b55c45522
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Feb 15 05:51:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 28 15:07:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d42240c6

dev-util/omake: add 0.10.7

Also add tests and do some other tweaks with using edo and usev instead
of use <flag> || echo "".

Bug: https://bugs.gentoo.org/722934
Closes: https://bugs.gentoo.org/921169
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/omake/Manifest            |  1 +
 dev-util/omake/omake-0.10.7.ebuild | 89 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/dev-util/omake/Manifest b/dev-util/omake/Manifest
index c9ceed4b106f..873eeaf88621 100644
--- a/dev-util/omake/Manifest
+++ b/dev-util/omake/Manifest
@@ -1 +1,2 @@
 DIST omake-0.10.3.tar.gz 2438877 BLAKE2B 
c14adc4da9849b369a2cf5e3676260a2efeb6339939de95965f708b93ac5964af0a8b7e79ebaf98a20061c45530a20ca3825e7a432a3d8b86cdef3ab661cd5d9
 SHA512 
77eb87b819048d7d9cb9b89a73c5f922ba3adc93f0d58536b3cfa20abdbf1d2a4c576b77921c52e8ea5f80171e8a503b573bf2a92b65fa0579f6492574079733
+DIST omake-0.10.7.tar.gz 1508061 BLAKE2B 
8b9d006b65b8a0c2498986062691347cebeb42ad405f18ab8060e76f7bc4719b974285e61f2268dff094e4ee082c76a2903f421d012d3271c2eddf5931520f8d
 SHA512 
bbc8637ad98cae742d7ae91af9a295fe2dff4bd637c14d913b8b6924a562e645a54f1ad698817c2cea1bb4eb883af73dad5fe81d86b2179c8e0258e9ecc4e4c6

diff --git a/dev-util/omake/omake-0.10.7.ebuild 
b/dev-util/omake/omake-0.10.7.ebuild
new file mode 100644
index 000000000000..7453adec1cbc
--- /dev/null
+++ b/dev-util/omake/omake-0.10.7.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="Make replacement"
+HOMEPAGE="http://projects.camlcity.org/projects/omake.html";
+SRC_URI="https://github.com/ocaml-omake/omake/archive/refs/tags/${P}.tar.gz";
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc fam ncurses +ocamlopt readline"
+RESTRICT="installsources !ocamlopt? ( strip )"
+
+DEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt?]
+       ncurses? ( >=sys-libs/ncurses-5.3:0= )
+       fam? ( virtual/fam )
+       readline? ( >=sys-libs/readline-4.3:0= )"
+RDEPEND="${DEPEND}"
+BDEPEND=">=dev-lang/ocaml-3.10.2"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.10.2-cflags.patch"
+)
+
+src_prepare() {
+       default
+
+       cat <<- EOF > .config.local || die
+       # Install man pages into the correct location
+       public.MANDIR = $'${EPREFIX}/usr/share/man'
+       EOF
+
+       # https://bugs.gentoo.org/722934
+       sed -i -e "s/AR = ar/AR = $(tc-getAR)/" mk/osconfig_unix.mk || die
+}
+
+src_configure() {
+       edo ./configure \
+               -prefix "${EPREFIX}/usr" \
+               $(usev !readline '-disable-readline') \
+               $(usev !ncurses '-disable-ncurses') \
+               $(usev !fam '-disable-fam')
+}
+
+src_compile() {
+       emake all
+}
+
+src_test() {
+       # C lexer tests fails with glibc and gcc headers
+       # *** omake error:
+       # File /usr/include/stdio.h: line 212, characters 27-28
+       # Syntax error on token lbrack
+       # Current state:
+       # decl_specifiers_id_opt type_id . decl_specifiers_any_opt
+       # The next possible tokens are: tyqual tyclass tymod __attribute__
+       # *** failure
+       rm -r test/parse/C/Test2 || die
+       # *** omake error:
+       # File /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/stddef.h: line 427, 
characters 71-75
+       # Syntax error on token tymod
+       # Current state:
+       # id lparen . args_opt rparen
+       # The next possible tokens are: id lparen amp star string sizeof plus 
minus
+       # __extension__ incop1 unop1 char float int
+       # *** failure
+       rm -r test/parse/C/Test3 || die
+       # Shell test failure due to innocuous output change
+       rm -r test/shell/Test2 || die
+
+       edo ./src/main/omake check
+       if find test -name result.log | xargs grep -q '^*** failure$'; then
+               die "Some tests failed."
+       fi
+}
+
+src_install() {
+       emake INSTALL_ROOT="${D}" install
+       dodoc ChangeLog CONTRIBUTORS.org README.md
+       if use doc; then
+               dodoc doc/ps/omake-doc.pdf doc/txt/omake-doc.txt
+               dodoc -r doc/html
+       fi
+}

Reply via email to