Package: eccodes / 2.21.0-1

static-libs.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
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Build both static and dynamic libraries for Debian;
 Add SONAME support for the dynamic libraries
Last-Updated: 2016-04-27
Forwarded: no

Index: eccodes-2.19.0/fortran/CMakeLists.txt
===================================================================
--- eccodes-2.19.0.orig/fortran/CMakeLists.txt
+++ eccodes-2.19.0/fortran/CMakeLists.txt
@@ -47,6 +47,17 @@ if( HAVE_FORTRAN )
     ecbuild_add_library( TARGET          eccodes_f90
                          SOURCES         grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
                          GENERATED       grib_f90.f90 eccodes_f90.f90
+			 CFLAGS          ${CFLAGS}
+			 VERSION         0
+                         PUBLIC_INCLUDES $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
+                                         $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
+                         PRIVATE_LIBS    eccodes )
+    ecbuild_add_library( TARGET          eccodes_f90_static
+			 TYPE            STATIC
+                         SOURCES         grib_fortran.c grib_f90.f90 eccodes_f90.f90 grib_kinds.h
+                         GENERATED       grib_f90.f90 eccodes_f90.f90
+			 CFLAGS          ${CFLAGS}
+			 VERSION         0
                          PUBLIC_INCLUDES $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
                                          $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
                          PRIVATE_LIBS    eccodes )
Index: eccodes-2.19.0/src/CMakeLists.txt
===================================================================
--- eccodes-2.19.0.orig/src/CMakeLists.txt
+++ eccodes-2.19.0/src/CMakeLists.txt
@@ -436,6 +436,24 @@ endif()
 
 
 ecbuild_add_library( TARGET    eccodes
+  VERSION 0
+                     SOURCES   grib_api_version.c
+                              # griby.c gribl.c
+                              ${grib_api_srcs}
+                     GENERATED grib_api_version.c
+                     LIBS      ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES}
+                     TEMPLATES ${grib_api_extra_srcs}
+                     INSTALL_HEADERS_LIST
+                              grib_api.h
+                              eccodes.h
+                              eccodes_windef.h
+                              ${CMAKE_CURRENT_BINARY_DIR}/eccodes_version.h
+                              ${PROJECT_BINARY_DIR}/eccodes_config.h )
+
+
+			    ecbuild_add_library( TARGET    eccodes_static
+			      TYPE STATIC
+			      VERSION 0
                      SOURCES   grib_api_version.c
                               # griby.c gribl.c
                               ${grib_api_srcs}