Files
guru/dev-cpp/finalcut/finalcut-0.9.1-r1.ebuild
T
ingenarel (NeoJesus) d56f4baa37 */*: Use [[ ${PV} ... ]] instead of POSIX [ ${PV} ... ]
as per the coding style guide:
https://projects.gentoo.org/qa/policy-guide/ebuild-format.html#pg0101

if it previously used [ ${PV} ... ] it uses [[ ${PV} ... ]] now
if it previously used [[ ${PV} = b ]] or [ ${PV} = b ], it uses
[[ ${PV} == b ]] now

the changes were generated using these two commands:

```
find -name '*.ebuild' -exec sed -i -E \
's|([^[])\[+(\s+)(\S*\$\S*PV\S*)(\s+)(\S+)(\s+)(\S+)(\s+)\]+([^]])|\1\[\[\2\3\4\5\6\7\8\]\]\9|g' \
{} \+

find -name '*.ebuild' -exec sed -i -E \
's|\[(\s+)(\S*\$\S*PV\S*)(\s+)==?(\s+)(\S+)(\s+)\]|\[\1\2\3==\4\5\6\]|g' \
{} \+
```

this is aimed to be a series of commits meant to replace all instance of
POSIX [ ... ] to bash's [[ ... ]], to make guru up to date with the
coding style guide

this process is divided up into a series of commits in order to make
review and testing more easy

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-25 18:48:54 +02:00

100 lines
2.0 KiB
Bash

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic
DESCRIPTION="A text-based widget toolkit"
HOMEPAGE="https://github.com/gansm/finalcut/"
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/gansm/finalcut.git"
else
SRC_URI="https://github.com/gansm/finalcut/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="LGPL-3+"
SLOT="0/${PV}"
IUSE="doc examples +gpm test"
REQUIRED_USE="test? ( !examples )"
RESTRICT="!test? ( test )"
DEPEND="
sys-libs/ncurses:=[tinfo]
gpm? ( sys-libs/gpm )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
virtual/pkgconfig
test? ( >=dev-util/cppunit-1.12.0 )
"
RDEPEND="${DEPEND}"
DOCS=(
AUTHORS
ChangeLog
CODE_OF_CONDUCT.md
Contributing.md
SECURITY.md
)
src_prepare() {
default
[[ "${PV}" == 9999 ]] || eapply "${FILESDIR}/${P}-fix-tests.ebuild"
sed -i "/doc_DATA/d" Makefile.am || die
sed -i "/AM_CPPFLAGS/ s/-Werror//" {examples,final,test}/Makefile.am \
|| die 'Failed to remove `-Werror` from `CPPFLAGS`'
for component in doc examples test; do
if ! use "${component}"; then
sed -i "/SUBDIRS/ s/${component}//" Makefile.am \
|| die "Failed to remove ${component} from the building process"
fi
done
eautoreconf
}
src_configure() {
use test && append-cxxflags -O0 -DDEBUG -DUNIT_TEST
econf \
$(use_with gpm) \
$(use_with test unit-test)
}
src_install() {
einstalldocs
emake DESTDIR="${ED}" PACKAGE="${PF}" install
use doc || dodoc doc/first-steps*
if use examples; then
local examples="/usr/share/doc/${PF}/examples"
docompress -x "${examples}"
for example in examples/.libs/*; do
example="${example#examples/.libs/}"
local install_dir="${examples}/${example}"
insinto "${install_dir}"
doins "examples/${example}.cpp"
exeinto "${install_dir}"
doexe "examples/${example}"
done
fi
find "${ED}" -name "*.la" -delete || die
}