summaryrefslogtreecommitdiff
path: root/apkbuild-cpan.in
diff options
context:
space:
mode:
authorKiyoshi Aman <aphrael@alpinelinux.org>2011-06-02 14:31:17 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-06-02 14:33:14 +0300
commitf6a74379add41f84aae68db9e630d448594444c5 (patch)
tree9948b524fbaf4c35ff4f3d78c84c7d30afb31edc /apkbuild-cpan.in
parent9c8f411ab397febceccc446e52aaa9a79883aaeb (diff)
downloadabuild-f6a74379add41f84aae68db9e630d448594444c5.tar.gz
abuild-f6a74379add41f84aae68db9e630d448594444c5.tar.bz2
abuild-f6a74379add41f84aae68db9e630d448594444c5.tar.xz
abuild-f6a74379add41f84aae68db9e630d448594444c5.zip
apkbuild-cpan: add detection for perl modules with native code
so we get arch set properly
Diffstat (limited to 'apkbuild-cpan.in')
-rwxr-xr-xapkbuild-cpan.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in
index f5c88d9..792c736 100755
--- a/apkbuild-cpan.in
+++ b/apkbuild-cpan.in
@@ -249,6 +249,10 @@ sub do_depends {
$text =~ s/^pkgdesc=\"([^\"]*)\"$/pkgdesc=\"$abstract\"/mg or
die "Can't find cpandepends line in APKBUILD";
}
+ if (length(`find $metaprefix -name '*.xs'`)) {
+ $text =~ s/^arch=\"([^\"]*)\"$/arch="all"/mg or
+ die "Can't find arch line in APKBUILD";
+ }
if ($license ne 'unknown') {
$text =~ s/^license=\"([^\"]*)\"$/license=\"$license\"/mg or
die "Can't find license line in APKBUILD";