Rebase to the latest upstream.

Fix epoch versioning.
This commit is contained in:
Ales Kozumplik 2012-06-07 08:50:19 +02:00
parent a22d1f674b
commit 0abb4bd93a
6 changed files with 19 additions and 47 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/libsolv-80afaf7.tar.xz
/libsolv-af1465a2.tar.xz
/libsolv-8cf7650.tar.xz
/libsolv-d39a42b.tar.xz

View File

@ -1,15 +0,0 @@
diff -up libsolv/bindings/solv.i.newruby libsolv/bindings/solv.i
--- libsolv/bindings/solv.i.newruby 2012-02-07 20:15:17.909237059 +0100
+++ libsolv/bindings/solv.i 2012-02-07 20:15:53.612790703 +0100
@@ -143,9 +143,9 @@
int size, i;
VALUE *o;
queue_init(&$1);
- size = RARRAY($input)->len;
+ size = RARRAY_LEN($input);
i = 0;
- o = RARRAY($input)->ptr;
+ o = RARRAY_PTR($input);
for (i = 0; i < size; i++, o++) {
int v;
int e = SWIG_AsVal_int(*o, &v);

View File

@ -1,15 +0,0 @@
diff -up libsolv/bindings/ruby/CMakeLists.txt.ruby-usevendordirs libsolv/bindings/ruby/CMakeLists.txt
--- libsolv/bindings/ruby/CMakeLists.txt.ruby-usevendordirs 2012-05-18 12:54:34.483906092 +0200
+++ libsolv/bindings/ruby/CMakeLists.txt 2012-05-18 12:55:11.108000512 +0200
@@ -1,10 +1,6 @@
FIND_PACKAGE (Ruby)
-IF (USE_VENDORDIRS)
- SET (RUBY_INSTALL_DIR ${RUBY_VENDORARCH_DIR})
-ELSE (USE_VENDORDIRS)
- SET (RUBY_INSTALL_DIR ${RUBY_SITEARCH_DIR})
-ENDIF (USE_VENDORDIRS)
+SET (RUBY_INSTALL_DIR ${RUBY_SITEARCH_DIR})
EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['arch']"
OUTPUT_VARIABLE RUBY_ARCH)

View File

@ -1,9 +1,9 @@
diff -up libsolv/bindings/ruby/CMakeLists.txt.rubyinclude libsolv/bindings/ruby/CMakeLists.txt
--- libsolv/bindings/ruby/CMakeLists.txt.rubyinclude 2012-02-07 18:49:31.075581334 +0100
+++ libsolv/bindings/ruby/CMakeLists.txt 2012-02-07 19:55:59.627717571 +0100
@@ -6,8 +6,17 @@ ELSE (USE_VENDORDIRS)
--- 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)
ENDIF (USE_VENDORDIRS AND RUBY_VENDORARCH_DIR)
+EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['arch']"
+ OUTPUT_VARIABLE RUBY_ARCH)

View File

@ -1,21 +1,19 @@
%global gitrev 8cf7650
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
%global gitrev d39a42b
%{!?ruby_vendorarch: %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')}
%filter_provides_in %{perl_vendorarch}/.*\.so$
%filter_provides_in %{python_sitearch}/.*\.so$
%filter_provides_in %{ruby_sitearch}/.*\.so$
%filter_provides_in %{ruby_vendorarch}/.*\.so$
%filter_setup
Name: libsolv
Version: 0.0.0
Release: 9.git%{gitrev}%{?dist}
Release: 11.git%{gitrev}%{?dist}
License: BSD
Url: https://github.com/openSUSE/libsolv
# git clone https://github.com/openSUSE/libsolv.git
# git archive %{gitrev} --prefix=libsolv/ | xz > libsolv-%{gitrev}.tar.xz
Source: libsolv-%{gitrev}.tar.xz
Patch0: libsolv-rubyinclude.patch
Patch1: libsolv-newruby.patch
Patch2: libsolv-ruby-usevendordirs.patch
Group: Development/Libraries
Summary: Package dependency solver
BuildRequires: cmake libdb-devel expat-devel rpm-devel zlib-devel
@ -33,8 +31,8 @@ library is based on two major, but independent, blocks:
%package devel
Summary: A new approach to package dependency solving
Group: Development/Libraries
Requires: libsolv-tools%{?_isa} = %{epoch}:%{version}-%{release}
Requires: libsolv%{?_isa} = %{epoch}:%{version}-%{release}
Requires: libsolv-tools%{?_isa} = %{version}-%{release}
Requires: libsolv%{?_isa} = %{version}-%{release}
Requires: rpm-devel%{?_isa}
Requires: cmake
@ -45,7 +43,7 @@ Development files for libsolv,
Summary: A new approach to package dependency solving
Group: Development/Libraries
Requires: gzip bzip2 coreutils
Requires: libsolv%{?_isa} = %{epoch}:%{version}-%{release}
Requires: libsolv%{?_isa} = %{version}-%{release}
%description tools
Package dependency solver tools.
@ -84,8 +82,6 @@ Perl bindings for sat solver.
%prep
%setup -q -n libsolv
%patch0 -p1 -b .rubyinclude
%patch1 -p1 -b .newruby
%patch2 -p1 -b .ruby-usevendordirs
%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -138,13 +134,18 @@ rm $RPM_BUILD_ROOT/usr/bin/testsolv
%files -n ruby-solv
%doc examples/rbsolv
%{ruby_sitearch}/*
%{ruby_vendorarch}/*
%files -n python-solv
%doc examples/pysolv
%{python_sitearch}/*
%changelog
* Thu Jun 7 2012 Aleš Kozumplik <akozumpl@redhat.com> - 0.0.0-11.gitd39a42b%{?dist}
- Rebase to upstream d39a42b.
- Fix the epochs.
- Move the ruby modules into vendorarch dir, where they are expected.
* Thu May 17 2012 Aleš Kozumplik <akozumpl@redhat.com> - 0.0.0-9.git8cf7650%{?dist}
- Rebase to upstream 8cf7650.
- ruby bindings: fix USE_VENDORDIRS for Fedora.

View File

@ -1 +1 @@
b788357ff68eaddd004e3e48bbd359f5 libsolv-8cf7650.tar.xz
36208a65be0fb2f479c8818fdcffdd1e libsolv-d39a42b.tar.xz