Dear PLplot developers,

We are currently applying the patch attached below when building the Debian package for PLplot. It allows the creation of a static version of libplplotada, what is recommended to meet the Ada standards in Debian.

This solution is not ideal, because the new target libplplotada_static.a is created and later, in debian/rules, the following is needed in target execute_after_dh_auto_install (see [1]):

       mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libplplotada_static.a \
          debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libplplotada.a

My knowledge of CMake is too scarce and I could not figure out how to avoid the renaming above.

According to Nicolas Boulenguez, this change could be accompanied by a new configuration option :

    shared_library  *yes/no
    static_library  yes/*no

This schema could allow one to add a static-pic in the future.

Best,

Rafael Laboissière

 [1] 
https://salsa.debian.org/science-team/plplot/-/commit/82895090f80180bd1d085e03fb09056e31138e92
Description: Compile a static library for the Ada binding
 This is needed for dh_ada_library. This is a Debian-specific change.
Author: Rafael Laboissière <raf...@debian.org>
Forwarded: not-needed
Last-Update: 2022-11-29

--- plplot-5.15.0+dfsg.orig/bindings/ada/CMakeLists.txt
+++ plplot-5.15.0+dfsg/bindings/ada/CMakeLists.txt
@@ -88,6 +88,9 @@ if(ENABLE_ada)
   # target_link_libraries used in special way below so avoid using it inside configure_library_build.
   configure_library_build(plplotada "" "${plplotada_BODY_SRCS}" "" "${LIB_INSTALL_RPATH}")
 
+  # Also build the static library
+  configure_library_build(plplotada_static STATIC "${plplotada_BODY_SRCS}" "" "${LIB_INSTALL_RPATH}")
+
   # Work around an issue in our CMake Ada language
   # support for MinGW/Windows.  FIXME.  This issue should be fixed
   # at the Ada language support level and not worked around here.
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to