From 70b80699a1a74a6e394b37bb363a9b848a07ff36 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Feb 01 2014 16:43:36 +0000 Subject: Update to 2.2.5 - New upstream release 2.2.5 (mostly a minor bugfix release) - Includes various fixes for: - Wrap text on right margin - The replace engine - Free jsmin implementation - The split lines feature - Auto-recovery - Many obscure bugs - Other improvements: - The syntax scanning engine is faster after small changes to the text - The file browser is also much faster with less memory usage, with various fixes and new features - Projects now store the active document and active line numbers - Indenting is improved in auto-completion and the smart indenting - Bookmarks and paste special also have been improved - Almost all syntax highlighting has been improved, most notably jquery in javascript, HTML5, and HTML5 in PHP files - Bluefish now has an appdata file - Drop upstreamed fixes for syntax highlighting and jsmin.py --- diff --git a/bluefish-2.2.4-bz983902.patch b/bluefish-2.2.4-bz983902.patch deleted file mode 100644 index dd9499e..0000000 --- a/bluefish-2.2.4-bz983902.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: src/bftextview2_patcompile.c -=================================================================== ---- src/bftextview2_patcompile.c (revision 7819) -+++ src/bftextview2_patcompile.c (working copy) -@@ -513,7 +513,7 @@ - /* check if the last character of the regex is a symbol, if so the last state should not - refer to the identstate for all non-symbols */ - gint j; -- for (j = 0; j <= NUMSCANCHARS; j++) { -+ for (j = 0; j < NUMSCANCHARS; j++) { - if (characters[j] == 1 - && !character_is_symbol(st, context, j)) { - only_symbols = FALSE; diff --git a/bluefish.spec b/bluefish.spec index 26b4f5b..bf9419a 100644 --- a/bluefish.spec +++ b/bluefish.spec @@ -1,6 +1,6 @@ -%global pkgver 2.2.4 +%global pkgver 2.2.5 #global prerel rc1 -%global rpmrel 4 +%global rpmrel 1 Name: bluefish Version: %{pkgver} @@ -9,13 +9,7 @@ Summary: GTK2 web development application for experienced users Group: Development/Tools License: GPLv3+ URL: http://bluefish.openoffice.nl/ -# Upstream source contains non-free jsmin.py -# Source0: http://www.bennewitz.com/bluefish/stable/source/bluefish-%{version}%{?prerel:-%{prerel}}.tar.bz2 -# To generate clean source, simply rm -rf data/jsmin.py -# We provide a replacement in Source1. -Source0: bluefish-%{version}%{?prerel:-%{prerel}}-clean.tar.bz2 -Source1: jsmin.py -Patch0: bluefish-2.2.4-bz983902.patch +Source0: http://www.bennewitz.com/bluefish/stable/source/bluefish-%{version}%{?prerel:-%{prerel}}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: desktop-file-utils BuildRequires: enchant-devel >= 1.4.2 @@ -79,12 +73,6 @@ Files common to every architecture version of %{name}. %prep %setup -q -n %{name}-%{version}%{?prerel:-%{prerel}} -# Add upstream fix for syntax highlighting problem (#983902, Gnome Bug #704108) -%patch0 - -# Replace jsmin.py with free version (#1003849) -cp -a %{SOURCE1} data/ - %build %configure --disable-dependency-tracking \ --disable-static \ @@ -154,6 +142,7 @@ fi %files shared-data -f %{name}.lang %defattr(-,root,root,-) %doc %{bluefish_docdir}/ +%{_datadir}/appdata/ %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/mime/packages/%{name}.xml @@ -167,6 +156,27 @@ fi %{_mandir}/man1/%{name}.1* %changelog +* Sat Feb 1 2014 Paul Howarth - 2.2.5-1 +- Update to 2.2.5 (mostly a minor bugfix release) + - Includes various fixes for: + - Wrap text on right margin + - The replace engine + - Free jsmin implementation + - The split lines feature + - Auto-recovery + - Many obscure bugs + - Other improvements: + - The syntax scanning engine is faster after small changes to the text + - The file browser is also much faster with less memory usage, with various + fixes and new features + - Projects now store the active document and active line numbers + - Indenting is improved in auto-completion and the smart indenting + - Bookmarks and paste special also have been improved + - Almost all syntax highlighting has been improved, most notably jquery in + javascript, HTML5, and HTML5 in PHP files + - Bluefish now has an appdata file +- Drop upstreamed fixes for syntax highlighting and jsmin.py + * Mon Dec 2 2013 Paul Howarth - 2.2.4-4 - Replace v8 jsmin implementation (which doesn't work with bluefish) with an MIT-licensed version that will be in bluefish 2.2.5 diff --git a/jsmin.py b/jsmin.py deleted file mode 100644 index 36fa604..0000000 --- a/jsmin.py +++ /dev/null @@ -1,240 +0,0 @@ -#!/usr/bin/env python - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. It was rewritten by Dave St.Germain for speed. -# -# The MIT License (MIT) -# -# Copyright (c) 2013 Dave St.Germain -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - - -import sys -is_3 = sys.version_info >= (3, 0) -if is_3: - import io -else: - import StringIO - try: - import cStringIO - except ImportError: - cStringIO = None - - -__all__ = ['jsmin', 'JavascriptMinify'] -__version__ = '2.0.8' - - -def jsmin(js): - """ - returns a minified version of the javascript string - """ - if not is_3: - if cStringIO and not isinstance(js, unicode): - # strings can use cStringIO for a 3x performance - # improvement, but unicode (in python2) cannot - klass = cStringIO.StringIO - else: - klass = StringIO.StringIO - else: - klass = io.StringIO - ins = klass(js) - outs = klass() - JavascriptMinify(ins, outs).minify() - return outs.getvalue() - - -class JavascriptMinify(object): - """ - Minify an input stream of javascript, writing - to an output stream - """ - - def __init__(self, instream=None, outstream=None): - self.ins = instream - self.outs = outstream - - def minify(self, instream=None, outstream=None): - if instream and outstream: - self.ins, self.outs = instream, outstream - - self.is_return = False - self.return_buf = '' - - def write(char): - # all of this is to support literal regular expressions. - # sigh - if char in 'return': - self.return_buf += char - self.is_return = self.return_buf == 'return' - self.outs.write(char) - if self.is_return: - self.return_buf = '' - - read = self.ins.read - - space_strings = "abcdefghijklmnopqrstuvwxyz"\ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\" - starters, enders = '{[(+-', '}])+-"\'' - newlinestart_strings = starters + space_strings - newlineend_strings = enders + space_strings - do_newline = False - do_space = False - doing_single_comment = False - previous_before_comment = '' - doing_multi_comment = False - in_re = False - in_quote = '' - quote_buf = [] - - previous = read(1) - next1 = read(1) - if previous == '/': - if next1 == '/': - doing_single_comment = True - elif next1 == '*': - doing_multi_comment = True - previous = next1 - next1 = read(1) - else: - write(previous) - elif not previous: - return - elif previous >= '!': - if previous in "'\"": - in_quote = previous - write(previous) - previous_non_space = previous - else: - previous_non_space = ' ' - if not next1: - return - - while 1: - next2 = read(1) - if not next2: - last = next1.strip() - if not (doing_single_comment or doing_multi_comment)\ - and last not in ('', '/'): - if in_quote: - write(''.join(quote_buf)) - write(last) - break - if doing_multi_comment: - if next1 == '*' and next2 == '/': - doing_multi_comment = False - next2 = read(1) - elif doing_single_comment: - if next1 in '\r\n': - doing_single_comment = False - while next2 in '\r\n': - next2 = read(1) - if not next2: - break - if previous_before_comment in ')}]': - do_newline = True - elif previous_before_comment in space_strings: - write('\n') - elif in_quote: - quote_buf.append(next1) - - if next1 == in_quote: - numslashes = 0 - for c in reversed(quote_buf[:-1]): - if c != '\\': - break - else: - numslashes += 1 - if numslashes % 2 == 0: - in_quote = '' - write(''.join(quote_buf)) - elif next1 in '\r\n': - if previous_non_space in newlineend_strings \ - or previous_non_space > '~': - while 1: - if next2 < '!': - next2 = read(1) - if not next2: - break - else: - if next2 in newlinestart_strings \ - or next2 > '~' or next2 == '/': - do_newline = True - break - elif next1 < '!' and not in_re: - if (previous_non_space in space_strings \ - or previous_non_space > '~') \ - and (next2 in space_strings or next2 > '~'): - do_space = True - elif previous_non_space in '-+' and next2 == previous_non_space: - # protect against + ++ or - -- sequences - do_space = True - elif self.is_return and next2 == '/': - # returning a regex... - write(' ') - elif next1 == '/': - if do_space: - write(' ') - if in_re: - if previous != '\\' or next2 in 'gimy': - in_re = False - write('/') - elif next2 == '/': - doing_single_comment = True - previous_before_comment = previous_non_space - elif next2 == '*': - doing_multi_comment = True - previous = next1 - next1 = next2 - next2 = read(1) - else: - in_re = previous_non_space in '(,=:[?!&|' or self.is_return # literal regular expression - write('/') - else: - if do_space: - do_space = False - write(' ') - if do_newline: - write('\n') - do_newline = False - - write(next1) - if not in_re and next1 in "'\"": - in_quote = next1 - quote_buf = [] - - previous = next1 - next1 = next2 - - if previous >= '!': - previous_non_space = previous - -if __name__ == '__main__': - import sys, os, glob - -#for f in sys.argv[1:]: -# with open(f, 'r') as js: -# minifier = JavascriptMinify(js, sys.stdout) -# minifier.minify() -# sys.stdout.write('\n') - - minifier = JavascriptMinify(sys.stdin, sys.stdout) - minifier.minify() - sys.stdout.write('\n') diff --git a/sources b/sources index 01660a8..9145cd0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -24180aa005941aa1bdd5b704952e28f6 bluefish-2.2.4-clean.tar.bz2 +1782883dcbc01faa856c162edd4c3b39 bluefish-2.2.5.tar.bz2