Skip to content

Commit

Permalink
erfa: Add erfa to build in thirdparty
Browse files Browse the repository at this point in the history
This is added as a submodule. Nothing yet depends on it.
  • Loading branch information
timj committed Aug 1, 2014
1 parent c65c469 commit 6c323e4
Show file tree
Hide file tree
Showing 9 changed files with 286 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile.dependencies
Expand Up @@ -793,6 +793,10 @@ $(MANIFESTS)/ems: \
cd libraries/ems \
&& $(MAKE_CPT)

$(MANIFESTS)/erfa:
cd thirdparty/erfa \
&& $(MAKE_CPT)

$(MANIFESTS)/esp: \
$(MANIFESTS)/agi \
$(MANIFESTS)/ard \
Expand Down
1 change: 1 addition & 0 deletions Makefile.in
Expand Up @@ -39,6 +39,7 @@ ALL_TARGETS = \
$(MANIFESTS)/echomop \
$(MANIFESTS)/echwind \
$(MANIFESTS)/ems \
$(MANIFESTS)/erfa \
$(MANIFESTS)/esp \
$(MANIFESTS)/extractor \
$(MANIFESTS)/extreme \
Expand Down
18 changes: 18 additions & 0 deletions componentset.xml
Expand Up @@ -6554,6 +6554,24 @@ Ultrix and for SunOS and may still work for them.
<bugreports>starlink@jiscmail.ac.uk</bugreports>
</component>

<component id="erfa" support="U">
<version>1.1</version>
<path>thirdparty/erfa</path>
<description>Essential Routines for Fundamental Astronomy</description>
<dependencies >

</dependencies>
<developers>
<person>
<name>Tim Jenness</name>
<uname>timj</uname>
<email>t.jenness@jach.hawaii.edu</email>
<role>owner</role>
</person>
</developers>
<bugreports>starlink@jiscmail.ac.uk</bugreports>
</component>

<component id="skycat" support="U">
<version>3.1.2</version>
<path>thirdparty/eso/skycat</path>
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/configure.ac
Expand Up @@ -13,7 +13,7 @@ AC_PROG_MAKE_SET
dnl The following list must be kept up-to-date by hand.
dnl The list is available as the substitution variable @subdirs@.
dnl (must be kept on one line).
AC_CONFIG_SUBDIRS([caltech eso heasarc knoxville tclsys ijg rit fsf mit mesa3d kitware latex2html apache perlsys sofa])
AC_CONFIG_SUBDIRS([caltech eso heasarc knoxville tclsys ijg rit fsf mit mesa3d kitware latex2html apache perlsys sofa erfa])

AC_CONFIG_FILES(Makefile)

Expand Down
24 changes: 24 additions & 0 deletions thirdparty/erfa/Makefile.am
@@ -0,0 +1,24 @@
## Process this file with automake to produce Makefile.in

@SET_MAKE@

RECURSIVE_TARGETS = all check

$(RECURSIVE_TARGETS):
( cd erfa; $(MAKE) $@; )

## Automake really requires local versions for these targets.
distclean-local:
( cd erfa; $(MAKE) distclean )

clean-local:
( cd erfa; $(MAKE) clean )

EXTRA_DIST = erfa

## Before distributing subdirectories we need to clean up and remove any
## softlinks.
dist-hook:
rm -rf `find $(distdir) -type l`
(cd $(distdir)/erfa; make distclean)

134 changes: 134 additions & 0 deletions thirdparty/erfa/bootstrap
@@ -0,0 +1,134 @@
#! /bin/sh -
# original bootstrap file, installed by starconf 1.3, rnum=1003000
# If you _need_ to change this file, delete `original' in the line above,
# or else starconf may overwrite it with an updated version.
#
# bootstrap.installed. Generated from bootstrap.installed.in by configure.
#
# Bootstrap a checked-out component of the Starlink software tree.
# Run this script in a freshly checked-out directory to bring the
# system to the point where you can just type ./configure;make
#
# Usage:
# ./bootstrap


