diff options
Diffstat (limited to 'meta/recipes-devtools/apt')
17 files changed, 689 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch b/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch new file mode 100644 index 000000000..c85c3881a --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch @@ -0,0 +1,44 @@ +Upstream-Status: Backport + +Add missing includes required when building with modern toolchain, based on +patch from Debian bugzilla: +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505954 + +Should no longer be required once upgraded to 0.7.22 or later. + +Index: apt-0.7.14/apt-pkg/acquire.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/acquire.cc 2008-05-28 14:22:13.000000000 +0100 ++++ apt-0.7.14/apt-pkg/acquire.cc 2010-07-23 17:30:11.494883936 +0100 +@@ -22,6 +22,7 @@ + + #include <apti18n.h> + ++#include <cstdio> + #include <iostream> + #include <sstream> + +Index: apt-0.7.14/apt-pkg/contrib/sha256.h +=================================================================== +--- apt-0.7.14.orig/apt-pkg/contrib/sha256.h 2008-05-28 14:22:14.000000000 +0100 ++++ apt-0.7.14/apt-pkg/contrib/sha256.h 2010-07-23 17:30:11.494883936 +0100 +@@ -14,6 +14,7 @@ + #ifndef APTPKG_SHA256_H + #define APTPKG_SHA256_H + ++#include <stdint.h> + #include <string> + #include <cstring> + #include <algorithm> +Index: apt-0.7.14/apt-pkg/deb/dpkgpm.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc 2008-05-28 14:22:14.000000000 +0100 ++++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc 2010-07-23 17:30:36.960856870 +0100 +@@ -20,6 +20,7 @@ + #include <stdlib.h> + #include <fcntl.h> + #include <sys/select.h> ++#include <sys/stat.h> + #include <sys/types.h> + #include <sys/wait.h> + #include <signal.h> diff --git a/meta/recipes-devtools/apt/apt-0.7.14/localefixes.patch b/meta/recipes-devtools/apt/apt-0.7.14/localefixes.patch new file mode 100644 index 000000000..80252732e --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/localefixes.patch @@ -0,0 +1,91 @@ +Add in missing header includes to resolve compile failures with recent +compiler/glibc combinations. + +Upstream-Status: Inappropriate [Resolved upstream] + +RP 2011/11/23 + +Index: apt-0.7.14/apt-pkg/init.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/init.cc 2011-11-23 22:48:53.544637868 +0000 ++++ apt-0.7.14/apt-pkg/init.cc 2011-11-23 22:48:59.456638260 +0000 +@@ -16,6 +16,7 @@ + #include <config.h> + #include <cstdlib> + #include <sys/stat.h> ++#include <locale> + /*}}}*/ + + #define Stringfy_(x) # x +Index: apt-0.7.14/cmdline/apt-cache.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-cache.cc 2011-11-23 22:53:29.048631067 +0000 ++++ apt-0.7.14/cmdline/apt-cache.cc 2011-11-23 22:54:15.784616212 +0000 +@@ -32,6 +32,7 @@ + #include <apti18n.h> + + #include <locale.h> ++#include <locale> + #include <iostream> + #include <unistd.h> + #include <errno.h> +Index: apt-0.7.14/cmdline/apt-cdrom.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-cdrom.cc 2011-11-23 22:53:29.064631096 +0000 ++++ apt-0.7.14/cmdline/apt-cdrom.cc 2011-11-23 22:53:57.616630261 +0000 +@@ -27,6 +27,7 @@ + //#include "indexcopy.h" + + #include <locale.h> ++#include <locale> + #include <iostream> + #include <fstream> + #include <vector> +Index: apt-0.7.14/cmdline/apt-config.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-config.cc 2011-11-23 22:50:16.796635352 +0000 ++++ apt-0.7.14/cmdline/apt-config.cc 2011-11-23 22:50:25.640633906 +0000 +@@ -27,6 +27,7 @@ + #include <locale.h> + #include <iostream> + #include <string> ++#include <locale> + /*}}}*/ + using namespace std; + +Index: apt-0.7.14/cmdline/apt-extracttemplates.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-extracttemplates.cc 2011-11-23 22:53:29.080631084 +0000 ++++ apt-0.7.14/cmdline/apt-extracttemplates.cc 2011-11-23 22:53:38.304630439 +0000 +@@ -39,6 +39,7 @@ + #include <config.h> + #include <apti18n.h> + #include "apt-extracttemplates.h" ++#include <locale> + /*}}}*/ + + using namespace std; +Index: apt-0.7.14/cmdline/apt-get.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-get.cc 2011-11-23 22:53:29.096631090 +0000 ++++ apt-0.7.14/cmdline/apt-get.cc 2011-11-23 22:53:49.368629452 +0000 +@@ -48,6 +48,7 @@ + + #include <set> + #include <locale.h> ++#include <locale> + #include <langinfo.h> + #include <fstream> + #include <termios.h> +Index: apt-0.7.14/cmdline/apt-sortpkgs.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-sortpkgs.cc 2011-11-23 22:52:03.872640247 +0000 ++++ apt-0.7.14/cmdline/apt-sortpkgs.cc 2011-11-23 22:52:10.880638611 +0000 +@@ -27,6 +27,7 @@ + + #include <locale.h> + #include <unistd.h> ++#include <locale> + /*}}}*/ + + using namespace std; diff --git a/meta/recipes-devtools/apt/apt-0.7.14/makerace.patch b/meta/recipes-devtools/apt/apt-0.7.14/makerace.patch new file mode 100644 index 000000000..403711f01 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/makerace.patch @@ -0,0 +1,23 @@ +I was seeing various issues with parallel make, mainly due to to what was likely +partially installed headers. If you change into the source directory and +"NOISY=1 make ../obj/apt-pkg/sourcelist.opic" in apt-pkg, you'll see it +doesn't have any dependencies on the headers being installed. This patch +fixes that so things build correctly. + +RP 2012/3/19 + +Upstream-Status: Pending + +Index: apt-0.7.14/buildlib/library.mak +=================================================================== +--- apt-0.7.14.orig/buildlib/library.mak ++++ apt-0.7.14/buildlib/library.mak +@@ -61,7 +61,7 @@ $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR + + # Compilation rules + vpath %.cc $(SUBDIRS) +-$(OBJ)/%.opic: %.cc ++$(OBJ)/%.opic: %.cc $($(LOCAL)-HEADERS) + echo Compiling $< to $@ + $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $< + $(DoDep) diff --git a/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch b/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch new file mode 100644 index 000000000..7fd1db8b2 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch @@ -0,0 +1,11 @@ +Upstream-Status: Inappropriate [configuration] + +--- + po/LINGUAS | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- apt-0.7.14.orig/po/LINGUAS ++++ apt-0.7.14/po/LINGUAS +@@ -1 +1 @@ +-ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ko ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW ++ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW diff --git a/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch b/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch new file mode 100644 index 000000000..04e721d65 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch @@ -0,0 +1,37 @@ +Upstream-Status: Inappropriate [configuration] + +--- + apt-pkg/packagemanager.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +--- apt-0.6.45exp2.orig/apt-pkg/packagemanager.cc ++++ apt-0.6.45exp2/apt-pkg/packagemanager.cc +@@ -534,10 +534,12 @@ bool pkgPackageManager::SmartUnPack(PkgI + + List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States); + ++#if 0 + // Perform immedate configuration of the package. + if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true) + if (SmartConfigure(Pkg) == false) + return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name()); ++#endif + + return true; + } +@@ -609,6 +611,7 @@ pkgPackageManager::OrderResult pkgPackag + DoneSomething = true; + } + ++#if 0 + // Final run through the configure phase + if (ConfigureAll() == false) + return Failed; +@@ -623,6 +626,7 @@ pkgPackageManager::OrderResult pkgPackag + return Failed; + } + } ++#endif + + return Completed; + } diff --git a/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch b/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch new file mode 100644 index 000000000..216c09181 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch @@ -0,0 +1,21 @@ +Upstream-Status: Inappropriate [configuration] + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- apt-0.7.14.orig/Makefile ++++ apt-0.7.14/Makefile +@@ -15,11 +15,11 @@ all headers library clean veryclean bina + $(MAKE) -C apt-inst $@ + $(MAKE) -C methods $@ + $(MAKE) -C cmdline $@ + $(MAKE) -C ftparchive $@ + $(MAKE) -C dselect $@ +- $(MAKE) -C doc $@ ++# $(MAKE) -C doc $@ + $(MAKE) -C po $@ + + # Some very common aliases + .PHONY: maintainer-clean dist-clean distclean pristine sanity + maintainer-clean dist-clean distclean pristine sanity: veryclean diff --git a/meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch b/meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch new file mode 100644 index 000000000..68cb0b026 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch @@ -0,0 +1,57 @@ +Fix build errors + +deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': +deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' +deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here + +Upstream-Status: Backport +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc +=================================================================== +--- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 ++++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 +@@ -209,18 +209,18 @@ + /* Strip out any spaces from the text, this undoes dpkgs reformatting + of certain fields. dpkg also has the rather interesting notion of + reformatting depends operators < -> <= */ +- char *I = S; ++ char *J = S; + for (; Start != End; Start++) + { + if (isspace(*Start) == 0) +- *I++ = tolower(*Start); ++ *J++ = tolower(*Start); + if (*Start == '<' && Start[1] != '<' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + if (*Start == '>' && Start[1] != '>' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + } + +- Result = AddCRC16(Result,S,I - S); ++ Result = AddCRC16(Result,S,J - S); + } + + return Result; +Index: apt-0.7.14/cmdline/apt-get.cc +=================================================================== +--- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 ++++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 +@@ -1752,12 +1752,12 @@ + if ((*Cache)[I].Install() == false) + continue; + +- const char **J; +- for (J = CmdL.FileList + 1; *J != 0; J++) +- if (strcmp(*J,I.Name()) == 0) ++ const char **K; ++ for (K = CmdL.FileList + 1; *K != 0; J++) ++ if (strcmp(*K,I.Name()) == 0) + break; + +- if (*J == 0) { ++ if (*K == 0) { + List += string(I.Name()) + " "; + VersionsList += string(Cache[I].CandVersion) + "\n"; + } diff --git a/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch b/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch new file mode 100644 index 000000000..485ad7ba3 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch @@ -0,0 +1,42 @@ +Upstream-Status: Inappropriate [configuration] + +--- + buildlib/sizetable | 4 +++- + configure.in | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +Index: apt-0.7.14/buildlib/sizetable +=================================================================== +--- apt-0.7.14.orig/buildlib/sizetable ++++ apt-0.7.14/buildlib/sizetable +@@ -11,6 +11,9 @@ + # The format is:- + # CPU endian sizeof: char, int, short, long + i386 little 1 4 2 4 ++i486 little 1 4 2 4 ++i586 little 1 4 2 4 ++i686 little 1 4 2 4 + armeb big 1 4 2 4 + arm little 1 4 2 4 + alpha little 1 4 2 8 +@@ -21,4 +24,5 @@ m68k big 1 4 2 4 + powerpc big 1 4 2 4 + mips big 1 4 2 4 + hppa big 1 4 2 4 +-m32r big 1 4 2 4 +\ No newline at end of file ++m32r big 1 4 2 4 ++x86_64 little 1 4 2 8 +Index: apt-0.7.14/configure.in +=================================================================== +--- apt-0.7.14.orig/configure.in ++++ apt-0.7.14/configure.in +@@ -88,7 +88,7 @@ dnl This is often the dpkg architecture + dnl First check against the full canonical canoncial-system-type in $target + dnl and if that fails, just look for the cpu + AC_MSG_CHECKING(debian architecture) +-archset="`dpkg-architecture -qDEB_HOST_ARCH`" ++archset="`echo $host_alias|cut -d'-' -f1`" + if test "x$archset" = "x"; then + AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture]) + fi diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc new file mode 100644 index 000000000..51e1e3b5c --- /dev/null +++ b/meta/recipes-devtools/apt/apt-native.inc @@ -0,0 +1,64 @@ +require apt.inc +inherit native + +DEPENDS += "dpkg-native gettext-native" +PACKAGES = "" +USE_NLS = "yes" + +SRC_URI += "file://db_linking_hack.patch" + +python do_install () { + bb.build.exec_func('do_install_base', d) + bb.build.exec_func('do_install_config', d) +} + +python do_install_config () { + indir = os.path.dirname(d.getVar('FILE',1)) + infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r') + data = infile.read() + infile.close() + + data = d.expand(data) + + outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt') + if not os.path.exists(outdir): + os.makedirs(outdir) + outpath = os.path.join(outdir, 'apt.conf.sample') + + outfile = file(outpath, 'w') + outfile.write(data) + outfile.close() +} + +do_install_base () { + install -d ${D}${bindir} + install -m 0755 bin/apt-cdrom ${D}${bindir}/ + install -m 0755 bin/apt-get ${D}${bindir}/ + install -m 0755 bin/apt-config ${D}${bindir}/ + install -m 0755 bin/apt-cache ${D}${bindir}/ + install -m 0755 bin/apt-sortpkgs ${D}${bindir}/ + install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ + + eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` + eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'` + oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ + ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so + oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ + ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so + + install -d ${D}${libdir}/apt/methods + install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/ + + install -d ${D}${libdir}/dpkg/methods/apt + install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/ + install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/ + + install -d ${D}${sysconfdir}/apt + install -d ${D}${localstatedir}/lib/apt/lists/partial + install -d ${D}${localstatedir}/cache/apt/archives/partial + + install -d ${D}${localstatedir}/log/apt/ +} diff --git a/meta/recipes-devtools/apt/apt-native_0.7.14.bb b/meta/recipes-devtools/apt/apt-native_0.7.14.bb new file mode 100644 index 000000000..ec3fd20a8 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-native_0.7.14.bb @@ -0,0 +1,13 @@ +require apt-native.inc + +PR = "r7" + +SRC_URI += "file://nodoc.patch \ + file://noconfigure.patch \ + file://no-curl.patch \ + file://includes-fix.patch" + +SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" +SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045" + +LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc new file mode 100644 index 000000000..736672c26 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-package.inc @@ -0,0 +1,105 @@ +apt-manpages="doc/apt-cache.8 \ + doc/apt-cdrom.8 \ + doc/apt-config.8 \ + doc/apt-get.8 \ + doc/apt.8 \ + doc/apt.conf.5 \ + doc/apt_preferences.5 \ + doc/fr/apt-cache.fr.8 \ + doc/fr/apt-cdrom.fr.8 \ + doc/fr/apt-config.fr.8 \ + doc/fr/apt-get.fr.8 \ + doc/fr/apt.conf.fr.5 \ + doc/fr/apt_preferences.fr.5 \ + doc/fr/sources.list.fr.5 \ + doc/es/apt.es.8 \ + doc/es/apt-cache.es.8 \ + doc/es/apt-cdrom.es.8 \ + doc/es/apt-config.es.8 \ + doc/es/apt-get.es.8 \ + doc/es/apt.conf.es.5 \ + doc/es/apt_preferences.es.5 \ + doc/es/sources.list.es.5 \ + doc/pt_BR/apt_preferences.pt_BR.5 \ + doc/ja/apt-cache.ja.8 \ + doc/ja/apt-cdrom.ja.8 \ + doc/ja/apt-get.ja.8 \ + doc/ja/apt.conf.ja.5 \ + doc/sources.list.5" +apt-utils-manpages="doc/apt-extracttemplates.1 \ + doc/apt-sortpkgs.1 \ + doc/fr/apt-extracttemplates.fr.1 \ + doc/fr/apt-sortpkgs.fr.1" +# doc/fr/apt-ftparchive.fr.1 +# doc/apt-ftparchive.1 + +def get_files_apt_doc(d, bb, manpages): + import re + manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages) + manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages) + return manpages + +def get_commands_apt_doc(d, bb, manpages): + import os + s = list() + __dir_cache__ = list() + for m in manpages.split(): + dest = get_files_apt_doc(d, bb, m) + dir = os.path.dirname(dest) + if not dir in __dir_cache__: + s.append("install -d ${D}/%s" % dir) + __dir_cache__.append(dir) + s.append("install -m 0644 %s ${D}/%s" % (m, dest)) + return "\n".join(s) + +PACKAGES += "${PN}-utils ${PN}-utils-doc" +FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \ + ${bindir}/apt-config ${bindir}/apt-cache \ + ${libdir}/apt ${libdir}/libapt*.so.* \ + ${localstatedir} ${sysconfdir} \ + ${libdir}/dpkg" +FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates" +FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \ + ${docdir}/apt" +FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}" +FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}" + +do_install () { + set -x + ${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', True))} + ${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))} + install -d ${D}${bindir} + install -m 0755 bin/apt-cdrom ${D}${bindir}/ + install -m 0755 bin/apt-get ${D}${bindir}/ + install -m 0755 bin/apt-config ${D}${bindir}/ + install -m 0755 bin/apt-cache ${D}${bindir}/ + + install -m 0755 bin/apt-sortpkgs ${D}${bindir}/ + install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ + + eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` + eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'` + oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ + ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so + oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ + ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so + + install -d ${D}${libdir}/apt/methods + install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/ + + install -d ${D}${libdir}/dpkg/methods/apt + install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/ + install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/ + install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/ + + install -d ${D}${sysconfdir}/apt + install -d ${D}${localstatedir}/lib/apt/lists/partial + install -d ${D}${localstatedir}/cache/apt/archives/partial + install -d ${D}${docdir}/apt/examples + install -m 0644 doc/examples/* ${D}${docdir}/apt/examples/ + + install -d ${D}${includedir}/apt-pkg/ + install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/ +} diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc new file mode 100644 index 000000000..9d32ddb4c --- /dev/null +++ b/meta/recipes-devtools/apt/apt.inc @@ -0,0 +1,28 @@ +DESCRIPTION = "Advanced front-end for dpkg." +LICENSE = "GPLv2.0+" +SECTION = "base" + +SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \ + file://no-ko-translation.patch \ + file://use-host.patch \ + file://localefixes.patch \ + file://makerace.patch \ + " + +inherit autotools gettext + +EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" + +# Apt wants to know the glibc version by running a binary file, which will +# fail, so we have to tell configure which version to use Since I don't know +# the impliations of setting a wrong value I only provide one for angstrom, +# which uses glibc 2.5 (which claims to be 2.4) +# Koen - 20070327 +EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4" + +# under Debian it is set to libc6.3 as they use glibc 2.3 +# They also provide glibc 2.5 in 'experimental' and it works with APT built +# for 2.3 so we set it in same way +EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3" + +FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/" diff --git a/meta/recipes-devtools/apt/apt_0.7.14.bb b/meta/recipes-devtools/apt/apt_0.7.14.bb new file mode 100644 index 000000000..6354f8e05 --- /dev/null +++ b/meta/recipes-devtools/apt/apt_0.7.14.bb @@ -0,0 +1,20 @@ +DEPENDS = "curl db" +RDEPENDS_${PN} = "dpkg" +LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" +require apt.inc + +PR = "r11" + +SRC_URI += "file://nodoc.patch \ + file://includes-fix.patch \ + file://remove-redeclaration.patch \ + " + +SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" +SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045" + +require apt-package.inc + +FILES_${PN} += "${bindir}/apt-key" +apt-manpages += "doc/apt-key.8" + diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/files/apt.conf new file mode 100644 index 000000000..ab7a5db49 --- /dev/null +++ b/meta/recipes-devtools/apt/files/apt.conf @@ -0,0 +1,43 @@ +Dir "${STAGING_DIR_NATIVE}/" +{ + State "var/lib/apt/" + { + Lists "lists/"; + status "#ROOTFS#/var/lib/dpkg/status"; + }; + Cache "var/cache/apt/" + { + Archives "archives/"; + pkgcache ""; + srcpkgcache ""; + }; + Bin "${STAGING_BINDIR_NATIVE}/" + { + methods "${STAGING_LIBDIR}/apt/methods/"; + gzip "/bin/gzip"; + dpkg "dpkg"; + dpkg-source "dpkg-source"; + dpkg-buildpackage "dpkg-buildpackage"; + apt-get "apt-get"; + apt-cache "apt-cache"; + }; + Etc "etc/apt/" + { + Preferences "preferences"; + }; +}; + +APT +{ + Install-Recommends "true"; + Immediate-Configure "false"; + Architecture "i586"; + Get + { + Assume-Yes "true"; + Force-Yes "true" + }; +}; + +DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"}; +}; diff --git a/meta/recipes-devtools/apt/files/db_linking_hack.patch b/meta/recipes-devtools/apt/files/db_linking_hack.patch new file mode 100644 index 000000000..d2246b3d2 --- /dev/null +++ b/meta/recipes-devtools/apt/files/db_linking_hack.patch @@ -0,0 +1,29 @@ +Upstream-Status: Backport + +Index: apt-0.7.3/configure.in +=================================================================== +--- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000 ++++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000 +@@ -67,8 +67,20 @@ + [AC_DEFINE(HAVE_BDB) + BDBLIB="-ldb" + AC_MSG_RESULT(yes)], +- [BDBLIB="" +- AC_MSG_RESULT(no)] ++ ++ LIBS="$LIBS -lpthread" ++ [AC_MSG_CHECKING(if we can link against BerkeleyDB with pthread) ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [#include <db.h>], ++ [int r, s, t; db_version(&r, &s, &t);] ++ )], ++ [AC_DEFINE(HAVE_BDB) ++ BDBLIB="-ldb -lpthread" ++ AC_MSG_RESULT(yes)], ++ [BDBLIB="" ++ AC_MSG_RESULT(no)] ++ )] + )] + ) + diff --git a/meta/recipes-devtools/apt/files/environment.patch b/meta/recipes-devtools/apt/files/environment.patch new file mode 100644 index 000000000..9a0303803 --- /dev/null +++ b/meta/recipes-devtools/apt/files/environment.patch @@ -0,0 +1,15 @@ +Upstream-Status: Backport + +Index: apt-0.6.46.2/buildlib/environment.mak.in +=================================================================== +--- apt-0.6.46.2.orig/buildlib/environment.mak.in 2007-03-29 11:38:58.000000000 +0100 ++++ apt-0.6.46.2/buildlib/environment.mak.in 2007-03-29 11:39:12.000000000 +0100 +@@ -62,7 +62,7 @@ + + # Shared library things + HOST_OS = @host_os@ +-ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0) ++ifneq ($(words $(filter linux-gnu linux-gnueabi gnu% %gnu,$(HOST_OS))),0) + SONAME_MAGIC=-Wl,-soname -Wl, + LFLAGS_SO= + else diff --git a/meta/recipes-devtools/apt/files/no-curl.patch b/meta/recipes-devtools/apt/files/no-curl.patch new file mode 100644 index 000000000..eb2f100d1 --- /dev/null +++ b/meta/recipes-devtools/apt/files/no-curl.patch @@ -0,0 +1,46 @@ +Upstream-Status: Inappropriate [configuration] + +--- + configure.in | 6 ------ + methods/makefile | 7 ------- + 2 files changed, 13 deletions(-) + +--- apt-0.7.14.orig/configure.in ++++ apt-0.7.14/configure.in +@@ -84,16 +84,10 @@ AC_CHECK_HEADER(db.h, + )] + ) + + LIBS="$saveLIBS" + +-AC_CHECK_LIB(curl, curl_easy_init, +- [AC_CHECK_HEADER(curl/curl.h, +- curl_ok=yes, +- curl_ok=no)], +- AC_MSG_ERROR([failed: I need CURL due https support]), +-) + + AC_SUBST(BDBLIB) + + dnl Converts the ARCH to be something singular for this general CPU family + dnl This is often the dpkg architecture string. +--- apt-0.7.14.orig/methods/makefile ++++ apt-0.7.14/methods/makefile +@@ -50,17 +50,10 @@ PROGRAM=http + SLIBS = -lapt-pkg $(SOCKETLIBS) + LIB_MAKES = apt-pkg/makefile + SOURCE = http.cc rfc2553emu.cc connect.cc + include $(PROGRAM_H) + +-# The https method +-PROGRAM=https +-SLIBS = -lapt-pkg -lcurl +-LIB_MAKES = apt-pkg/makefile +-SOURCE = https.cc +-include $(PROGRAM_H) +- + # The ftp method + PROGRAM=ftp + SLIBS = -lapt-pkg $(SOCKETLIBS) + LIB_MAKES = apt-pkg/makefile + SOURCE = ftp.cc rfc2553emu.cc connect.cc |
