dpkg/dpkg.patch

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
child 626
03d66ab4c7ca
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

michael@49 1 Index: dpkg-deb/Makefile.in
michael@49 2 --- dpkg-deb/Makefile.in.orig 2008-03-30 11:58:18 +0200
michael@49 3 +++ dpkg-deb/Makefile.in 2008-04-01 21:56:55 +0200
michael@49 4 @@ -213,8 +213,7 @@
michael@49 5 main.c
michael@49 6
michael@49 7 dpkg_deb_LDADD = \
michael@49 8 - ../libcompat/libcompat.a \
michael@49 9 - $(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS)
michael@49 10 + $(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS) ../libcompat/libcompat.a
michael@49 11
michael@49 12 all: all-am
michael@49 13
michael@49 14 Index: dpkg-split/Makefile.in
michael@49 15 --- dpkg-split/Makefile.in.orig 2008-03-30 11:58:18 +0200
michael@49 16 +++ dpkg-split/Makefile.in 2008-04-01 21:57:43 +0200
michael@49 17 @@ -217,9 +217,8 @@
michael@49 18 split.c
michael@49 19
michael@49 20 dpkg_split_LDADD = \
michael@49 21 - ../libcompat/libcompat.a \
michael@49 22 $(LIBINTL) \
michael@49 23 - ../lib/libdpkg.a
michael@49 24 + ../lib/libdpkg.a ../libcompat/libcompat.a
michael@49 25
michael@49 26 pkglib_SCRIPTS = mksplit
michael@49 27 EXTRA_DIST = mksplit.pl
michael@49 28 Index: dselect/Makefile.in
michael@49 29 --- dselect/Makefile.in.orig 2008-03-30 11:58:18 +0200
michael@49 30 +++ dselect/Makefile.in 2008-04-01 21:56:55 +0200
michael@49 31 @@ -249,10 +249,9 @@
michael@49 32 pkgtop.cc
michael@49 33
michael@49 34 dselect_LDADD = \
michael@49 35 - ../libcompat/libcompat.a \
michael@49 36 $(LIBINTL) \
michael@49 37 $(CURSES_LIBS) \
michael@49 38 - ../lib/libdpkg.a
michael@49 39 + ../lib/libdpkg.a ../libcompat/libcompat.a
michael@49 40
michael@49 41 EXTRA_DIST = keyoverride mkcurkeys.pl
michael@49 42 CLEANFILES = curkeys.h
michael@49 43 @@ -640,8 +639,8 @@
michael@49 44
michael@49 45 curkeys.$(OBJEXT): curkeys.h
michael@49 46 curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl
michael@49 47 - cursesfile=`echo '#include <ncursesw/curses.h>' | \
michael@49 48 - $(CC) -E - | grep 'curses.h' | head -n 1 | \
michael@49 49 + cursesfile=`echo '#include <ncurses/curses.h>' | \
michael@49 50 + $(CC) $(CPPFLAGS) -E - | grep 'curses.h' | head -n 1 | \
michael@49 51 sed -e 's/^[^"]*"//; s/".*$$//'`; \
michael@49 52 if [ "$$cursesfile" = "" ]; then \
michael@49 53 echo "can't find curses file"; exit 1; \
michael@49 54 Index: dselect/dselect.h
michael@49 55 --- dselect/dselect.h.orig 2008-03-30 11:57:41 +0200
michael@49 56 +++ dselect/dselect.h 2008-04-01 21:56:55 +0200
michael@49 57 @@ -28,7 +28,7 @@
michael@49 58
michael@49 59 #include <signal.h>
michael@49 60 #undef ERR
michael@49 61 -#include <ncursesw/curses.h>
michael@49 62 +#include <ncurses/curses.h>
michael@49 63
michael@49 64 struct helpmenuentry {
michael@49 65 char key;
michael@49 66 Index: dselect/main.cc
michael@49 67 --- dselect/main.cc.orig 2008-03-30 11:57:41 +0200
michael@49 68 +++ dselect/main.cc 2008-04-01 21:56:55 +0200
michael@49 69 @@ -37,7 +37,7 @@
michael@49 70 #include <ctype.h>
michael@49 71 #include <assert.h>
michael@49 72
michael@49 73 -#include <ncursesw/term.h>
michael@49 74 +#include <ncurses/term.h>
michael@49 75
michael@49 76 extern "C" {
michael@49 77 #include <dpkg.h>
michael@49 78 Index: lib/tarfn.c
michael@49 79 --- lib/tarfn.c.orig 2008-03-30 10:58:51 +0200
michael@49 80 +++ lib/tarfn.c 2008-04-01 21:56:55 +0200
michael@49 81 @@ -62,7 +62,9 @@
michael@49 82 int len;
michael@49 83 char * str;
michael@49 84
michael@49 85 - len = strnlen(s, size);
michael@49 86 + len = strlen(s);
michael@49 87 + if (len > size)
michael@49 88 + len = size;
michael@49 89 str = m_malloc(len + 1);
michael@49 90 memcpy(str, s, len);
michael@49 91 str[len] = 0;
michael@49 92 Index: man/Makefile.in
michael@49 93 --- man/Makefile.in.orig 2008-03-30 11:58:18 +0200
michael@49 94 +++ man/Makefile.in 2008-04-01 21:56:55 +0200
michael@49 95 @@ -189,7 +189,7 @@
michael@49 96 top_srcdir = @top_srcdir@
michael@49 97
michael@49 98 # Extract the list of languages from the po4a config file.
michael@49 99 -LINGUAS = $(shell sed -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg)
michael@49 100 +LINGUAS =
michael@49 101 dist_man_MANS = \
michael@49 102 822-date.1 \
michael@49 103 cleanup-info.8 \
michael@49 104 @@ -540,7 +540,7 @@
michael@49 105 all-local: all-local-@USE_NLS@
michael@49 106
michael@49 107 all-local-no:
michael@49 108 -all-local-yes: man.stamp
michael@49 109 +all-local-yes:
michael@49 110
michael@49 111 # FIXME: Use a stamp file until po4a supports them internally.
michael@49 112 man.stamp:
michael@49 113 Index: scripts/Makefile.in
michael@49 114 --- scripts/Makefile.in.orig 2008-03-30 11:58:19 +0200
michael@49 115 +++ scripts/Makefile.in 2008-04-01 21:56:55 +0200
michael@49 116 @@ -757,8 +757,8 @@
michael@49 117 $(INSTALL_SCRIPT) install-info $(DESTDIR)$(sbindir)
michael@49 118
michael@49 119 install-data-local:
michael@49 120 - $(mkdir_p) $(DESTDIR)$(sysconfdir)/alternatives
michael@49 121 - $(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/alternatives/README
michael@49 122 + $(mkdir_p) $(DESTDIR)$(sysconfdir)/dpkg/alternatives
michael@49 123 + $(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/dpkg/alternatives/README
michael@49 124
michael@49 125 # Ideally we'd use 'sed -i', but unfortunately that's not portable.
michael@49 126 install-data-hook:
michael@49 127 Index: src/Makefile.in
michael@49 128 --- src/Makefile.in.orig 2008-03-30 11:58:19 +0200
michael@49 129 +++ src/Makefile.in 2008-04-01 21:56:55 +0200
michael@49 130 @@ -239,8 +239,8 @@
michael@49 131 update.c
michael@49 132
michael@49 133 dpkg_LDADD = \
michael@49 134 - ../libcompat/libcompat.a \
michael@49 135 - $(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS)
michael@49 136 + \
michael@49 137 + $(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS) ../libcompat/libcompat.a
michael@49 138
michael@49 139 dpkg_query_SOURCES = \
michael@49 140 errors.c \
michael@49 141 @@ -248,17 +248,17 @@
michael@49 142 query.c
michael@49 143
michael@49 144 dpkg_query_LDADD = \
michael@49 145 - ../libcompat/libcompat.a \
michael@49 146 + \
michael@49 147 $(LIBINTL) \
michael@49 148 - ../lib/libdpkg.a
michael@49 149 + ../lib/libdpkg.a ../libcompat/libcompat.a
michael@49 150
michael@49 151 dpkg_trigger_SOURCES = \
michael@49 152 trigcmd.c
michael@49 153
michael@49 154 dpkg_trigger_LDADD = \
michael@49 155 - ../libcompat/libcompat.a \
michael@49 156 + \
michael@49 157 $(LIBINTL) \
michael@49 158 - ../lib/libdpkg.a
michael@49 159 + ../lib/libdpkg.a ../libcompat/libcompat.a
michael@49 160
michael@49 161 all: all-am
michael@49 162

mercurial