aboutsummaryrefslogtreecommitdiffstats
path: root/community/perl-anyevent-i3
diff options
context:
space:
mode:
authorTimothy Legge <timlegge@gmail.com>2020-04-04 15:05:45 +0000
committerLeo <thinkabit.ukim@gmail.com>2020-04-04 17:25:04 +0000
commit370474cc94dc50d2eef6de7cf573b4174179a586 (patch)
treec876e2d0403e92ef219b2ea2257f46b54af45759 /community/perl-anyevent-i3
parent35afd4d0ccba44b77477f98468c462027a864875 (diff)
downloadaports-370474cc94dc50d2eef6de7cf573b4174179a586.tar.bz2
aports-370474cc94dc50d2eef6de7cf573b4174179a586.tar.xz
community/perl-anyevent-i3: modernize APKBUILD
Diffstat (limited to 'community/perl-anyevent-i3')
-rw-r--r--community/perl-anyevent-i3/APKBUILD34
-rw-r--r--community/perl-anyevent-i3/disable-tests-fail-with-insecure-path.patch36
2 files changed, 55 insertions, 15 deletions
diff --git a/community/perl-anyevent-i3/APKBUILD b/community/perl-anyevent-i3/APKBUILD
index e4cc4ef6c3..cc232062bf 100644
--- a/community/perl-anyevent-i3/APKBUILD
+++ b/community/perl-anyevent-i3/APKBUILD
@@ -1,33 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 3
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=perl-anyevent-i3
-_pkgname=AnyEvent-I3
+#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
+_pkgreal=AnyEvent-I3
pkgver=0.17
-pkgrel=0
-pkgdesc="Communicate with the i3 window manager."
-url="https://metacpan.org/release/AnyEvent-I3"
+pkgrel=1
+pkgdesc="Communicate with the i3 window manager"
+url="https://metacpan.org/release/AnyEvent-I3/"
arch="noarch"
license="Artistic-1.0 GPL-1.0-only"
-depends="perl-anyevent perl-json-xs"
-makedepends="perl-dev perl-module-build"
+depends="perl perl-anyevent perl-json-xs i3wm"
+makedepends="perl-dev perl-module-build i3wm"
subpackages="$pkgname-doc"
-source="https://cpan.metacpan.org/authors/id/M/MS/MSTPLBG/$_pkgname-$pkgver.tar.gz"
-builddir="$srcdir/$_pkgname-$pkgver"
+source="https://cpan.metacpan.org/authors/id/M/MS/MSTPLBG/AnyEvent-I3-$pkgver.tar.gz
+ disable-tests-fail-with-insecure-path.patch"
+builddir="$srcdir/$_pkgreal-$pkgver"
build() {
- cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
- perl Makefile.PL INSTALLDIRS=vendor
+ PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
+ make
}
-check(){
- cd "$builddir"
+check() {
+ export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
make test
}
package() {
- cd "$builddir"
- make install DESTDIR="$pkgdir"
+ make DESTDIR="$pkgdir" install
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
-sha512sums="e8b0ccb89be27d5e952e5cb819e1f462ad5c558879a88fb5087d72517424316c0053b081ed9763d701a017c1d838fa694b49f40886335a23a68ebb091714b259 AnyEvent-I3-0.17.tar.gz"
+sha512sums="e8b0ccb89be27d5e952e5cb819e1f462ad5c558879a88fb5087d72517424316c0053b081ed9763d701a017c1d838fa694b49f40886335a23a68ebb091714b259 AnyEvent-I3-0.17.tar.gz
+6885a5fa8c0edc75c4dcbfae80126920398f3b99529ac2ac6a74b3b6218104a9ab9e9119119bc71581a866e4dbbd1140dda51edce54c976dd7ef08e9b9c9c312 disable-tests-fail-with-insecure-path.patch"
diff --git a/community/perl-anyevent-i3/disable-tests-fail-with-insecure-path.patch b/community/perl-anyevent-i3/disable-tests-fail-with-insecure-path.patch
new file mode 100644
index 0000000000..c56693932f
--- /dev/null
+++ b/community/perl-anyevent-i3/disable-tests-fail-with-insecure-path.patch
@@ -0,0 +1,36 @@
+Submitter: Timothy Legge <timlegge@gmail.com>
+Date: 2020-04-04
+AnyEvent::I3 appears to remove the ENV settings before
+running to execute via qx in test mode with -T triggers an error:
+
+Insecure directory in $ENV{PATH} while running with -T switch at
+/builds/timlegge/aports/community/perl-anyevent-i3/src/
+AnyEvent-I3-0.17/blib/lib/AnyEvent/I3.pm line 151.
+
+As the module does this as a normal part of its operation and
+tests pass local this appears to be due to the tests running via
+the aports build tests
+
+--- a/t/01-workspaces.t
++++ b/t/01-workspaces.t
+@@ -1,7 +1,7 @@
+ #!perl -T
+ # vim:ts=4:sw=4:expandtab
+
+-use Test::More tests => 3;
++use Test::More skip_all => "AnyEvent::I3 removes ENV which causes test to fail";
+ use AnyEvent::I3;
+ use AnyEvent;
+
+--- a/t/02-sugar.t
++++ b/t/02-sugar.t
+@@ -1,7 +1,8 @@
+ #!perl -T
+ # vim:ts=4:sw=4:expandtab
+
+-use Test::More tests => 3;
++use Test::More skip_all => "AnyEvent::I3 removes ENV which causes test to fail";
++
+ use AnyEvent::I3;
+ use AnyEvent;
+