aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-04-23 16:35:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-04-23 16:35:05 +0000
commit18a355feef818f1fdfa581067d5b846e2ddc7888 (patch)
tree88fca9cad7cb6ec002dc59b557fa016f974f720f /community
parent2e1d8d625fa0dc71ee08e82233b909f8ebad072a (diff)
downloadaports-18a355feef818f1fdfa581067d5b846e2ddc7888.tar.gz
aports-18a355feef818f1fdfa581067d5b846e2ddc7888.tar.bz2
aports-18a355feef818f1fdfa581067d5b846e2ddc7888.tar.xz
community/abiword: get rid of eval
simplify by extracting plugin name from $subpkgname so we don't need to use eval.
Diffstat (limited to 'community')
-rw-r--r--community/abiword/APKBUILD12
1 files changed, 4 insertions, 8 deletions
diff --git a/community/abiword/APKBUILD b/community/abiword/APKBUILD
index baba4721e9..52745ebe73 100644
--- a/community/abiword/APKBUILD
+++ b/community/abiword/APKBUILD
@@ -26,7 +26,7 @@ _plugins="applix babelfish bmp clarisworks collab docbook command eml epub \
xslfo"
for _i in $_plugins; do
- subpackages="$subpackages $pkgname-plugin-$_i:plugin_${_i}"
+ subpackages="$subpackages $pkgname-plugin-$_i:_plugin"
done
source="http://www.abisource.com/downloads/$pkgname/$pkgver/source/$pkgname-$pkgver.tar.gz
@@ -51,18 +51,14 @@ package() {
make DESTDIR="$pkgdir" install
}
-_do_plugin() {
- local plugin="$1"
- pkgdesc="Abiword $1 plugin"
+_plugin() {
+ local plugin="${subpkgname#${pkgname}-plugin-}"
+ pkgdesc="Abiword $plugin plugin"
local dir="usr/lib/abiword-${pkgver%.*}/plugins"
mkdir -p "$subpkgdir"/$dir
mv "$pkgdir"/$dir/$plugin.so "$subpkgdir"/$dir/
}
-for _i in $_plugins; do
- eval "plugin_${_i}() { _do_plugin $_i; }"
-done
-
plugins() {
pkgdesc="Abiword plugins, all of them"
depends=