Bug 197316 - www/webkit-gtk2 : Fix build with DEFAULT_VERSIONS=python=3.3
Summary: www/webkit-gtk2 : Fix build with DEFAULT_VERSIONS=python=3.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jan Beich
URL:
Keywords:
: 205710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-04 10:09 UTC by olivier
Modified: 2016-07-28 02:50 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
patch for building webkit-gtk2 with python 3.3 (3.69 KB, patch)
2015-02-04 10:09 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2015-02-04 10:09:30 UTC
Created attachment 152545 [details]
patch for building webkit-gtk2 with python 3.3

Here is a patch that fix build of webkit-gtk2 with python 3.3.
Without this patch there is this error message during build:
Traceback (most recent call last):
  File "./Source/JavaScriptCore/inspector/scripts/cssmin.py", line 44, in <module>
    sys.stdout.write(cssminify(sys.stdin.read()))
  File "/usr/local/lib/python3.3/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 642: ordinal not in range(128)
GNUmakefile:81947: recipe for target 'DerivedSources/WebCore/XMLViewerCSS.h' failed
gmake[1]: *** [DerivedSources/WebCore/XMLViewerCSS.h] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/webkit-gtk2/work/webkitgtk-2.4.8'
*** Error code 1

Then I've used the patch proposed (but not accepted) here:
https://bugs.webkit.org/show_bug.cgi?id=128971
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-04 10:09:30 UTC
Auto-assigned to maintainer gnome@FreeBSD.org
Comment 2 Andrew Berg 2015-03-22 19:04:24 UTC
This patch effectively does nothing but bump PORTREVISION.

Without upstream fixing the script, the way to actually solve this is to add an explicit dependency on Python 2 rather than assuming Python is in the environment because GTK needs it.
Comment 3 olivier 2015-03-22 21:21:52 UTC
(In reply to Andrew Berg from comment #2)

How can this patch do nothing ?

There are theses 2 patches files included:
files/patch-Source_WebCore_xml_XMLViewer.css
files/patch-Source_WebCore_xml_XMLViewer.js
Comment 4 Andrew Berg 2015-03-22 21:27:37 UTC
(In reply to olivier from comment #3)
For each of those files, your diff only removes a line from the license statement and then adds it back. If you are adding files, they are not here.
Comment 5 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2016-05-02 21:30:18 UTC
*** Bug 205710 has been marked as a duplicate of this bug. ***
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-07-25 21:10:46 UTC
A commit references this bug:

Author: jbeich
Date: Mon Jul 25 21:09:59 UTC 2016
New revision: 419064
URL: https://svnweb.freebsd.org/changeset/ports/419064

Log:
  www/webkit-gtk{2,3}: use ASCII quotes to unbreak python3 build

    GEN      DerivedSources/WebCore/XMLViewerCSS.h
    GEN      DerivedSources/WebCore/XMLViewerJS.h
  Traceback (most recent call last):
    File "./Source/JavaScriptCore/inspector/scripts/cssmin.py", line 44, in <module>
      sys.stdout.write(cssminify(sys.stdin.read()))
    File "/usr/local/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 642: ordinal not in range(128)
  gmake: *** [GNUmakefile:82114: DerivedSources/WebCore/XMLViewerCSS.h] Error 1
  gmake: *** Waiting for unfinished jobs....
  Traceback (most recent call last):
    File "./Source/JavaScriptCore/inspector/scripts/jsmin.py", line 237, in <module>
      minifier.minify()
    File "./Source/JavaScriptCore/inspector/scripts/jsmin.py", line 106, in minify
      previous = read(1)
    File "/usr/local/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 696: ordinal not in range(128)
  gmake: *** [GNUmakefile:82119: DerivedSources/WebCore/XMLViewerJS.h] Error 1
  offlineasm: offset extractor DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h successfully generated.

  PR:		197316
  Submitted by:	olivier@cochard.me
  Approved by:	maintainer timeout (1.5 years)
  MFH:		2016Q3

Changes:
  head/www/webkit-gtk2/Makefile
  head/www/webkit-gtk2/files/patch-Source_WebCore_xml_XMLViewer.css
  head/www/webkit-gtk2/files/patch-Source_WebCore_xml_XMLViewer.js
  head/www/webkit-gtk3/Makefile
  head/www/webkit-gtk3/files/patch-Source_WebCore_xml_XMLViewer.css
  head/www/webkit-gtk3/files/patch-Source_WebCore_xml_XMLViewer.js
Comment 7 Jan Beich freebsd_committer freebsd_triage 2016-07-25 21:14:58 UTC
Thanks. Landed.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-07-28 02:50:35 UTC
A commit references this bug:

Author: jbeich
Date: Thu Jul 28 02:50:29 UTC 2016
New revision: 419205
URL: https://svnweb.freebsd.org/changeset/ports/419205

Log:
  MFH: r419064

  www/webkit-gtk{2,3}: use ASCII quotes to unbreak python3 build

    GEN      DerivedSources/WebCore/XMLViewerCSS.h
    GEN      DerivedSources/WebCore/XMLViewerJS.h
  Traceback (most recent call last):
    File "./Source/JavaScriptCore/inspector/scripts/cssmin.py", line 44, in <module>
      sys.stdout.write(cssminify(sys.stdin.read()))
    File "/usr/local/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 642: ordinal not in range(128)
  gmake: *** [GNUmakefile:82114: DerivedSources/WebCore/XMLViewerCSS.h] Error 1
  gmake: *** Waiting for unfinished jobs....
  Traceback (most recent call last):
    File "./Source/JavaScriptCore/inspector/scripts/jsmin.py", line 237, in <module>
      minifier.minify()
    File "./Source/JavaScriptCore/inspector/scripts/jsmin.py", line 106, in minify
      previous = read(1)
    File "/usr/local/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 696: ordinal not in range(128)
  gmake: *** [GNUmakefile:82119: DerivedSources/WebCore/XMLViewerJS.h] Error 1
  offlineasm: offset extractor DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h successfully generated.

  PR:		197316
  Submitted by:	olivier@cochard.me
  Approved by:	maintainer timeout (1.5 years)
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/www/webkit-gtk2/Makefile
  branches/2016Q3/www/webkit-gtk2/files/patch-Source_WebCore_xml_XMLViewer.css
  branches/2016Q3/www/webkit-gtk2/files/patch-Source_WebCore_xml_XMLViewer.js
  branches/2016Q3/www/webkit-gtk3/Makefile
  branches/2016Q3/www/webkit-gtk3/files/patch-Source_WebCore_xml_XMLViewer.css
  branches/2016Q3/www/webkit-gtk3/files/patch-Source_WebCore_xml_XMLViewer.js