Subject: [alpine-aports] [PATCH] testing/perl-font-ttf: new aport

From: Valery Kartel <[email-masked]>
Date: Tue, 3 Nov 2015 14:35:14 +0200

---
 testing/perl-font-ttf/APKBUILD | 43 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 testing/perl-font-ttf/APKBUILD

diff --git a/testing/perl-font-ttf/APKBUILD b/testing/perl-font-ttf/APKBUILD
new file mode 100644
index 0000000..0d62e52
--- /dev/null
+++ b/testing/perl-font-ttf/APKBUILD
@@ -0,0 +1,43 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Valery Kartel <[email-masked]>
+# Maintainer: Valery Kartel <[email-masked]>
+pkgname=perl-font-ttf
+_pkgreal=Font-TTF
+pkgver=1.05
+pkgrel=0
+pkgdesc="TTF font support for Perl"
+url="http://search.cpan.org/dist/Font-TTF/"
+arch="noarch"
+license="Artistic-2"
+cpandepends="perl-io-string"
+cpanmakedepends="   "
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MH/MHOSKEN/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+	cd "$_builddir"
+	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+	cd "$_builddir"
+	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+	make && make test
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	find "$pkgdir" \( -name *.txt -o -name *.pod -o -name .packlist -o ttfmod.pl \) -delete
+	mv "$pkgdir"/usr/share/perl5/vendor_perl/* "$pkgdir"/usr/lib/perl5/vendor_perl
+	rm -fr "$pkgdir"/usr/share/perl5
+}
+
+md5sums="a9d0acf4cb9ebaee875d71732b83dfe5  Font-TTF-1.05.tar.gz"
+sha256sums="26c48e4e76e00f0ac00766b3cfba79f0cb8cbf005b7a39033f0e8e0d9eeafb50  Font-TTF-1.05.tar.gz"
+sha512sums="7288a2de63fc92c36f3706f365b2ea886e37361b13400a14f940961b0263f6492b02f73048c653bdcd5c5d1bb714977f3c5326b7217dcf3683b16d5048cd1e63  Font-TTF-1.05.tar.gz"
-- 
2.6.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 4 Nov 2015 10:58:34 +0100

On Tue,  3 Nov 2015 14:35:14 +0200

>  create mode 100644 testing/perl-font-ttf/APKBUILD

I see this when building and it does not look right:

...
Installing /home/ncopa/aports/testing/perl-font-ttf/pkg/perl-font-ttf/usr/share/man/man3/Font::TTF::Hhea.3pm
find: unrecognized: ttfmod.pl
BusyBox v1.24.1 (2015-11-03 08:19:52 GMT) multi-call binary.

Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]

Search for files and perform actions on them.
First failed action stops processing of current file.
Defaults: PATH is current directory, action is '-print'

	-L,-follow	Follow symlinks
	-H		...on command line only
	-xdev		Don't descend directories on other filesystems
	-maxdepth N	Descend at most N levels. -maxdepth 0 applies
			actions to command line arguments only
	-mindepth N	Don't act on first N levels
	-depth		Act on directory *after* traversing it

Actions:
	( ACTIONS )	Group actions for -o / -a
	! ACT		Invert ACT's success/failure
	ACT1 [-a] ACT2	If ACT1 fails, stop, else do ACT2
	ACT1 -o ACT2	If ACT1 succeeds, stop, else do ACT2
			Note: -a has higher priority than -o
	-name PATTERN	Match file name (w/o directory name) to PATTERN
	-iname PATTERN	Case insensitive -name
	-path PATTERN	Match path to PATTERN
	-ipath PATTERN	Case insensitive -path
	-regex PATTERN	Match path to regex PATTERN
	-type X		File type is X (one of: f,d,l,b,c,...)
	-perm MASK	At least one mask bit (+MASK), all bits (-MASK),
			or exactly MASK bits are set in file's mode
	-mtime DAYS	mtime is greater than (+N), less than (-N),
			or exactly N days in the past
	-mmin MINS	mtime is greater than (+N), less than (-N),
			or exactly N minutes in the past
	-newer FILE	mtime is more recent than FILE's
	-inum N		File has inode number N
	-user NAME/ID	File is owned by given user
	-group NAME/ID	File is owned by given group
	-size N[bck]	File size is N (c:bytes,k:kbytes,b:512 bytes(def.))
			+/-N: file size is bigger/smaller than N
	-links N	Number of links is greater than (+N), less than (-N),
			or exactly N
	-prune		If current file is directory, don't descend into it
If none of the following actions is specified, -print is assumed
	-print		Print file name
	-print0		Print file name, NUL terminated
	-exec CMD ARG ;	Run CMD with all instances of {} replaced by
			file name. Fails if CMD exits with nonzero
	-exec CMD ARG + Run CMD with {} replaced by list of file names
	-delete		Delete current file/directory. Turns on -depth option
>>> perl-font-ttf*: Running split function doc...
>>> perl-font-ttf-doc*: Preparing subpackage perl-font-ttf-doc...

I think something goes wrong but it does not halt (maybe a missing ||
return 1?)

> +++ b/testing/perl-font-ttf/APKBUILD

My guess is that it should be:

 .... -o -name ttfmod.pl ... || return 1

> +sha512sums="7288a2de63fc92c36f3706f365b2ea886e37361b13400a14f940961b0263f6492b02f73048c653bdcd5c5d1bb714977f3c5326b7217dcf3683b16d5048cd1e63  Font-TTF-1.05.tar.gz"

-nc

---

---

From: Valery Kartel <[email-masked]>
Date: Wed, 4 Nov 2015 12:16:48 +0200

Yes, it's my mistake ... Should be ... -o -name ttfmod.pl

--- old/APKBUILD.old    2015-11-04 12:16:05.369999999 +0200
+++ new/APKBUILD    2015-11-04 12:17:54.806666656 +0200
@@ -33,7 +33,7 @@
 package() {
     cd "$_builddir"
     make DESTDIR="$pkgdir" install || return 1
-    find "$pkgdir" \( -name *.txt -o -name *.pod -o -name .packlist -o
ttfmod.pl \) -delete
+    find "$pkgdir" \( -name *.txt -o -name *.pod -o -name .packlist -o
-name ttfmod.pl \) -delete || return 1
     mv "$pkgdir"/usr/share/perl5/vendor_perl/*
"$pkgdir"/usr/lib/perl5/vendor_perl
     rm -fr "$pkgdir"/usr/share/perl5
 }

2015-11-04 11:58 GMT+02:00 Natanael Copa <[email-masked]>:

> >  testing/perl-font-ttf/APKBUILD | 43
> ++++++++++++++++++++++++++++++++++++++++++
> Installing
> /home/ncopa/aports/testing/perl-font-ttf/pkg/perl-font-ttf/usr/share/man/man3/Font::TTF::Hhea.3pm
> > +source="
> http://search.cpan.org/CPAN/authors/id/M/MH/MHOSKEN/$_pkgreal-$pkgver.tar.gz
> "
> > +