Pārlūkot izejas kodu

* Compilation fixes and portability improvement for compiling APT against non-GNU libc

Luca Bruno 18 gadi atpakaļ
vecāks
revīzija
8cd53bd4fe
6 mainītis faili ar 35 papildinājumiem un 17 dzēšanām
  1. 2 0
      buildlib/apti18n.h.in
  2. 7 0
      buildlib/inttypes.h.in
  3. 6 6
      cmdline/makefile
  4. 9 0
      debian/changelog
  5. 1 1
      ftparchive/makefile
  6. 10 10
      methods/makefile

+ 2 - 0
buildlib/apti18n.h.in

@@ -18,6 +18,8 @@
 #else
 #else
 // apt will not use any gettext
 // apt will not use any gettext
 # define setlocale(a, b)
 # define setlocale(a, b)
+# define textdomain(a)
+# define bindtextdomain(a, b)
 # define _(x) x
 # define _(x) x
 # define N_(x) x
 # define N_(x) x
 #endif
 #endif

+ 7 - 0
buildlib/inttypes.h.in

@@ -4,6 +4,13 @@
 
 
 #include <config.h>
 #include <config.h>
 
 
+#undef int32_t
+#undef uint32_t
+#undef int16_t
+#undef uint16_t
+#undef int8_t
+#undef uint8_t
+
 /* Generate the fixed bit size types */
 /* Generate the fixed bit size types */
 #if SIZEOF_INT == 4
 #if SIZEOF_INT == 4
   typedef int int32_t;
   typedef int int32_t;

+ 6 - 6
cmdline/makefile

@@ -7,42 +7,42 @@ include ../buildlib/defaults.mak
 
 
 # The apt-cache program
 # The apt-cache program
 PROGRAM=apt-cache
 PROGRAM=apt-cache
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-cache.cc
 SOURCE = apt-cache.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-get program
 # The apt-get program
 PROGRAM=apt-get
 PROGRAM=apt-get
-SLIBS = -lapt-pkg -lutil
+SLIBS = -lapt-pkg -lutil $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-get.cc acqprogress.cc
 SOURCE = apt-get.cc acqprogress.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-config program
 # The apt-config program
 PROGRAM=apt-config
 PROGRAM=apt-config
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-config.cc
 SOURCE = apt-config.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-cdrom program
 # The apt-cdrom program
 PROGRAM=apt-cdrom
 PROGRAM=apt-cdrom
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-cdrom.cc 
 SOURCE = apt-cdrom.cc 
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-sortpkgs program
 # The apt-sortpkgs program
 PROGRAM=apt-sortpkgs
 PROGRAM=apt-sortpkgs
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-sortpkgs.cc
 SOURCE = apt-sortpkgs.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-extracttemplates program
 # The apt-extracttemplates program
 PROGRAM=apt-extracttemplates
 PROGRAM=apt-extracttemplates
-SLIBS = -lapt-pkg -lapt-inst
+SLIBS = -lapt-pkg -lapt-inst $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = apt-extracttemplates.cc 
 SOURCE = apt-extracttemplates.cc 
 include $(PROGRAM_H)
 include $(PROGRAM_H)

+ 9 - 0
debian/changelog

@@ -4,6 +4,15 @@ apt (0.7.17~exp1) UNRELEASED; urgency=low
   * Fix compilation warnings:
   * Fix compilation warnings:
     - apt-pkg/acquire.cc
     - apt-pkg/acquire.cc
     - apt-pkg/versionmatch.cc
     - apt-pkg/versionmatch.cc
+  * Compilation fixes and portability improvement for compiling APT against non-GNU libc
+    (thanks to Martin Koeppe, closes: #392063):
+    - buildlib/apti18n.h.in:
+      + textdomain() and bindtextdomain() must not be visible when --disable-nls
+    - buildlib/inttypes.h.in: undefine standard int*_t types
+    - Append INTLLIBS to SLIBS:
+      + cmdline/makefile
+      + ftparchive/makefile
+      + methods/makefile
 
 
  -- Luca Bruno <lethalman88@gmail.com>  Sat, 11 Oct 2008 09:17:46 +0200
  -- Luca Bruno <lethalman88@gmail.com>  Sat, 11 Oct 2008 09:17:46 +0200
 
 

+ 1 - 1
ftparchive/makefile

@@ -8,7 +8,7 @@ include ../buildlib/defaults.mak
 # The apt-ftparchive program
 # The apt-ftparchive program
 ifdef BDBLIB
 ifdef BDBLIB
 PROGRAM=apt-ftparchive
 PROGRAM=apt-ftparchive
-SLIBS = -lapt-pkg -lapt-inst $(BDBLIB)
+SLIBS = -lapt-pkg -lapt-inst $(BDBLIB) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile apt-inst/makefile
 LIB_MAKES = apt-pkg/makefile apt-inst/makefile
 SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \
 SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \
          multicompress.cc
          multicompress.cc

+ 10 - 10
methods/makefile

@@ -12,70 +12,70 @@ APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
 
 
 # The file method
 # The file method
 PROGRAM=file
 PROGRAM=file
-SLIBS = -lapt-pkg 
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = file.cc
 SOURCE = file.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The copy method
 # The copy method
 PROGRAM=copy
 PROGRAM=copy
-SLIBS = -lapt-pkg 
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = copy.cc
 SOURCE = copy.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The gzip method
 # The gzip method
 PROGRAM=gzip
 PROGRAM=gzip
-SLIBS = -lapt-pkg 
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = gzip.cc
 SOURCE = gzip.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The gpgv method
 # The gpgv method
 PROGRAM=gpgv
 PROGRAM=gpgv
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = gpgv.cc
 SOURCE = gpgv.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The cdrom method
 # The cdrom method
 PROGRAM=cdrom
 PROGRAM=cdrom
-SLIBS = -lapt-pkg 
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = cdrom.cc
 SOURCE = cdrom.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The http method
 # The http method
 PROGRAM=http
 PROGRAM=http
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = http.cc rfc2553emu.cc connect.cc
 SOURCE = http.cc rfc2553emu.cc connect.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The https method
 # The https method
 PROGRAM=https
 PROGRAM=https
-SLIBS = -lapt-pkg -lcurl
+SLIBS = -lapt-pkg -lcurl $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = https.cc
 SOURCE = https.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The ftp method
 # The ftp method
 PROGRAM=ftp
 PROGRAM=ftp
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = ftp.cc rfc2553emu.cc connect.cc
 SOURCE = ftp.cc rfc2553emu.cc connect.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The rred method
 # The rred method
 PROGRAM=rred
 PROGRAM=rred
-SLIBS = -lapt-pkg $(SOCKETLIBS)
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = rred.cc
 SOURCE = rred.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The rsh method
 # The rsh method
 PROGRAM=rsh
 PROGRAM=rsh
-SLIBS = -lapt-pkg
+SLIBS = -lapt-pkg $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
 SOURCE = rsh.cc
 SOURCE = rsh.cc
 include $(PROGRAM_H)
 include $(PROGRAM_H)