diff --git a/bluefish-2.2.10-no-python.patch b/bluefish-2.2.10-no-python.patch new file mode 100644 index 0000000..dc01055 --- /dev/null +++ b/bluefish-2.2.10-no-python.patch @@ -0,0 +1,150 @@ +--- data/Makefile.am ++++ data/Makefile.am +@@ -10,6 +10,13 @@ nobase_bfdata_DATA = \ + default_accelmap \ + encodings \ + snippets \ ++ colorprofiles/Light_theme \ ++ colorprofiles/Dark_theme ++ ++bfdata_SCRIPTS = ++ ++if ENABLE_ZENCODING_PLUGIN ++nobase_bfdata_DATA += \ + lipsum/__init__.py \ + lipsum/data/dictionary.txt \ + lipsum/data/sample.txt \ +@@ -21,13 +28,12 @@ nobase_bfdata_DATA = \ + jsbeautifier/unpackers/myobfuscate.py \ + jsbeautifier/unpackers/__init__.py \ + jsbeautifier/unpackers/evalbased.py \ +- jsbeautifier/unpackers/urlencode.py \ +- colorprofiles/Light_theme \ +- colorprofiles/Dark_theme ++ jsbeautifier/unpackers/urlencode.py + +-bfdata_SCRIPTS = \ ++bfdata_SCRIPTS += \ + lorem-ipsum-generator \ + jsbeautify \ + jsmin.py \ + css_decompressor \ + cssmin.py ++endif +--- src/bfwin_uimanager.c ++++ src/bfwin_uimanager.c +@@ -892,8 +892,10 @@ static const GtkActionEntry global_actio + {"DeleteLine", NULL, N_("_Delete Line"), "y", N_("Delete the current line"), + G_CALLBACK(ui_delete_line)}, + {"WordCount", NULL, N_("_Word Count"), NULL, N_("Word count"), G_CALLBACK(ui_word_count)}, ++#ifdef HAVE_PYTHON + {"LoremIpsum", NULL, N_("Lorem Ipsum generator"), NULL, N_("Lorem Ipsum generator"), + G_CALLBACK(ui_lorem_ipsum)}, ++#endif + {"RelativeFilename", NULL, N_("Insert Relative Filename"), NULL, N_("Insert Relative Filename"), + G_CALLBACK(ui_insert_relative_filename)}, + {"AbsoluteFilename", NULL, N_("Insert Absolute Filename"), NULL, N_("Insert Absolute Filename"), +@@ -911,8 +913,10 @@ static const GtkActionEntry global_actio + {"RewrapLines", NULL, N_("Rewrap _Lines"), NULL, N_("Rewrap lines"), G_CALLBACK(ui_rewrap_lines)}, + {"StripTrailingWhitespace", NULL, N_("Strip T_railing Whitespace"), NULL, N_("Strip trailing whitespace"), + G_CALLBACK(ui_strip_trailing_whitespace)}, ++#ifdef HAVE_PYTHON + {"JsBeautify", NULL, N_("Javascript beautifier"), NULL, N_("Javascript beautifier"), + G_CALLBACK(ui_jsbeautify)}, ++#endif + {"BrowserPreview", BF_STOCK_BROWSER_PREVIEW, N_("Preview in browser"), NULL, N_("Preview in browser"), + G_CALLBACK(ui_browser_preview)} + }; +--- src/rcfile.c ++++ src/rcfile.c +@@ -788,6 +788,7 @@ GList *update_filters(GList *current, gb + defaults = + g_list_append(defaults, + array_from_arglist(_("PHP Beautifier"), "|php_beautifier -t|", NULL)); ++#ifdef HAVE_PYTHON + #ifdef WIN32 + defaults = + g_list_append(defaults, +@@ -809,6 +810,7 @@ GList *update_filters(GList *current, gb + g_list_append(defaults, + array_from_arglist(_("Compress CSS"), "|"PKGDATADIR"/cssmin.py|", NULL)); + #endif ++#endif + defaults = + g_list_append(defaults, + array_from_arglist(_("CSS tidy"), "|csstidy --preserve_css=true -|", NULL)); +--- data/Makefile.in ++++ data/Makefile.in +@@ -89,6 +89,27 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ ++@ENABLE_ZENCODING_PLUGIN_TRUE@am__append_1 = \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ lipsum/__init__.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ lipsum/data/dictionary.txt \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ lipsum/data/sample.txt \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ lipsum/data/lipsum.xml \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/__init__.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/__version__.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/packer.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/javascriptobfuscator.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/myobfuscate.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/__init__.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/evalbased.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautifier/unpackers/urlencode.py ++ ++@ENABLE_ZENCODING_PLUGIN_TRUE@am__append_2 = \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ lorem-ipsum-generator \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsbeautify \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ jsmin.py \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ css_decompressor \ ++@ENABLE_ZENCODING_PLUGIN_TRUE@ cssmin.py ++ + subdir = data + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ +@@ -384,7 +405,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -397,32 +417,10 @@ SUBDIRS = bflang bflib templates + EXTRA_DIST = $(nobase_bfdata_DATA) $(bfdata_SCRIPTS) + MAINTAINERCLEANFILES = Makefile.in + bfdatadir = $(pkgdatadir) +-nobase_bfdata_DATA = \ +- default_accelmap \ +- encodings \ +- snippets \ +- lipsum/__init__.py \ +- lipsum/data/dictionary.txt \ +- lipsum/data/sample.txt \ +- lipsum/data/lipsum.xml \ +- jsbeautifier/__init__.py \ +- jsbeautifier/__version__.py \ +- jsbeautifier/unpackers/packer.py \ +- jsbeautifier/unpackers/javascriptobfuscator.py \ +- jsbeautifier/unpackers/myobfuscate.py \ +- jsbeautifier/unpackers/__init__.py \ +- jsbeautifier/unpackers/evalbased.py \ +- jsbeautifier/unpackers/urlencode.py \ +- colorprofiles/Light_theme \ +- colorprofiles/Dark_theme +- +-bfdata_SCRIPTS = \ +- lorem-ipsum-generator \ +- jsbeautify \ +- jsmin.py \ +- css_decompressor \ +- cssmin.py +- ++nobase_bfdata_DATA = default_accelmap encodings snippets \ ++ colorprofiles/Light_theme colorprofiles/Dark_theme \ ++ $(am__append_1) ++bfdata_SCRIPTS = $(am__append_2) + all: all-recursive + + .SUFFIXES: diff --git a/bluefish.spec b/bluefish.spec index b87e568..b0a09c0 100644 --- a/bluefish.spec +++ b/bluefish.spec @@ -1,6 +1,6 @@ %global pkgver 2.2.10 #global prerel rc1 -%global rpmrel 12 +%global rpmrel 13 Name: bluefish Version: %{pkgver} @@ -11,6 +11,7 @@ URL: http://bluefish.openoffice.nl/ Source0: http://www.bennewitz.com/bluefish/stable/source/bluefish-%{version}%{?prerel:-%{prerel}}.tar.bz2 Patch0: bluefish-2.2.10-strict-aliasing.patch Patch1: bluefish-2.2.10-shellbang.patch +Patch2: bluefish-2.2.10-no-python.patch BuildRequires: coreutils BuildRequires: desktop-file-utils BuildRequires: enchant-devel >= 1.4.2 @@ -28,7 +29,9 @@ BuildRequires: gucharmap-devel >= 2.90 BuildRequires: intltool BuildRequires: libxml2-devel BuildRequires: make +%if 0%{?fedora} < 32 && 0%{?rhel} < 8 BuildRequires: python2-devel >= 2.7 +%endif %if 0%{?fedora} > 22 || 0%{?rhel} > 7 BuildRequires: libappstream-glib >= 0.3.6 %endif @@ -90,8 +93,14 @@ Files common to every architecture version of %{name}. # Avoid use of /usr/bin/env in shipped scripts %patch1 +# Strip all python content if we don't have Python +%patch2 + %build %configure --disable-dependency-tracking \ +%if ! (0%{?fedora} < 32 && 0%{?rhel} < 8) + --disable-python \ +%endif --disable-static \ --disable-update-databases \ --disable-xml-catalog-update \ @@ -102,10 +111,12 @@ make %{?_smp_mflags} mkdir -p %{buildroot}%{_datadir}/applications make install DESTDIR=%{buildroot} INSTALL="install -p" +%if 0%{?fedora} < 32 && 0%{?rhel} < 8 # Make zencoding plugin scripts executable to placate rpmlint find %{buildroot}%{_datadir}/bluefish/plugins/zencoding -name '*.py' | xargs awk '/^#!/ { print FILENAME }' | xargs chmod -c +x +%endif %find_lang %{name} %find_lang %{name}_plugin_about @@ -131,7 +142,7 @@ install -m 644 -p -t %{buildroot}%{bluefish_docdir}/ \ rm -f %{buildroot}%{_libdir}/%{name}/*.la # Explicitly byte-compile "extra" python code using Python 2 -%if 0%{?rhel} >= 8 || 0%{?fedora} >= 29 +%if 0%{?fedora} >= 29 && 0%{?fedora} <= 31 %py_byte_compile %{__python2} %{buildroot}%{_datadir}/bluefish %endif @@ -194,6 +205,12 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_mandir}/man1/%{name}.1* %changelog +* Mon Nov 4 2019 Paul Howarth - 2.2.10-13 +- Disable Python functionality on F-32, EL-8 onwards as it requires Python 2 + https://bugzilla.redhat.com/show_bug.cgi?id=1737907 + Will re-enable when Python 3 is supported + https://sourceforge.net/p/bluefish/tickets/10/ + * Wed Jul 24 2019 Fedora Release Engineering - 2.2.10-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild