use
5.008;
our
%build_reqs
= (
'libtiff'
=>
'4.0.3'
, );
our
%runtime_reqs
= (
'libtiff'
=>
'4.0.3'
, );
my
$lib
=
'-ltiff'
;
my
$inc
=
'-I. '
;
my
%pkgcfg
;
if
(
eval
{
%pkgcfg
=
ExtUtils::PkgConfig->find(
'libtiff-4 >= '
.
$build_reqs
{libtiff} );
}
)
{
$lib
=
$pkgcfg
{libs};
$inc
.=
$pkgcfg
{cflags};
$runtime_reqs
{libtiff} =
$pkgcfg
{modversion};
}
WriteMakefile(
NAME
=>
'Graphics::TIFF'
,
VERSION_FROM
=>
'lib/Graphics/TIFF.pm'
,
PREREQ_PM
=> {
Readonly
=> 0 },
CONFIGURE_REQUIRES
=> {
'ExtUtils::Depends'
=> 0,
'ExtUtils::PkgConfig'
=> 0
},
TEST_REQUIRES
=> {
'File::Spec'
=> 0,
'File::Temp'
=> 0.19,
'Test::More'
=> 0,
'Test::Requires'
=> 0,
'Test::Deep'
=> 0,
},
META_MERGE
=> {
'meta-spec'
=> {
version
=> 2 },
resources
=> {
repository
=> {
type
=>
'git'
,
},
},
},
clean
=> {
FILES
=>
'$(SOURCE_TIDY)'
},
(
$] >= 5.005
?
(
ABSTRACT_FROM
=>
'lib/Graphics/TIFF.pm'
,
AUTHOR
=>
'Jeffrey Ratcliffe'
)
: ()
),
LIBS
=> [
$lib
],
DEFINE
=>
''
,
INC
=>
$inc
,
);
sub
MY::postamble {
if
(
$OSNAME
ne
'linux'
) {
return
}
return
<<'END';
SHELL = bash
MANIFEST = $(shell cat MANIFEST)
SOURCE = $(filter bin/% examples/% %.pm %.PL %.pl %.t,$(MANIFEST))
SOURCE_TIDY = $(foreach file,$(SOURCE),$(file).tdy)
MANIFEST : $(SOURCE)
git ls-files | egrep -v '^\.(git|be)' > $@
tardist : README
README : lib/Graphics/TIFF.pm
pod2readme $< $@
tidy : MANIFEST $(SOURCE_TIDY)
%.tdy : %
perltidy $* && if ! diff -q $@ $* > /dev/null; then cp $@ $*; fi
END
}