diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-astronomy/sextractor |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-astronomy/sextractor')
8 files changed, 354 insertions, 0 deletions
diff --git a/sci-astronomy/sextractor/Manifest b/sci-astronomy/sextractor/Manifest new file mode 100644 index 000000000000..6274a1762017 --- /dev/null +++ b/sci-astronomy/sextractor/Manifest @@ -0,0 +1,9 @@ +AUX sextractor-2.19.5-fix-format-errors.patch 2189 SHA256 250dbeb63d9dbfb05b69c3ce2f22a284de88b6070f4dc5445e07fa741d1f31da SHA512 7f7252fbd662bfc14f7bd141a74430d4dbb876c6ea5f1634a4e77379ca1916459db6929becc1e3510e71079c8ec718e93551b63ca0374b574d432f0ea49d2be5 WHIRLPOOL ab4cc3e16a5cc458a6f4c41528689f6ce5b912c9f0a75bb216230d399d6c5f18e2f825ec20a2f669282b3197b65c6839fdd7d5026bf7ca8dcf1ef42bf6c78b17 +AUX sextractor-2.19.5-have-malloc.patch 543 SHA256 0d624e57bc3dbf0038505bc5b4c2762d7d6cadadcbeccfae256f028451627157 SHA512 98bcfbe9a010f58976782113e3ad7f4eb1008f3f39a62a4a7a17ed74a03d05957198806da9972337052472d0c628875085fef1f85aefe573a7fe66347dd52090 WHIRLPOOL 1181181953fadd2fc240ab8e890f75cf397de7899575fa665179320199b13ab325bdf5a3bce5706b607b12e5aa764d8369d419270e2d268032d7abd8388a1263 +AUX sextractor-2.19.5-have-mmap.patch 1406 SHA256 5fbd289f5659f1ebe0856832dfcfee5ef6032bad83b6f7df36efc1a8720ad3b5 SHA512 b944a9c75b379932faa0af70d6e215ccbe113b2b063939d8a21810a1c03deecdb0c5a2947b4ebdf4c1396426bd2382e3014e906ac68ef17962670e3705d95a45 WHIRLPOOL 74d47decc00b6e1e12d4a2973b3baaa98378795c3e56ffc5c408d320658ac591ff82d099ee34b78c83ec1ff1f2b348cff9f1822edc10fb68a6b13d2f0579db4c +AUX sextractor-2.19.5-sigbus.patch 736 SHA256 6dbece30c6d805cebc9211648c08b5b5013f8c2dfc3c5d91ddb6e80c337a5d28 SHA512 bca9ad7a758294812761b9f860cc40cd931a5753f248a4682858e9fd1b917a485d5e0b891e17b90c96b54d0e7f05d1aa2e2e7e6143fdc52ec57d4a609c9f4df6 WHIRLPOOL 7cf8f0a365dca534b94557c2897d2f848f44def25e18549060646f4b8e3e5fcc5460c65bc424286037c8d5caafc86ca23fc2aed6fbb2e34addcc8d6ba47fc9a4 +DIST sextractor-2.19.5.tar.gz 4317039 SHA256 2a880e018585f905300d5919ab454b18640a5bef13deb5c4f03111ac4710b2c5 SHA512 aadd007facad983ea35bd7496a53520f987aa8e492259e428170354d262212e3c1a17c60bf6ea97b6056136b0bd02793e92e14b21cb40a0f8886245eeeac6f4d WHIRLPOOL cf499f4763ebf07d94ccb630030baa1b1e3e03972a9f214ee965c1f742548ee46fa4ce22203d1a6ee7c0817c2915d36483d1a7d7fcc04348beb559f5b5dd4464 +EBUILD sextractor-2.19.5-r1.ebuild 1753 SHA256 b27b42e05c3d0d6fdfbbbd2bf60293fb8e49008a369a6c62a55de38050ab1043 SHA512 632af0c3956430c889f4116c9e94b9ace09db33d32e73b32ea698d73c5a14eca132725952dd97e72ec2bd49bda57e5c827529b4fa3676b1c62801786c02ba62f WHIRLPOOL faea1b5698e9865eff883a996e847156380e742cdc3fcd0811dadc8c959e7558a0febaac94a9f678b030ca816ac377b67627dada867de9b3c1fc495eacbfe2f7 +EBUILD sextractor-2.19.5.ebuild 1736 SHA256 a3feea0bea272daebe919b71cdf5d3b8e2abffb7f9a0e473e3f5ad7de339146f SHA512 a2b499ae626f800c8a90cfd6660e8a9572ad32ef6901419e908262ea9a77e9736322094502a18e50b194b8ede567a25f45d1353976d7cef4d37760965b260ee1 WHIRLPOOL 0a914419f6862a4641165834164f33d3a48e5de063e3bd1ea5dbc20186e5a1ec707536aca3077269b9ea11690006f1c0bb48681c20d0a9bb6deaf3b44fea1efa +MISC ChangeLog 772 SHA256 3e8d8373ec75c964744c9ad21c8b1654d524dfc7418aee5873f3b4e17890a9f9 SHA512 06f7aedc895ceec746fb4be5d3e25c5a2caf23a100c4d440bedbba903bb46acc1191686cb2af5935714dc7653caa9cd02836b9e4282a814fc609d7cb1e4189b4 WHIRLPOOL 161e87c7b64b468c78570c875a2c8e8a696757f91b31288e732681edd15dba9da4aa6828e97822ae0d37cea9144b8da03ceaa7b1096f23575468f9c024249ef1 +MISC metadata.xml 797 SHA256 31cc4755cfc875af4eb0b182853c17ad2d343a4823338cdd0c69fbb2576cb787 SHA512 83f4baddd93a51960fb6adf2d55b7c5cda033f92ad5dc92eb7e6f15392432f49f40b1fe07dcfc475a464a6d3502696a3639c0e33d5c45848fbda686a1777189c WHIRLPOOL 3604f71360dd354d872af000e6d3f9a92a2b607df27d87589fa3d428c5d34530c91040de4e070111d640e1006bf0cc021573e3d764d5c0755253f42b7b004b88 diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch new file mode 100644 index 000000000000..c20ce31ee30e --- /dev/null +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-fix-format-errors.patch @@ -0,0 +1,65 @@ +Author: Ole Streicher <debian@liska.ath.cx> +Description: Fix format security errors +--- a/src/catout.c ++++ b/src/catout.c +@@ -999,7 +999,7 @@ + break; + + case ASCII_SKYCAT: +- fprintf(ascfile, skycattail); ++ fprintf(ascfile, "%s", skycattail); + if (!prefs.pipe_flag) + fclose(ascfile); + break; +--- a/src/xml.c ++++ b/src/xml.c +@@ -696,7 +696,7 @@ + name, ucd); + break; + case P_STRING: +- sprintf(value, (char *)key[i].ptr); ++ sprintf(value, "%s", (char *)key[i].ptr); + fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\"" + " ucd=\"%s\" value=\"%s\"/>\n", + name, ucd, *value? value: " "); +@@ -705,13 +705,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, ((char **)key[i].ptr)[0]); ++ sprintf(value, "%s", ((char **)key[i].ptr)[0]); + fprintf(file, " <PARAM name=\"%s\" datatype=\"char\"" + " arraysize=\"*\" ucd=\"%s\" value=\"%s", + name, ucd, *value? value: " "); + for (j=1; j<n; j++) + { +- sprintf(value, ((char **)key[i].ptr)[j]); ++ sprintf(value, "%s", ((char **)key[i].ptr)[j]); + fprintf(file, ",%s", *value? value: " "); + } + fprintf(file, "\"/>\n"); +@@ -722,7 +722,7 @@ + name, ucd); + break; + case P_KEY: +- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]); ++ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]); + fprintf(file, " <PARAM name=\"%s\" datatype=\"char\" arraysize=\"*\"" + " ucd=\"%s\" value=\"%s\"/>\n", + name, ucd, value); +@@ -731,13 +731,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]); ++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]); + fprintf(file, " <PARAM name=\"%s\" datatype=\"char\"" + " arraysize=\"*\" ucd=\"%s\" value=\"%s", + name, ucd, value); + for (j=1; j<n; j++) + { +- sprintf(value, key[i].keylist[((int *)key[i].ptr)[j]]); ++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[j]]); + fprintf(file, ",%s", value); + } + fprintf(file, "\"/>\n"); diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch new file mode 100644 index 000000000000..dd10d4a2c3cd --- /dev/null +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch @@ -0,0 +1,32 @@ +Author: Justin Pryzby <justinpryzby@users.sf.net> +Description: (guess) Define rpl_malloc if not there. +--- a/src/misc.c ++++ b/src/misc.c +@@ -34,6 +34,8 @@ + #include <time.h> + #include <sys/time.h> + ++#include <sys/types.h> ++ + #include "define.h" + #include "globals.h" + +@@ -153,3 +155,18 @@ + } + + ++#if !HAVE_MALLOC ++#undef malloc ++ ++// Allocate an N-byte block of memory from the heap. If N is zero, ++// allocate a 1-byte block. ++void *rpl_malloc(size_t n) ++{ ++ void *malloc(); ++ if (0==n) { ++ n = 1; ++ } ++ ++ return malloc(n); ++} ++#endif diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch new file mode 100644 index 000000000000..1b6565089849 --- /dev/null +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-mmap.patch @@ -0,0 +1,55 @@ +Author: Justin Pryzby <justinpryzby@users.sf.net> +Description: (guess) Use mmap only if it exists. +--- a/src/fits/fitsbody.c ++++ b/src/fits/fitsbody.c +@@ -64,9 +64,12 @@ + ***/ + PIXTYPE *alloc_body(tabstruct *tab, void (*func)(PIXTYPE *ptr, int npix)) + { ++#ifdef HAVE_MMAP + FILE *file; + PIXTYPE *buffer; +- size_t npix, size, sizeleft, spoonful; ++ size_t sizeleft, spoonful; ++#endif ++ size_t npix, size; + + if (!body_ramflag) + { +@@ -87,7 +90,9 @@ + /* Decide if the data will go in physical memory or on swap-space */ + npix = tab->tabsize/tab->bytepix; + size = npix*sizeof(PIXTYPE); ++#if !HAVE_MMAP + if (size < body_ramleft) ++#endif + { + /*-- There should be enough RAM left: try to do a malloc() */ + if ((tab->bodybuf = malloc(size))) +@@ -105,6 +110,7 @@ + tab->bodybuf = NULL; + } + ++#if HAVE_MMAP + if (size < body_vramleft) + { + /*-- Convert and copy the data to a swap file, and mmap() it */ +@@ -144,6 +150,7 @@ + return NULL; + return (PIXTYPE *)tab->bodybuf; + } ++#endif + + /* If no memory left at all: forget it! */ + return NULL; +@@ -270,8 +277,10 @@ + size = (tab->tabsize/tab->bytepix)*sizeof(PIXTYPE); + if (tab->swapflag) + { ++#if HAVE_MMAP + if (munmap(tab->bodybuf, size)) + warning("Can't unmap ", tab->cat->filename); ++#endif + tab->swapflag = 0; + tab->bodybuf = NULL; + body_vramleft += size; diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch new file mode 100644 index 000000000000..2796f63884e3 --- /dev/null +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-sigbus.patch @@ -0,0 +1,26 @@ +Author: Justin Pryzby <justinpryzby@users.sf.net> +Description: (guess) Handle the "sigbus" case only if it exists +--- a/src/fits/fitscleanup.c ++++ b/src/fits/fitscleanup.c +@@ -164,7 +164,9 @@ + /* Catch CTRL-Cs */ + signal(SIGINT, signal_function); + /* Catch bus errors */ ++#ifdef SIGBUS // TODO: what if it is an enum? + signal(SIGBUS, signal_function); ++#endif + /* Catch segmentation faults */ + signal(SIGSEGV, signal_function); + /* Catch floating exceptions */ +@@ -195,9 +197,11 @@ + case SIGINT: + fprintf(stderr, "^C\n"); + exit(-1); ++#ifdef SIGBUS + case SIGBUS: + fprintf(stderr, "bus error\n"); + exit(-1); ++#endif + case SIGSEGV: + fprintf(stderr, "segmentation fault\n"); + exit(-1); diff --git a/sci-astronomy/sextractor/metadata.xml b/sci-astronomy/sextractor/metadata.xml new file mode 100644 index 000000000000..87b74a0a93cb --- /dev/null +++ b/sci-astronomy/sextractor/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>sci-astronomy@gentoo.org</email> +<name>Gentoo Astronomy Project</name> +</maintainer> +<longdescription lang="en"> + SExtractor (Source Extractor) is a program that builds a catalogue of + objects from an astronomical image. Although it is particularly + oriented towards reduction of large scale galaxy-survey data, it + performs rather well on moderately crowded star fields. It has the + ability to automatically separate stars and galaxy using neural + networks. +</longdescription> +<use> +<flag name="modelfit"> + Enable profile model fitting, needs <pkg>sci-libs/atlas</pkg> + and <pkg>sci-libs/fftw</pkg> +</flag> +</use> +</pkgmetadata> diff --git a/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild new file mode 100644 index 000000000000..a3aae82d8cdf --- /dev/null +++ b/sci-astronomy/sextractor/sextractor-2.19.5-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +AUTOTOOLS_AUTO_DEPEND=no + +inherit autotools + +DESCRIPTION="Extract catalogs of sources from astronomical FITS images" +HOMEPAGE="http://www.astromatic.net/software/sextractor" +SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +LICENSE="GPL-3" +SLOT="0" + +IUSE="doc modelfit test threads" + +RDEPEND=" + !games-misc/sex + modelfit? ( sci-libs/atlas[lapack,threads=] sci-libs/fftw:3.0 )" +DEPEND="${RDEPEND} + modelfit? ( ${AUTOTOOLS_DEPEND} )" + +REQUIRED_USE="test? ( modelfit )" + +PATCHES=( + "${FILESDIR}/${P}-fix-format-errors.patch" + "${FILESDIR}/${P}-have-malloc.patch" + "${FILESDIR}/${P}-have-mmap.patch" + "${FILESDIR}/${P}-sigbus.patch" +) + +src_prepare() { + default + if use modelfit; then + local mycblas=atlcblas myclapack=atlclapack + if use threads; then + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \ + mycblas=ptcblas + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \ + myclapack=ptclapack + fi + sed -i \ + -e "s/-lcblas/-l${mycblas}/g" \ + -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \ + -e "s/-llapack/-l${myclapack}/g" \ + -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \ + acx_atlas.m4 || die + eautoreconf + fi +} + +src_configure() { + econf \ + --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \ + $(use_enable modelfit model-fitting) \ + $(use_enable threads) +} + +src_install () { + default + CONFDIR=/usr/share/sextractor + insinto ${CONFDIR} + doins config/* + use doc && dodoc doc/* +} + +pkg_postinst() { + elog "SExtractor examples configuration files are located in" + elog "${EROOT%/}/${CONFDIR} and are not loaded anymore by default." +} diff --git a/sci-astronomy/sextractor/sextractor-2.19.5.ebuild b/sci-astronomy/sextractor/sextractor-2.19.5.ebuild new file mode 100644 index 000000000000..3aeded5ecbc8 --- /dev/null +++ b/sci-astronomy/sextractor/sextractor-2.19.5.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +AUTOTOOLS_AUTO_DEPEND=no + +inherit autotools + +DESCRIPTION="Extract catalogs of sources from astronomical FITS images" +HOMEPAGE="http://www.astromatic.net/software/sextractor" +SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +LICENSE="GPL-3" +SLOT="0" + +IUSE="doc modelfit test threads" + +RDEPEND=" + modelfit? ( sci-libs/atlas[lapack,threads=] sci-libs/fftw:3.0 )" +DEPEND="${RDEPEND} + modelfit? ( ${AUTOTOOLS_DEPEND} )" + +REQUIRED_USE="test? ( modelfit )" + +PATCHES=( + "${FILESDIR}/${P}-fix-format-errors.patch" + "${FILESDIR}/${P}-have-malloc.patch" + "${FILESDIR}/${P}-have-mmap.patch" + "${FILESDIR}/${P}-sigbus.patch" +) + +src_prepare() { + default + if use modelfit; then + local mycblas=atlcblas myclapack=atlclapack + if use threads; then + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \ + mycblas=ptcblas + [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \ + myclapack=ptclapack + fi + sed -i \ + -e "s/-lcblas/-l${mycblas}/g" \ + -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \ + -e "s/-llapack/-l${myclapack}/g" \ + -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \ + acx_atlas.m4 || die + eautoreconf + fi +} + +src_configure() { + econf \ + --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \ + $(use_enable modelfit model-fitting) \ + $(use_enable threads) +} + +src_install () { + default + CONFDIR=/usr/share/sextractor + insinto ${CONFDIR} + doins config/* + use doc && dodoc doc/* +} + +pkg_postinst() { + elog "SExtractor examples configuration files are located in" + elog "${EROOT%/}/${CONFDIR} and are not loaded anymore by default." +} |