[packages/libsolv] ruby paths fix from fedora package

glen glen at pld-linux.org
Sun Aug 3 19:32:01 CEST 2014


commit 951d8ff0827035417e0802fab8f598c94f850998
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Aug 3 20:31:44 2014 +0300

    ruby paths fix from fedora package

 libsolv.spec |  4 +++-
 ruby.patch   | 30 ++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/libsolv.spec b/libsolv.spec
index 7ed41b3..c3b2d3d 100644
--- a/libsolv.spec
+++ b/libsolv.spec
@@ -10,12 +10,13 @@ Summary:	Package dependency solver
 Summary(pl.UTF-8):	Biblioteka do rozwiązywania zależności pakietów
 Name:		libsolv
 Version:	0.6.1
-Release:	1
+Release:	2
 License:	BSD
 Group:		Libraries
 # git clone https://github.com/openSUSE/libsolv.git
 Source0:	http://pkgs.fedoraproject.org/repo/pkgs/libsolv/%{name}-%{gitrev}.tar.xz/79166e5d759b1c879bca4d167c02fc62/libsolv-%{gitrev}.tar.xz
 # Source0-md5:	79166e5d759b1c879bca4d167c02fc62
+Patch0:		ruby.patch
 URL:		https://github.com/openSUSE/libsolv
 BuildRequires:	bzip2-devel
 BuildRequires:	cmake >= 2.4
@@ -155,6 +156,7 @@ Wiązania języka Ruby do bibliotek libsolv.
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1
 
 %build
 install -d build %{?with_python3:build-py3}
diff --git a/ruby.patch b/ruby.patch
new file mode 100644
index 0000000..13a0b36
--- /dev/null
+++ b/ruby.patch
@@ -0,0 +1,30 @@
+diff -up libsolv/bindings/ruby/CMakeLists.txt.rubyinclude libsolv/bindings/ruby/CMakeLists.txt
+--- libsolv/bindings/ruby/CMakeLists.txt.rubyinclude	2012-06-07 10:06:19.372687533 +0200
++++ libsolv/bindings/ruby/CMakeLists.txt	2012-06-07 10:09:57.313968719 +0200
+@@ -6,8 +6,17 @@ ELSE (USE_VENDORDIRS AND RUBY_VENDORARCH
+     SET (RUBY_INSTALL_DIR ${RUBY_SITEARCH_DIR})
+ ENDIF (USE_VENDORDIRS AND RUBY_VENDORARCH_DIR)
+ 
++EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['arch']"
++   OUTPUT_VARIABLE RUBY_ARCH)
++
++EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"
++   OUTPUT_VARIABLE RUBY_HDR_DIR)
++
++SET(RUBY_INCLUDE_DIRS ${RUBY_HDR_DIR} ${RUBY_HDR_DIR}/${RUBY_ARCH})
++
+ MESSAGE (STATUS "Ruby executable: ${RUBY_EXECUTABLE}")
+ MESSAGE (STATUS "Ruby installation dir: ${RUBY_INSTALL_DIR}")
++MESSAGE (STATUS "Ruby include dir: ${RUBY_INCLUDE_DIRS}")
+ 
+ ADD_CUSTOM_COMMAND (
+     OUTPUT solv_ruby.c
+@@ -17,7 +26,7 @@ ADD_CUSTOM_COMMAND (
+ )
+ 
+ ADD_DEFINITIONS(-Wno-unused)
+-INCLUDE_DIRECTORIES (${RUBY_INCLUDE_PATH})
++INCLUDE_DIRECTORIES (${RUBY_INCLUDE_DIRS})
+ 
+ ADD_LIBRARY (bindings_ruby SHARED solv_ruby.c)
+ SET_TARGET_PROPERTIES (bindings_ruby PROPERTIES PREFIX "" OUTPUT_NAME "solv")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsolv.git/commitdiff/951d8ff0827035417e0802fab8f598c94f850998



More information about the pld-cvs-commit mailing list