Package: eccodes / 2.12.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
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.9.0/fortran/CMakeLists.txt
===================================================================
--- eccodes-2.9.0.orig/fortran/CMakeLists.txt
+++ eccodes-2.9.0/fortran/CMakeLists.txt
@@ -43,6 +43,15 @@ 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
+                         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
                          LIBS       eccodes )
     add_custom_command( TARGET     eccodes_f90 POST_BUILD
                         COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include
Index: eccodes-2.9.0/src/CMakeLists.txt
===================================================================
--- eccodes-2.9.0.orig/src/CMakeLists.txt
+++ eccodes-2.9.0/src/CMakeLists.txt
@@ -433,7 +433,19 @@ ecbuild_add_library(TARGET    eccodes
                     SOURCES   grib_api_version.c
                               # griby.c gribl.c
                              ${grib_api_srcs}
-                    GENERATED grib_api_version.c
+		    GENERATED grib_api_version.c
+	 	    VERSION   0
+		    CFLAGS    ${CFLAGS}
+                    LIBS      ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES}
+                    TEMPLATES ${grib_api_extra_srcs})
+
+ecbuild_add_library(TARGET    eccodes_static
+		    TYPE       STATIC
+                    SOURCES   grib_api_version.c
+                              # griby.c gribl.c
+                             ${grib_api_srcs}
+		    GENERATED grib_api_version.c
+		    CFLAGS    ${CFLAGS}
                     LIBS      ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMATH_LIBRARIES}
                     TEMPLATES ${grib_api_extra_srcs})