# HG changeset patch # User Masamichi Hosoda # Date 1425819573 -32400 # Node ID 62a9fcf680ddb08ed33f277733c32b668b83f555 # Parent d02df78f9193baad36141f9a7df85ed7aa432e09# Parent aad77c79308ab8770288b216a96e8a6071ce01cb Merge remote-tracking branch 'origin/ghostscript-9.0' into ghostscript-9.15 Conflicts: gub/specs/freetype.py gub/specs/ghostscript.py diff -r d02df78f9193 -r 62a9fcf680dd gub/installer.py --- a/gub/installer.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/installer.py Sun Mar 08 21:59:33 2015 +0900 @@ -181,8 +181,9 @@ 'share/guile/*/ice-9/debugger/', 'share/gettext/intl', 'share/ghostscript/*/{doc,examples}/', - 'share/ghostscript/*/Resource/{CMap,ColorSpace,Decoding}/', -# keep font, otherwise mingw users have problems. +# keep Decoding, avoids utf8 warnings. + 'share/ghostscript/*/Resource/{CMap,ColorSpace}/', +# keep Font, otherwise mingw users have problems. 'share/ghostscript/*/Resource/{Encoding,SubstCID}/', 'share/gs/*/{doc,examples}/', 'share/gtk-doc', diff -r d02df78f9193 -r 62a9fcf680dd gub/misc.py --- a/gub/misc.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/misc.py Sun Mar 08 21:59:33 2015 +0900 @@ -144,7 +144,7 @@ return default_version def version_to_string (t): - if t[-1]: + if t[-1] and t[-1] != '0': return '%s-%s' % ('.'.join (map (str, t[:-1])), t[-1]) return '.'.join (map (str, t[:-1])) @@ -158,11 +158,7 @@ s = re.sub ('([^0-9][^0-9]*)', ' \\1 ', s) s = re.sub ('[ _.-][ _.-]*', ' ', s) s = s.strip () - def atoi (x): - if re.match ('^[0-9]+$', x): - return int (x) - return x - return tuple (map (atoi, (s.split (' ')))) + return tuple (s.split (' ')) def is_ball (s): # FIXME: do this properly, by identifying different flavours: diff -r d02df78f9193 -r 62a9fcf680dd gub/specs/freetype.py --- a/gub/specs/freetype.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/specs/freetype.py Sun Mar 08 21:59:33 2015 +0900 @@ -11,7 +11,7 @@ libraries, display servers, font conversion tools, text image generation tools, and many other products as well.''' - source = 'http://download.savannah.nongnu.org/releases/freetype/freetype-old/freetype-2.3.11.tar.gz&name=freetype' + source = 'http://download.savannah.nongnu.org/releases/freetype/freetype-2.4.4.tar.gz&name=freetype' def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) # Freetype stats /sbin, /usr/sbin and /hurd to determine if diff -r d02df78f9193 -r 62a9fcf680dd gub/specs/ghostscript.py --- a/gub/specs/ghostscript.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/specs/ghostscript.py Sun Mar 08 21:59:33 2015 +0900 @@ -10,6 +10,7 @@ shared = True class Ghostscript_static (target.AutoBuild): + parallel_build_broken = True '''The GPL Ghostscript PostScript interpreter Ghostscript is used for PostScript preview and printing. It can display PostScript documents in an X11 environment. It can render @@ -22,10 +23,14 @@ exe = '' revision = 'b35333cf3579e85725bd7d8d39eacc9640515eb8' #source = 'git://git.infradead.org/ghostscript.git?branch=refs/remotes/git-svn&revision=' + revision - source = 'http://sourceforge.net/projects/ghostscript/files/GPL%%20Ghostscript/8.70/ghostscript-8.70.tar.gz' + source = 'http://sourceforge.net/projects/ghostscript/files/GPL%%20Ghostscript/9.02/ghostscript-9.02.tar.gz' patches = [ - 'ghostscript-8.70-make.patch', - ] + 'ghostscript-9.00-make.patch', + 'ghostscript-9.00-cygwin.patch', + 'ghostscript-9.00-share-libtiff-init.patch', + 'ghostscript-9.00-windows-snprintf.patch', + 'ghostscript-8.70-windows-make.patch', + ] parallel_build_broken = True # For --enable-compile-inits, see comment in compile() configure_flags = (target.AutoBuild.configure_flags @@ -56,13 +61,15 @@ make_flags = target.AutoBuild.make_flags + ' TARGET=%(target_os)s CFLAGS+="-DHAVE_SYS_TIME_H=1"' obj = 'obj' @staticmethod - def static_version (): + def static_version (self=False): return misc.version_from_url (Ghostscript.source) def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) if (isinstance (source, repository.Repository) and not isinstance (source, repository.TarBall)): source.version = misc.bind_method (Ghostscript.version_from_VERSION, source) + else: + source.version = misc.bind_method (Ghostscript.static_version, source) @staticmethod def version_from_VERSION (self): try: @@ -74,7 +81,13 @@ except: pass return '0.0' - dependencies = ['libjpeg-devel', 'libpng-devel'] + dependencies = [ + 'freetype-devel', + 'lcms-devel', + 'libjpeg-devel', + 'libpng-devel', + 'libtiff-devel', + ] subpackage_names = ['doc', ''] def srcdir (self): return re.sub ('-source', '', @@ -84,6 +97,12 @@ target.AutoBuild.builddir (self)) def name (self): return 'ghostscript' + def patch (self): + self.symlink('base', self.expand('%(srcdir)s/src')) + target.AutoBuild.patch (self) + self.file_sub ([('[([]PKGCONFIG', '(XPKGCONFIG'), + ('PKGCONFIG', 'PKG_CONFIG')], + '%(srcdir)s/base/configure.ac', must_succeed=True) def autoupdate (self): # generate Makefile.in self.system ('cd %(srcdir)s && sh ./autogen.sh --help') @@ -147,6 +166,8 @@ def configure (self): target.AutoBuild.configure (self) self.makefile_fixup ('%(builddir)s/Makefile') + self.file_sub ([('^(EXTRALIBS *=)', r'\1 -lfreetype ')], + '%(builddir)s/Makefile') def makefile_fixup (self, file): self.file_sub ([ ('-Dmalloc=rpl_malloc', ''), @@ -200,8 +221,7 @@ .replace (' install', ' soinstall')) def install (self): Ghostscript_static.install (self) - self.system ('mv %(install_prefix)s/bin/gs%(exe)sc %(install_prefix)s/bin/gs%(exe)s') - self.system ('rm -f %(install_prefix)s/bin/gs%(exe)sx') + self.system ('mv %(install_prefix)s/bin/gsc%(exe)s %(install_prefix)s/bin/gs%(exe)s') if shared: Ghostscript = Ghostscript_shared @@ -210,13 +230,7 @@ class Ghostscript__mingw (Ghostscript): exe = '.exe' - patches = Ghostscript.patches + [ - 'ghostscript-8.70-cygwin.patch', - 'ghostscript-8.70-windows-wb.patch', - 'ghostscript-8.70-windows-make.patch', - 'ghostscript-8.70-gs_dll.patch', - 'ghostscript-8.70-mingw-w64-snprintf.patch', - ] + patches = Ghostscript.patches def __init__ (self, settings, source): Ghostscript.__init__ (self, settings, source) # Configure (compile) without -mwindows for console @@ -229,9 +243,6 @@ ac_cv_lib_pthread_pthread_create=no ''' compile_flags = Ghostscript.compile_flags.replace ("XLDFLAGS='", "XLDFLAGS='-mwindows ") - def patch (self): - self.symlink('base', self.expand('%(srcdir)s/src')) - Ghostscript.patch (self) def configure (self): Ghostscript.configure (self) if shared: # Shared is a configure cross-compile disaster area, @@ -295,13 +306,21 @@ class Ghostscript__tools (tools.AutoBuild, Ghostscript_static): parallel_build_broken = True - dependencies = ['libjpeg', 'libpng'] + dependencies = [ + 'freetype-devel', + 'lcms-devel', + 'libjpeg-devel', + 'libpng-devel', + 'libtiff-devel', + ] configure_flags = (tools.AutoBuild.configure_flags + Ghostscript_static.configure_flags) make_flags = Ghostscript_static.make_flags def configure (self): tools.AutoBuild.configure (self) self.makefile_fixup ('%(builddir)s/Makefile') + self.file_sub ([('^(EXTRALIBS *=)', r'\1 -lfreetype ')], + '%(builddir)s/Makefile') def compile (self): self.system (''' cd %(builddir)s && mkdir -p obj diff -r d02df78f9193 -r 62a9fcf680dd gub/specs/lcms.py --- a/gub/specs/lcms.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/specs/lcms.py Sun Mar 08 21:59:33 2015 +0900 @@ -1,8 +1,15 @@ from gub import target +from gub import tools class Lcms (target.AutoBuild): - source = 'http://www.littlecms.com/lcms-1.17.tar.gz' + source = 'http://surfnet.dl.sourceforge.net/sourceforge/lcms/lcms-1.18.tar.gz' + #source = 'http://www.littlecms.com/lcms/2.1/lcms2-2.1.tar.gz/ dependencies = ['tools::libtool'] def configure (self): target.AutoBuild.configure (self) self.system ('rm -f %(srcdir)s/include/icc34.h') + +class Lcms__tools (tools.AutoBuild, Lcms): + def configure (self): + tools.AutoBuild.configure (self) + self.system ('rm -f %(srcdir)s/include/icc34.h') diff -r d02df78f9193 -r 62a9fcf680dd gub/specs/lilypondcairo.py --- a/gub/specs/lilypondcairo.py Mon Mar 02 14:34:54 2015 +0000 +++ b/gub/specs/lilypondcairo.py Sun Mar 08 21:59:33 2015 +0900 @@ -6,11 +6,12 @@ # in. Hmm. class Lilypondcairo (lilypond.Lilypond): - source = 'http://lilypond.org/download/source/v2.13/lilypond-2.13.54.tar.gz' + source = 'http://lilypond.org/download/source/v2.13/lilypond-2.13.62.tar.gz' dependencies = [x.replace ('pango', 'pangocairo') for x in lilypond.Lilypond.dependencies] patches = [ '0003-Start-OTF-font-from-E800-avoids-hardcoded-linux-unic.patch', + '0001-Allow-for-spaces-in-ttf-font-glyph-names.-Fixes-1562.patch', ] def get_conflict_dict (self): return {'': ['lilypond']} @@ -21,6 +22,7 @@ for x in lilypond.Lilypond__mingw.dependencies] patches = [ '0003-Start-OTF-font-from-E800-avoids-hardcoded-linux-unic.patch', + '0001-Allow-for-spaces-in-ttf-font-glyph-names.-Fixes-1562.patch', ] def get_conflict_dict (self): return {'': ['lilypond']} diff -r d02df78f9193 -r 62a9fcf680dd patches/ghostscript-9.00-share-libtiff-init.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ghostscript-9.00-share-libtiff-init.patch Sun Mar 08 21:59:33 2015 +0900 @@ -0,0 +1,40 @@ +>From 0f34cb36f7812efcfb3bb27256a37ba349c83776 Mon Sep 17 00:00:00 2001 +From: Hin-Tak Leung +Date: Thu, 12 Aug 2010 00:27:14 +0100 +Subject: [PATCH 07/10] SHARE_LIBTIFF not initialised + +--- + base/configure.ac | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/base/configure.ac b/base/configure.ac +index 0f7cb78..deea3cf 100644 +--- a/base/configure.ac ++++ b/base/configure.ac +@@ -540,6 +540,7 @@ dnl png for the png output device; it also requires zlib + AC_ARG_WITH([system-libtiff], AC_HELP_STRING([--with-system-libtiff], + [Force using the systems libtiff]), + [], [with_system_libtiff=check]) ++SHARE_LIBTIFF=1 + TIFFDEVS='' + TIFFDEVS_ALL='$(DD)tiffs $(DD)tiff12nc $(DD)tiff24nc $(DD)tiff48nc $(DD)tiff32nc $(DD)tiff64nc $(DD)tiffcrle $(DD)tifflzw $(DD)tiffpack $(DD)tiffgray $(DD)tiffsep' + case "x$with_system_libtiff" in +@@ -547,7 +548,6 @@ case "x$with_system_libtiff" in + if test -d tiff; then + LIBTIFFDIR=tiff + HAVE_LOCAL_LIBTIFF=1 +- SHARE_LIBTIFF=0 + else + AC_CHECK_LIB(tiff, TIFFOpen, + [AC_CHECK_HEADERS(tiff.h, [HAVE_SYSTEM_LIBTIFF=1;SHARE_LIBTIFF=1])], +@@ -577,7 +577,6 @@ Disabling tiff output devices.]) + if test -d tiff; then + AC_MSG_RESULT([yes]) + LIBTIFFDIR=tiff +- SHARE_LIBTIFF=0 + TIFFDEVS="$TIFFDEVS_ALL" + else + AC_MSG_RESULT([no]) +-- +1.7.2.2 + diff -r d02df78f9193 -r 62a9fcf680dd patches/ghostscript-9.00-windows-snprintf.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ghostscript-9.00-windows-snprintf.patch Sun Mar 08 21:59:33 2015 +0900 @@ -0,0 +1,30 @@ +>From 62de1fd86c1172903641c12a90122f7c00266ee3 Mon Sep 17 00:00:00 2001 +From: Hin-Tak Leung +Date: Thu, 12 Aug 2010 02:09:48 +0100 +Subject: [PATCH 09/10] mingw32/cygwin provides snprintf() - no need to have private + version, unlike msvc + +--- + base/gp_mswin.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/base/gp_mswin.c b/base/gp_mswin.c +index a9c3d3a..096c5f8 100644 +--- a/base/gp_mswin.c ++++ b/base/gp_mswin.c +@@ -729,6 +729,7 @@ int gp_fseek_64(FILE *strm, int64_t offset, int origin) + /* Microsoft Visual C++ 2005 doesn't properly define snprintf, + which is defined in the C standard ISO/IEC 9899:1999 (E) */ + ++#if !defined(__CYGWIN__) && !defined(__MINGW32__) + int snprintf(char *buffer, size_t count, const char *format, ...) + { + if (count > 0) { +@@ -743,3 +744,4 @@ int snprintf(char *buffer, size_t count, const char *format, ...) + } else + return 0; + } ++#endif +-- +1.7.2.2 +