Update cfitsio to the latest stable version. Build test with consumers and with upcoming kstars.
OK and feedback welcome? RS Index: Makefile_____________________________________________ RCS file: /cvs/ports/math/cfitsio/Makefile,v retrieving revision 1.11 diff -u -p -u -p -r1.11 Makefile --- Makefile 10 Mar 2016 21:58:52 -0000 1.11 +++ Makefile 12 Apr 2019 05:33:59 -0000 @@ -3,46 +3,61 @@ COMMENT= library for handling FITS data CATEGORIES= math graphics devel -HOMEPAGE= http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html +HOMEPAGE= https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html -DISTNAME= cfitsio3006 -WRKDIST= ${WRKDIR}/cfitsio +DISTNAME= cfitsio3450 + +PKGNAME= cfitsio-3.450 -PKGNAME= cfitsio-3.006 -REVISION= 1 -MASTER_SITES= ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/ \ - https://spacehopper.org/mirrors/ +SHARED_LIBS += cfitsio 1.0 # 0.0 -CONFIGURE_STYLE=autoconf no-autoheader -AUTOCONF_VERSION=2.13 +MASTER_SITES= https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/ \ + https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/oldvers/ # Mostly BSD-style, with two chunks of GPL code PERMIT_PACKAGE_CDROM= Yes -ALL_TARGET= all fitscopy imcopy listhead shared -SHARED_LIBS= cfitsio 0.0 +WANTLIB += c crypto curl m nghttp2 ssl z + +CONFIGURE_STYLE=gnu + +#ALL_TARGET= all fitscopy imcopy shared fpack funpack +ALL_TARGET= utils shared SHLIB_SUFFIX= .so.${LIBcfitsio_VERSION} MAKE_FLAGS= SHLIB_SUFFIX=${SHLIB_SUFFIX} -WANTLIB= c m + +MODULES+= fortran +MODFORTRAN_COMPILER= gfortran + +LIB_DEPENDS+= net/curl \ + www/nghttp2 DOCDIR=${PREFIX}/share/doc/cfitsio +WRKDIST= ${WRKDIR}/cfitsio + +post-patch: + sed -i 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/*.[chl] ${WRKSRC}/zlib/*.h + do-install: - ${INSTALL_DATA} ${WRKDIST}/{fitsio.h,fitsio2.h,longnam.h,drvrsmem.h} ${PREFIX}/include + ${INSTALL_DATA} ${WRKDIST}/{fitsio.h,fitsio2.h,longnam.h,drvrsmem.h,fpack.h} \ + ${PREFIX}/include ${INSTALL_DATA} ${WRKBUILD}/libcfitsio.a ${PREFIX}/lib - -${INSTALL_DATA} ${WRKBUILD}/libcfitsio${SHLIB_SUFFIX} ${PREFIX}/lib + ${INSTALL_DATA} ${WRKBUILD}/libcfitsio${SHLIB_SUFFIX} ${PREFIX}/lib ${INSTALL_DATA_DIR} ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/License.txt ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/README ${DOCDIR} - ${INSTALL_DATA} ${WRKDIST}/*.doc ${DOCDIR} - ${INSTALL_PROGRAM} ${WRKBUILD}/{fitscopy,imcopy,listhead} ${PREFIX}/bin + ${INSTALL_DATA} ${WRKDIST}/docs/*.doc ${DOCDIR} + ${INSTALL_PROGRAM} ${WRKBUILD}/{fitscopy,imcopy,funpack,fpack} \ + ${PREFIX}/bin ${INSTALL_DATA} ${WRKBUILD}/cookbook.c ${DOCDIR} -TEST_DEPENDS=math/cfitsio +TEST_DEPENDS= ${BASE_PKGPATH} + do-test: cd ${WRKBUILD} && ${MAKE} testprog cd ${WRKBUILD} && ./testprog >testprog.lis diff ${WRKBUILD}/testprog.lis ${WRKBUILD}/testprog.out cmp ${WRKBUILD}/testprog.fit ${WRKBUILD}/testprog.std - + .include <bsd.port.mk> Index: distinfo_____________________________________________ RCS file: /cvs/ports/math/cfitsio/distinfo,v retrieving revision 1.4 diff -u -p -u -p -r1.4 distinfo --- distinfo 18 Jan 2015 03:14:26 -0000 1.4 +++ distinfo 12 Apr 2019 05:33:59 -0000 @@ -1,2 +1,2 @@ -SHA256 (cfitsio3006.tar.gz) = IT4zkeW9PdMtqRevCE695riJa6JPPp7/M+UNnVWLDfg= -SIZE (cfitsio3006.tar.gz) = 2121107 +SHA256 (cfitsio3450.tar.gz) = v2AS2+Zo7LIsOZxLeygUVX7igsdKfV3HBOsXww2fuS4= +SIZE (cfitsio3450.tar.gz) = 4738748 Index: patches/patch-configure_____________________________________________ RCS file: patches/patch-configure diff -N patches/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure 12 Apr 2019 05:33:59 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: configure +--- configure.orig ++++ configure +@@ -4768,7 +4768,7 @@ esac + # Darwin uses gcc (=cc), but needs different flags (see above) + if test "x$EXT" != xdarwin && test "x$EXT" != xcygwin && test "x$EXT" != xmingw32; then + if test "x$GCC" = xyes; then +- SHLIB_LD="$CC -shared -Wl,-soname,lib\${PACKAGE}\${SHLIB_SUFFIX}.\${CFITSIO_SONAME}" ++ SHLIB_LD="$CC -shared -Wl,-soname,lib\${PACKAGE}\${SHLIB_SUFFIX}" + lhea_shlib_cflags='-fPIC' + fi + fi Index: patches/patch-configure_in_____________________________________________ RCS file: patches/patch-configure_in diff -N patches/patch-configure_in --- patches/patch-configure_in 12 Jun 2006 11:14:08 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -$OpenBSD: patch-configure_in,v 1.1.1.1 2006/06/12 11:14:08 espie Exp $ ---- configure.in.orig Thu Jul 28 23:26:00 2005 -+++ configure.in Mon Jun 12 13:04:54 2006 -@@ -307,7 +307,8 @@ AC_MSG_RESULT("yes") - # ------------------------------------------------------------------------- - - AC_MSG_CHECKING("whether system V style IPC services are supported") --AC_TRY_LINK([#include <sys/ipc.h> -+AC_TRY_LINK([#include <sys/types.h> -+#include <sys/ipc.h> - #include <sys/shm.h> - #include <sys/sem.h> - ], [ -@@ -354,7 +355,8 @@ fi - - AC_MSG_CHECKING("do we have union semun defined") - AC_TRY_COMPILE( --[#include <sys/ipc.h> -+[#include <sys/types.h> -+#include <sys/ipc.h> - #include <sys/shm.h> - #include <sys/sem.h> - ], [ Index: patches/patch-eval_defs_h_____________________________________________ RCS file: patches/patch-eval_defs_h diff -N patches/patch-eval_defs_h --- patches/patch-eval_defs_h 13 Jun 2016 19:59:25 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-eval_defs_h,v 1.1 2016/06/13 19:59:25 landry Exp $ ---- eval_defs.h.orig Mon Jun 13 13:35:33 2016 -+++ eval_defs.h Mon Jun 13 13:35:50 2016 -@@ -5,9 +5,6 @@ - #if defined(__sgi) || defined(__hpux) - #include <alloca.h> - #endif --#ifdef sparc --#include <malloc.h> --#endif - #include "fitsio2.h" - - #ifndef FFBISON Index: patches/patch-eval_l_c_____________________________________________ RCS file: patches/patch-eval_l_c diff -N patches/patch-eval_l_c --- patches/patch-eval_l_c 13 Jun 2016 19:59:25 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-eval_l_c,v 1.1 2016/06/13 19:59:25 landry Exp $ ---- eval_l.c.orig Mon Jun 13 13:34:54 2016 -+++ eval_l.c Mon Jun 13 13:35:07 2016 -@@ -560,11 +560,7 @@ char *fftext; - #include <math.h> - #include <string.h> - #include <ctype.h> --#ifdef sparc --#include <malloc.h> --#else - #include <stdlib.h> --#endif - #include "eval_defs.h" - - ParseData gParse; /* Global structure holding all parser information */ Index: patches/patch-fitsio2_h_____________________________________________ RCS file: patches/patch-fitsio2_h diff -N patches/patch-fitsio2_h --- patches/patch-fitsio2_h 23 Jan 2008 15:57:26 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-fitsio2_h,v 1.2 2008/01/23 15:57:26 naddy Exp $ ---- fitsio2.h.orig Tue Jan 3 23:05:19 2006 -+++ fitsio2.h Tue Jan 22 22:05:04 2008 -@@ -28,6 +28,8 @@ - #define MINDIRECT 8640 /* minimum size for direct reads and writes */ - /* MINDIRECT must have a value >= 8640 */ - -+#undef MACHINE /* OpenBSD <machine/param.h> */ -+ - /* it is useful to identify certain specific types of machines */ - #define NATIVE 0 /* machine that uses non-byteswapped IEEE formats */ - #define OTHERTYPE 1 /* any other type of machine */ Index: patches/patch-grparser_c_____________________________________________ RCS file: patches/patch-grparser_c diff -N patches/patch-grparser_c --- patches/patch-grparser_c 13 Jun 2016 19:59:25 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-grparser_c,v 1.1 2016/06/13 19:59:25 landry Exp $ ---- grparser.c.orig Mon Jun 13 13:39:07 2016 -+++ grparser.c Mon Jun 13 13:39:23 2016 -@@ -70,11 +70,6 @@ - #include <stdio.h> - #include <stdlib.h> - --#ifdef sparc --#include <malloc.h> --#include <memory.h> --#endif -- - #include <string.h> - #include "fitsio2.h" - #include "grparser.h" Index: pkg/PLIST_____________________________________________ RCS file: /cvs/ports/math/cfitsio/pkg/PLIST,v retrieving revision 1.2 diff -u -p -u -p -r1.2 PLIST --- pkg/PLIST 16 Mar 2015 18:07:49 -0000 1.2 +++ pkg/PLIST 12 Apr 2019 05:33:59 -0000 @@ -1,17 +1,18 @@ @comment $OpenBSD: PLIST,v 1.2 2015/03/16 18:07:49 naddy Exp $ @bin bin/fitscopy +@bin bin/fpack +@bin bin/funpack @bin bin/imcopy -@bin bin/listhead include/drvrsmem.h include/fitsio.h include/fitsio2.h +include/fpack.h include/longnam.h lib/libcfitsio.a @lib lib/libcfitsio.so.${LIBcfitsio_VERSION} share/doc/cfitsio/ share/doc/cfitsio/License.txt share/doc/cfitsio/README -share/doc/cfitsio/cfitsio.doc share/doc/cfitsio/cfortran.doc share/doc/cfitsio/cookbook.c share/doc/cfitsio/fitsio.doc
