use alienfile;

plugin 'PkgConfig' => (
  pkg_name => 'libtiff-4',
);

plugin 'Probe::CommandLine' => (
  command   => 'tiffcp',
  secondary => 1,
);

share {

  plugin Download => (
    url     => 'https://download.osgeo.org/libtiff/',
    version => qr/^tiff-([0-9\.]+)\.tar\.gz$/,
  );

  plugin Extract => 'tar.gz';

  plugin 'Build::Autoconf' => ();

  # the build step is only necessary if you need to customize the
  # options passed to ./configure.  The default set by the
  # Build::Autoconf plugin is frequently sufficient.
  build [
    '%{configure} --disable-shared',
    '%{make} -j1',
    '%{make} install',
  ];
};
