# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem      1.0
PortGroup       compilers 1.0

name            eso-qfits
conflicts       eso-qfits-devel
version         6.2.0
revision        16


set _name       qfits

categories      science
license         GPL-2+
platforms       darwin
maintainers     eso.org:usd-help
description     ESO's qfits is a stand-alone C library offering easy access to FITS files.
long_description ESO's qfits is a stand-alone C library offering easy access to FITS files, including commandline tools such as dfits and fitsort.
homepage        https://www.eso.org/sci/software/eclipse/qfits/


distname            ${_name}-${version}
#distfiles           ${_name}-${version}${extract.suffix}
dist_subdir         ${name}
master_sites        https://ftp.eso.org/pub/qfits/

checksums       ${_name}-${version}${extract.suffix} \
                sha256  3271469f8c50310ed88d1fd62a07c8bbd5b361e102def1dce3478d1a6b104b54

compilers.choose    cc cxx
compilers.setup    -clang  -gcc44 -gcc45 -gcc46 -gcc47 -gcc48 -g95

post-extract {
  move ${worksrcpath}/admin/html.am ${worksrcpath}/
  delete ${worksrcpath}/admin
  file mkdir ${worksrcpath}/admin
  move ${worksrcpath}/html.am ${worksrcpath}/admin
}

patchfiles-append \
          patch-qfits_memory.c_gcc7.diff \
          patch-qfits_table.h_gcc14.diff


configure.args-append  --mandir=${prefix}/share/man

use_autoreconf      yes
autoreconf.args     -fiv

default_variants +${compilers.gcc_default}
use_parallel_build  no
