From 8bfe06a0d3f7accb7b93ce5ddc3265616d9ad00f Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sep 06 2019 07:17:20 +0000 Subject: 3.3.7 --- diff --git a/.gitignore b/.gitignore index d852052..bcd25c6 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ /pango-no-gi-3.3.2.tar.gz /pango-3.3.6.gem /pango-no-gi-3.3.6.tar.gz +/pango-3.3.7.gem +/pango-no-gi-3.3.7.tar.gz diff --git a/pango-no-gi-3.2.7-backport-def.patch b/pango-no-gi-3.2.7-backport-def.patch deleted file mode 100644 index 1919809..0000000 --- a/pango-no-gi-3.2.7-backport-def.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- pango-no-gi-3.2.7/ext/pango/rbpango.h.orig 2018-06-20 14:55:00.753601838 +0900 -+++ pango-no-gi-3.2.7/ext/pango/rbpango.h 2018-06-21 17:10:31.197614447 +0900 -@@ -93,3 +93,5 @@ - - extern VALUE pango_get_attribute_klass(VALUE attr_type); - extern void pango_add_attribute(int attr_type, VALUE klass); -+ -+VALUE rbpango_attribute_to_ruby(PangoAttribute *attribute); ---- pango-no-gi-3.2.7/ext/pango/rbpangoattribute.c.orig 2018-06-20 14:55:00.756601871 +0900 -+++ pango-no-gi-3.2.7/ext/pango/rbpangoattribute.c 2018-06-21 17:10:37.147691468 +0900 -@@ -82,6 +82,39 @@ - return gattr; - } - -+static GType -+pango_attribute_get_type(void) -+{ -+ static GType our_type = 0; -+ if (our_type == 0) -+ our_type = g_boxed_type_register_static("PangoAttribute", -+ (GBoxedCopyFunc)pango_attribute_copy, -+ (GBoxedFreeFunc)pango_attribute_destroy); -+ return our_type; -+} -+ -+VALUE -+rbpango_attribute_to_ruby(PangoAttribute *attribute) -+{ -+ VALUE rb_attr_type; -+ ID id_to_class; -+ VALUE klass; -+ -+ rb_attr_type = GENUM2RVAL(attribute->klass->type, PANGO_TYPE_ATTR_TYPE); -+ CONST_ID(id_to_class, "to_class"); -+ klass = rb_funcall(rb_attr_type, id_to_class, 0); -+ return rbgobj_make_boxed_raw(pango_attribute_copy(attribute), -+ pango_attribute_get_type(), -+ klass, -+ 0); -+} -+ -+PangoAttribute * -+rbpango_attribute_from_ruby(VALUE rb_attribute) -+{ -+ return rbgobj_boxed_get(rb_attribute, pango_attribute_get_type()); -+} -+ - /***********************************************/ - static VALUE - rg_s_allocate(VALUE klass) diff --git a/pango-no-gi-3.3.7-backport-def.patch b/pango-no-gi-3.3.7-backport-def.patch new file mode 100644 index 0000000..3d36772 --- /dev/null +++ b/pango-no-gi-3.3.7-backport-def.patch @@ -0,0 +1,62 @@ +diff -urp pango-no-gi-3.3.7.orig/ext/pango/rbpango.h pango-no-gi-3.3.7.new/ext/pango/rbpango.h +--- pango-no-gi-3.3.7.orig/ext/pango/rbpango.h 2019-09-06 16:06:39.000000000 +0900 ++++ pango-no-gi-3.3.7.new/ext/pango/rbpango.h 2019-09-06 16:11:02.031086838 +0900 +@@ -93,3 +93,5 @@ extern GType pango_script_iter_get_type( + + extern VALUE pango_get_attribute_klass(VALUE attr_type); + extern void pango_add_attribute(int attr_type, VALUE klass); ++ ++VALUE rbpango_attribute_to_ruby(PangoAttribute *attribute); +diff -urp pango-no-gi-3.3.7.orig/ext/pango/rbpangoattribute.c pango-no-gi-3.3.7.new/ext/pango/rbpangoattribute.c +--- pango-no-gi-3.3.7.orig/ext/pango/rbpangoattribute.c 2019-09-06 16:06:39.000000000 +0900 ++++ pango-no-gi-3.3.7.new/ext/pango/rbpangoattribute.c 2019-09-06 16:13:15.953257590 +0900 +@@ -82,6 +82,49 @@ pango_get_attribute(VALUE attr) + return gattr; + } + ++#ifndef PANGO_CHECK_VERSION ++# define PANGO_CHECK_VERSION(major, minor, micro) \ ++ (PANGO_VERSION_MAJOR > (major) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR > (minor)) || \ ++ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR == (minor) && \ ++ PANGO_VERSION_MICRO >= (micro))) ++#endif ++ ++#if !PANGO_CHECK_VERSION(1, 44, 0) ++static GType ++pango_attribute_get_type(void) ++{ ++ static GType our_type = 0; ++ if (our_type == 0) ++ our_type = g_boxed_type_register_static("PangoAttribute", ++ (GBoxedCopyFunc)pango_attribute_copy, ++ (GBoxedFreeFunc)pango_attribute_destroy); ++ return our_type; ++} ++#endif ++ ++VALUE ++rbpango_attribute_to_ruby(PangoAttribute *attribute) ++{ ++ VALUE rb_attr_type; ++ ID id_to_class; ++ VALUE klass; ++ ++ rb_attr_type = GENUM2RVAL(attribute->klass->type, PANGO_TYPE_ATTR_TYPE); ++ CONST_ID(id_to_class, "to_class"); ++ klass = rb_funcall(rb_attr_type, id_to_class, 0); ++ return rbgobj_make_boxed_raw(pango_attribute_copy(attribute), ++ pango_attribute_get_type(), ++ klass, ++ 0); ++} ++ ++PangoAttribute * ++rbpango_attribute_from_ruby(VALUE rb_attribute) ++{ ++ return rbgobj_boxed_get(rb_attribute, pango_attribute_get_type()); ++} ++ + /***********************************************/ + static VALUE + rg_s_allocate(VALUE klass) diff --git a/rubygem-pango.spec b/rubygem-pango.spec index 88b17af..0b960c4 100644 --- a/rubygem-pango.spec +++ b/rubygem-pango.spec @@ -12,8 +12,8 @@ Summary: Ruby binding of pango-1.x Name: rubygem-%{gem_name} -Version: 3.3.6 -Release: 2%{?dist} +Version: 3.3.7 +Release: 1%{?dist} # from README License: LGPLv2 URL: http://ruby-gnome2.sourceforge.jp/ @@ -23,7 +23,7 @@ Source1: pango-no-gi-%{version}.tar.gz # Source1 is created from Source2 Source2: pango-create-no-gi-src.sh # Backport rbpango_attribute_{to,from}_ruby definition -Patch10: pango-no-gi-3.2.7-backport-def.patch +Patch10: pango-no-gi-3.3.7-backport-def.patch Requires: ruby(release) BuildRequires: ruby(release) @@ -100,7 +100,7 @@ gem unpack %{SOURCE0} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # Allow ruby-gnome2 no less than ones -sed -i -e 's|= 3\.3\.6|>= 3.3.6|' %{gem_name}.gemspec +sed -i -e 's|= 3\.3\.7|>= 3.3.7|' %{gem_name}.gemspec # Fix wrong shebang @@ -139,7 +139,7 @@ grep -rl '#!.*/usr/bin' sample | \ find sample/ -name \*.rb | xargs chmod 0644 gem spec ../%{gem_name}-%{version}.gem -l --ruby > %{gem_name}.gemspec -sed -i -e 's|= 3\.3\.6|>= 3.3.6|' %{gem_name}.gemspec +sed -i -e 's|= 3\.3\.7|>= 3.3.7|' %{gem_name}.gemspec export CONFIGURE_ARGS="--with-cflags='%{optflags}'" export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig" gem build %{gem_name}.gemspec @@ -278,6 +278,9 @@ ruby -Ilib:test:ext/%{gem_name} ./test/run-test.rb \ %changelog +* Fri Sep 6 2019 Mamoru TASAKA - 3.3.7-1 +- 3.3.7 + * Fri Jul 26 2019 Fedora Release Engineering - 3.3.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index a4ba9e2..c8c51a8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pango-3.3.6.gem) = 5e99bcd26cf10da2e577c1cb9936c44eaf21d187090f0aff186c368e6127f21792368b308eddfea8811200f6c26c21d47cae2f54a414efea800f5c83850c7218 -SHA512 (pango-no-gi-3.3.6.tar.gz) = e75b7c4b16ee8fc18c250b82d77b39800ce4983328d47ecbfb4e960b53671d76e19d6f8b98dabdff9f4fe92dc3ca1ca8594d4110a46c966926e706b7233093a2 +SHA512 (pango-3.3.7.gem) = ac07fb6efaba7ae72dedd9b4a5fb6eae404b463964ef73e71fb72c46c335e9633ded28b9165c57dadb4a656f6d43068c0658d0c4cd0a4651de9b7ec42f9c2501 +SHA512 (pango-no-gi-3.3.7.tar.gz) = 54f01313f25d9707dc7a8eaf41e643589e812748399f2607096650eb4bf07f86dfe3a6b408f35c1a2fee9b45828183edfa83bcc01de0573a93464185c514f8e8