summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Duft <mduft@gentoo.org>2008-12-09 08:30:18 +0000
committerMarkus Duft <mduft@gentoo.org>2008-12-09 08:30:18 +0000
commitf5531c453b243c12897509cfa050d8ef8c4c2e89 (patch)
tree6338f281dce13ac3af2768f62eb36b8a73e3ad58 /dev-util/confix
parentUpdate PIC patch (#250335) (diff)
downloadhistorical-f5531c453b243c12897509cfa050d8ef8c4c2e89.tar.gz
historical-f5531c453b243c12897509cfa050d8ef8c4c2e89.tar.bz2
historical-f5531c453b243c12897509cfa050d8ef8c4c2e89.zip
added patch to enable faster installation rules in generated makefiles
Package-Manager: portage-2.1.4.5
Diffstat (limited to 'dev-util/confix')
-rw-r--r--dev-util/confix/ChangeLog9
-rw-r--r--dev-util/confix/Manifest5
-rw-r--r--dev-util/confix/confix-2.1.0-r2.ebuild (renamed from dev-util/confix/confix-2.1.0-r1.ebuild)4
-rw-r--r--dev-util/confix/files/2.1.0/fast-install.patch307
4 files changed, 321 insertions, 4 deletions
diff --git a/dev-util/confix/ChangeLog b/dev-util/confix/ChangeLog
index d6f6add59244..986c45abe860 100644
--- a/dev-util/confix/ChangeLog
+++ b/dev-util/confix/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/confix
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/confix/ChangeLog,v 1.5 2008/10/17 09:51:27 mduft Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/confix/ChangeLog,v 1.6 2008/12/09 08:30:18 mduft Exp $
+
+*confix-2.1.0-r2 (09 Dec 2008)
+
+ 09 Dec 2008; Markus Duft <mduft@gentoo.org>
+ +files/2.1.0/fast-install.patch, -confix-2.1.0-r1.ebuild,
+ +confix-2.1.0-r2.ebuild:
+ added patch to enable faster installation rules in generated makefiles
*confix-2.1.0-r1 (17 Oct 2008)
diff --git a/dev-util/confix/Manifest b/dev-util/confix/Manifest
index 167dbcb5a5b8..54f653857988 100644
--- a/dev-util/confix/Manifest
+++ b/dev-util/confix/Manifest
@@ -1,10 +1,11 @@
AUX 2.1.0/CALL_RESCAN_HACK.patch 1903 RMD160 5d39086ec359febe718ac01e74ab2c66618710e9 SHA1 10be6be55790b20ddd8839663428389c84b392ec SHA256 32a5ef51215a3694a6c1f9a2f86501c1f931d508ae1f2e0d7ef1a2165cbaf6d7
AUX 2.1.0/exeext.patch 853 RMD160 a74991889f13ae4ac9c693a31a3cac45c3369c64 SHA1 fed309c4a92a316d75145426566abca547725d95 SHA256 8acfacd280fcc61506078f54ad4a15b31514272ec61d50296eeed77f9f8bfc50
AUX 2.1.0/ext-ac-archive.patch 1219 RMD160 132c5f93b6ab7bb6180e3387ae2c0053e988f6e6 SHA1 e46fa3c669fabcbac9fb425645e30c29765e880e SHA256 93869837ba4c9430cd1f4997f7a446a43f294c28b2bb74018574d33ff9acfbc8
+AUX 2.1.0/fast-install.patch 14892 RMD160 b28dd88605c7d5002d1049e51a9acc934b41092c SHA1 60e4147ba2541f723b88c27b8b22c696e0125bd3 SHA256 01d9930396d903b52f5e1ce0f474c820738758695c0fcbf4373b4266788203f7
AUX 2.1.0/jni-hpux.patch 461 RMD160 ceb81eab19f5ad68cbfea6e0a222396e568ee04f SHA1 1d106059b0c5af376dc63fa39c95a98d27acd7f7 SHA256 7b53466e987f738a34adaca8cbd8266265f43985ba7bddb02f100f068ca946e3
AUX 2.1.0/private-headers.patch 1685 RMD160 b15e70c2f3bad3205b6ae6b6627dc9167eb46945 SHA1 e0614dc7a80f573cd4c5119775d7e2929d90ffe6 SHA256 a47b77fb37677b7e3faa8d5e5d15c9cadf1546103f069c84b75f28dcda0fc873
DIST Confix-2.1.0.tar.bz2 977383 RMD160 f83dc809b674cf7cfc78ad2a6a843c8bba9cc43a SHA1 837a8db0ca59c451289661f012eb227ccc8fda08 SHA256 ba4c4278e6bf1bf74503935fb394a2c045d122afebde52d863b040fba6e7104f
-EBUILD confix-2.1.0-r1.ebuild 1603 RMD160 a84acb7e3e00c66cab7e9a27fb72ea7c11d3dff6 SHA1 c8c1d5e78b8b9890b692ea5fec5b21fa983d1125 SHA256 93332cf16e1b793ebd71491035a6ab9d51876a36519d485bf9dff25df2e1553a
+EBUILD confix-2.1.0-r2.ebuild 1685 RMD160 de43d615ddb537c1b7446616edef64fdeb36ae6c SHA1 244dde391a23a27df588fb27a3548d0e470d5ecf SHA256 4afa74a9c9995a229fc0ad4e3756d3a355091eeb65f2dfb2b46979a4b11fe5c7
EBUILD confix-2.1.0.ebuild 1487 RMD160 4bb8e31cfc4bb639c03f4b3d81799e770dae3931 SHA1 86548c173643c70888cff9838466fb4ea7d0ddda SHA256 d3fa0ea2e60e8304555d284eff41bad742722c75df39f1ba85ad13f2552691f7
-MISC ChangeLog 937 RMD160 60ea92620d6c97443e97ffd81e5eca6672e63703 SHA1 c70b247a6787d7cac6f75efa11517f9e9deb7a46 SHA256 c91857c889f210981aa21590cd9646dd464b908458d598a57bdb2076e8265350
+MISC ChangeLog 1176 RMD160 e3f6e32ac5f0917023d2a553bde3787ec1a69302 SHA1 ad23f2e1496dcb8b9acf6ce816bc618462dc7e00 SHA256 160f68921eb762d412cfb3f390dfbb668f25dbfa64344c3c7123a23090132e60
MISC metadata.xml 310 RMD160 8705c05dd91101641c0c967f040cf8c6de36f5e0 SHA1 255e1d97639f0f1698d667d23273797d05ac034d SHA256 05b48b7bd20b100b293a45dd84f1d9e7beeb52409327248b0d5ad242e0d9d2e5
diff --git a/dev-util/confix/confix-2.1.0-r1.ebuild b/dev-util/confix/confix-2.1.0-r2.ebuild
index d8324b7e2a77..f5e84ab8011e 100644
--- a/dev-util/confix/confix-2.1.0-r1.ebuild
+++ b/dev-util/confix/confix-2.1.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/confix/confix-2.1.0-r1.ebuild,v 1.1 2008/10/17 09:12:48 mduft Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/confix/confix-2.1.0-r2.ebuild,v 1.1 2008/12/09 08:30:18 mduft Exp $
inherit distutils
@@ -38,6 +38,8 @@ src_unpack() {
epatch "${FILESDIR}"/${PV}/ext-ac-archive.patch
# enable SET_FILE_PROPERTIES(file, { 'PRIVATE_CINCLUDE', 1 })
epatch "${FILESDIR}"/${PV}/private-headers.patch
+ # enable fast installation rules.
+ epatch "${FILESDIR}"/${PV}/fast-install.patch
# need to store repos in exact versioned share/confix-PV/repo
sed -i -e "s,'confix2','confix-${PV}'," \
diff --git a/dev-util/confix/files/2.1.0/fast-install.patch b/dev-util/confix/files/2.1.0/fast-install.patch
new file mode 100644
index 000000000000..aaec4d86f0d8
--- /dev/null
+++ b/dev-util/confix/files/2.1.0/fast-install.patch
@@ -0,0 +1,307 @@
+diff -ru Confix-2.1.0.orig/libconfix/core/automake/file_installer.py Confix-2.1.0/libconfix/core/automake/file_installer.py
+--- Confix-2.1.0.orig/libconfix/core/automake/file_installer.py 2008-10-21 11:17:30 +0200
++++ Confix-2.1.0/libconfix/core/automake/file_installer.py 2008-11-05 13:17:14 +0100
+@@ -22,6 +22,11 @@
+ from libconfix.core.utils.paragraph import Paragraph
+ from libconfix.core.utils import const
+
++try:
++ from hashlib import md5 as my_md5
++except ImportError:
++ from md5 import new as my_md5
++
+ import helper_automake
+ from rule import Rule
+
+@@ -55,10 +60,17 @@
+ ## FILENAME_BULK_INSTALL_PUBLIC = '.bulk-install-public'
+ ## FILENAME_BULK_INSTALL_LOCAL = '.bulk-install-local'
+
+-## TARGET_INSTALL_PUBLIC = 'confix-install-public'
++ TARGET_INSTALL_PUBLIC = 'confix-install-public'
++ TARGET_INSTALL_DATA_PUBLIC = 'confix-install-data-public'
++ TARGET_INSTALL_PREFIX_PUBLIC = 'confix-install-prefix-public'
++ TARGET_UNINSTALL_PUBLIC = 'confix-uninstall-public'
++ TARGET_UNINSTALL_DATA_PUBLIC = 'confix-uninstall-data-public'
++ TARGET_UNINSTALL_PREFIX_PUBLIC = 'confix-uninstall-prefix-public'
+ TARGET_INSTALL_LOCAL = 'confix-install-local'
+ TARGET_CLEAN_LOCAL = 'confix-clean-local'
+
++ MAX_SIMULTANOUS_INSTALL = 20
++
+ ## VAR_SRCDIR = 'srcdir'
+ ## VAR_BUILDDIR = 'builddir'
+ ## VAR_INCLUDEDIR = 'includedir'
+@@ -190,10 +202,13 @@
+ ## buildmod.makefile_am().add_lines(['if !BULK_INSTALL', ''])
+ ## pass
+
+- self.automake_install_public_headers_(makefile_am=makefile_am)
+- self.automake_install_datafiles_(makefile_am=makefile_am)
+- self.automake_install_prefixfiles_(makefile_am=makefile_am)
+- self.automake_install_private_headers_(makefile_am=makefile_am)
++ #self.automake_install_public_headers_(makefile_am=makefile_am)
++ #self.automake_install_datafiles_(makefile_am=makefile_am)
++ #self.automake_install_prefixfiles_(makefile_am=makefile_am)
++ self.fast_install_public_headers_(makefile_am=makefile_am)
++ self.fast_install_datafiles_(makefile_am=makefile_am)
++ self.fast_install_prefixfiles_(makefile_am=makefile_am)
++ self.fast_install_private_headers_(makefile_am=makefile_am)
+ ## buildmod.makefile_am().add_lines(helper_automake.format_rule(
+ ## targets=[FileInstaller.TARGET_INSTALL_PUBLIC]))
+
+@@ -264,6 +279,55 @@
+ files=filelist)
+ pass
+ pass
++
++ def fast_install_public_headers_(self, makefile_am):
++ makefile_am.add_install_data_local(FileInstaller.TARGET_INSTALL_PUBLIC)
++ # this rule should be provided by makefile_am, much like the above install-data-local
++ makefile_am.add_element(Rule(targets=['uninstall-local'], prerequisites=[FileInstaller.TARGET_UNINSTALL_PUBLIC], commands=[]))
++
++ install_public_rule = Rule(targets=[FileInstaller.TARGET_INSTALL_PUBLIC], prerequisites=[], commands=[])
++ uninstall_public_rule = Rule(targets=[FileInstaller.TARGET_UNINSTALL_PUBLIC], prerequisites=[], commands=[])
++
++ makefile_am.add_element(install_public_rule)
++ makefile_am.add_element(uninstall_public_rule)
++
++ dir2file_dict = self.dir2filedict_(self.public_headers_)
++
++ for (installpath, files) in dir2file_dict.iteritems():
++ if len(installpath):
++ targetdir = '/'.join(['$(includedir)', installpath])
++
++ # define symbol for backwards compatability in handwritten rules.
++ symbolicname = self.compute_install_dirname_('publicheader_'+installpath)
++ makefile_am.define_install_directory(symbolicname=symbolicname,
++ dirname='$(includedir)/'+installpath)
++ else:
++ targetdir = '$(includedir)'
++ pass
++
++ # add mkdir rules for every subdirectory
++ makefile_am.add_element(
++ Rule(targets=[targetdir],
++ prerequisites=[],
++ commands=['-$(mkinstalldirs) '+targetdir]))
++
++ _i=0
++ _f=[]
++ for f in files:
++ _f.append(f)
++ _i+=1
++ if len(_f) >= FileInstaller.MAX_SIMULTANOUS_INSTALL or _i >= len(files):
++ # is this rule name unique enough?
++ rulename='.installstamp.public_' + my_md5(str(hash(self)) + targetdir + str(_i)).hexdigest()
++ self.fast_general_install(makefile_am, rulename, targetdir, _f, '0644')
++ install_public_rule.add_prerequisite(rulename)
++ uninstall_public_rule.add_prerequisite(rulename + '_clean')
++ _f=[]
++ pass
++ pass
++ pass
++ pass
++
+
+ def automake_install_datafiles_(self, makefile_am):
+ for dirname, filelist in self.dir2filedict_(file2dirdict=self.datafiles_).iteritems():
+@@ -278,6 +342,50 @@
+ pass
+ pass
+
++ def fast_install_datafiles_(self, makefile_am):
++ makefile_am.add_install_data_local(FileInstaller.TARGET_INSTALL_DATA_PUBLIC)
++ # this rule should be provided by makefile_am, much like the above install-data-local
++ makefile_am.add_element(Rule(targets=['uninstall-local'], prerequisites=[FileInstaller.TARGET_UNINSTALL_DATA_PUBLIC], commands=[]))
++
++ install_public_data_rule = Rule(targets=[FileInstaller.TARGET_INSTALL_DATA_PUBLIC], prerequisites=[], commands=[])
++ uninstall_public_data_rule = Rule(targets=[FileInstaller.TARGET_UNINSTALL_DATA_PUBLIC], prerequisites=[], commands=[])
++
++ makefile_am.add_element(install_public_data_rule)
++ makefile_am.add_element(uninstall_public_data_rule)
++
++ dir2file_dict = self.dir2filedict_(self.datafiles_)
++
++ for (installpath, files) in dir2file_dict.iteritems():
++ targetdir = '/'.join(['$(datadir)', installpath])
++
++ # define symbol for backwards compatability in handwritten rules.
++ symbolicname = self.compute_install_dirname_('data_'+installpath)
++ makefile_am.define_install_directory(symbolicname=symbolicname,
++ dirname='$(datadir)/'+installpath)
++
++ # add mkdir rules for every subdirectory
++ makefile_am.add_element(
++ Rule(targets=[targetdir],
++ prerequisites=[],
++ commands=['-$(mkinstalldirs) '+targetdir]))
++
++ _i=0
++ _f=[]
++ for f in files:
++ _f.append(f)
++ _i+=1
++ if len(_f) >= FileInstaller.MAX_SIMULTANOUS_INSTALL or _i >= len(files):
++ # is this rule name unique enough?
++ rulename='.installstamp.public_data_' + my_md5(str(hash(self)) + targetdir + str(_i)).hexdigest()
++ self.fast_general_install(makefile_am, rulename, targetdir, _f, '0644')
++ install_public_data_rule.add_prerequisite(rulename)
++ uninstall_public_data_rule.add_prerequisite(rulename + '_clean')
++ _f=[]
++ pass
++ pass
++ pass
++ pass
++
+ def automake_install_prefixfiles_(self, makefile_am):
+ for dirname, filelist in self.dir2filedict_(file2dirdict=self.prefixfiles_).iteritems():
+ # define directory
+@@ -291,17 +399,92 @@
+ pass
+ pass
+
+- def automake_install_private_headers_(self, makefile_am):
++ def fast_install_prefixfiles_(self, makefile_am):
++ makefile_am.add_install_data_local(FileInstaller.TARGET_INSTALL_PREFIX_PUBLIC)
++ # this rule should be provided by makefile_am, much like the above install-data-local
++ makefile_am.add_element(Rule(targets=['uninstall-local'], prerequisites=[FileInstaller.TARGET_UNINSTALL_PREFIX_PUBLIC], commands=[]))
++
++ install_public_prefix_rule = Rule(targets=[FileInstaller.TARGET_INSTALL_PREFIX_PUBLIC], prerequisites=[], commands=[])
++ uninstall_public_prefix_rule = Rule(targets=[FileInstaller.TARGET_UNINSTALL_PREFIX_PUBLIC], prerequisites=[], commands=[])
++
++ makefile_am.add_element(install_public_prefix_rule)
++ makefile_am.add_element(uninstall_public_prefix_rule)
++
++ dir2file_dict = self.dir2filedict_(self.prefixfiles_)
++
++ for (installpath, files) in dir2file_dict.iteritems():
++ targetdir = '/'.join(['$(prefix)', installpath])
++
++ # define symbol for backwards compatability in handwritten rules.
++ symbolicname = self.compute_install_dirname_('prefix_'+installpath)
++ makefile_am.define_install_directory(symbolicname=symbolicname,
++ dirname='$(prefix)/'+installpath)
++
++ # add mkdir rules for every subdirectory
++ makefile_am.add_element(
++ Rule(targets=[targetdir],
++ prerequisites=[],
++ commands=['-$(mkinstalldirs) '+targetdir]))
++
++ _i=0
++ _f=[]
++ for f in files:
++ _f.append(f)
++ _i+=1
++ if len(_f) >= FileInstaller.MAX_SIMULTANOUS_INSTALL or _i >= len(files):
++ # is this rule name unique enough?
++ rulename='.installstamp.public_prefix_' + my_md5(str(hash(self)) + targetdir + str(_i)).hexdigest()
++ self.fast_general_install(makefile_am, rulename, targetdir, _f, '0644')
++ install_public_prefix_rule.add_prerequisite(rulename)
++ uninstall_public_prefix_rule.add_prerequisite(rulename + '_clean')
++ _f=[]
++ pass
++ pass
++ pass
++ pass
++
++
++
++ def fast_general_install(self, makefile_am, rulename, targetdir, files, mode):
++ # WARNING: be _very_ carefull about what you change
++ # below, since this is a double-loop, one for'ing over
++ # all paths, and one shift'ing over all basenames. If
++ # for some reason those run apart, files may be copied
++ # to wrong destination names!
++ makefile_am.add_element(
++ Rule(targets=[rulename],
++ prerequisites=[' '.join(files)],
++ commands=['-@$(mkinstalldirs) ' + targetdir,
++ '@test -z "$?" && exit 0; \\',
++ 'set dummy $(?F); \\',
++ 'for f in $?; do \\',
++ ' shift; \\',
++ ' bf=$${1}; \\',
++ ' echo "fast install $${f} -> ' + targetdir + '/$${bf}"; \\',
++ ' __f="$${__f} $${f}"; \\',
++ ' __tf="$${__tf} ' + targetdir + '/$${bf}"; \\',
++ 'done; \\',
++ 'test -z "$${__f}" && exit 0; \\',
++ 'cp -fp $${__f} ' + targetdir + ' || exit 1; \\',
++ 'chmod ' + mode + ' $${__tf} || exit 1; \\',
++ 'touch ' + rulename + ';']))
++ makefile_am.add_element(
++ Rule(targets=[rulename + '_clean'],
++ prerequisites=[],
++ commands=['rm -f ' + rulename + ' ' + str(' ' + targetdir + '/').join([''] + files) + ';']))
++ pass
++
++ def fast_install_private_headers_(self, makefile_am):
+
+ # now for the private header files. this is a bit more
+ # complicated as we have to do it by hand, using the all-local
+ # hook.
+
+- makefile_am.add_all_local('confix-install-local')
+- makefile_am.add_clean_local('confix-clean-local')
++ makefile_am.add_all_local(FileInstaller.TARGET_INSTALL_LOCAL)
++ makefile_am.add_clean_local(FileInstaller.TARGET_CLEAN_LOCAL)
+
+- install_local_rule = Rule(targets=['confix-install-local'], prerequisites=[], commands=[])
+- clean_local_rule = Rule(targets=['confix-clean-local'], prerequisites=[], commands=[])
++ install_local_rule = Rule(targets=[FileInstaller.TARGET_INSTALL_LOCAL], prerequisites=[], commands=[])
++ clean_local_rule = Rule(targets=[FileInstaller.TARGET_CLEAN_LOCAL], prerequisites=[], commands=[])
+ makefile_am.add_element(install_local_rule)
+ makefile_am.add_element(clean_local_rule)
+
+@@ -321,20 +504,36 @@
+ commands=['-$(mkinstalldirs) '+targetdir]))
+
+ # copy files
++# for f in files:
++# targetfile = '/'.join([targetdir, f])
++# makefile_am.add_element(
++# Rule(targets=[targetfile],
++# prerequisites=[f],
++# commands=['-@$(mkinstalldirs) '+targetdir,
++# 'cp -fp $? '+' '+targetdir,
++# 'chmod 0444 '+targetfile]))
++# makefile_am.add_element(
++# Rule(targets=[targetfile+'-clean'],
++# prerequisites=[],
++# commands=['rm -f '+targetfile]))
++# install_local_rule.add_prerequisite(targetfile)
++# clean_local_rule.add_prerequisite(targetfile+'-clean')
++# pass
++# pass
++
++ _i=0
++ _f=[]
+ for f in files:
+- targetfile = '/'.join([targetdir, f])
+- makefile_am.add_element(
+- Rule(targets=[targetfile],
+- prerequisites=[f],
+- commands=['-@$(mkinstalldirs) '+targetdir,
+- 'cp -fp $? '+' '+targetdir,
+- 'chmod 0444 '+targetfile]))
+- makefile_am.add_element(
+- Rule(targets=[targetfile+'-clean'],
+- prerequisites=[],
+- commands=['rm -f '+targetfile]))
+- install_local_rule.add_prerequisite(targetfile)
+- clean_local_rule.add_prerequisite(targetfile+'-clean')
++ _f.append(f)
++ _i+=1
++ if len(_f) >= FileInstaller.MAX_SIMULTANOUS_INSTALL or _i >= len(files):
++ # is this rule name unique enough?
++ rulename='.installstamp.private_' + my_md5(str(hash(self)) + targetdir + str(_i)).hexdigest()
++ self.fast_general_install(makefile_am, rulename, targetdir, _f, '0444')
++ install_local_rule.add_prerequisite(rulename)
++ clean_local_rule.add_prerequisite(rulename + '_clean')
++ _f=[]
++ pass
+ pass
+ pass
+ pass