Package: gcc-3.4
Version: 3.4.6-4
Severity: normal
Tags: patch

There is a typo in the generated dependencies of the 
libstdc++6-powerpc-cross package.  The cross specific string 
'powerpc-cross' is duplicated for the libgccl library (e.g. 
libgccl-powerpc-cross-powerpc-cross).  This causes the package to not 
install properly.

I managed to fix the $(binary_stamp)-libstdcxx: target in the 
debian/rules.d/.mk file so that the duplicated 
'powerpc-cross-powerpc-cross' dependency no longer occurs.  It's a 
rather brute force fix (I duplicated some sed code used elsewhere in the 
file to strip out the cross string 'powerpc-cross' in case it already 
exists before it gets put back by the later sed script).

The sed code I added in my patch I applied to all similar libraries 
that were setup for cross compiling.  It should be safe to apply either 
specifically to gcc-3.4, as well as to later gcc versions if desired.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-486
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -Naur gcc-3.4-3.4.6.orig/debian/rules.d/binary-libgcc-cross.mk 
gcc-3.4-3.4.6/debian/rules.d/binary-libgcc-cross.mk
--- gcc-3.4-3.4.6.orig/debian/rules.d/binary-libgcc-cross.mk    2006-11-13 
10:45:22.000000000 -0500
+++ gcc-3.4-3.4.6/debian/rules.d/binary-libgcc-cross.mk 2006-11-13 
10:47:03.000000000 -0500
@@ -53,6 +53,8 @@
        mv debian/$(p_lgcc)/DEBIAN/shlibs.fixed debian/$(p_lgcc)/DEBIAN/shlibs
        touch debian/$(p_lgcc).substvars
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_lgcc) -Xlibgcc_s
+       sed s/$(cross_lib_arch)//g < debian/$(p_lgcc).substvars > 
debian/$(p_lgcc).substvars.fixed
+       mv debian/$(p_lgcc).substvars.fixed debian/$(p_lgcc).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_lgcc).substvars > debian/$(p_lgcc).substvars.new
        mv debian/$(p_lgcc).substvars.new debian/$(p_lgcc).substvars
   else
@@ -61,6 +63,8 @@
        mv debian/$(p_lgcc)/DEBIAN/shlibs.fixed debian/$(p_lgcc)/DEBIAN/shlibs
        touch debian/$(p_lgcc).substvars
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_lgcc)
+       sed s/$(cross_lib_arch)//g < debian/$(p_lgcc).substvars > 
debian/$(p_lgcc).substvars.fixed
+       mv debian/$(p_lgcc).substvars.fixed debian/$(p_lgcc).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_lgcc).substvars > debian/$(p_lgcc).substvars.new
        mv debian/$(p_lgcc).substvars.new debian/$(p_lgcc).substvars
   endif
@@ -113,6 +117,8 @@
        cat debian/$(p_l64gcc)/DEBIAN/shlibs >> debian/shlibs.local
 endif
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_l64gcc)
+       sed s/$(cross_lib_arch)//g < debian/$(p_l64gcc).substvars > 
debian/$(p_l64gcc).substvars.fixed
+       mv debian/$(p_l64gcc).substvars.fixed debian/$(p_l64gcc).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_l64gcc).substvars > debian/$(p_l64gcc).substvars.new
        mv debian/$(p_l64gcc).substvars.new debian/$(p_l64gcc).substvars
        dh_gencontrol -p$(p_l64gcc) \
@@ -160,6 +166,8 @@
        cat debian/$(p_l32gcc)/DEBIAN/shlibs >> debian/shlibs.local
 endif
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_l32gcc)
+       sed s/$(cross_lib_arch)//g < debian/$(p_l32gcc).substvars > 
debian/$(p_l32gcc).substvars.fixed
+       mv debian/$(p_l32gcc).substvars.fixed debian/$(p_l32gcc).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_l32gcc).substvars > debian/$(p_l32gcc).substvars.new
        mv debian/$(p_l32gcc).substvars.new debian/$(p_l32gcc).substvars
        dh_gencontrol -p$(p_l32gcc) \
diff -Naur gcc-3.4-3.4.6.orig/debian/rules.d/binary-libstdcxx-cross.mk 
gcc-3.4-3.4.6/debian/rules.d/binary-libstdcxx-cross.mk
--- gcc-3.4-3.4.6.orig/debian/rules.d/binary-libstdcxx-cross.mk 2006-11-13 
10:45:22.000000000 -0500
+++ gcc-3.4-3.4.6/debian/rules.d/binary-libstdcxx-cross.mk      2006-11-13 
10:46:40.000000000 -0500
@@ -101,6 +101,8 @@
        sed s/$(cross_lib_arch)//g < debian/$(p_lib)/DEBIAN/shlibs > 
debian/$(p_lib)/DEBIAN/shlibs.fixed
        mv debian/$(p_lib)/DEBIAN/shlibs.fixed debian/$(p_lib)/DEBIAN/shlibs
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lib)
+       sed s/$(cross_lib_arch)//g < debian/$(p_lib).substvars > 
debian/$(p_lib).substvars.fixed
+       mv debian/$(p_lib).substvars.fixed debian/$(p_lib).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_lib).substvars > debian/$(p_lib).substvars.new
        mv debian/$(p_lib).substvars.new debian/$(p_lib).substvars
        dh_gencontrol -p$(p_lib) -- -v$(DEB_VERSION) $(common_substvars)
@@ -136,6 +138,8 @@
        sed s/$(cross_lib_arch)//g < debian/$(p_lib64)/DEBIAN/shlibs > 
debian/$(p_lib64)/DEBIAN/shlibs.fixed
        mv debian/$(p_lib64)/DEBIAN/shlibs.fixed debian/$(p_lib64)/DEBIAN/shlibs
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_lib64)
+       sed s/$(cross_lib_arch)//g < debian/$(p_lib64).substvars > 
debian/$(p_lib64).substvars.fixed
+       mv debian/$(p_lib64).substvars.fixed debian/$(p_lib64).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_lib64).substvars > debian/$(p_lib64).substvars.new
        mv debian/$(p_lib64).substvars.new debian/$(p_lib64).substvars
        dh_gencontrol -p$(p_lib64) -- -v$(DEB_VERSION) $(common_substvars)
@@ -171,6 +175,8 @@
        sed s/$(cross_lib_arch)//g < debian/$(p_lib32)/DEBIAN/shlibs > 
debian/$(p_lib32)/DEBIAN/shlibs.fixed
        mv debian/$(p_lib32)/DEBIAN/shlibs.fixed debian/$(p_lib32)/DEBIAN/shlibs
        ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps 
-p$(p_lib32)
+       sed s/$(cross_lib_arch)//g < debian/$(p_lib32).substvars > 
debian/$(p_lib32).substvars.fixed
+       mv debian/$(p_lib32).substvars.fixed debian/$(p_lib32).substvars
        sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < 
debian/$(p_lib32).substvars > debian/$(p_lib32).substvars.new
        mv debian/$(p_lib32).substvars.new debian/$(p_lib32).substvars
        dh_gencontrol -p$(p_lib32) -- -v$(DEB_VERSION) $(common_substvars)

Reply via email to