From: Ole Streicher <olebole@debian.org>
Date: Tue, 5 Jul 2016 15:13:46 +0200
Subject: "ast" is a quite short name for a library that is so specific as
 this one. Therefore, and for consistency with the "pal" library,
 "ast" is prefixed by the vendor name "starlink". . This patch can be
 re-created by running debian/create_patches_rename_library.sh on the freshly
 unpacked source tarball.

---
 Makefile.am | 104 ++++++++++++++++++++++++++++++------------------------------
 ast.news    |   4 +--
 2 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 56096e7..953c808 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -251,7 +251,7 @@ F_C_INCLUDE_FILES = \
 
 # The following list should include AST_PAR, but that must not be
 # distributed, and so it is listed separately in
-# nodist_libast_la_SOURCES below.
+# nodist_libstarlink_ast_la_SOURCES below.
 GRP_F_INCLUDE_FILES = \
     GRF_PAR \
     AST_ERR
@@ -592,21 +592,21 @@ include_MESSAGES = AST_ERR ast_err.h
 if EXTERNAL_PAL
 PAL_LIB =
 else
-PAL_LIB = libast_pal.la
+PAL_LIB = libstarlink_ast_pal.la
 endif
 
 lib_LTLIBRARIES = \
     $(PAL_LIB) \
-    libast.la \
-    libast_err.la \
-    libast_ems.la \
-    libast_drama.la \
-    libast_grf3d.la \
-    libast_grf_2.0.la \
-    libast_grf_3.2.la \
-    libast_grf_5.6.la \
-    libast_pgplot.la \
-    libast_pgplot3d.la
+    libstarlink_ast.la \
+    libstarlink_ast_err.la \
+    libstarlink_ast_ems.la \
+    libstarlink_ast_drama.la \
+    libstarlink_ast_grf3d.la \
+    libstarlink_ast_grf_2.0.la \
+    libstarlink_ast_grf_3.2.la \
+    libstarlink_ast_grf_5.6.la \
+    libstarlink_ast_pgplot.la \
+    libstarlink_ast_pgplot3d.la
 
 stardocs_DATA = @STAR_LATEX_DOCUMENTATION@
 dist_starnews_DATA = ast.news
@@ -621,31 +621,31 @@ dist_pkgdata_DATA = COPYING COPYING.LESSER COPYING.LIB
 if !NOTHREADS
 
 if !NOPIC
-libast_la_CFLAGS = $(AM_CFLAGS) -prefer-pic -DTHREAD_SAFE
+libstarlink_ast_la_CFLAGS = $(AM_CFLAGS) -prefer-pic -DTHREAD_SAFE
 else
-libast_la_CFLAGS = $(AM_CFLAGS) -DTHREAD_SAFE
+libstarlink_ast_la_CFLAGS = $(AM_CFLAGS) -DTHREAD_SAFE
 endif
 
 else
-libast_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
 
 endif
 
 if !NOPIC
-libast_err_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_ems_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_drama_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_grf3d_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_grf_2_0_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_grf_3_2_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_grf_5_6_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_pgplot_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_pgplot3d_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
-libast_pal_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_err_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_ems_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_drama_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_grf3d_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_grf_2_0_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_grf_3_2_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_grf_5_6_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_pgplot_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_pgplot3d_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+libstarlink_ast_pal_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
 endif
 
 #  The module containing the main AST classes
-libast_la_SOURCES = \
+libstarlink_ast_la_SOURCES = \
     $(GRP_C_ROUTINES) \
     $(F_C_ROUTINES) \
     $(GRP_C_INCLUDE_FILES) \
@@ -655,55 +655,55 @@ libast_la_SOURCES = \
     $(WCSLIB_FILES) \
     ast_err.h
 
-# Ensure libast links against libraries containing functions used within
-# libast. If AST is configured --with-external-pal, then the internal
-# libast_pal library will be empty, and we link to an external PAL
+# Ensure libstarlink_ast links against libraries containing functions used within
+# libstarlink_ast. If AST is configured --with-external-pal, then the internal
+# libstarlink_ast_pal library will be empty, and we link to an external PAL
 # library instead.
 if EXTERNAL_PAL
-libast_la_LIBADD =  $(libdir)/libpal.la
+libstarlink_ast_la_LIBADD =  $(libdir)/libpal.la
 else
-libast_la_LIBADD = libast_pal.la
+libstarlink_ast_la_LIBADD = libstarlink_ast_pal.la
 endif
 
 # AST_PAR is really part of GRP_F_INCLUDE_FILES, but it must not be
 # distributed, so list it separately.
-nodist_libast_la_SOURCES = \
+nodist_libstarlink_ast_la_SOURCES = \
     ast.h \
     AST_PAR
 
 #  The default error reporting module.
-libast_err_la_SOURCES = err_null.c
+libstarlink_ast_err_la_SOURCES = err_null.c
 
 #  The error reporting module that uses EMS to deliver errors.
-libast_ems_la_SOURCES = err_ems.c
+libstarlink_ast_ems_la_SOURCES = err_ems.c
 
 #  The error reporting module that uses DRAMA Ers to deliver errors.
-libast_drama_la_SOURCES = err_drama.c
+libstarlink_ast_drama_la_SOURCES = err_drama.c
 
 #  The module containing null implementations of the 3D graphics routines
 #  required by AST
-libast_grf3d_la_SOURCES = grf3d.c
+libstarlink_ast_grf3d_la_SOURCES = grf3d.c
 
 #  The module containing null implementations of the graphics routines
 #  required by AST V2.0