# This script should be installed, by starconf, in all `component
# directories'. A `component directory' is a directory which has a
# component.xml.in file in it. All component directories will have a
# manifest file created and installed in .../manifests; non-component
# directories will not have manifest files. Everything that's
# installed should be installed as part of some component
# or other.
#
# The ./bootstrap scripts will stop recursing when they find a
# component.xml.in file. They'll warn if they find a component.xml.in
# file in any AC_CONFIG_SUBDIRS directory, but ignore it, and exit
# with an error if they do not find a component.xml.in file and there
# are no AC_CONFIG_SUBDIRS directories in which to search further.
# That is, the tree of directories which the top-level bootstrap
# traverses should have component.xml.in files at or above all its
# leaves.


# The starconf below might update bootstrap, if a newer version is
# available. Unfortunately, this confuses sh, which appears _not_ to
# keep open the script it's reading, but to reopen it afresh, or reseek
# within the file, for each line (or something like that!?).
# So rewrite this script to a temporary file and exec it.
tempfile="${TMP-/tmp}/$0-$$.tmp"
rm -f $tempfile
echo "trap 'rm -f $tempfile' 0" >$tempfile # remove temporary at exit
sed '1,/^--TRAMPOLINE--/d' $0 >>$tempfile # strip out the trampoline
exec /bin/sh $tempfile # exec the temporary
--TRAMPOLINE--


echo "Bootstrapping `pwd` ..."

if test ! -f configure.ac; then
echo "bootstrap: No configure.ac in directory `pwd`" >&2
exit 1
fi

subdirs=`autoconf --trace=AC_CONFIG_SUBDIRS:$% configure.ac`

if test -f component.xml.in; then

if starconf --show buildsupport >/dev/null 2>&1; then

# starconf is in the path
echo "...using starconf in " `starconf --show buildsupport`
starconf || exit 1

else

# The temptation here is to use ./starconf.status to find the
# starconf that it came from and invoke that explicitly. Don't do
# this, however: we don't want to be too clever, and it's better
# to be consistent with the way the autotools behave (the first
# one in your path is the one that works, and they don't have this
# sort of `phone home' cleverness in them).

echo "bootstrap error: The starconf application is not in your path"

# This doesn't stop us being helpful, however.
if test -f ./starconf.status; then
starconf_home=`./starconf.status --show buildsupport`
echo "This directory was last bootstrapped with $starconf_home/bin/starconf"
fi

exit 1
fi

# Check that there are no component.xml.in files in any subdirectories
if test -n "$subdirs"; then
for d in $subdirs
do
if test -d "$d" && test -f "$d/component.xml.in"; then
echo "bootstrap: warning: ignoring child $d/component.xml.in" >&2
fi
done
fi

# If STAR_SUPPRESS_AUTORECONF is true in the environment, then we
# suppress the call of `autoreconf'. This is here _only_ so that
# the top-level bootstrap file can suppress multiple calls of this
# in bootstrap scripts in its children. This mechanism must not
# be used by users, as it is likely to change without warning.
if ${STAR_SUPPRESS_AUTORECONF-false}; then
echo "Suppressing autoreconf in" `pwd`
else
echo autoreconf --install --symlink
autoreconf --install --symlink || exit 1
fi

else

# This is not a component directory, so simply recurse into the children.

# ...if there are any, that is.
if test -z "$subdirs"; then
echo "bootstrap: error: non-component directory `pwd` has no subdirs" >&2
exit 1
fi

# Bootstrap the child directories mentioned in AC_CONFIG_SUBDIRS.
# These bootstrap files must exist.
for d in $subdirs
do
if test -d "$d"; then
echo "Bootstrapping $d..."
if test -f $d/bootstrap; then
# good...
(cd $d; /bin/sh ./bootstrap)
else
echo "bootstrap: no file $d/bootstrap" >&2
exit 1
fi
fi
done

