Mercurial > gub
changeset 37:d412e2bcc8c1
resolve conflicts
author | hanwen <hanwen@xs4all.nl> |
---|---|
date | Fri, 25 Nov 2005 16:51:53 +0100 |
parents | 5423f185b99b (current diff) 20d755d88fa7 (diff) |
children | 4c3fba517489 |
files | specs/framework.py specs/gub.py |
diffstat | 3 files changed, 82 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/specs/download.py Fri Nov 25 12:11:15 2005 +0100 +++ b/specs/download.py Fri Nov 25 16:51:53 2005 +0100 @@ -17,3 +17,12 @@ def opendarwin (): return 'http://www.opendarwin.org/downloads/%(name)s-%(version)s.tar.%(format)s' + +def sf (): + return 'http://mesh.dl.sourceforge.net/sourceforge/%(name)s/%(name)s-%(version)s.tar.%(format)s' + +def lp (): + return 'http://lilypond.org/mingw/uploads/%(name)s/%(name)s-%(version)s-src.tar.%(format)s' + +def zlib (): + return 'http://www.zlib.net/%(name)s-%(version)s.tar.%(format)s'
--- a/specs/framework.py Fri Nov 25 12:11:15 2005 +0100 +++ b/specs/framework.py Fri Nov 25 16:51:53 2005 +0100 @@ -1,6 +1,7 @@ import cvs import download import gub +import os import re class Libtool (gub.Target_package): @@ -47,9 +48,27 @@ gub.Package.install (self) +def read_pipe (cmd): + pipe = os.popen (cmd, 'r') + output = pipe.read () + status = pipe.close () + # successful pipe close returns 'None' + if status: + raise 'barf' + return output + class Fontconfig (gub.Target_package): def configure_command (self): cmd = gub.Target_package.configure_command (self) + ## fixme. + ''' \ +--with-default-fonts=@WINDIR@\\fonts \ +--with-add-fonts=@INSTDIR@\\usr\\share\\gs\\fonts \ +--with-freetype-config="/usr/bin/freetype-config \ +--prefix=%(installdir)s/usr \ +--exec-prefix=%(installdir)s/usr \ +" +''' if self.settings.platform == 'mingw': cmd += '--with-default-fonts=@WINDIR@\\fonts\\ --with-add-fonts=@INSTDIR@\\usr\\share\\gs\\fonts' @@ -66,6 +85,44 @@ '''}) gub.Package.configure (self) + # help fontconfig cross compiling a bit, all CC/LD + # flags are wrong, set to the target's root + + cflags = '-I%(srcdir)s -I%(srcdir)s/src ' \ + + read_pipe ('freetype-config --cflags')[:-1] + libs = read_pipe ('freetype-config --libs')[:-1] + for i in ('fc-case', 'fc-lang', 'fc-glyphname'): + self.system (''' +cd %(builddir)s/%(i)s && make "CFLAGS=%(cflags)s" "LIBS=%(libs)s" CPPFLAGS= LDFLAGS= INCLUDES= +''', locals ()) + +class Expat (gub.Target_package): + def xxconfigure (self): + self.autoupdate () + gub.Target_package.configure (self) + + def compile_command (self): + return gub.Target_package.compile_command (self) + ''' \ +CFLAGS="-O2 -DHAVE_EXPAT_CONFIG_H" \ +EXEEXT= \ +''' + def install_command (self): + return gub.Target_package.install_command (self) + ''' \ +EXEEXT= \ +exec_prefix=%(installdir)s \ +libdir=%(installdir)s/lib \ +includedir=%(installdir)s/include \ +man1dir=%(installdir)s/share/man/man1 \ +''' + +class Zlib (gub.Target_package): + def configure (self): + self.system (''' +sed -i~ 's/mgwz/libz/' %(srcdir)s/configure +shtool mkshadow %(srcdir)s %(builddir)s +cd %(builddir)s && target=mingw AR="%(AR)s r" %(srcdir)s/configure --shared +''') + def get_packages (settings, platform): packages = { 'mac': ( @@ -79,6 +136,11 @@ Libiconv (settings).with (version='1.9.2'), Glib (settings).with (version='2.8.4', mirror=download.gtk), Freetype (settings).with (version='2.1.9', mirror=download.freetype), +# Expat (settings).with (version='1.95.8', mirror=download.sf), + Expat (settings).with (version='1.95.8-1', mirror=download.lp, format='bz2'), +# Fontconfig (settings).with (version='2.3.92', mirror=download.fontconfig), + Zlib (settings).with (version='1.2.3', mirror=download.zlib, format='bz2'), + Fontconfig (settings).with (version='2.3.2', mirror=download.fontconfig), LilyPond (settings).with (mirror=cvs.gnu, download=gub.Package.cvs), ), }
--- a/specs/gub.py Fri Nov 25 12:11:15 2005 +0100 +++ b/specs/gub.py Fri Nov 25 16:51:53 2005 +0100 @@ -104,6 +104,7 @@ def basename (self): f = self.file_name () + f = re.sub ('-src\.tar.*', '', f) f = re.sub ('\.tar.*', '', f) return f @@ -160,6 +161,9 @@ cd %(srcdir)s && aclocal cd %(srcdir)s && autoheader cd %(srcdir)s && autoconf +''') + if os.path.exists (os.path.join (self.srcdir (), 'Makefile.am')): + self.system (''' cd %(srcdir)s && automake --add-missing ''') @@ -276,7 +280,14 @@ 'LD': '%(target_architecture)s-ld', 'LDFLAGS': '-L%(installdir)s/lib', 'NM': '%(target_architecture)s-nm', + 'PKG_CONFIG_PATH': '%(systemdir)s/usr/lib/pkgconfig', + 'PKG_CONFIG': '''/usr/bin/pkg-config \ +--define-variable prefix=%(systemdir)s/usr \ +--define-variable includedir=%(systemdir)s/usr/include \ +--define-variable libdir=%(systemdir)s/usr/lib \ +''', 'RANLIB': '%(target_architecture)s-ranlib', + 'SED': 'sed', # libtool (expat mingw) fixup } dict.update (env)