Alien-FontForge
view release on metacpan or search on metacpan
0.001 2017-08-28 23:52:45-0400
Features
- First release.
- Installs fontforge if package is not found on the system.
use alienfile;
plugin 'PkgConfig' => 'libfontforge';
requires 'Alien::Build::Plugin::Gather::Dino';
requires 'Path::Tiny' => 0;
use Env qw(@ACLOCAL_PATH);
if ( exists $ENV{MSYSTEM} ) {
requires 'Archive::Zip'; # for Extract::ArchiveZip
}
# https://fontforge.github.io/
share {
# Use .zip on Windows' MSYS2 because of extraction issues with bsdtar under MSYS2
my $ext = exists $ENV{MSYSTEM} ? 'zip' : 'tar.gz';
plugin Download => (
url => 'https://github.com/fontforge/fontforge/releases',
version => qr/(\d{4}\d{2}\d{2})\.\Q$ext\E/,
);
if ( exists $ENV{MSYSTEM} ) {
plugin 'Extract::ArchiveZip' => $ext;
} else {
plugin 'Extract::CommandLine' => $ext;
}
patch sub {
my($splinefont_h) = Path::Tiny->new('fontforge/splinefont.h');
if( $^O eq 'darwin' ) {
$splinefont_h->edit_lines(sub {
s{\Q#include "locale.h"\E}{#include <locale.h>\n#include <xlocale.h>\n}g;
});
}
};
plugin 'Build::Autoconf' => ();
if( exists $ENV{MSYSTEM} ) {
# Need for call to `autoreconf` in `./bootstrap`.
# Taken from <https://github.com/jtanx/fontforgebuilds/blob/master/ffbuild.sh>.
push @ACLOCAL_PATH,
(
'm4',
"/@{[ lc $ENV{MSYSTEM} ]}/share/aclocal"
);
}
build [
[ 'sh ./bootstrap' ],
[ '%{configure}'
lib/Alien/FontForge.pm view on Meta::CPAN
=head1 NAME
Alien::FontForge - Alien package for the FontForge library
=head1 VERSION
version 0.001
=head1 SEE ALSO
L<FontForge|http://fontforge.github.io/>
L<Repository information|http://project-renard.github.io/doc/development/repo/p5-Alien-FontForge/>
=head1 AUTHOR
Zakariyya Mughal <zmughal@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Zakariyya Mughal.
maint/devops.yml view on Meta::CPAN
- libcairo2-dev
macos-homebrew:
packages:
- pkg-config
- autoconf
- automake
- libtool
- gettext
- pango
- cairo
- fontconfig
- libpng
- jpeg
- libtiff
- giflib
- libspiro
- libuninameslist
msys2-mingw64:
packages:
- mingw-w64-x86_64-cairo
- mingw-w64-x86_64-libxml2
t/version.t view on Meta::CPAN
my $xs = do { local $/; <DATA> };
xs_ok {
xs => $xs,
verbose => 0,
cbuilder_link => {
extra_linker_flags =>
# add -dylib_file since during test, the dylib is under blib/
$^O eq 'darwin'
? ' -dylib_file ' . join ":", map {
"$_/lib/libfontforge.2.dylib"
} (@{Alien::FontForge->runtime_prop}{qw(prefix distdir)}),
: ' '
},
}, with_subtest {
my($module) = @_;
is $module->version, Alien::FontForge->version,
"Got FontForge version @{[ Alien::FontForge->version ]}";
};
};
done_testing;
__DATA__
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#undef _
#include "fontforge.h"
const char *
version(const char *class)
{
return PACKAGE_VERSION;
}
MODULE = TA_MODULE PACKAGE = TA_MODULE
const char *version(class);
( run in 2.378 seconds using v1.01-cache-2.11-cpan-5735350b133 )