Author: Ole Streicher <debian@liska.ath.cx>
Last-Update: 2012-05-10
Description: "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.
--- a/Makefile.am
+++ b/Makefile.am
@@ -235,7 +235,7 @@
 
 # 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
@@ -544,21 +544,21 @@
 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
@@ -573,31 +573,31 @@
 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) \
     $(GRP_C_INCLUDE_FILES) \
     $(GRP_F_INCLUDE_FILES) \
@@ -605,55 +605,55 @@
     $(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.c
+libstarlink_ast_pgplot_la_SOURCES = grf_pgplot.c
 
 #  The graphics module that uses PGPLOT for 3D graphical output.
-libast_pgplot3d_la_SOURCES = grf3d_pgplot.c
+libstarlink_ast_pgplot3d_la_SOURCES = grf3d_pgplot.c
 
 #  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 \
@@ -707,24 +707,24 @@
 #  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
@@ -760,5 +760,5 @@
 ast_test_SOURCES = ast_test.c
 
 #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
--- a/ast.news
+++ b/ast.news
@@ -44,7 +44,7 @@
 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.
 
 
@@ -52,7 +52,7 @@
 ----------------------
 
 - 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
