summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/ports/python/py-sk1libs
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-23 23:36:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-23 23:36:49 +0000
commit0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch)
tree59b2bc9ed3412ab2de4c703ef30342dfe2401704 /packaging/macosx/ports/python/py-sk1libs
parentrefactor from lastApplied (diff)
parentFixed a bug pointed by suv running from comand line, also removed another des... (diff)
downloadinkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz
inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip
fixing to trunk
(bzr r12588.1.34)
Diffstat (limited to 'packaging/macosx/ports/python/py-sk1libs')
-rw-r--r--packaging/macosx/ports/python/py-sk1libs/Portfile64
-rw-r--r--packaging/macosx/ports/python/py-sk1libs/files/patch-src-imaging-libimagingft-_imagingft.c.diff16
-rw-r--r--packaging/macosx/ports/python/py-sk1libs/files/patch-src-utils-fs.py.diff26
3 files changed, 106 insertions, 0 deletions
diff --git a/packaging/macosx/ports/python/py-sk1libs/Portfile b/packaging/macosx/ports/python/py-sk1libs/Portfile
new file mode 100644
index 000000000..0c152ce8c
--- /dev/null
+++ b/packaging/macosx/ports/python/py-sk1libs/Portfile
@@ -0,0 +1,64 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py-sk1libs
+version 0.9.1
+revision 101
+license LGPL-2
+maintainers nomaintainer
+categories python graphics
+platforms darwin
+homepage http://sk1project.org/
+
+description Set of python non-GUI extensions for sK1 Project
+
+long_description \
+ sk1libs is a set of python non-GUI extensions for sK1 Project. \
+ The package includes multiplatform non-GUI extensions which are \
+ usually native extensions.
+
+distname sk1libs-${version}
+# MacPorts does not properly support URLs with a get parameter.
+# Workaround for this bug: https://trac.macports.org/wiki/PortfileRecipes#fetchwithgetparams
+master_sites http://sk1project.org/dc.php?target=${distfiles}&dummy=
+
+checksums md5 e18088bbc8a105e7535a96f40b80f284 \
+ sha1 dd948558128bb6547b1f277087bf3066104912da \
+ rmd160 38f22205e0b5b6078e31ec6dc4c1d93845533046
+
+python.versions 25 26 27
+
+if {$subport != $name} {
+
+ depends_lib-append \
+ port:freetype \
+ port:jpeg \
+ port:lcms \
+ port:zlib
+
+ depends_run-append \
+ port:py${python.version}-pil
+
+ variant Pillow {
+ depends_run-delete port:py${python.version}-pil
+ depends_run-append port:py${python.version}-Pillow
+ }
+
+ patchfiles \
+ patch-src-utils-fs.py.diff \
+ patch-src-imaging-libimagingft-_imagingft.c.diff
+
+ post-patch {
+ reinplace "s|'/usr/include/freetype2'|'${prefix}/include/freetype2'|g" ${worksrcpath}/setup.py
+ reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/src/utils/fs.py
+ }
+}
+
+default_variants +Pillow
+
+livecheck.type regex
+livecheck.url http://sk1project.org/modules.php?name=Products&product=uniconvertor&op=download
+livecheck.regex "sk1libs-(\\d+(?:\\.\\d+)*)${extract.suffix}"
diff --git a/packaging/macosx/ports/python/py-sk1libs/files/patch-src-imaging-libimagingft-_imagingft.c.diff b/packaging/macosx/ports/python/py-sk1libs/files/patch-src-imaging-libimagingft-_imagingft.c.diff
new file mode 100644
index 000000000..1d69461a3
--- /dev/null
+++ b/packaging/macosx/ports/python/py-sk1libs/files/patch-src-imaging-libimagingft-_imagingft.c.diff
@@ -0,0 +1,16 @@
+--- src/imaging/libimagingft/_imagingft.c.orig 2014-07-13 00:37:57.000000000 +0200
++++ src/imaging/libimagingft/_imagingft.c 2014-07-13 00:41:08.000000000 +0200
+@@ -70,7 +70,13 @@
+ const char* message;
+ } ft_errors[] =
+
++#if defined(USE_FREETYPE_2_1)
++/* freetype 2.1 and newer */
++#include FT_ERRORS_H
++#else
++/* freetype 2.0 */
+ #include <freetype/fterrors.h>
++#endif
+
+ /* -------------------------------------------------------------------- */
+ /* font objects */
diff --git a/packaging/macosx/ports/python/py-sk1libs/files/patch-src-utils-fs.py.diff b/packaging/macosx/ports/python/py-sk1libs/files/patch-src-utils-fs.py.diff
new file mode 100644
index 000000000..541935e71
--- /dev/null
+++ b/packaging/macosx/ports/python/py-sk1libs/files/patch-src-utils-fs.py.diff
@@ -0,0 +1,26 @@
+--- src/utils/fs.py.orig 2010-05-23 12:46:21.000000000 +0200
++++ src/utils/fs.py 2013-01-18 15:40:02.000000000 +0100
+@@ -220,8 +220,14 @@
+ finally:
+ _winreg.CloseKey( k )
+ if system.get_os_family()==system.MACOSX:
+- #FIXME: It's a stub. The paths should be more exact.
+- return ['/',]
++ return ['__PREFIX__/share/fonts',
++ '/usr/share/fonts',
++ '/opt/X11/lib/X11/fonts',
++ '/System/Library/Fonts',
++ '/Network/Library/Fonts',
++ '/Library/Fonts',
++ os.path.expanduser("~/Library/Fonts"),
++ os.path.expanduser("~/.fonts")]
+
+
+ DIRECTORY_OBJECT=0
+@@ -311,4 +317,4 @@
+ if __name__ == '__main__':
+ _test()
+
+-
+\ No newline at end of file
++