diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-10 20:27:58 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-10 20:27:58 +0000 |
commit | e1170532beba2a237287172bb0f3ed05526e99a0 (patch) | |
tree | 07049a8cba507fd1660db020c3996787206df641 /sci-libs/cfitsio | |
parent | fix #190324 (again) (diff) | |
download | gentoo-2-e1170532beba2a237287172bb0f3ed05526e99a0.tar.gz gentoo-2-e1170532beba2a237287172bb0f3ed05526e99a0.tar.bz2 gentoo-2-e1170532beba2a237287172bb0f3ed05526e99a0.zip |
Version bump. Added tests and a proper autotools version, added fortran use flag to enable fortran wrappers. Closing bug #123803
(Portage version: 2.1.2.12)
Diffstat (limited to 'sci-libs/cfitsio')
-rw-r--r-- | sci-libs/cfitsio/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/cfitsio/cfitsio-3.060.ebuild | 69 | ||||
-rw-r--r-- | sci-libs/cfitsio/files/cfitsio-3.060-autotools.patch | 297 | ||||
-rw-r--r-- | sci-libs/cfitsio/files/digest-cfitsio-3.060 | 3 | ||||
-rw-r--r-- | sci-libs/cfitsio/metadata.xml | 9 |
5 files changed, 386 insertions, 1 deletions
diff --git a/sci-libs/cfitsio/ChangeLog b/sci-libs/cfitsio/ChangeLog index ab9000c09e44..e3843fa98b2f 100644 --- a/sci-libs/cfitsio/ChangeLog +++ b/sci-libs/cfitsio/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-libs/cfitsio # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/cfitsio/ChangeLog,v 1.11 2007/01/08 02:36:35 kugelfang Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/cfitsio/ChangeLog,v 1.12 2007/09/10 20:27:58 bicatali Exp $ + +*cfitsio-3.060 (10 Sep 2007) + + 10 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org> + +files/cfitsio-3.060-autotools.patch, metadata.xml, +cfitsio-3.060.ebuild: + Version bump. Added tests and a proper autotools version, added fortran use + flag to enable fortran wrappers. Closing bug #123803 08 Jan 2007; Danny van Dyk <kugelfang@gentoo.org> -cfitsio-2.490.ebuild, -cfitsio-2.500.ebuild: diff --git a/sci-libs/cfitsio/cfitsio-3.060.ebuild b/sci-libs/cfitsio/cfitsio-3.060.ebuild new file mode 100644 index 000000000000..581a0083fc8a --- /dev/null +++ b/sci-libs/cfitsio/cfitsio-3.060.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/cfitsio/cfitsio-3.060.ebuild,v 1.1 2007/09/10 20:27:58 bicatali Exp $ + +inherit eutils fortran autotools + +DESCRIPTION="C and Fortran library for manipulating FITS files" +HOMEPAGE="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" +SRC_URI="ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/${PN}${PV//.}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="doc fortran" + +DEPEND="fortran? ( dev-lang/cfortran )" + +S=${WORKDIR}/${PN} + +pkg_setup() { + if use fortran; then + FORTRAN="gfortran g77 ifc" + fortran_pkg_setup + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + # sed to avoid internal cfortran + if use fortran; then + sed -i \ + -e 's:"cfortran.h":<cfortran.h>:' \ + f77_wrap.h || die "sed fortran failed" + fi + epatch "${FILESDIR}"/${P}-autotools.patch + eautoreconf +} + +src_compile() { + econf $(use_enable fortran) || die "econf failed" + emake || die "emake failed" +} + +src_test() { + einfo "Testing cfitsio" + ./testprog > testprog.lis + diff testprog.lis testprog.out || die "test failed" + cmp testprog.fit testprog.std || die "failed" + if use fortran; then + einfo "Testing cfitsio fortran wrappers" + ./testf77 > testf77.lis + diff testf77.lis testf77.out || die "test failed" + cmp testf77.fit testf77.std || die "failed" + fi +} + +src_install () { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc changes.txt README License.txt cfitsio.doc || die "dodoc failed" + insinto /usr/share/doc/${PF} + doins cookbook.c || die "install cookbook failed" + use doc && dodoc cfitsio.ps quick.ps + if use fortran; then + doins cookbook.f || die "install cookbook failed" + dodoc fitsio.doc + use doc && dodoc fitsio.ps + fi +} diff --git a/sci-libs/cfitsio/files/cfitsio-3.060-autotools.patch b/sci-libs/cfitsio/files/cfitsio-3.060-autotools.patch new file mode 100644 index 000000000000..2155ef48c640 --- /dev/null +++ b/sci-libs/cfitsio/files/cfitsio-3.060-autotools.patch @@ -0,0 +1,297 @@ +--- configure.ac 1970-01-01 01:00:00.000000000 +0100 ++++ configure.ac 2007-09-10 19:04:36.382298581 +0100 +@@ -0,0 +1,230 @@ ++AC_PREREQ(2.59) ++AC_INIT(cfitsio, 3.060, pence@tetra.gsfc.nasa.gov) ++AC_CONFIG_SRCDIR([fitscore.c]) ++AM_INIT_AUTOMAKE([foreign]) ++ ++AC_PROG_LIBTOOL ++ ++AC_MSG_CHECKING([whether to enable fortran api]) ++AC_ARG_ENABLE([fortran], ++ AS_HELP_STRING([--enable-fortran], [Build the fortran API]), ++ [ENABLE_FORTRAN=$enableval ++ AC_MSG_RESULT([$enableval])], ++ [ENABLE_FORTRAN=no ++ AC_MSG_RESULT([no])]) ++ ++if test x"$ENABLE_FORTRAN" = "xyes" ; then ++ AC_PROG_F77 ++ if test $F77 = 'g77'; then ++ cfortran_def=g77Fortran ++ elif test $F77 = 'ifort' ; then ++ cfortran_def=INTEL_COMPILER ++ elif test $F77 = 'gfortran' ; then ++ cfortran_def=gFortran ++ elif test $F77 = 'pgif77' ; then ++ cfortran_def=pgiFortran ++ else ++ cfortran_def=f2cFortran ++ fi ++ CFORTRAN_CPPFLAGS="-D$cfortran_def" ++fi ++ ++AC_SUBST([ENABLE_FORTRAN]) ++AM_CONDITIONAL([ENABLE_FORTRAN], test "x$ENABLE_FORTRAN" = "xyes") ++ ++# taken from original configure.in ++# determine system type ++#-------------------------------------------------------------------- ++ ++AC_PROGRAM_CHECK(uname_found, uname, 1, 0) ++if test $uname_found -eq 0 ; then ++ echo "cfitsio: No uname found; setting system type to unknown." ++ system="unknown" ++else ++ system=`uname -s`-`uname -r` ++fi ++case $system in ++ Darwin-*) ++ # For large file support (but may break Absoft compilers): ++ AC_DEFINE(_LARGEFILE_SOURCE) ++ AC_DEFINE(_FILE_OFFSET_BITS,64) ++ ;; ++ HP-UX-*) ++ if test x"$CFORTRAN_CPPFLAGS" = x ; then ++ CFORTRAN_CPPFLAGS="-Dappendus" ++ fi ++ CPPFLAGS="$CPPFLAGS -DPG_PPU" ++ LIBPRE="-Wl," ++ ;; ++ SunOS-5*) ++ if test x"$CFORTRAN_CPPFLAGS" = x ; then ++ CFORTRAN_CPPFLAGS="-Dsolaris" ++ fi ++ # For large file support: ++ AC_DEFINE(_LARGEFILE_SOURCE) ++ AC_DEFINE(_FILE_OFFSET_BITS, 64) ++ ;; ++ IRIX*) ++ CPPFLAGS="$CPPFLAGS -DHAVE_POSIX_SIGNALS" ++ ;; ++ Linux*) ++ AC_DEFINE(_LARGEFILE_SOURCE) ++ AC_DEFINE(_FILE_OFFSET_BITS,64) ++ ;; ++ CYGWIN*) ++ CPPFLAGS="$CPPFLAGS -DHAVE_POSIX_SIGNALS" ++ ;; ++ *) ++ ;; ++esac ++ ++if test x"$ENABLE_FORTRAN" = "xyes" ; then ++ CPPFLAGS="$CPPFLAGS $CFORTRAN_CPPFLAGS" ++fi ++ ++case $CC in ++ gcc) ++ GCCVERSION="`gcc -dumpversion 2>&1`" ++ AC_SUBST(GCCVERSION) ++ changequote(,) ++ if test `echo $GCCVERSION | grep -c '2\.[45678]'` -gt 0 ++ then ++ CFLAGS=`echo $CFLAGS | sed 's:-O[^ ]* *::'` ++# AC_MSG_WARN(This gcc is pretty old. Disabling optimization to be safe.) ++ fi ++ changequote([,]) ++ ;; ++ cc) ++ echo "cfitsio: Old CFLAGS is $CFLAGS" ++ CFLAGS=`echo $CFLAGS | sed -e "s/-g/-O/"` ++ case $system in ++ SunOS-5*) ++ changequote(,) ++ if test `echo $CFLAGS | grep -c fast` -gt 0 ++ then ++ echo "cfitsio: Replacing -fast with -O3" ++ CFLAGS=`echo $CFLAGS | sed 's:-fast:-O3:'` ++ fi ++ changequote([,]) ++ CFLAGS="$CFLAGS -DHAVE_ALLOCA_H -DHAVE_POSIX_SIGNALS" ++ ;; ++ *) ++ echo "== No special changes for $system" ++ ;; ++ esac ++ echo "New CFLAGS is $CFLAGS" ++ ;; ++ *) ++ # Don't do anything now ++ ;; ++esac ++ ++ ++# ================= test for the unix ftruncate function ================ ++ ++AC_MSG_CHECKING("whether ftruncate works") ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> ++]], [[ ++ftruncate(0, 0); ++]])],[ ++AC_DEFINE(HAVE_FTRUNCATE) ++AC_MSG_RESULT("yes") ++],[AC_MSG_RESULT("no") ]) ++ ++# --------------------------------------------------------- ++# some systems define long long for 64-bit ints ++# --------------------------------------------------------- ++ ++AC_MSG_CHECKING("whether long long is defined") ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> ++]], [[ ++long long filler; ++]])],[ ++AC_DEFINE(HAVE_LONGLONG) ++AC_MSG_RESULT("yes") ++],[AC_MSG_RESULT("no") ]) ++ ++# ==================== SHARED MEMORY DRIVER SECTION ======================= ++# ++# 09-Mar-98 : modified by JB/ISDC ++# 3 checks added to support autoconfiguration of shared memory ++# driver. First generic check is made whether shared memory is supported ++# at all, then 2 more specific checks are made (architecture dependent). ++# Currently tested on : sparc-solaris, intel-linux, sgi-irix, dec-alpha-osf ++ ++# ------------------------------------------------------------------------- ++# check is System V IPC is supported on this machine ++# ------------------------------------------------------------------------- ++ ++AC_MSG_CHECKING("whether system V style IPC services are supported") ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/ipc.h> ++#include <sys/shm.h> ++#include <sys/sem.h> ++]], [[ ++shmat(0, 0, 0); ++shmdt(0); ++shmget(0, 0, 0); ++semget(0, 0, 0); ++]])], ++[AC_DEFINE(HAVE_SHMEM_SERVICES) ++AC_MSG_RESULT("yes")], ++[AC_MSG_RESULT("no") ]) ++ ++ ++# ------------------------------------------------------------------------- ++# some systems define flock_t, for others we have to define it ourselves ++# ------------------------------------------------------------------------- ++ ++AC_MSG_CHECKING("do we have flock_t defined in sys/fcntl.h") ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/fcntl.h> ++]], [[ ++flock_t filler; ++]])],[ ++AC_DEFINE(HAVE_FLOCK_T) ++AC_MSG_RESULT("yes") ++],[AC_MSG_RESULT("no") ]) ++ ++if test "$HAVE_FLOCK_T" != 1; then ++ AC_MSG_CHECKING("do we have flock_t defined in sys/flock.h") ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/flock.h> ++ ]], [[ ++ flock_t filler; ++ ]])],[ ++ AC_DEFINE(HAVE_FLOCK_T) ++ AC_MSG_RESULT("yes") ++ ],[AC_MSG_RESULT("no") ]) ++fi ++ ++# ------------------------------------------------------------------------- ++# there are some idiosyncrasies with semun defs (used in semxxx). Solaris ++# does not define it at all ++# ------------------------------------------------------------------------- ++ ++AC_MSG_CHECKING("do we have union semun defined") ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ipc.h> ++#include <sys/shm.h> ++#include <sys/sem.h> ++]], [[ ++union semun filler; ++]])],[ ++AC_DEFINE(HAVE_UNION_SEMUN) ++AC_MSG_RESULT("yes") ++],[AC_MSG_RESULT("no") ]) ++ ++# ==================== END OF SHARED MEMORY DRIVER SECTION ================ ++# ================= test for the unix networking functions ================ ++ ++AC_SEARCH_LIBS([gethostbyname], [nsl], cfitsio_have_nsl=1, cfitsio_have_nsl=0) ++AC_SEARCH_LIBS([connect], [socket], cfitsio_have_socket=1, ++ cfitsio_have_socket=0, [-lnsl]) ++ ++if test "$cfitsio_have_nsl" = 1 -a "$cfitsio_have_socket" = 1; then ++ AC_DEFINE(HAVE_NET_SERVICES) ++fi ++ ++# ==================== END OF unix networking SECTION ================ ++ ++# this quick check will add -lm to LIBS ++AC_CHECK_LIB(m, cos) ++AC_CONFIG_FILES([Makefile cfitsio.pc]) ++AC_OUTPUT +--- Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ Makefile.am 2007-09-10 16:02:13.520646341 +0100 +@@ -0,0 +1,43 @@ ++lib_LTLIBRARIES = libcfitsio.la ++ ++C_SOURCES = \ ++ buffers.c cfileio.c checksum.c compress.c drvrfile.c drvrmem.c \ ++ drvrnet.c drvrsmem.c drvrgsiftp.c editcol.c edithdu.c eval_l.c \ ++ eval_y.c eval_f.c fitscore.c getcol.c getcolb.c getcold.c getcole.c \ ++ getcoli.c getcolj.c getcolk.c getcoll.c getcols.c getcolsb.c \ ++ getcoluk.c getcolui.c getcoluj.c getkey.c group.c grparser.c \ ++ histo.c iraffits.c \ ++ modkey.c putcol.c putcolb.c putcold.c putcole.c putcoli.c \ ++ putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \ ++ putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \ ++ swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \ ++ pliocomp.c fits_hcompress.c fits_hdecompress.c ++ ++F77_SOURCES= ++if ENABLE_FORTRAN ++F77_SOURCES += f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c f77_wrap.h ++endif ++ ++include_HEADERS = fitsio.h fitsio2.h longnam.h drvrsmem.h ++libcfitsio_la_SOURCES = $(C_SOURCES) $(F77_SOURCES) $(include_HEADERS) ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = cfitsio.pc ++ ++LDADD = libcfitsio.la ++noinst_PROGRAMS = testprog speed cookbook ++bin_PROGRAMS = fitscopy imcopy listhead smem ++ ++testprog_SOURCES = testprog.c ++speed_SOURCES = speed.c ++cookbook_SOURCES = cookbook.c ++ ++fitscopy_SOURCES = fitscopy.c ++listhead_SOURCES = listhead.c ++imcopy_SOURCES = imcopy.c ++smem_SOURCES = smem.c ++ ++if ENABLE_FORTRAN ++noinst_PROGRAMS += testf77 ++testf77_SOURCES = testf77.f ++endif +--- cfitsio.pc.in.orig 2007-09-05 12:35:29.153211202 +0100 ++++ cfitsio.pc.in 2007-09-05 12:30:31.664258273 +0100 +@@ -1,10 +1,10 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-libdir=${exec_prefix}/lib +-includedir=${prefix}/include ++libdir=@libdir@ ++includedir=@includedir@ + +-Name: cfitsio ++Name: @PACKAGE_NAME@ + Description: FITS File Subroutine Library +-Version: 3.006 +-Libs: -L${libdir} -lcfitsio @LIBS@ -lm ++Version: @PACKAGE_VERSION@ ++Libs: -L${libdir} -lcfitsio @LIBS@ + Cflags: -I${includedir} diff --git a/sci-libs/cfitsio/files/digest-cfitsio-3.060 b/sci-libs/cfitsio/files/digest-cfitsio-3.060 new file mode 100644 index 000000000000..d8615a975576 --- /dev/null +++ b/sci-libs/cfitsio/files/digest-cfitsio-3.060 @@ -0,0 +1,3 @@ +MD5 b7ab291d227c60b17a19a1c028dc649c cfitsio3060.tar.gz 2260799 +RMD160 2c85f7fe1ddce8f83d5b2bdbf30c681fe0db0d87 cfitsio3060.tar.gz 2260799 +SHA256 3475679b6ef7a8494ceffec8255b9b2719251f16880da5d128b58c5de8954b46 cfitsio3060.tar.gz 2260799 diff --git a/sci-libs/cfitsio/metadata.xml b/sci-libs/cfitsio/metadata.xml index 219cf66ce53b..cbd007c16aca 100644 --- a/sci-libs/cfitsio/metadata.xml +++ b/sci-libs/cfitsio/metadata.xml @@ -3,4 +3,13 @@ <pkgmetadata> <herd>sci</herd> <maintainer><email>nerdboy@gentoo.org</email></maintainer> +<longdescription lang="en"> +CFITSIO is a library of C and Fortran subroutines for reading and +writing data files in FITS (Flexible Image Transport System) data +format. CFITSIO provides simple high-level routines for reading and +writing FITS files that insulate the programmer from the internal +complexities of the FITS format. CFITSIO also provides advanced +features for manipulating and filtering the information in FITS +files. +</longdescription> </pkgmetadata> |