[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2501: (no subject)



Package: perl
Version: 5.002-5

This patch is needed to make the debian.* files independent of the
architecture used. Well at least it should make _no_difference_ on
a ix86-linux (which might has never worked correctly on a pentium?),
but works correctly on a m68k-linux.

I have replaced all i486 in the debian.rules file with $(ARCH), which
essentially is set to `uname -a`. This change is also propagated to
the debian.postinst and debian.prerm files (by replaceing =arch= with
$(ARCH), instead of the hardcoded i486 in the original files) this
patch leads to a correct build on m68k-linux systems, and shouldn't
change anything on a ix86-linux system (so at least on a i486-linux
this should work).

Note however that on pentiums (as well as on i386) systems the build
process might nevertheless break, since the Configure script seems to
determine the system type as i586-linux (i386-linux) and so creates a
binary which cannot find eg Config.pm, because this file is hardwired
to
   /usr/lib/perl5/i486-linux/$(version)
where perl might search
   /usr/lib/perl5/i586-linux/$(version)
or on a i386:
   /usr/lib/perl5/i386-linux/$(version).
In any way, the behaviour for a build process doesn't change for the
intels with this patch (which means that if this bug is present, it is
neither created with this patch, nor fixed).

If this bug really happens, then with this patch installed only the
line
   ARCH := $(shell uname -m | sed -e 's/i[345]86/$(DefaultIntelArch)/')
in the patched debian.rules file might be changed to
   ARCH := $(shell uname -m)
to fix it.

please check these hints, as i don't have any intel-arch at hand... ;-)

jjm

----------------------------------------------------------------------
diff -ru -x log.* perl5.002.orig/debian.postinst perl5.002/debian.postinst
--- perl5.002.orig/debian.postinst	Tue Feb  6 03:06:04 1996
+++ perl5.002/debian.postinst	Sun Mar  3 15:51:59 1996
@@ -2,7 +2,7 @@

 set -e

-PHDIR=/usr/lib/perl5/i486-linux/=version=
+PHDIR=/usr/lib/perl5/=arch=-linux/=version=

 makeheaders () {
 	echo "Creating Perl header files.  This may take a while..."
diff -ru -x log.* perl5.002.orig/debian.prerm perl5.002/debian.prerm
--- perl5.002.orig/debian.prerm	Tue Feb  6 03:06:04 1996
+++ perl5.002/debian.prerm	Sun Mar  3 15:52:00 1996
@@ -1,6 +1,6 @@
 #!/bin/sh -

 set -e
-find /usr/lib/perl5/i486-linux/=version= -name '*.ph' | xargs rm -f
+find /usr/lib/perl5/=arch=-linux/=version= -name '*.ph' | xargs rm -f
 cd /usr/bin
 test -f perl.dist || ln perl perl.dist
diff -ru -x log.* perl5.002.orig/debian.rules perl5.002/debian.rules
--- perl5.002.orig/debian.rules	Wed Feb  7 01:46:37 1996
+++ perl5.002/debian.rules	Mon Mar  4 21:45:23 1996
@@ -21,6 +21,11 @@
 # Need the current directory to install from
 PWD := $(shell pwd)

+# uname returns i[345]86. only one of them is known by the Makefile
+DefaultIntelArch=i486
+# get the architecture name
+ARCH := $(shell uname -m | sed -e 's/i[345]86/$(DefaultIntelArch)/')
+
 # Since Laziness is a virtue, let's make things a little easier for your
 # humble package maintainer.
 HOSTNAME = $(shell hostname)
@@ -62,7 +67,7 @@
 	install -d $(BINDIR)
 	install -d $(MAN1DIR)
 	install -d $(MAN3DIR)
-	install -d $(LIBDIR)/i486-linux/$(version)
+	install -d $(LIBDIR)/$(ARCH)-linux/$(version)
 	install -d $(DOCDIR)/copyright
 	install -d $(DOCDIR)/examples/perl
 	install -d $(DOCDIR)/perl/emacs
@@ -70,10 +75,10 @@
 	make install
 	mv $(BINDIR)/perl $(BINDIR)/perl.dist

-	./perl -i -pe 's#$(PWD)/debian-tmp##;' ./debian-tmp/usr/lib/perl5/i486-linux/$(version)/Config.pm
+	./perl -i -pe 's#$(PWD)/debian-tmp##;' ./debian-tmp/usr/lib/perl5/$(ARCH)-linux/$(version)/Config.pm
 	./perl -pe 's/=version=/$(version)-$(debian)/;' debian.control > debian-tmp/DEBIAN/control
-	./perl -pe 's/=version=/$(version)/' debian.postinst > debian-tmp/DEBIAN/postinst
-	./perl -pe 's/=version=/$(version)/' debian.prerm > debian-tmp/DEBIAN/prerm
+	./perl -pe 's/=version=/$(version)/;' -pe 's/=arch=/$(ARCH)/;' debian.postinst > debian-tmp/DEBIAN/postinst
+	./perl -pe 's/=version=/$(version)/;' -pe 's/=arch=/$(ARCH)/;' debian.prerm > debian-tmp/DEBIAN/prerm
 	chmod 644 debian-tmp/DEBIAN/control
 	chmod 755 debian-tmp/DEBIAN/{postinst,prerm}
 	chown -R root.root debian-tmp/DEBIAN

--
Juergen Menden                   | Disclaimer: The opinions expressed by me,
tel:    +49 (89) 2051 - 2387     +-----------+ are (usually) not the opinions
e-mail: menden@informatik.tu-muenchen.de     | of anyone else on this planet.

Hi! I'm a .signature virus!  Add me to your .signature and join in the fun!


Reply to: