From 05c3408340d79b44374f89b7b7f8be0f03d4ecbb Mon Sep 17 00:00:00 2001 From: "Travis-CI on github.com/conda-forge/staged-recipes" Date: Wed, 10 Jul 2019 11:46:57 +0000 Subject: [PATCH] Initial feedstock commit with conda-smithy 3.4.0. --- conda-forge.yml | 1 + recipe/0001-Search-lapacke-library.patch | 22 ++++++++ recipe/0002-Fix_sprintf_buffer_overflow.patch | 22 ++++++++ recipe/build.sh | 13 +++++ recipe/meta.yaml | 53 +++++++++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 conda-forge.yml create mode 100644 recipe/0001-Search-lapacke-library.patch create mode 100644 recipe/0002-Fix_sprintf_buffer_overflow.patch create mode 100755 recipe/build.sh create mode 100644 recipe/meta.yaml diff --git a/conda-forge.yml b/conda-forge.yml new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/conda-forge.yml @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/recipe/0001-Search-lapacke-library.patch b/recipe/0001-Search-lapacke-library.patch new file mode 100644 index 0000000..a9d874d --- /dev/null +++ b/recipe/0001-Search-lapacke-library.patch @@ -0,0 +1,22 @@ +diff --git a/m4/acx_openblas.m4 b/m4/acx_openblas.m4 +index 5421eec..fe43f65 100644 +--- a/m4/acx_openblas.m4 ++++ b/m4/acx_openblas.m4 +@@ -100,7 +100,7 @@ dnl ---------------------------- + [Define if you have the OpenBLAS parallel library and header files.]), + unset ac_cv_search_LAPACKE_dpotrf + [AC_SEARCH_LIBS( +- [LAPACKE_dpotrf], ["openblas"$acx_openblas_suffix], ++ [LAPACKE_dpotrf], ["openblas"$acx_openblas_suffix "lapacke"$acx_openblas_suffix], + [OPENBLAS_WARN="parallel OpenBLAS"$acx_openblas_suffix" not found, reverting to scalar OpenBLAS"$acx_openblas_suffix"!"], + [OPENBLAS_ERROR="OpenBLAS"$acx_openblas_suffix" library file not found!"], + $acx_openblas_libopt +@@ -109,7 +109,7 @@ dnl ---------------------------- + ) + else + AC_SEARCH_LIBS( +- [LAPACKE_dpotrf], ["openblas"$acx_openblas_suffix],, ++ [LAPACKE_dpotrf], ["openblas"$acx_openblas_suffix "lapacke"$acx_openblas_suffix],, + [OPENBLAS_ERROR="OpenBLAS"$acx_openblas_suffix" library file not found!"], + $acx_openblas_libopt + ) diff --git a/recipe/0002-Fix_sprintf_buffer_overflow.patch b/recipe/0002-Fix_sprintf_buffer_overflow.patch new file mode 100644 index 0000000..cf1cf8c --- /dev/null +++ b/recipe/0002-Fix_sprintf_buffer_overflow.patch @@ -0,0 +1,22 @@ +diff --git a/src/match.c b/src/match.c +index 79ea1f4..4377ea3 100644 +--- a/src/match.c ++++ b/src/match.c +@@ -106,7 +106,7 @@ VERSION 29/09/2012 + void match_field(fieldstruct *field, fieldstruct *reffield) + { + setstruct *refset, *refset2, *set, *fieldset; +- char str[128]; ++ char str[MAXCHAR]; + double wcspos[NAXIS], + angle,scale,dlng,dlat,sig, dlng2,dlat2,sig2, asig, + dangle,dscale, ddlng,ddlat, shear,sangle, sheartot, sangletot, +@@ -114,7 +114,7 @@ void match_field(fieldstruct *field, fieldstruct *reffield) + int i,j,k, lng,lat, + naxis, nmax; + +- sprintf(str, "Matching field %s...", field->rfilename); ++ sprintf(str, "Matching field %.*s ...", MAXCHAR - 20, field->rfilename); + NFPRINTF(OUTPUT, str); + + /* We are going to use FFT routines */ diff --git a/recipe/build.sh b/recipe/build.sh new file mode 100755 index 0000000..8060512 --- /dev/null +++ b/recipe/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +sh autogen.sh +./configure --prefix=${PREFIX} \ + --enable-openblas \ + --with-openblas-incdir=${PREFIX}/include \ + --with-openblas-libdir=${PREFIX}/lib \ + --with-curl-incdir=${PREFIX}/include \ + --with-curl-libdir=${PREFIX}/lib \ + --enable-plplot=no +make + +make install diff --git a/recipe/meta.yaml b/recipe/meta.yaml new file mode 100644 index 0000000..cfcf182 --- /dev/null +++ b/recipe/meta.yaml @@ -0,0 +1,53 @@ +{% set name = "scamp" %} +{% set version = "2.6.7" %} + +package: + name: astromatic-{{ name }} + version: {{ version }} + +source: + url: https://github.com/astromatic/{{ name }}/archive/v{{ version }}.tar.gz + sha256: 6dede2177c712821c1c91afa423b6cfc6e7100f7a1f2abecad1ad8e181359a50 + patches: + - 0001-Search-lapacke-library.patch + - 0002-Fix_sprintf_buffer_overflow.patch + +build: + skip: true # [win] + number: 0 + +requirements: + build: + - {{ compiler('c') }} + - autoconf + - automake + - libtool + - make + host: + - fftw + - curl + - liblapacke + run: + - fftw + - libcurl + +test: + commands: + - scamp -d + +about: + home: http://www.astromatic.net/software/scamp + license: GPL-3.0 + license_file: LICENSE + summary: A utility that computes astrometric solutions from SExtractor catalogs + description: | + SCAMP (Software for Calibrating AstroMetry and Photometry) is a computer + program that computes astrometric projection parameters from source + catalogues derived from FITS images. The computed solution is expressed + according to the WCS standard. + doc_url: https://scamp.readthedocs.io/ + dev_url: https://github.com/astromatic/scamp + +extra: + recipe-maintainers: + - teake