]> git.pld-linux.org Git - packages/libsolv.git/commitdiff
ruby paths fix from fedora package auto/th/libsolv-0.6.1-2
authorElan Ruusamäe <glen@delfi.ee>
Sun, 3 Aug 2014 17:31:44 +0000 (20:31 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 3 Aug 2014 17:31:44 +0000 (20:31 +0300)
libsolv.spec
ruby.patch [new file with mode: 0644]

index 7ed41b3d7458ae99ac810581ca060d7cfcaf93da..c3b2d3d9a9ae3dca4f121aa29a8035b78d38ccb1 100644 (file)
@@ -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 (file)
index 0000000..13a0b36
--- /dev/null
@@ -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")
This page took 0.188983 seconds and 4 git commands to generate.