From 1d84baf522f0febef6a0e1a166a1ce4719a8629b Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 19 Jan 2020 15:00:09 +0100
Subject: [PATCH] cfitsio: change to gnu_configure build_style

The upstream CMake file produces a wrong soname and a broken
pkg-config file.
---
 common/shlibs            | 2 +-
 srcpkgs/cfitsio/template | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 889115c811..277ed023e1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3291,7 +3291,7 @@ libSoapySDR.so.0.7 SoapySDR-0.7.0_1
 libeditorconfig.so.0 editorconfig-0.12.2_1
 libkid3-core.so.3.8.0 kid3-3.8.0_1
 libkid3-gui.so.3.8.0 kid3-3.8.0_1
-libcfitsio.so.3 cfitsio-3.450_1
+libcfitsio.so.8 cfitsio-3.470_2
 libapparmor.so.1 libapparmor-2.12.0_1
 libgsettings-qt.so.1 gsettings-qt-0.1+17.10.20170824_1
 libplacebo.so.29 libplacebo-1.29.0_1
diff --git a/srcpkgs/cfitsio/template b/srcpkgs/cfitsio/template
index 4817f4615d..db913e9626 100644
--- a/srcpkgs/cfitsio/template
+++ b/srcpkgs/cfitsio/template
@@ -1,9 +1,9 @@
 # Template file for 'cfitsio'
 pkgname=cfitsio
 version=3.470
-revision=1
+revision=2
 wrksrc="${pkgname}-${version%0}"
-build_style=cmake
+build_style=gnu-configure
 makedepends="libcurl-devel"
 short_desc="Library for reading and writing data files in FITS data format"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
@@ -22,5 +22,6 @@ cfitsio-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
 	}
 }