Package: dpkg Version: 1.10.18 Severity: wishlist Tags: patch Hello dpkg developers,
As discussed in #218893, here a patch that implement support in dpkg-buildpackage for `Build-Options: build-arch' in debian/control as defined in the matching patch to debian-policy. When a package specify the Build-Options 'build-arch', dpkg-buildpackage will assume that build-arch and build-indep are implemented in debian/rules and act accordingly. Cheers, -- Bill. <[EMAIL PROTECTED]> Imagine a large red swirl here. -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux seventeen 2.4.24 #1 Mon Jan 5 19:10:08 CET 2004 i686 Locale: LANG=fran�ais, LC_CTYPE=fran�ais Versions of packages dpkg depends on: ii dselect 1.10.18 a user tool to manage Debian packa ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an -- no debconf information
--- dpkg-1.10.18/scripts/controllib.pl 2003-09-19 19:29:09.000000000 +0200
+++ dpkg-1.10.18.new/scripts/controllib.pl 2003-11-17 18:03:25.000000000
+0100
@@ -15,7 +15,8 @@
grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
Build-Depends Build-Depends-Indep
- Build-Conflicts Build-Conflicts-Indep));
+ Build-Conflicts Build-Conflicts-Indep
+ Build-Options));
@pkg_dep_fields = qw(Replaces Provides Depends Pre-Depends Recommends Suggests
Conflicts Enhances);
@src_dep_fields = qw(Build-Depends Build-Depends-Indep
@@ -300,6 +301,15 @@
$index || &syntax("empty file");
return $index;
}
+sub parsebuildoption
+{
+ $controlfile=$_[0];
+ &parsecontrolfile;
+ my $opts=$fi{'C Build-Options'};
+ return if (!defined($opts));
+ $opts=~ s/ //;
+ return split(',',$opts);
+}
sub unknown {
&warn("unknown information field " . $fi{"o:$_"} . " in input data in
$_[0]");
@@ -328,4 +338,8 @@
}
}
+if ($0 =~ /controllib\.pl$/ )
+{
+ eval join(' ',@ARGV);
+}
1;
--- dpkg-1.10.18/scripts/dpkg-buildpackage.sh 2003-09-20 02:57:39.000000000
+0200
+++ dpkg-1.10.18.new/scripts/dpkg-buildpackage.sh 2003-11-17
18:18:17.000000000 +0100
@@ -2,7 +2,8 @@
set -e
-version="1.10.10"; # This line modified by Makefile
+version="1.10.18"; # This line modified by Makefile
+dpkglibdir="."; # This line modified by Makefile
progname="`basename \"$0\"`"
usageversion () {
@@ -61,6 +62,7 @@
checkbuilddep=true
checkbuilddep_args=''
binarytarget=binary
+buildtarget=build
sourcestyle=''
version=''
since=''
@@ -156,6 +158,16 @@
sversion=`echo "$version" | perl -pe 's/^\d+://'`
pv="${package}_${sversion}"
pva="${package}_${sversion}_${arch}"
+buildoptions=(`perl $dpkglibdir/controllib.pl \
+ 'print parsebuildoption("debian/control")'`)
+
+if [ $binarytarget = binary-arch ] ; then
+ for opt in $buildoptions; do
+ if [ $opt = build-arch ] ; then
+ buildtarget='build-arch'
+ fi
+ done
+fi
signfile () {
if test "$signinterface" = "gpg" ; then
@@ -196,7 +208,7 @@
cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b
"$dirn"; cd "$dirn"
fi
if [ x$sourceonly = x ]; then
- withecho debian/rules build
+ withecho debian/rules $buildtarget
withecho $rootcommand debian/rules $binarytarget
fi
if [ "$usepause" = "true" ] && \
--- dpkg-1.10.18/scripts/Makefile.in 2002-05-20 06:40:27.000000000 +0200
+++ dpkg-1.10.18.new/scripts/Makefile.in 2003-11-16 21:01:09.000000000
+0100
@@ -108,3 +108,5 @@
%: %.sh
$(SED) -e "s:version=\"[^\"]*\":version=\"$(VERSION)\":" \
< $< > $@
+ $(SED) -e "s:dpkglibdir=\"[^\"]*\":dpkglibdir=\"$(dpkglibdir)\":" \
+ < $< > $@
signature.asc
Description: Digital signature

