On Sun, Jul 17 2022, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: > On Sun, Jul 17 2022, Marc Espie <es...@nerim.net> wrote: >> Anyone got an update for cfitsio ? >> our port is somewhat ancient. > > I have an update to 4.1.0, but I'd like to clean up the existing > ports first. > >> I noticed while looking at siril, which tries to detect >> cfitsio thru pkgconfig, and it seems easier to update >> cfitsio than patching siril ;) > > Does the diff below (which adds the pkgconfig file) help, or do you > really need an update for your siril port? > > ok?
Similar diff but including the update to cfitsio-4.1.0. Some explanations for both the previous and the current diff: - tweak the build targets order so that the programs link against the shared library version, to avoid a build error because of a missing -lcurl. This probably also saves space in the resulting package. - fpack.h is a local header, not meant to be installed - cookbook, speed and testprog aren't very useful as executables so I forcefully delete them All direct consumers build against the previous diff and the diff below. Index: Makefile =================================================================== RCS file: /cvs/ports/math/cfitsio/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- Makefile 11 Mar 2022 19:36:13 -0000 1.15 +++ Makefile 17 Jul 2022 19:53:13 -0000 @@ -3,12 +3,9 @@ CATEGORIES= math graphics devel HOMEPAGE= https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html -DISTNAME= cfitsio3450 +DISTNAME= cfitsio-4.1.0 -PKGNAME= cfitsio-3.450 -REVISION= 0 - -SHARED_LIBS += cfitsio 1.0 # 0.0 +SHARED_LIBS += cfitsio 2.0 # 0.0 MASTER_SITES= https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/ \ https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/oldvers/ @@ -16,12 +13,12 @@ MASTER_SITES= https://heasarc.gsfc.nasa. # Mostly BSD-style, with two chunks of GPL code PERMIT_PACKAGE= Yes -WANTLIB += c crypto curl m nghttp2 ssl z +WANTLIB += c curl m z CONFIGURE_STYLE=gnu -#ALL_TARGET= all fitscopy imcopy shared fpack funpack -ALL_TARGET= utils shared +# "shared" before "utils" so that the latter link against the shared library +ALL_TARGET= shared utils SHLIB_SUFFIX= .so.${LIBcfitsio_VERSION} MAKE_FLAGS= SHLIB_SUFFIX=${SHLIB_SUFFIX} @@ -32,29 +29,20 @@ LIB_DEPENDS+= net/curl DOCDIR=${PREFIX}/share/doc/cfitsio -WRKDIST= ${WRKDIR}/cfitsio - post-patch: - sed -i 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/*.[chl] ${WRKSRC}/zlib/*.h + sed -i 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/*.[chl] -do-install: - ${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 +post-install: ${INSTALL_DATA_DIR} ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/License.txt ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/README ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/docs/*.doc ${DOCDIR} - ${INSTALL_PROGRAM} ${WRKBUILD}/{fitscopy,imcopy,funpack,fpack} \ - ${PREFIX}/bin ${INSTALL_DATA} ${WRKBUILD}/cookbook.c ${DOCDIR} - -TEST_DEPENDS= ${BASE_PKGPATH} + rm -f ${PREFIX}/bin/{cookbook,speed,testprog} do-test: cd ${WRKBUILD} && ${MAKE} testprog - cd ${WRKBUILD} && ./testprog >testprog.lis + cd ${WRKBUILD} && LD_LIBRARY_PATH="${WRKBUILD}:" ./testprog >testprog.lis diff ${WRKBUILD}/testprog.lis ${WRKBUILD}/testprog.out cmp ${WRKBUILD}/testprog.fit ${WRKBUILD}/testprog.std Index: distinfo =================================================================== RCS file: /cvs/ports/math/cfitsio/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 2 May 2019 13:13:08 -0000 1.5 +++ distinfo 17 Jul 2022 19:53:13 -0000 @@ -1,2 +1,2 @@ -SHA256 (cfitsio3450.tar.gz) = v2AS2+Zo7LIsOZxLeygUVX7igsdKfV3HBOsXww2fuS4= -SIZE (cfitsio3450.tar.gz) = 4738748 +SHA256 (cfitsio-4.1.0.tar.gz) = s2fGldKDGVjnFmkhw7NW1d+lGx7O5QW5dBa6OdG2wXo= +SIZE (cfitsio-4.1.0.tar.gz) = 4305184 Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/math/cfitsio/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 11 Mar 2022 19:36:13 -0000 1.4 +++ pkg/PLIST 17 Jul 2022 19:53:13 -0000 @@ -2,13 +2,14 @@ @bin bin/fpack @bin bin/funpack @bin bin/imcopy +@bin bin/smem include/drvrsmem.h include/fitsio.h include/fitsio2.h -include/fpack.h include/longnam.h -lib/libcfitsio.a +@static-lib lib/libcfitsio.a @lib lib/libcfitsio.so.${LIBcfitsio_VERSION} +lib/pkgconfig/cfitsio.pc share/doc/cfitsio/ share/doc/cfitsio/License.txt share/doc/cfitsio/README -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE