Description: Use ExtUtils::PkgConfig instead of the unpackaged Alien::CFITSIO.
 Inspired by the old Makefile.PL.
Origin: vendor
Forwarded: not needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2022-08-24

--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,12 +1,20 @@
 use strict;
 use warnings;
 
-use Alien::Base::Wrapper 'WriteMakefile';
+use ExtUtils::MakeMaker;
+use ExtUtils::PkgConfig;
+my ($inc, $libs);
+my %pkg = eval { ExtUtils::PkgConfig->find( 'cfitsio' ); };
+if ( ! $@ ) {
+        $inc = $pkg{cflags};
+        $libs= $pkg{libs};
+}
 
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.
 WriteMakefile(
-        alien_requires => { 'Alien::CFITSIO' => '4.2.0' },
+        LIBS         => [$libs],
+        INC          => $inc,
         NAME         => 'Astro::FITS::CFITSIO',
         VERSION_FROM => 'CFITSIO.pm',             # finds $VERSION
         OBJECT       => 'CFITSIO.o util.o',
