r37203 - in /packages/fenics/dolfin/trunk/debian: changelog patches/cmake-pkgconfig-gen.patch patches/series

johannr-guest at users.alioth.debian.org johannr-guest at users.alioth.debian.org
Tue Jan 11 17:17:46 UTC 2011


Author: johannr-guest
Date: Tue Jan 11 17:17:42 2011
New Revision: 37203

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=37203
Log:
Add patch to fix pkg-config file dolfin.pc.

Added:
    packages/fenics/dolfin/trunk/debian/patches/cmake-pkgconfig-gen.patch
Modified:
    packages/fenics/dolfin/trunk/debian/changelog
    packages/fenics/dolfin/trunk/debian/patches/series

Modified: packages/fenics/dolfin/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/fenics/dolfin/trunk/debian/changelog?rev=37203&op=diff
==============================================================================
--- packages/fenics/dolfin/trunk/debian/changelog (original)
+++ packages/fenics/dolfin/trunk/debian/changelog Tue Jan 11 17:17:42 2011
@@ -1,7 +1,8 @@
-dolfin (0.9.9-4) UNRELEASED; urgency=low
+dolfin (0.9.9-4) unstable; urgency=low
 
   * Update Homepage field in debian/control and Maintainer field in
     debian/copyright.
+  * Add patch for generating correct pkg-config file dolfin.pc.
 
  -- Johannes Ring <johannr at simula.no>  Tue, 11 Jan 2011 12:36:55 +0100
 

Added: packages/fenics/dolfin/trunk/debian/patches/cmake-pkgconfig-gen.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/fenics/dolfin/trunk/debian/patches/cmake-pkgconfig-gen.patch?rev=37203&op=file
==============================================================================
--- packages/fenics/dolfin/trunk/debian/patches/cmake-pkgconfig-gen.patch (added)
+++ packages/fenics/dolfin/trunk/debian/patches/cmake-pkgconfig-gen.patch Tue Jan 11 17:17:42 2011
@@ -1,0 +1,70 @@
+--- dolfin-0.9.9/dolfin/CMakeLists.txt	2010-09-02 02:49:57.000000000 +0200
++++ dolfin-dev/dolfin/CMakeLists.txt	2010-09-15 11:52:15.000000000 +0200
+@@ -260,36 +260,50 @@
+ # Define packages that should be required by pkg-config file
+ set(PKG_REQUIRES "ufc-1 libxml-2.0")
+ 
+-get_directory_property(cmake_inc INCLUDE_DIRECTORIES)
+-foreach(_inc_dir ${cmake_inc})
+-  set(PKG_CXXFLAGS "-I${_inc_dir} ${PKG_CXXFLAGS}")
++# Convert include dirs to -I<incdir> form
++foreach(_inc_dir ${DOLFIN_INCLUDE_DIRECTORIES})
++  set(PKG_INCLUDES "-I${_inc_dir} ${PKG_INCLUDES}")
+ endforeach()
+-string(REGEX REPLACE ";" " " PKG_DEFINITIONS ${PKG_CXXFLAGS})
+ 
+-# Add CXX COMPILER flags
+-set(PKG_CXXFLAGS ${CMAKE_CXX_FLAGS} ${PKG_CXXFLAGS})
+-string(REGEX REPLACE ";" " " PKG_CXXFLAGS ${PKG_CXXFLAGS})
+-
+-# Convert compiler defintions into a list for pkg-config
+-# Append definitions to PKG_CXXFLAGS
+-string(REGEX REPLACE ";" " " PKG_DEFINITIONS ${DOLFIN_CXX_DEFINITIONS})
+-set(PKG_CXXFLAGS ${PKG_DEFINITIONS} ${PKG_CXXFLAGS})
++# Convert compiler flags and definitions into space separated strings
++string(REPLACE ";" " " PKG_CXXFLAGS "${CMAKE_CXX_FLAGS}")
++string(REPLACE ";" " " PKG_DEFINITIONS "${DOLFIN_CXX_DEFINITIONS}")
++
++# Convert libraries to -L<libdir> -l<lib> form
++foreach(_lib ${DOLFIN_TARGET_LINK_LIBRARIES})
++  string(REGEX REPLACE "(/[^ ]*)/lib([^ ]*)\\.(a|so|dylib|dll)" "-L\\1 -l\\2"
++    _linkflags
++    "${_lib}"
++    )
++
++  # Only add libraries that matches the form -L<libdir> -l<lib>
++  if ("${_linkflags}" MATCHES "-L.+ -l.+")
++    set(PKG_LINKFLAGS "${_linkflags} ${PKG_LINKFLAGS}")
++  endif()
++endforeach()
++
++# Remove duplicated link flags
++separate_arguments(PKG_LINKFLAGS)
++list(REMOVE_DUPLICATES PKG_LINKFLAGS)
++string(REPLACE ";" " " PKG_LINKFLAGS "${PKG_LINKFLAGS}")
+ 
+-# Add definitions to PKG_CXXFLAGS
+-set(PKG_CXXFLAGS ${PKG_DEFINITIONS} ${PKG_CXXFLAGS})
++# Add additional link flags
++set(PKG_LINK_FLAGS "${PKG_LINKFLAGS} ${DOLFIN_LINK_FLAGS}")
+ 
+ # Configure and install pkg-config file
+ configure_file(${DOLFIN_CMAKE_DIR}/templates/dolfin.pc.in ${CMAKE_BINARY_DIR}/dolfin.pc @ONLY)
+ install(FILES ${CMAKE_BINARY_DIR}/dolfin.pc
+-  DESTINATION ${CMAKE_INSTALL_PREFIX}/${DOLFIN_PKGCONFIG_DIR}
++  DESTINATION ${DOLFIN_PKGCONFIG_DIR}
+   COMPONENT Development
+   )
+ 
+ #------------------------------------------------------------------------------
+ # Generate CMake config file (dolfin-config.cmake)
+ 
+-# Get library location
+-get_target_property(DOLFIN_LIBRARY dolfin LOCATION)
++# Set library location
++get_target_property(DOLFIN_LIBRARY_LOCATION dolfin LOCATION)
++get_filename_component(DOLFIN_LIBRARY_FILENAME ${DOLFIN_LIBRARY_LOCATION} NAME)
++set(DOLFIN_LIBRARY "${CMAKE_INSTALL_PREFIX}/${DOLFIN_LIB_DIR}/${DOLFIN_LIBRARY_FILENAME}")
+ 
+ configure_file(${DOLFIN_CMAKE_DIR}/templates/dolfin-config.cmake.in ${CMAKE_BINARY_DIR}/dolfin/dolfin-config.cmake @ONLY)
+ install(FILES ${CMAKE_BINARY_DIR}/dolfin/dolfin-config.cmake

Modified: packages/fenics/dolfin/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/fenics/dolfin/trunk/debian/patches/series?rev=37203&op=diff
==============================================================================
--- packages/fenics/dolfin/trunk/debian/patches/series (original)
+++ packages/fenics/dolfin/trunk/debian/patches/series Tue Jan 11 17:17:42 2011
@@ -1,4 +1,5 @@
 cmake_find_petsc_slepc.patch
 cmake_find_trilinos.patch
 install.patch
-library_location.patch
+#library_location.patch
+cmake-pkgconfig-gen.patch




More information about the debian-science-commits mailing list