1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1
8 DESCRIPTION="Command line shell and scripting interface for Drupal"
9 HOMEPAGE="https://github.com/drush-ops/drush"
10 SRC_URI="https://github.com/drush-ops/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 RDEPEND="dev-lang/php[cli,ctype,json(+),simplexml]
17 dev-php/PEAR-Console_Table"
20 "${FILESDIR}/update-bash-completion-script-for-2.1.patch"
21 "${FILESDIR}/array-syntax.patch"
22 "${FILESDIR}/${P}-php8.0.patch"
23 "${FILESDIR}/${P}-gzip-mime.patch"
24 "${FILESDIR}/${P}-dont-pass-null-to-strtoupper.patch"
25 "${FILESDIR}/${P}-batch-signature-fix.patch"
31 # dodoc compresses all of the documentation, so we fix the filenames
34 # First, the README location in bootstrap.inc.
36 "s!/share/doc/drush!/share/doc/${PF}!" \
37 -e "s!README\.md!\0.bz2!g" \
38 includes/bootstrap.inc || die
40 # Next, the list of documentation in docs.drush.inc. Note that
41 # html files don't get compressed.
43 -e "s!\.bashrc'!.bashrc.bz2'!" \
44 -e "s!\.inc'!.inc.bz2'!" \
45 -e "s!\.ini'!.ini.bz2'!" \
46 -e "s!\.md'!.md.bz2'!" \
47 -e "s!\.php'!.php.bz2'!" \
48 -e "s!\.script'!.script.bz2'!" \
49 -e "s!\.txt'!.txt.bz2'!" \
50 commands/core/docs.drush.inc || die
54 # Always install the examples; they're referenced within the source
55 # code and too difficult to exorcise.
56 dodoc -r README.md docs examples
58 insinto /usr/share/drush
59 doins -r classes commands includes lib misc
60 doins drush_logo-black.png drush.info drush.php
62 exeinto /usr/share/drush
64 dosym ../share/drush/drush /usr/bin/drush
67 newbashcomp drush.complete.sh drush