From 8816b4010678266163082be61e9811aab46c5dc7 Mon Sep 17 00:00:00 2001 From: Gabriele Baldassarre Date: Sun, 17 May 2020 09:44:13 +0200 Subject: [PATCH] New Recipe: Wcslib (#4972) * WCSLib - new recipe --- .../wcslib/patches/wcslib-7.2.patchset | 22 ++++ sci-astronomy/wcslib/wcslib-7.2.recipe | 118 ++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 sci-astronomy/wcslib/patches/wcslib-7.2.patchset create mode 100644 sci-astronomy/wcslib/wcslib-7.2.recipe diff --git a/sci-astronomy/wcslib/patches/wcslib-7.2.patchset b/sci-astronomy/wcslib/patches/wcslib-7.2.patchset new file mode 100644 index 000000000..f65bb5675 --- /dev/null +++ b/sci-astronomy/wcslib/patches/wcslib-7.2.patchset @@ -0,0 +1,22 @@ +From 619f1d199dd6451f82659827792348bfc54d0610 Mon Sep 17 00:00:00 2001 +From: Gabriele Baldassarre +Date: Sun, 10 May 2020 22:41:35 +0000 +Subject: Changed -lsocket to -lnetwork + + +diff --git a/configure.ac b/configure.ac +index 4b5c521..317e90a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -434,7 +434,7 @@ if test "x$with_cfitsio" != xno -o \ + AC_CHECK_FILE([$INCDIR/fitsio.h], [CFITSIOINC="-I$INCDIR"; break]) + done + +- AC_CHECK_LIB([socket], [recv], [CFITSIOLIB="-lsocket"], [], [$LIBS]) ++ AC_CHECK_LIB([network], [recv], [CFITSIOLIB="-lnetwork"], [], [$LIBS]) + AC_CHECK_LIB([cfitsio], [ffopen], [CFITSIOLIB="-lcfitsio $CFITSIOLIB"], [], + [$CFITSIOLIB $LIBS]) + +-- +2.26.0 + diff --git a/sci-astronomy/wcslib/wcslib-7.2.recipe b/sci-astronomy/wcslib/wcslib-7.2.recipe new file mode 100644 index 000000000..593dfeb2f --- /dev/null +++ b/sci-astronomy/wcslib/wcslib-7.2.recipe @@ -0,0 +1,118 @@ +SUMMARY="Astronomical World Coordinate System transformations library" +DESCRIPTION="WCSLIB is a C library, supplied with a full set of Fortran wrappers, \ +that implements the World Coordinate System (WCS) convention in FITS \ +(Flexible Image Transport System). Since PGPLOT is not yet available on Haiku, \ +this package doesn't include PGBOX (routines for drawing general curvilinear \ +coordinate graticules) and related utilities." +HOMEPAGE="http://www.atnf.csiro.au/people/mcalabre/WCS/" +COPYRIGHT="1995-2020 Mark Calabretta - Australia Telescope National Facility, CSIRO." +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-$portVersion.tar.bz2" +CHECKSUM_SHA256="63959eb4859517a1ecca48c91542318bebeed62e4a1663656de9a983af376e39" +PATCHES="wcslib-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86_64 ?arm ?ppc ?sparc" +SECONDARY_ARCHITECTURES="x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +portVersionCompat="$portVersion compat >= 7.1" +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + wcslib$secondaryArchSuffix = $portVersionCompat + lib:libwcs$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcfitsio$secondaryArchSuffix + lib:libgfortran$secondaryArchSuffix + " + +PROVIDES_devel=" + wcslib${secondaryArchSuffix}_devel = $portVersionCompat + devel:libwcs$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + wcslib$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libcfitsio$secondaryArchSuffix + lib:libgfortran$secondaryArchSuffix + " + +PROVIDES_utils=" + wcslib${secondaryArchSuffix}_utils = $portVersion + cmd:hpxcvt$commandSuffix = $portVersionCompat + cmd:fitshdr$commandSuffix = $portVersionCompat + cmd:wcsware$commandSuffix = $portVersionCompat + " +REQUIRES_utils=" + wcslib$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libcfitsio$secondaryArchSuffix + lib:libgfortran$secondaryArchSuffix + lib:libquadmath$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcfitsio$secondaryArchSuffix + devel:libgfortran$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoreconf + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:gfortran$secondaryArchSuffix + cmd:make + cmd:xargs +" + +defineDebugInfoPackage wcslib$secondaryArchSuffix \ + "$libDir"/libwcs.so.$libVersion + +BUILD() +{ + autoreconf -vfi + runConfigure --omit-dirs binDir ./configure \ + --bindir="$commandBinDir" \ + --with-cfitsiolib=`finddir B_SYSTEM_LIB_DIRECTORY`${secondaryArchSubDir} \ + --with-cfitsioinc=`finddir B_SYSTEM_HEADERS_DIRECTORY`${secondaryArchSubDir} \ + --without-pgplot \ + --enable-fortran + + make $jobArgs +} + +INSTALL() +{ + make install + + rm -f $libDir/libwcs-7.2.a + + prepareInstalledDevelLib libwcs + fixPkgconfig + + # devel package + packageEntries devel \ + $docDir \ + $developDir + + # utils package + packageEntries utils \ + $commandBinDir \ + $manDir +} + +TEST() +{ + make check $jobArgs +}