[netcdf] 05/15: Try version-script via cmake

Alastair McKinstry mckinstry at moszumanska.debian.org
Mon Jun 9 05:59:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch dev-coinstallable
in repository netcdf.

commit 65e81c1660c3176fa57fecce85120552ef2de186
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Fri Jun 6 04:33:58 2014 +0100

    Try version-script via cmake
---
 debian/patches/version-script.patch | 16 ++++++++++++++++
 debian/rules                        |  5 ++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/debian/patches/version-script.patch b/debian/patches/version-script.patch
index 11bad06..678214c 100644
--- a/debian/patches/version-script.patch
+++ b/debian/patches/version-script.patch
@@ -11,3 +11,19 @@ Index: netcdf-4.3.2/liblib/Makefile.am
  libnetcdf_la_CPPFLAGS = ${AM_CPPFLAGS}
  libnetcdf_la_LIBADD = 
  CLEANFILES = 
+Index: netcdf-4.3.2/liblib/CMakeLists.txt
+===================================================================
+--- netcdf-4.3.2.orig/liblib/CMakeLists.txt
++++ netcdf-4.3.2/liblib/CMakeLists.txt
+@@ -84,7 +84,10 @@ ENDIF()
+ 
+ IF(NOT MSVC)
+   IF(BUILD_SHARED_LIBS)
+-    SET_TARGET_PROPERTIES(netcdf PROPERTIES LINK_FLAGS -shared)
++    IF (NOT LIBLIB_VERSION_SCRIPT)
++       SET(LIBLIB_VERSION_SCRIPT "")
++    ENDIF()
++    SET_TARGET_PROPERTIES(netcdf PROPERTIES LINK_FLAGS -shared LIBLIB_VERSION_SCRIPT)
+   ENDIF()
+ ENDIF()
+ 
diff --git a/debian/rules b/debian/rules
index 0b5f870..1a62b01 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,7 @@ MPI:=${ARCH_DEFAULT_MPI_IMPL}
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 LIB:=/usr/lib/${DEB_HOST_MULTIARCH}
+TOP:=$(shell pwd)
 
 override_dh_auto_configure:
 	dh_auto_configure --builddirectory=build-serial -- \
@@ -22,7 +23,8 @@ override_dh_auto_configure:
 	-DHDF5_C_INCLUDE_DIR="/usr/include/serial/hdf5" \
 	-DHDF5_HL_INCLUDE_DIR="/usr/include/serial/hdf5" \
 	-DHDF5_hdf5_hl_LIBRARY_RELEASE=${LIB}/libhdf5_serial_hl.so \
-	-DHDF5_hdf5_LIBRARY_RELEASE=${LIB}/libhdf5_serial.so
+	-DHDF5_hdf5_LIBRARY_RELEASE=${LIB}/libhdf5_serial.so \
+	-DLIBLIB_VERSION_SCRIPT="-Wl,--version-script,${TOP}/debian/netcdf-serial.ver"
 	dh_auto_configure --builddirectory=build-mpi --  \
 	-DCMAKE_SKIP_RPATH:BOOL=ON \
 	-DENABLE_DAP_REMOTE_TESTS:BOOL=OFF \
@@ -34,6 +36,7 @@ override_dh_auto_configure:
         -DHDF5_HL_INCLUDE_DIR="/usr/include/${MPI}/hdf5" \
 	-DHDF5_hdf5_hl_LIBRARY_RELEASE=${LIB}/libhdf5_${MPI}_hl.so \
 	-DHDF5_hdf5_LIBRARY_RELEASE=${LIB}/libhdf5_${MPI}.so \
+	-DLIBLIB_VERSION_SCRIPT="-Wl,--version-script,${TOP}/debian/netcdf-mpi.ver" \
 	-DCMAKE_C_COMPILER=mpicc 
 
 override_dh_auto_build:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf.git



More information about the Pkg-grass-devel mailing list