Package: starlink-pal / 0.9.8-1

use_std_automake.patch Patch series | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From: Ole Streicher <debian@liska.ath.cx>
Date: Wed, 11 Jan 2017 18:29:10 +0100
Subject: Do not depend on the starlink's automake,
 but use their macro file together with the standard automake

---
 Makefile.am  | 11 ++++++++---
 acinclude.m4 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac |  2 +-
 3 files changed, 66 insertions(+), 4 deletions(-)
 create mode 100644 acinclude.m4

diff --git a/Makefile.am b/Makefile.am
index c41b238..19dc017 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,10 +11,9 @@ libstarlink_pal_la_CPPFLAGS = $(ERFA_CPPFLAGS)
 libstarlink_pal_la_LDFLAGS = $(ERFA_LDFLAGS)
 
 # Force a link against ERFA and, optionally, starutil
-libstarlink_pal_la_LIBADD = $(ERFA_LIBADD) $(STARUTIL_LIBADD)
+libstarlink_pal_la_LIBADD = -lerfa
 
 # Misc files
-dist_starnews_DATA = pal.news
 dist_pkgdata_DATA = COPYING COPYING.LESSER README.md
 
 # Make all library code position independent. This is handy for creating
@@ -123,7 +122,13 @@ PRIVATE_C_FILES = \
 pal1Atms.c \
 pal1Atmt.c
 
-stardocs_DATA = @STAR_LATEX_DOCUMENTATION@
+doc: @STARDOCS@.pdf @STARDOCS@/index.html
+.tex.pdf:
+	pdflatex $^ && pdflatex $^
+
+@STARDOCS@/index.html: @STARDOCS@.tex
+	latex2html -noaddress $^
+	rm -f @STARDOCS@/@STARDOCS@.html @STARDOCS@/WARNINGS
 
 TESTS = palTest
 
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..3c2355a
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,57 @@
+m4_define([OVERRIDE_PREFIX],[/usr/])
+
+AC_DEFUN([STAR_DEFAULTS],[
+
+AC_DEFINE([NOSTARUTIL], 1, [The starutil package is not available in Debian])
+
+# Create a PACKAGE_VERSION_INTEGER variable, which contains the
+# package's version number as an integer major*1e6+minor*1e3+release.
+eval [`echo $VERSION | sed -e 's/\([0-9]*\)[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\).*/PACKAGE_VERSION_MAJOR=\1; PACKAGE_VERSION_MINOR=\2; PACKAGE_VERSION_RELEASE=\3;/'`]
+test -n "$PACKAGE_VERSION_MAJOR"   || PACKAGE_VERSION_MAJOR=0
+test -n "$PACKAGE_VERSION_MINOR"   || PACKAGE_VERSION_MINOR=0
+test -n "$PACKAGE_VERSION_RELEASE" || PACKAGE_VERSION_RELEASE=0
+PACKAGE_VERSION_INTEGER=`expr $PACKAGE_VERSION_MAJOR \* 1000000 + $PACKAGE_VERSION_MINOR \* 1000 + $PACKAGE_VERSION_RELEASE`
+AC_SUBST(PACKAGE_VERSION_MAJOR)
+AC_SUBST(PACKAGE_VERSION_MINOR)
+AC_SUBST(PACKAGE_VERSION_RELEASE)
+AC_SUBST(PACKAGE_VERSION_INTEGER)
+])
+
+# Dummy declaration of starlink intedependencies
+AC_DEFUN([STAR_DECLARE_DEPENDENCIES], [])
+
+#  Perform the check that configures f77.h.in for the return type of REAL
+#  Fortran functions. On 64-bit g77 with f2c compatibility this is double
+#  not float.
+AC_DEFUN([STAR_CNF_F2C_COMPATIBLE], [
+    AC_SUBST([REAL_FUNCTION_TYPE], double)
+])
+
+# Determine the type of Fortran character string lengths.
+AC_DEFUN([STAR_CNF_TRAIL_TYPE], [
+    AC_SUBST([TRAIL_TYPE], int)
+])
+
+#   Declare the message file.
+AC_DEFUN([STAR_MESSGEN], [])
+
+#   Declare the documentation.
+# For Debian, this must be explicitely set in the patched Makefile.am
+# since we don't use Starlink's automake here.
+AC_DEFUN([STAR_LATEX_DOCUMENTATION], [
+    AC_SUBST([STARDOCS], [$1])
+])
+
+
+AC_DEFUN([STAR_PREDIST_SOURCES], [])
+
+AC_DEFUN([STAR_PLATFORM_SOURCES], [
+for _t in $1; do
+    (cd ${srcdir}; rm -f ${_t}; cp -p ${_t}default ${_t})
+done
+])
+
+# We ignore any starlinks programs here since we don' install the whole
+# Starlink bootstrap chain.
+AC_DEFUN([STAR_CHECK_PROGS], [])
+
diff --git a/configure.ac b/configure.ac
index bf2bead..b1a9675 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 dnl    Require autoconf-2.50 at least
 AC_PREREQ([2.69])
 dnl    Require Starlink automake
-AM_INIT_AUTOMAKE(1.8.2-starlink)
+AM_INIT_AUTOMAKE([foreign])
 
 dnl    Sanity-check: name a file in the source directory -- if this
 dnl    isn't found then configure will complain