diff --git a/sci-libs/ccfits/ccfits-2.5.recipe b/sci-libs/ccfits/ccfits-2.5.recipe new file mode 100644 index 000000000..81ec1d420 --- /dev/null +++ b/sci-libs/ccfits/ccfits-2.5.recipe @@ -0,0 +1,121 @@ +SUMMARY="C++ Wrappers for the cfitsio library" +DESCRIPTION="CCfits is an object oriented interface to the cfitsio library. \ +It is designed to make the capabilities of cfitsio available to programmers \ +working in C++. It is written in ANSI C++ and implemented \ +using the C++ Standard Library with namespaces, exception handling, \ +and member template functions." +HOMEPAGE="https://heasarc.gsfc.nasa.gov/fitsio/CCfits" +COPYRIGHT="2002-2019 Ben Dorman, Craig Gordon, Bryan Irby - HEASARC, NASA/GSFC" +LICENSE="CCFITS" +REVISION="1" +SOURCE_URI="https://heasarc.gsfc.nasa.gov/fitsio/CCfits/CCfits-$portVersion.tar.gz" +CHECKSUM_SHA256="938ecd25239e65f519b8d2b50702416edc723de5f0a5387cceea8c4004a44740" +SOURCE_DIR="CCfits" +PATCHES="ccfits-$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 + +libVersion="0.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + ccfits$secondaryArchSuffix = $portVersion compat >= 2.5 + lib:libccfits$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcfitsio$secondaryArchSuffix + " + +PROVIDES_devel=" + ccfits${secondaryArchSuffix}_devel = $portVersion + devel:libCCfits$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + ccfits$secondaryArchSuffix == $portVersion base + devel:libcfitsio$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcfitsio$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + " + +TEST_REQUIRES=" + cmd:test + " + +defineDebugInfoPackage ccfits$secondaryArchSuffix \ + "$libDir"/libCCfits.so.$libVersion + +PATCH() +{ + mv configure.in configure.ac || true +} + +BUILD() +{ + if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then + export CXXFLAGS="-Wno-catch-value" + fi + + libtoolize --force --copy --install + aclocal -I m4 -I config/m4 --force --install + autoconf --force + automake --add-missing --force-missing + runConfigure --omit-dirs binDir ./configure \ + --bindir="$commandBinDir" \ + --with-cfitsio-libdir=`finddir B_SYSTEM_LIB_DIRECTORY`${secondaryArchSubDir} \ + --with-cfitsio-include=`finddir B_SYSTEM_HEADERS_DIRECTORY`${secondaryArchSubDir} + + make $jobArgs +} + +INSTALL() +{ + make install + + rm -f $libDir/libCCfits.la + + prepareInstalledDevelLib libCCfits + fixPkgconfig + + # copy pdf documentation + mkdir -p $developDocDir + cp -rd *.pdf $developDocDir + + # copy html documentation + cp -rd html $developDocDir/ + + # devel package + packageEntries devel $developDir +} + +TEST() +{ + make check $jobArgs + cookbook 1>/dev/null + + declare -a testfiles=("atestfil" "btestfil" "ctestfil") + for i in "${testfiles[@]}" + do + test -f ${i}.fit + done +} diff --git a/sci-libs/ccfits/licenses/CCFITS b/sci-libs/ccfits/licenses/CCFITS new file mode 100644 index 000000000..2f5f48d3d --- /dev/null +++ b/sci-libs/ccfits/licenses/CCFITS @@ -0,0 +1,25 @@ +Copyright (Unpublished--all rights reserved under the copyright laws of +the United States), U.S. Government as represented by the Administrator +of the National Aeronautics and Space Administration. No copyright is +claimed in the United States under Title 17, U.S. Code. + +Permission to freely use, copy, modify, and distribute this software +and its documentation without fee is hereby granted, provided that this +copyright notice and disclaimer of warranty appears in all copies. + +DISCLAIMER: + +THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, +EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, +ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE +DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE +SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY +DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY +CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, +CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY +PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED +FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR +SERVICES PROVIDED HEREUNDER. diff --git a/sci-libs/ccfits/patches/ccfits-2.5.patchset b/sci-libs/ccfits/patches/ccfits-2.5.patchset new file mode 100644 index 000000000..f89f5c5ec --- /dev/null +++ b/sci-libs/ccfits/patches/ccfits-2.5.patchset @@ -0,0 +1,62 @@ +From 52e3a61308ec1be60722f3c2e980a9d93af708e9 Mon Sep 17 00:00:00 2001 +From: Gabriele Baldassarre +Date: Thu, 7 May 2020 21:46:37 +0000 +Subject: Fix m4 paths for libtools + + +diff --git a/Makefile.am b/Makefile.am +index 215d194..1a0b674 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -9,6 +9,7 @@ + # generation like gcc does + AUTOMAKE_OPTIONS = foreign # no-dependencies + ++ACLOCAL_AMFLAGS = -I m4 -I config/m4 + + # Trick to add options to aclocal command + ACLOCAL = aclocal -I config/m4 +diff --git a/configure.in b/configure.in +index 58ff45a..5fc470e 100644 +--- a/configure.in ++++ b/configure.in +@@ -10,6 +10,8 @@ AC_CONFIG_AUX_DIR(config) + AC_CANONICAL_SYSTEM + AM_INIT_AUTOMAKE(CCfits, 2.5) + ++AC_CONFIG_MACRO_DIRS([m4]) ++ + AC_LANG_CPLUSPLUS + + dnl Checks for programs. +-- +2.26.0 + + +From cffd51e069995cbebb39b2fae046d0bc164a1723 Mon Sep 17 00:00:00 2001 +From: Gabriele Baldassarre +Date: Thu, 7 May 2020 22:24:44 +0000 +Subject: Do not build the cookbook by default + + +diff --git a/Makefile.am b/Makefile.am +index 1a0b674..ad64a6a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -27,12 +27,11 @@ MSVC_FILES = MSconfig.h + EXTRA_DIST = config CHANGES README.INSTALL License.txt file1.pha CMakeLists.txt FindCFITSIO.cmake $(MSVC_FILES) + + +-bin_PROGRAMS = cookbook ++check_PROGRAMS = cookbook + + cookbook_SOURCES = cookbook.cxx + + cookbook_LDADD = libCCfits.la +-cookbook_LDFLAGS = -R $(R_LIB_PATH) -R $(CXX_LIB_PATH) + + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = CCfits.pc +-- +2.26.0 +