Mercurial > gub
view gub/specs/libjpeg.py @ 6341:b49f865441a4
Fix some URLs
author | Masamichi Hosoda <trueroad@users.noreply.github.com> |
---|---|
date | Sat, 07 Feb 2015 18:22:20 +0900 |
parents | f87bd831bdb5 |
children |
line wrap: on
line source
import os import re # from gub import commands from gub import misc from gub import target from gub import tools class Libjpeg (target.AutoBuild): source = 'http://www.ijg.org/files/jpegsrc.v6b.tar.gz' config_cache_flag_broken = True def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) source._version = 'v6b' def name (self): return 'libjpeg' dependencies = ['libtool'] subpackage_names = ['devel', ''] def srcdir (self): return re.sub (r'src\.v', '-', target.AutoBuild.srcdir (self)) def update_libtool (self): self.system (''' cd %(builddir)s && %(srcdir)s/ltconfig --srcdir %(srcdir)s %(srcdir)s/ltmain.sh %(target_architecture)s''' , locals ()) target.AutoBuild.update_libtool (self) license_files = ['%(sourcefiledir)s/jpeg.license'] def configure (self): self.update_config_guess_config_sub () target.AutoBuild.configure (self) self.file_sub ( [ (r'(\(INSTALL_[A-Z]+\).*) (\$[^ ]+)$', r'\1 $(DESTDIR)\2'), ], '%(builddir)s/Makefile') install_command = misc.join_lines (''' mkdir -p %(install_prefix)s/include %(install_prefix)s/lib && make DESTDIR=%(install_root)s install-headers install-lib ''') class Libjpeg__darwin (Libjpeg): def update_libtool (self): arch = 'powerpc-apple' self.system (''' cd %(builddir)s && %(srcdir)s/ltconfig --srcdir %(srcdir)s %(srcdir)s/ltmain.sh %(arch)s ''', locals ()) target.AutoBuild.update_libtool (self) class Libjpeg__linux (Libjpeg): def compile (self): Libjpeg.compile (self) self.file_sub ([('^#define (HAVE_STDLIB_H) *', '''#ifdef \\1 #define \\1 #endif''')], '%(builddir)s/jconfig.h') class Libjpeg__tools (tools.AutoBuild, Libjpeg): def __init__ (self, settings, source): tools.AutoBuild.__init__ (self, settings, source) source._version = 'v6b' dependencies = ['libtool'] force_autoupdate = False def srcdir (self): return re.sub (r'src\.v', '-', tools.AutoBuild.srcdir (self)) '''libtoolize: `configure.ac' does not exist''' def update_libtool (self): pass def configure (self): self.update_config_guess_config_sub () tools.AutoBuild.configure (self) self.file_sub ( [ (r'(\(INSTALL_[A-Z]+\).*) (\$[^ ]+)$', r'\1 $(DESTDIR)\2'), ], '%(builddir)s/Makefile') install_command = misc.join_lines (''' mkdir -p %(install_prefix)s/bin %(install_prefix)s/include %(install_prefix)s/lib && make DESTDIR=%(install_root)s install-headers install-lib ''')