gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 207fd34: Installation: correct wcslib referenc


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 207fd34: Installation: correct wcslib reference and optional libs in pkg-config
Date: Sun, 10 Nov 2019 13:17:02 -0500 (EST)

branch: master
commit 207fd34db5145bfe0d21d824f38ea783dafb9963
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Installation: correct wcslib reference and optional libs in pkg-config
    
    Until now, in gnuastro's pkg-config file, we were using `wcs' for WCSLIB
    instead of the standard `wcslib' name that the library uses in its
    installed pkg-config file (`wcslib.pc'). As suggested by Stefan Brüns, it
    should be `wcslib'.
    
    Also, while making the change, I noticed that we weren't mentioning the
    optional libraries in Gnuastro's pkg-config at all! So a test was also
    added to see which optional libraries exist and adds the ones that
    Gnuastro's library was built with to the installed `gnuastro.pc'.
    
    This fixes bug #57200.
---
 THANKS                       |  1 +
 doc/announce-acknowledge.txt |  1 +
 lib/Makefile.am              | 21 +++++++++++++--------
 lib/gnuastro.pc.in           |  2 +-
 4 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/THANKS b/THANKS
index 04aa0f9..911ca1c 100644
--- a/THANKS
+++ b/THANKS
@@ -27,6 +27,7 @@ support in Gnuastro. The list is ordered alphabetically (by 
family name).
     Karl Berry                           address@hidden
     Leindert Boogaard                    address@hidden
     Nicolas Bouché                       address@hidden
+    Stefan Brüns                         address@hidden
     Fernando Buitrago                    address@hidden
     Adrian Bunk                          address@hidden
     Rosa Calvi                           address@hidden
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 9097144..abb66d4 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1,6 +1,7 @@
 Alphabetically ordered list to acknowledge in the next release.
 
 Hamed Altafi
+Stefan Brüns
 Alexey Dokuchaev
 Raúl Infante Sainz
 Sebastián Luna Valero
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d71ccdf..b4405f0 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -148,13 +148,18 @@ gnuastro/config.h: Makefile $(internaldir)/config.h.in
 # Build Gnuastro's pkg-config file similar to `gnuastro/config.h'.
 gnuastro.pc: Makefile $(srcdir)/gnuastro.pc.in
        rm -f $@ $@.tmp
-       $(SED)                                      \
-       -e 's|@prefix[@]|$(prefix)|g'               \
-       -e 's|@exec_prefix[@]|$(exec_prefix)|g'     \
-       -e 's|@libdir[@]|$(libdir)|g'               \
-       -e 's|@includedir[@]|$(includedir)|g'       \
-       -e 's|@LIBS[@]|$(LIBS)|g'                   \
-       -e 's|@VERSION[@]|$(VERSION)|g'             \
-       '$(srcdir)/$@.in' >> $@.tmp
+       ol=""; \
+       if [ x"$(HAVE_LIBJPEG)" = xyes ]; then ol="$$ol libjpeg"; fi; \
+       if [ x"$(HAVE_LIBLZMA)" = xyes ]; then ol="$$ol liblzma"; fi; \
+       if [ x"$(HAVE_LIBGIT2)" = xyes ]; then ol="$$ol libgit2"; fi; \
+       if [ x"$(HAVE_LIBTIFF)" = xyes ]; then ol="$$ol libtiff-4"; fi; \
+       $(SED) -e's|@prefix[@]|$(prefix)|g' \
+              -e"s|@optional_libs[@]|$$ol|g" \
+              -e's|@exec_prefix[@]|$(exec_prefix)|g' \
+              -e's|@libdir[@]|$(libdir)|g' \
+              -e's|@includedir[@]|$(includedir)|g' \
+              -e's|@LIBS[@]|$(LIBS)|g' \
+              -e's|@VERSION[@]|$(VERSION)|g' \
+              '$(srcdir)/$@.in' >> $@.tmp
        chmod a-w $@.tmp
        mv $@.tmp $@
diff --git a/lib/gnuastro.pc.in b/lib/gnuastro.pc.in
index 3223d8f..73759b7 100644
--- a/lib/gnuastro.pc.in
+++ b/lib/gnuastro.pc.in
@@ -27,6 +27,6 @@ Name: Gnuastro
 Description: GNU Astronomy Utilities
 URL: https://www.gnu.org/software/gnuastro/
 Version: @VERSION@
-Requires.private: wcs cfitsio gsl
+Requires.private: wcslib cfitsio gsl @optional_libs@
 Cflags: -I${includedir}
 Libs: -L${libdir} -lgnuastro @LIBS@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]