fi

exit 0
27 changes: 27 additions & 0 deletions thirdparty/erfa/component.xml
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!DOCTYPE component SYSTEM "componentinfo.dtd">
<!-- component.xml. Generated from component.xml.in by configure. -->

<component id="erfa" support="U">
<version>1.1</version>
<path>thirdparty/erfa</path>
<description>Essential Routines for Fundamental Astronomy</description>
<!-- <abstract><p></p></abstract> -->
<dependencies >

</dependencies>
<developers>
<!-- ERFA is maintained on Github at https://github.com/liberfa/erfa -->
<!-- and issues should be filed there if they are not due to the -->
<!-- Starlink build system. -->
<person>
<name>Tim Jenness</name>
<uname>timj</uname>
<email>t.jenness@jach.hawaii.edu</email>
<role>owner</role>
</person>
</developers>
<!-- <documentation></documentation> -->
<bugreports>starlink@jiscmail.ac.uk</bugreports>
<!-- <notes><p></p></notes> -->
</component>
27 changes: 27 additions & 0 deletions thirdparty/erfa/component.xml.in
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!DOCTYPE component SYSTEM "componentinfo.dtd">
<!-- @configure_input@ -->

<component id="@PACKAGE@" support="U">
<version>@PACKAGE_VERSION@</version>
<path>thirdparty/erfa</path>
<description>Essential Routines for Fundamental Astronomy</description>
<!-- <abstract><p></p></abstract> -->
<dependencies @STAR_DEPENDENCIES_ATTRIBUTES@>
@STAR_DEPENDENCIES_CHILDREN@
</dependencies>
<developers>
<!-- ERFA is maintained on Github at https://github.com/liberfa/erfa -->
<!-- and issues should be filed there if they are not due to the -->
<!-- Starlink build system. -->
<person>
<name>Tim Jenness</name>
<uname>timj</uname>
<email>t.jenness@jach.hawaii.edu</email>
<role>owner</role>
</person>
</developers>
<!-- <documentation>@STAR_DOCUMENTATION@</documentation> -->
<bugreports>@PACKAGE_BUGREPORT@</bugreports>
<!-- <notes><p></p></notes> -->
</component>
50 changes: 50 additions & 0 deletions thirdparty/erfa/configure.ac
@@ -0,0 +1,50 @@
dnl Process this file with autoconf to produce a configure script

dnl This is not a package, so the first two arguments are fake.
AC_INIT(erfa, 1.1, starlink@jiscmail.ac.uk)

dnl Require autoconf-2.50 at least
AC_PREREQ(2.50)

AM_INIT_AUTOMAKE(1.8.2-starlink)

dnl Ensure that we have the submodule
AC_CONFIG_SRCDIR([erfa/configure.ac])

STAR_DEFAULTS

dnl We may want to invoke make recursively
AC_PROG_MAKE_SET

dnl To configure erfa, run ./configure in the subdirectory.

# Look for --disable-shared and pass it on.
star_extra_items=
for ac_arg in $ac_configure_args; do
case $ac_arg in
*-disable-shared*)
star_extra_items="--disable-shared"
;;
esac
done
export star_extra_items
(
cd erfa; \
cmd="./bootstrap.sh"; \
echo $cmd; \
$cmd; \
cmd="./configure --prefix=$prefix \
--srcdir=. \
$star_extra_items \
--cache-file=../config.cache"; \
echo $cmd; \
$cmd; \
)

STAR_SPECIAL_INSTALL_COMMAND([
( cd erfa; $(MAKE) INSTALL_ROOT=$$DESTDIR DESTDIR=$$DESTDIR install );
])

AC_CONFIG_FILES([Makefile component.xml])

AC_OUTPUT

0 comments on commit 6c323e4

Please sign in to comment.