%global header_dir %{ruby_vendorarchdir} %global gem_name gtk2 %global glibminver 3.1.3 %global pangominver %{glibminver} %global obsoleteevr 0.90.7-1.999 %undefine _changelog_trimtime Summary: Ruby binding of GTK+-2.x Name: rubygem-%{gem_name} Version: 3.4.3 Release: 12%{?dist} # from README License: LGPLv2 URL: http://ruby-gnome2.sourceforge.jp/ Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem # Assign non-zero unique ID to each string (especially for id_relative_callbacks), # especially for ruby 3.2 Patch0: rubygem-gtk2-3.4.3-assign-nonzero-ID-to-relative-callback.patch Requires: ruby(release) BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: rubygem-cairo-devel >= 1.2.5 BuildRequires: rubygem-glib2-devel >= %{glibminver} BuildRequires: rubygem-pango-devel >= %{pangominver} BuildRequires: ruby-devel BuildRequires: gtk2-devel BuildRequires: rubygem(atk) >= %{glibminver} BuildRequires: rubygem(gdk_pixbuf2) >= %{glibminver} BuildRequires: rubygem(test-unit) BuildRequires: rubygem(test-unit-notify) BuildRequires: rubygem-gobject-introspection-devel # %%check # Testsuite needs X BuildRequires: xorg-x11-server-Xvfb # Icon for face-cool BuildRequires: gnome-icon-theme BuildRequires: adwaita-icon-theme # gtkrc BuildRequires: adwaita-gtk2-theme # "actions/find" BuildRequires: gnome-icon-theme-legacy Requires: rubygems Provides: rubygem(%{gem_name}) = %{version} Obsoletes: ruby-%{gem_name} <= %{version}-%{release} Provides: ruby-%{gem_name} = %{version}-%{release} Provides: ruby(%{gem_name}) = %{version}-%{release} %description Ruby/GTK2 is a Ruby binding of GTK+-2.0.x. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %package -n ruby-%{gem_name} Summary: Non-Gem support package for %{gem_name} Requires: %{name} = %{version}-%{release} # Requires for corresponsing non-gem rpms Requires: ruby(atk) >= %{glibminver} Requires: ruby(gdk_pixbuf2) >= %{glibminver} Requires: ruby(glib2) >= %{glibminver} Requires: ruby(pango) >= %{glibminver} Provides: ruby(%{gem_name}) = %{version}-%{release} %description -n ruby-%{gem_name} This package provides non-Gem support for %{gem_name}. %package devel Summary: Ruby/GTK development environment Requires: %{name} = %{version}-%{release} Requires: ruby-devel Requires: gtk2-devel Requires: rubygem-glib2-devel # Obsoletes / Provides # ruby(%%{gem_name}-devel) Provides is for compatibility Obsoletes: ruby-%{gem_name}-devel < %{obsoleteevr} Provides: ruby-%{gem_name}-devel = %{version}-%{release} %description devel Header files and libraries for building a extension library for the rubygem-%{gem_name} %prep %setup -q -n %{gem_name}-%{version} mv ../%{gem_name}-%{version}.gemspec . # Allow ruby-gnome2 no less than ones # Will fix below later sed -i -e 's|= 3\.4\.3|>= 3.4.3|' %{gem_name}-%{version}.gemspec # Patches and etc %if 0%{?fedora} >= 38 %patch0 -p1 -b .nonzero_id %endif # Fix wrong dir grep -rl /usr/local/bin sample | \ xargs sed -i -e 's|/usr/local/|/usr/|' || true # Kill shebang grep -rl '#!.*/usr/bin' sample lib | \ xargs sed -i -e '\@#![ ]*/usr/bin@d' find sample/ -name \*.rb | xargs chmod 0644 # rb_cData is deprecated, removed in ruby32 grep -rl rb_cData . | xargs sed -i -e 's|rb_cData|rb_cObject|' %build gem build ./%{gem_name}-%{version}.gemspec export CONFIGURE_ARGS="--with-cflags='%{optflags}'" export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig" %gem_install %install # Once copy all mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ # move header files, C extension files to the correct directory mkdir -p %{buildroot}%{gem_extdir_mri} cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ pushd %{buildroot} mkdir -p .%{header_dir} mv .%{gem_extdir_mri}/*.h .%{header_dir}/ rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log} popd # move pkgconfig file mkdir %{buildroot}%{_libdir}/pkgconfig install -cpm 644 ./%{_libdir}/pkgconfig/*.pc \ %{buildroot}%{_libdir}/pkgconfig/ # Cleanups pushd %{buildroot} rm -rf .%{gem_instdir}/ext/ rm -f .%{gem_instdir}/extconf.rb popd %check pushd .%{gem_instdir} # kill unneeded make process rm -rf ./TMPBINDIR mkdir ./TMPBINDIR pushd ./TMPBINDIR ln -sf /bin/true make export PATH=$(pwd):$PATH popd # icon-theme is somewhat broken, skip for now mv test/test_gtk_icon_theme.rb{,.skip} sed -i test/run-test.rb \ -e '\@exit Test::Unit::AutoRunner@s|,[ \t]*File\.join(.*"test")||' # Adwaita themes broken on F-30?? Need investigating... xvfb-run \ ruby -Ilib:test:%{buildroot}%{gem_extdir_mri} ./test/run-test.rb \ || false # back mv test/test_gtk_icon_theme.rb{.skip,} %files %dir %{gem_instdir} %dir %{gem_instdir}/lib/ %dir %{gem_instdir}/lib/%{gem_name}/ %doc %{gem_instdir}/[A-Z]* %exclude %{gem_instdir}/Rakefile %{gem_instdir}/lib/%{gem_name}.rb %{gem_instdir}/lib/%{gem_name}/base.rb %{gem_extdir_mri}/ %exclude %{gem_cache} %exclude %{gem_instdir}/*gemspec %{gem_spec} %files devel %{_libdir}/pkgconfig/ruby-%{gem_name}.pc %{header_dir}/rbgdk.h %{header_dir}/rbgdkconversions.h %{header_dir}/rbgtk.h %{header_dir}/rbgtkconversions.h %{header_dir}/rbgtkmacros.h %files doc %{gem_dir}/doc/%{gem_name}-%{version} %exclude %{gem_instdir}/Rakefile %{gem_instdir}/sample/ %{gem_instdir}/test/ %changelog * Sun Dec 25 2022 Mamoru TASAKA - 3.4.3-12 - Use %%gem_extdir_mri instead of ext for %%check due to ruby3.2 change for ext cleanup during build * Tue Nov 8 2022 Mamoru TASAKA - 3.4.3-11 - Assign non-zero unique ID to each string, especially for ruby 3.2 * Tue Nov 1 2022 Mamoru TASAKA - 3.4.3-10 - Ignore test failure on ruby32 for now * Mon Oct 3 2022 Mamoru TASAKA - 3.4.3-9 - Fix compilation with ruby 3.2 * Sun Jul 24 2022 Mamoru TASAKA - 3.4.3-8 - Skip failing icon test for now * Sat Jul 23 2022 Fedora Release Engineering - 3.4.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jan 26 2022 Mamoru TASAKA - 3.4.3-6 - F-36: rebuild against ruby31 * Fri Jan 21 2022 Fedora Release Engineering - 3.4.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Jul 25 2021 Mamoru TASAKA - 3.4.3-4 - Rebuild for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jan 27 2021 Fedora Release Engineering - 3.4.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jan 06 2021 Mamoru TASAKA - 3.4.3-2 - F-34: rebuild against ruby 3.0 * Thu Aug 13 2020 Mamoru TASAKA - 3.4.3-1 - 3.4.3 * Thu Aug 13 2020 Mamoru TASAKA - 3.4.1-5 - Relax dependency * Wed Jul 29 2020 Fedora Release Engineering - 3.4.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jan 30 2020 Fedora Release Engineering - 3.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jan 17 2020 Mamoru TASAKA - 3.4.1-2 - F-32: rebuild against ruby27 * Thu Dec 5 2019 Mamoru TASAKA - 3.4.1-1 - 3.4.1 * Mon Oct 14 2019 Mamoru TASAKA - 3.4.0-1 - 3.4.0 * Sun Sep 8 2019 Mamoru TASAKA - 3.3.7-2 - Rebuild again * Sun Sep 8 2019 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 * Thu Apr 18 2019 Mamoru TASAKA - 3.3.6-1 - 3.3.6 * Mon Feb 18 2019 Mamoru TASAKA - 3.3.2-1 - 3.3.2 * Fri Feb 1 2019 Mamoru TASAKA - 3.3.1-1 - 3.3.1 * Mon Jan 21 2019 Mamoru TASAKA - 3.3.0-2 - F-30: rebuild against ruby26 * Fri Nov 16 2018 Mamoru TASAKA - 3.3.0-1 - 3.3.0 * Mon Aug 13 2018 Mamoru TASAKA - 3.2.9-1 - 3.2.9 * Sat Jul 14 2018 Fedora Release Engineering - 3.2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Jun 21 2018 Mamoru TASAKA - 3.2.7-1 - 3.2.7 * Thu May 3 2018 Mamoru TASAKA - 3.2.5-1 - 3.2.5 * Thu Apr 19 2018 Mamoru TASAKA - 3.2.4-1 - 3.2.4 * Wed Feb 14 2018 Mamoru TASAKA - 3.2.1-5 - gtk2: fix wrong number of arguments, which fixes build failure with gcc8 -O2 + ruby 2.5 * Fri Feb 09 2018 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Jan 20 2018 Björn Esser - 3.2.1-3 - Rebuilt for switch to libxcrypt * Thu Jan 04 2018 Mamoru TASAKA - 3.2.1-2 - F-28: rebuild for ruby25 * Wed Nov 29 2017 Mamoru TASAKA - 3.2.1-1 - 3.2.1 * Tue Nov 14 2017 Mamoru TASAKA - 3.2.0-1 - 3.2.0 * Sun Oct 22 2017 Mamoru TASAKA - 3.1.9-1 - 3.1.9 * Thu Aug 03 2017 Fedora Release Engineering - 3.1.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 3.1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jul 17 2017 Mamoru TASAKA - 3.1.8-1 - 3.1.8 * Fri Jul 14 2017 Mamoru TASAKA - 3.1.7-1 - 3.1.7 * Wed Jun 7 2017 Mamoru TASAKA - 3.1.6-1 - 3.1.6 * Thu May 4 2017 Mamoru TASAKA - 3.1.3-1 - 3.1.3 * Sat Feb 11 2017 Fedora Release Engineering - 3.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jan 31 2017 Mamoru TASAKA - 3.1.1-1 - 3.1.1 * Wed Jan 11 2017 Mamoru TASAKA - 3.1.0-2 - F-26: rebuild for ruby24 * Tue Nov 29 2016 Mamoru TASAKA - 3.1.0-1 - 3.1.0 * Tue Sep 13 2016 Mamoru TASAKA - 3.0.9-2 - Fix misterious Obsoletes * Mon Aug 15 2016 Mamoru TASAKA - 3.0.9-1 - 3.0.9 * Tue Apr 19 2016 Mamoru TASAKA - 3.0.8-1 - 3.0.8 * Thu Feb 04 2016 Fedora Release Engineering - 3.0.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Jan 11 2016 Mamoru TASAKA - 3.0.7-2 - F-24: rebuild against ruby23 * Sun Oct 11 2015 Mamoru TASAKA - 3.0.7-1 - 3.0.7 * Wed Sep 23 2015 Mamoru TASAKA - 3.0.5-1 - 3.0.5 * Tue Sep 22 2015 Mamoru TASAKA - 3.0.4-1 - 3.0.4 * Sun Sep 20 2015 Mamoru TASAKA - 3.0.3-1 - 3.0.3 * Thu Jun 18 2015 Fedora Release Engineering - 2.2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Apr 29 2015 Mamoru TASAKA - 2.2.5-1 - 2.2.5 * Fri Jan 16 2015 Mamoru TASAKA - 2.2.4-2 - F-22: Rebuild for ruby 2.2 * Sun Dec 28 2014 Mamoru TASAKA - 2.2.4-1 - 2.2.4 * Wed Nov 5 2014 Mamoru TASAKA - 2.2.3-1 - 2.2.3 * Sun Oct 12 2014 Mamoru TASAKA - 2.2.0-5 - Fix test_type_integer(TestSelectionData) test failure on bigendian + 64bit (ppc64, s390x) (bug 1149702) * Mon Aug 18 2014 Fedora Release Engineering - 2.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 2.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Apr 17 2014 Mamoru TASAKA - 2.2.0-2 - F-21: rebuild for ruby 2.1 / rubygems 2.2 * Mon Apr 14 2014 Mamoru TASAKA - 2.2.0-1 - 2.2.0 * Tue Feb 11 2014 Mamoru TASAKA - 2.1.0-2 - Apply upstream patch to make GdkEventButton inherit GdkEventAny * Thu Jan 16 2014 Mamoru TASAKA - 2.1.0-1 - 2.1.0 * Fri Aug 16 2013 Mamoru TASAKA - 2.0.2-1 - 2.0.2 * Sun Aug 04 2013 Fedora Release Engineering - 1.2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Apr 17 2013 Mamoru TASAKA - 1.2.6-1 - 1.2.6 * Thu Apr 4 2013 Mamoru TASAKA - 1.2.5-1 - 1.2.5 * Tue Mar 26 2013 Mamoru TASAKA - 1.2.4-1 - 1.2.4 * Wed Mar 20 2013 Mamoru TASAKA - 1.2.3-1 - 1.2.3 * Sun Mar 3 2013 Mamoru TASAKA - 1.2.1-2 - F-19: Rebuild for ruby 2.0.0 * Mon Feb 4 2013 Mamoru TASAKA - 1.2.1-1 - 1.2.1 * Wed Jan 30 2013 Mamoru TASAKA - 1.2.0-1 - 1.2.0 * Mon Dec 31 2012 Mamoru TASAKA - 1.1.9-1 - 1.1.9 * Thu Dec 6 2012 Mamoru Tasaka - 1.1.6-1 - 1.1.6 * Wed Sep 5 2012 Mamoru Tasaka - 1.1.5-1 - 1.1.5 * Mon Aug 13 2012 Mamoru Tasaka - 1.1.4-1 - 1.1.4 * Sat Jul 21 2012 Fedora Release Engineering - 1.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Apr 16 2012 Mamoru Tasaka - 1.1.3-1 - 1.1.3 * Tue Apr 03 2012 Bohuslav Kabrda - 1.1.2-4 - Fix conditionals for F17 to work for RHEL 7 as well. * Wed Feb 1 2012 Mamoru Tasaka - 1.1.2-3 - Add proper Obsoletes/Provides * Tue Jan 31 2012 Mamoru Tasaka - 1.1.2-2 - 1.1.2 * Sun Jan 15 2012 Mamoru Tasaka - 1.1.1-1 - 1.1.1 * Sat Jan 14 2012 Fedora Release Engineering - 1.0.3-3 - F-17: Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Sep 19 2011 Mamoru Tasaka - 1.0.3-2 - 1.0.3 * Fri Jul 15 2011 Mamoru Tasaka - 1.0.0-1 - 1.0.0 * Sun Jun 12 2011 Mamoru Tasaka - 0.90.9-1 - 0.90.9 * Sat Mar 5 2011 Mamoru Tasaka - 0.90.8-1 - 0.90.8 * Wed Feb 09 2011 Fedora Release Engineering - 0.90.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Feb 9 2011 Mamoru Tasaka - 0.90.7-2 - 0.90.7 * Thu Nov 11 2010 Mamoru Tasaka - 0.90.5-3 - Make ruby-gtk2 subpackage install corresponsing ruby- compat packages correctly (bug 652106) * Sun Oct 31 2010 Mamoru Taska - 0.90.5-2 - 0.90.5 - Move C extension so that "require %%gem_name" works correctly * Sun Oct 24 2010 Mamoru Taska - 0.90.4-2 - 0.90.4 * Sun Oct 24 2010 Mamoru Taska - 0.90.3-2 - 0.90.3 * Fri Oct 1 2010 Mamoru Tasaka - 0.90.2-3 - Initial package