-
Notifications
You must be signed in to change notification settings - Fork 0
/
astrometry_net.build
26 lines (23 loc) · 1.42 KB
/
astrometry_net.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@LSST UPS@ &&
curl -L \
http://www.astrometry.net/downloads/astrometry.net-@REPOVERSION@.tar.gz \
> @PRODUCT@-@VERSION@.tar.gz &&
gunzip < @PRODUCT@-@VERSION@.tar.gz | tar -xf - &&
rm -rf @PRODUCT@-@VERSION@ &&
mv astrometry.net-@REPOVERSION@ @PRODUCT@-@VERSION@ &&
cd @PRODUCT@-@VERSION@ &&
product_dir=$(eups path 0)/$(eups flavor)/@PRODUCT@/@VERSION@ &&
# Apply patch
if [ @REPOVERSION@ == "0.30" ]; then
git archive --format=tar --remote=git://hsca.ipmu.jp/repos/devenv/buildFiles.git HEAD astrometry_net_0.30_Makefile_sed.patch | tar --extract --verbose
patch -p0 blind/Makefile < astrometry_net_0.30_Makefile_sed.patch || echo Unable to apply Makefile patch
_COMPILER=$(basename "$CC") &&
if [ ${_COMPILER:0:5} == "clang" ]; then
export CFLAGS="$CFLAGS -std=gnu89"
git archive --format=tar --remote=git://hsca.ipmu.jp/repos/devenv/buildFiles.git HEAD astrometry_net_0.30_c#lang_depend.patch | tar --extract --verbose
patch -p1 < astrometry_net_0.30_clang_depend.patch || echo Unable to apply clang patch
fi
fi &&
make install -j 1 INSTALL_DIR=$product_dir SYSTEM_GSL=yes GSL_INC="-I${GSL_DIR}/include" GSL_LIB="-L${GSL_DIR}/lib -lgsl -lgslcblas" WCSLIB_INC="-I${WCSLIB_DIR}/include/wcslib" WCSLIB_LIB="-L${WCSLIB_DIR}/lib -lwcs" CFITS_INC="-I${CFITSIO_DIR}/include" CFITS_LIB="-L${CFITSIO_DIR}/lib -lcfitsio" &&
lsst_ups @PRODUCT@ @VERSION@ $product_dir &&
eups expandtable -i ${product_dir}/ups/@PRODUCT@.table