removed some old classes no longer present in libzypp.
- Re-enabled building of python and perl bindings. (bnc #391831)
Group: Development/Sources
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake gcc-c++ python-devel ruby-devel swig
-BuildRequires: libzypp-devel >= 3.0.0
+BuildRequires: libzypp-devel >= 5.2.1
Source: %{name}-%{version}.tar.bz2
%description
-------------------------------------------------------------------
+Fri Jul 25 19:29:11 CEST 2008 - ma@suse.de
+
+- Removed almost all local copies of zypp header files. This also
+ removed some old classes no longer present in libzypp.
+- Re-enabled building of python and perl bindings. (bnc #391831)
+- revision 10666
+- version 0.4.6
+
+-------------------------------------------------------------------
Mon Jul 14 15:07:46 CEST 2008 - ma@suse.de
-- Remove obsolete references to Script/Message/Atom.
+- Remove obsolete references to Script/Message/Atom.
- Remove obsolete references to Dependencies.
-------------------------------------------------------------------
-------------------------------------------------------------------
Mon Mar 3 13:46:25 CET 2008 - schubi@suse.de
-- sat/repo moved to repository
+- sat/repo moved to repository
- Revision 8981
- version 0.4.5
-#if 1
%include <zypp/Capabilities.h>
-#else
-// I dont think this is correct: ctor and dtor are not taken into account
-class Capabilities
-{
-
-};
-
#ifdef SWIGRUBY
-iter3(Capabilities, Capability*);
+by_value_iterator(zypp::Capabilities);
#endif
// #endif
#ifdef SWIGPYTHON
-%extend Capabilities
+%extend zypp::Capabilities
{
- // just a test
- const Capability* haha()
- {
- Capabilities::iterator i = self->begin();
- const Capability* tmp = &*i;
- return tmp;
- }
+ // just a test
+ const Capability* haha()
+ {
+ Capabilities::const_iterator i = self->begin();
+ const Capability* tmp = &*i;
+ return tmp;
+ }
}
#endif
#ifdef SWIGPERL5
-iter2(Capabilities, Capability);
+forwarditer(zypp::Capabilities, zypp::Capability);
#endif
-#endif
\ No newline at end of file
// Ignore member functions shadowed by static versions
+// ma@: maybe one should ignore the statics and keep the members?
%ignore zypp::Edition::match(Edition const &) const;
%ignore zypp::Edition::match(IdString const &) const;
%ignore zypp::Edition::match(std::string const &) const;
// %rename Edition::match(const Edition& lhs, const Edition& rhs) match2;
//}
-%ignore zypp::Edition::compare(const Edition &, const Edition &);
+//%ignore zypp::Edition::compare(const Edition &, const Edition &);
%template(IdStringEdition) zypp::IdStringType<zypp::Edition>;
%include <zypp/Edition.h>
-
+%include <zypp/IdString.h>
%include <zypp/IdStringType.h>
%ignore zypp::KeyRingSignals;
%include <zypp/KeyRing.h>
-nakespcae zypp
+
+namespace zypp
{
-typedef intrusive_ptr<KeyRing> KeyRing_Ptr;
-%template(KeyRing_Ptr) intrusive_ptr<KeyRing>;
+ typedef intrusive_ptr<KeyRing> KeyRing_Ptr;
+ %template(KeyRing_Ptr) intrusive_ptr<KeyRing>;
}
%template(List_PublicKey) std::list<zypp::PublicKey>;
%define iter2(cls, storetype)
%extend cls {
cls::const_iterator iterator_incr(cls::const_iterator *it){
- (*it)++;
+ ++(*it);
return *it;
}
cls::const_iterator iterator_decr(cls::const_iterator *it){
- (*it)--;
+ --(*it);
+ return *it;
+ }
+ bool iterator_equal(cls::const_iterator it1, cls::const_iterator it2) {
+ return (it1 == it2);
+ }
+ storetype iterator_value(cls::const_iterator it) {
+ return (*it);
+ }
+ cls::const_iterator cBegin() {
+ return self->begin();
+ }
+ cls::const_iterator cEnd() {
+ return self->end();
+ }
+};
+%enddef
+
+// no operator--
+%define forwarditer(cls, storetype)
+%extend cls {
+ cls::const_iterator iterator_incr(cls::const_iterator *it){
+ ++(*it);
return *it;
}
bool iterator_equal(cls::const_iterator it1, cls::const_iterator it2) {
%ignore operator!=;
%ignore operator<<;
}
-}
+}
/*
* Extend cls with an ruby-like each iterator and a to_a method. Yields
} \
}
+/*
+ * This is for an iterator whichs operator* returns by value (i.e. a temporary).
+ * Like e.g. the Capabilities::const_iterator does. If the compiler warns you are
+ * taking the address of a temporary when using iter3, you most probaly need this one.
+ *
+ */
+#define by_value_iterator(cls) \
+%mixin cls "Enumerable"; \
+%extend cls \
+{ \
+ void each() { \
+ cls::const_iterator i = self->begin(); \
+ while (i != self->end()) { \
+ const cls::value_type* tmp = new cls::value_type( *i ); \
+ rb_yield(SWIG_NewPointerObj((void*) tmp, $descriptor(cls::value_type*), 1)); \
+ i++; \
+ } \
+ } \
+\
+ VALUE to_a() { \
+ VALUE ary = rb_ary_new(); \
+ cls::const_iterator i = self->begin(); \
+ while (i != self->end()) { \
+ const cls::value_type* tmp = new cls::value_type( *i ); \
+ rb_ary_push(ary, SWIG_NewPointerObj((void*) tmp, $descriptor(cls::value_type*), 1)); \
+ i++; \
+ } \
+ return ary; \
+ } \
+}
%exception
{