From 845341782edfa0d4f47cc3a2428ba1408149d14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sat, 18 Jun 2005 21:16:50 +0000 Subject: [PATCH] --- src/pisi/actionsapi/__init__.py | 3 - src/pisi/actionsapi/autotools.py | 45 ----------- src/pisi/actionsapi/gnuconfig.py | 48 ------------ src/pisi/actionsapi/libtoolize.py | 14 ---- src/pisi/actionsapi/shell.py | 63 ---------------- src/pisi/actionsapi/utils.py | 17 ----- .../var_lib_pisi/portage-1.4.1.patch | 74 ------------------- .../actionsapi/var_lib_pisi/sed-1.4.0.patch | 14 ---- 8 files changed, 278 deletions(-) delete mode 100644 src/pisi/actionsapi/__init__.py delete mode 100644 src/pisi/actionsapi/autotools.py delete mode 100644 src/pisi/actionsapi/gnuconfig.py delete mode 100644 src/pisi/actionsapi/libtoolize.py delete mode 100644 src/pisi/actionsapi/shell.py delete mode 100644 src/pisi/actionsapi/utils.py delete mode 100644 src/pisi/actionsapi/var_lib_pisi/portage-1.4.1.patch delete mode 100644 src/pisi/actionsapi/var_lib_pisi/sed-1.4.0.patch diff --git a/src/pisi/actionsapi/__init__.py b/src/pisi/actionsapi/__init__.py deleted file mode 100644 index 5fee121d..00000000 --- a/src/pisi/actionsapi/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ - -# pisi.actionsapi version -__version__ = "0.1" diff --git a/src/pisi/actionsapi/autotools.py b/src/pisi/actionsapi/autotools.py deleted file mode 100644 index 89136558..00000000 --- a/src/pisi/actionsapi/autotools.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import os -from pisi.context import Constants -const = Constants.c - -def configure(parameters = None): - ''' FIXME: Düzgün hale getirilecek ''' - ''' {EXTRA} = '--with-nls --with-libusb --with-something-usefull ''' - - # FIXME: I don't think its feasible to write all these parameters - # here. There should be a way to get all these... pisi.context.Constants? - configure_string = './configure --prefix=/usr \ - --host=i686-pc-linux-gnu \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --datadir=/usr/share \ - --sysconfdir=/etc \ - --localstatedir=/var/lib {EXTRA}' - - cmd = configure_string.replace('{EXTRA}', parameters) - os.system(cmd) - -def make(): - ''' FIXME: Düzgün hale getirilecek ''' - os.system('make') - -def install(): - ''' FIXME: Düzgün hale getirilecek ''' - ''' {D} = /var/tmp/pisi/ _paket_adı_ /image/ ''' - global const - - install_string = 'make prefix={D}/usr \ - datadir={D}/usr/share \ - infodir={D}/usr/share/info \ - localstatedir={D}/var/lib \ - mandir={D}/usr/share/man \ - sysconfdir={D}/etc \ - install' - - cmd = os.path.dirname(os.path.dirname(os.getcwd())) + \ - const.install_dir_suffix - cmd = install_string.replace('{D}', cmd) - os.system(cmd) diff --git a/src/pisi/actionsapi/gnuconfig.py b/src/pisi/actionsapi/gnuconfig.py deleted file mode 100644 index 36722c78..00000000 --- a/src/pisi/actionsapi/gnuconfig.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import os, string, re, shutil -from shell import * - -def gnuconfig_findnewest(): - ''' find the newest config.* file according to - timestamp and return it''' - - locations = ['/usr/share/gnuconfig/config.sub', - '/usr/share/automake-1.8/config.sub', - '/usr/share/automake-1.7/config.sub', - '/usr/share/automake-1.6/config.sub', - '/usr/share/automake-1.5/config.sub', - '/usr/share/automake-1.4/config.sub'] - - newer_location = {} - - for i in locations: - newer_location[i] = re.sub('\'', - '', - string.split((cat(i) | - tr(str.rstrip) | - grep ('^timestamp') | - join), '=')[1]) - - keys = newer_location.keys() - keys.sort() - map(newer_location.get, keys) - - return os.path.dirname(newer_location.popitem()[0]) - -def gnuconfig_update(): - ''' copy newest config.* onto source's ''' - - newer_location = gnuconfig_findnewest() - - try: - shutil.copyfile(newer_location + '/config.sub', - os.getcwd() + '/config.sub') - shutil.copyfile(newer_location + '/config.guess', - os.getcwd() + '/config.guess') - except IOError: - print 'Hata mata...' - sys.exit() - - print 'GNU Config Update Finished...' diff --git a/src/pisi/actionsapi/libtoolize.py b/src/pisi/actionsapi/libtoolize.py deleted file mode 100644 index 47ef40fd..00000000 --- a/src/pisi/actionsapi/libtoolize.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import os - -def libtoolize(): - ''' FIXME: Düzgün hale getirilecek ''' - ''' patch source with ltmain patches ''' - - # This is wrong! Action files should only operate on the build - # directory. And shouldn't depend on external files. If a patch is - # need to be applied it is PisiBuild's job to do it! - os.system('patch -sN < ' + Context.lib_dir() + '/portage-1.4.1.patch') - os.system('patch -sN < ' + Context.lib_dir() + '/sed-1.4.0.patch') diff --git a/src/pisi/actionsapi/shell.py b/src/pisi/actionsapi/shell.py deleted file mode 100644 index e82d7557..00000000 --- a/src/pisi/actionsapi/shell.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import sys, re -from itertools import izip, imap, count, ifilter, ifilterfalse - -def cat(filename): - return file(filename).xreadlines() - -class grep: - """keep only lines that match the regexp""" - def __init__(self,pat, flags = 0): - self.fun = re.compile(pat, flags).match - def __ror__(self, input): - return ifilter(self.fun, input) - -class tr: - """apply arbitrary transform to each sequence element""" - def __init__(self, transform): - self.tr = transform - def __ror__(self, input): - return imap(self.tr, input) - -class printto: - """print sequence elements one per line""" - def __init__(self, out = sys.stdout): - self.out = out - def __ror__(self,input): - for l in input: - print >> self.out, l - -printlines = printto(sys.stdout) - -class terminator: - def __init__(self,method): - self.process = method - def __ror__(self,input): - return self.process(input) - -aslist = terminator(list) -asdict = terminator(dict) -astuple = terminator(tuple) -join = terminator("".join) -enum = terminator(enumerate) - -class sort: - def __ror__(self,input): - ll = list(input) - ll.sort() - return ll -sort = sort() - -class uniq: - def __ror__(self,input): - for i in input: - try: - if i == prev: - continue - except NameError: - pass - prev = i - yield i -uniq = uniq() diff --git a/src/pisi/actionsapi/utils.py b/src/pisi/actionsapi/utils.py deleted file mode 100644 index e5022884..00000000 --- a/src/pisi/actionsapi/utils.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import time -from tempfile import mkstemp, mkdtemp - -def sleep(sleep_time = 5): - time.sleep(sleep_time) - -def createTmpFile(): - handle, path = mkstemp() - return path - -def createTmpDir(): - path = mkdtemp() - return path - diff --git a/src/pisi/actionsapi/var_lib_pisi/portage-1.4.1.patch b/src/pisi/actionsapi/var_lib_pisi/portage-1.4.1.patch deleted file mode 100644 index a49f3332..00000000 --- a/src/pisi/actionsapi/var_lib_pisi/portage-1.4.1.patch +++ /dev/null @@ -1,74 +0,0 @@ -Note that if you update this patch, please update this one as well: - - eclass/ELT-patches/portage/1.4.1 - -The file name can stay 1.4.1, as it will still apply to all versions. Only -when a new version of libtool comes out that it do not apply to, then the -name should be bumped, but the patch content should stay fairly the same. - ---- ltmain.sh Wed Apr 3 01:19:37 2002 -+++ ltmain.sh Sun May 26 19:50:52 2002 -@@ -3940,9 +3940,50 @@ - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit 1 - fi -- newdependency_libs="$newdependency_libs $libdir/$name" -+ # We do not want portage's install root ($D) present. Check only for -+ # this if the .la is being installed. -+ if test "$installed" = yes && test "$D"; then -+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` -+ else -+ mynewdependency_lib="$libdir/$name" -+ fi -+ # Do not add duplicates -+ if test "$mynewdependency_lib"; then -+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` -+ if test -z "$my_little_ninja_foo_1"; then -+ newdependency_libs="$newdependency_libs $mynewdependency_lib" -+ fi -+ fi -+ ;; -+ *) -+ if test "$installed" = yes; then -+ # Rather use S=WORKDIR if our version of portage supports it. -+ # This is because some ebuild (gcc) do not use $S as buildroot. -+ if test "$PWORKDIR"; then -+ S="$PWORKDIR" -+ fi -+ # We do not want portage's build root ($S) present. -+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"` -+ if test -n "$my_little_ninja_foo_2" && test "$S"; then -+ mynewdependency_lib="" -+ # We do not want portage's install root ($D) present. -+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` -+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then -+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` -+ else -+ mynewdependency_lib="$deplib" -+ fi -+ else -+ mynewdependency_lib="$deplib" -+ fi -+ # Do not add duplicates -+ if test "$mynewdependency_lib"; then -+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` -+ if test -z "$my_little_ninja_foo_4"; then -+ newdependency_libs="$newdependency_libs $mynewdependency_lib" -+ fi -+ fi - ;; -- *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" -@@ -3975,6 +4005,10 @@ - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac -+ # Do not add duplicates -+ if test "$installed" = yes && test "$D"; then -+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` -+ fi - $echo > $output "\ - # $outputname - a libtool library file - # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP diff --git a/src/pisi/actionsapi/var_lib_pisi/sed-1.4.0.patch b/src/pisi/actionsapi/var_lib_pisi/sed-1.4.0.patch deleted file mode 100644 index 9c51ac2d..00000000 --- a/src/pisi/actionsapi/var_lib_pisi/sed-1.4.0.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ltmain.sh 2003-02-13 14:54:24.000000000 +0100 -+++ ltmain.sh 2003-02-13 15:24:49.000000000 +0100 -@@ -48,6 +48,11 @@ EOF - exit 0 - fi - -+# define variables for historic ltconfig's generated by Libtool 1.3 -+test -z "$SED" && SED=sed -+test -z "$EGREP" && EGREP=egrep -+test -z "$LTCC" && LTCC=${CC-gcc} -+ - # The name of this program. - progname=`$echo "$0" | ${SED} 's%^.*/%%'` - modename="$progname"