diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/MyPaint/Portfile ./Portfile
old
|
new
|
|
128 | 128 | } |
129 | 129 | |
130 | 130 | subport ${name}-devel { |
| 131 | |
| 132 | revision 1 |
| 133 | |
131 | 134 | PortGroup github 1.0 |
132 | 135 | github.setup mypaint mypaint 33d16432b0d32ed072b3dc3c284ad3c79bc7caa3 |
133 | 136 | version 1.2.0-beta.20150915+git.[string range ${git.branch} 0 7] |
… |
… |
|
149 | 152 | port:py27-cairo \ |
150 | 153 | port:py27-gobject3 |
151 | 154 | |
| 155 | patchfiles-append patch-check-for-AppKit-module-for-NSLocale.diff |
| 156 | |
152 | 157 | post-extract { |
153 | 158 | delete ${workpath}/mypaint-${git.branch}/brushlib |
154 | 159 | move {*}[glob ${workpath}/mypaint-libmypaint-*] ${workpath}/mypaint-${git.branch}/brushlib |
… |
… |
|
163 | 168 | post-activate { |
164 | 169 | system "${prefix}/bin/gtk-update-icon-cache-3.0 -tf ${prefix}/share/icons/hicolor" |
165 | 170 | } |
| 171 | |
| 172 | variant nslocale description {Use AppKit NSLocale for i18n support} { |
| 173 | depends_lib-append py27-pyobjc-cocoa |
| 174 | } |
166 | 175 | } |
diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/MyPaint/files/patch-check-for-AppKit-module-for-NSLocale.diff ./files/patch-check-for-AppKit-module-for-NSLocale.diff
old
|
new
|
|
| 1 | --- lib/i18n.py.orig 2015-09-19 20:24:49.000000000 +0200 |
| 2 | +++ lib/i18n.py 2015-09-19 20:25:09.000000000 +0200 |
| 3 | @@ -100,7 +100,14 @@ |
| 4 | logger.info("Windows: LANG=%r", os.environ.get("LANG")) |
| 5 | logger.info("Windows: LANGUAGE=%r", os.environ.get("LANGUAGE")) |
| 6 | elif sys.platform == "darwin": |
| 7 | - from AppKit import NSLocale |
| 8 | + try: |
| 9 | + from AppKit import NSLocale |
| 10 | + except ImportError: |
| 11 | + logger.info("OSX: LANGUAGE detection via NSLocale failed:") |
| 12 | + logger.info("OSX: Falling back to POSIX.") |
| 13 | + logger.info("POSIX: LANG=%r", os.environ.get("LANG")) |
| 14 | + logger.info("POSIX: LANGUAGE=%r", os.environ.get("LANGUAGE")) |
| 15 | + return |
| 16 | locale_id = NSLocale.currentLocale().localeIdentifier() |
| 17 | lang = osx_locale_id_to_lang(locale_id) |
| 18 | os.environ.setdefault('LANG', lang) |