-libast_grf_2_0_la_SOURCES = grf_2.0.c
+libstarlink_ast_grf_2_0_la_SOURCES = grf_2.0.c
 
 #  The module containing null implementations of the graphics routines
 #  added by AST V3.2 and not present in V2.0
-libast_grf_3_2_la_SOURCES = grf_3.2.c
+libstarlink_ast_grf_3_2_la_SOURCES = grf_3.2.c
 
 #  The module containing null implementations of the graphics routines
 #  added by AST V5.6 and not present in V3.2
-libast_grf_5_6_la_SOURCES = grf_5.6.c
+libstarlink_ast_grf_5_6_la_SOURCES = grf_5.6.c
 
 #  The graphics module that uses PGPLOT for 2D graphical output.
-libast_pgplot_la_SOURCES = $(GRF_PGPLOT_SOURCES)
+libstarlink_ast_pgplot_la_SOURCES = $(GRF_PGPLOT_SOURCES)
 
 #  The graphics module that uses PGPLOT for 3D graphical output.
-libast_pgplot3d_la_SOURCES = $(GRF3D_PGPLOT_SOURCES)
+libstarlink_ast_pgplot3d_la_SOURCES = $(GRF3D_PGPLOT_SOURCES)
 
 #  Positional astronomy libraries.
-libast_pal_la_SOURCES = $(PAL_FILES)
+libstarlink_ast_pal_la_SOURCES = $(PAL_FILES)
 
 # The following files are built by the targets in this makefile.
 MAINTAINERCLEANFILES = version.h builddocs addversion \
@@ -757,24 +757,24 @@ BUILT_SOURCES = AST_ERR ast_err.h version.h
 #  Form a second link to the main object library (static and shared). This
 #  is used when a second pass through the library is needed during linking
 #  to resolve references made within other AST libraries (e.g. the grf
-#  modules, etc), to functions defined within libast (e.g. memory management
+#  modules, etc), to functions defined within libstarlink_ast (e.g. memory management
 #  and error reporting functions). Do not forget to change the contents of
-#  the libast_pass2.la file to refer to libast_pass2.* rather than libast.*.
+#  the libstarlink_ast_pass2.la file to refer to libstarlink_ast_pass2.* rather than libstarlink_ast.*.
 #  Use target install-exec-hook rather than install-exec-local so that the
 #  soft links and files are created *after* the main library has been
 #  installed.
-install-exec-hook: libast.la
+install-exec-hook: libstarlink_ast.la
 	$(mkdir_p) $(DESTDIR)$(libdir)
 	cd $(DESTDIR)$(libdir); \
-	for f in `ls libast.*`; do \
-	   ff=`echo $$f | sed -e 's/libast/libast_pass2/'`; \
+	for f in `ls libstarlink_ast.*`; do \
+	   ff=`echo $$f | sed -e 's/libstarlink_ast/libstarlink_ast_pass2/'`; \
 	   if test -f "$$ff"; then rm "$$ff"; fi; \
 	   $(LN_S) $$f $$ff; \
 	   $(MANIFEST) && echo "MANIFEST:$(DESTDIR)$(libdir)/$$ff" || :; \
 	done; \
-	if test -f "libast.la"; then \
-	   if test -f "libast_pass2.la"; then rm "libast_pass2.la"; fi; \
-	   sed -e 's/libast\./libast_pass2\./g' libast.la > libast_pass2.la; \
+	if test -f "libstarlink_ast.la"; then \
+	   if test -f "libstarlink_ast_pass2.la"; then rm "libstarlink_ast_pass2.la"; fi; \
+	   sed -e 's/libstarlink_ast\./libstarlink_ast_pass2\./g' libstarlink_ast.la > libstarlink_ast_pass2.la; \
 	fi
 
 # Make pre-distribution files.  These are files which are required for
@@ -815,8 +815,8 @@ test: install
 	cd ast_tester && STARLINK=@STARLINK@ PGPLOT_DIR=@STARLINK@/bin ./ast_tester -nd
 
 #ast_test_LDADD = `ast_link`
-# Expand ast_link to avoid libast_pass2, which causes problems for Solaris
-ast_test_LDADD = @LIBPAL@ libast.la libast_pal.la libast_grf_3.2.la libast_grf_5.6.la libast_grf_2.0.la libast_grf3d.la libast_err.la -lm
+# Expand ast_link to avoid libstarlink_ast_pass2, which causes problems for Solaris
+ast_test_LDADD = @LIBPAL@ libstarlink_ast.la libstarlink_ast_pal.la libstarlink_ast_grf_3.2.la libstarlink_ast_grf_5.6.la libstarlink_ast_grf_2.0.la libstarlink_ast_grf3d.la libstarlink_ast_err.la -lm
 
 #  Need to include latex support files in the distribution tar ball so
 #  that the docs can be built from the tex source files. Requires environment
diff --git a/ast.news b/ast.news
index cbefd45..75a5ade 100644
--- a/ast.news
+++ b/ast.news
@@ -463,7 +463,7 @@ astResampleUK that handles 64 bit integer data.
 Main Changes in V7.0.2
 ----------------------
 
-- The libast_pal library is no longer built if the "--with-external_pal"
+- The libstarlink_ast_pal library is no longer built if the "--with-external_pal"
 option is used when AST is configured.
 
 
@@ -471,7 +471,7 @@ Main Changes in V7.0.1
 ----------------------
 
 - The levmar and wcslib code distributed within AST is now stored in the
-main AST library (libast.so) rather than in separate libraries.
+main AST library (libstarlink_ast.so) rather than in separate libraries.
 
 
 Main Changes in V7.0.0
