File: no-alien-cfitsio.patch

package info (click to toggle)
libastro-fits-cfitsio-perl 1.17-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,116 kB
  • sloc: perl: 8,007; ansic: 899; sh: 49; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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',