diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-09-19 20:04:51 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-09-19 20:04:51 +0000 |
commit | b8cd572806b6d3d28ea43c15e1d5ed53a427afd8 (patch) | |
tree | e8325d227f6dc3848c8b7f1e7a3e46dae384c226 /ports-mgmt | |
parent | 59f9e4136eda375b1d4d58a50d948f9d3cd615ba (diff) | |
download | ports-b8cd572806b6d3d28ea43c15e1d5ed53a427afd8.tar.gz ports-b8cd572806b6d3d28ea43c15e1d5ed53a427afd8.zip |
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/pkg/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__pkg.h.in | 11 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c | 70 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__pkgdb.c | 11 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__private__elf_tables.h | 13 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-pkg__register.c | 11 |
6 files changed, 112 insertions, 6 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile index defedc885e3d..31c432c29124 100644 --- a/ports-mgmt/pkg/Makefile +++ b/ports-mgmt/pkg/Makefile @@ -2,7 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.1.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= ports-mgmt MASTER_SITES= http://files.etoilebsd.net/pkg/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/ \ diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg.h.in b/ports-mgmt/pkg/files/patch-libpkg__pkg.h.in new file mode 100644 index 000000000000..2afea253b6d0 --- /dev/null +++ b/ports-mgmt/pkg/files/patch-libpkg__pkg.h.in @@ -0,0 +1,11 @@ +--- ./libpkg/pkg.h.in.orig 2013-07-06 12:48:19.000000000 +0200 ++++ ./libpkg/pkg.h.in 2013-09-19 20:59:25.679219359 +0200 +@@ -626,7 +626,7 @@ + #define PKG_CONTAINS_STATIC_LIBS (1U << 25) + #define PKG_CONTAINS_H_OR_LA (1U << 26) + +-int pkg_analyse_files(struct pkgdb *, struct pkg *); ++int pkg_analyse_files(struct pkgdb *, struct pkg *, const char *stage); + + /** + * Suggest if a package could be marked architecture independent or diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c index 220f88d68b7c..343c43eaef48 100644 --- a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c +++ b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c @@ -1,6 +1,31 @@ ---- ./libpkg/pkg_elf.c.orig 2013-07-06 05:48:19.000000000 -0500 -+++ ./libpkg/pkg_elf.c 2013-09-05 06:33:00.416129335 -0500 -@@ -271,6 +271,10 @@ +--- ./libpkg/pkg_elf.c.orig 2013-07-06 12:48:19.000000000 +0200 ++++ ./libpkg/pkg_elf.c 2013-09-19 21:49:03.825014672 +0200 +@@ -87,6 +87,8 @@ + const char *name, bool is_shlib) + { + const char *pkgname, *pkgversion; ++ struct pkg_file *file = NULL; ++ const char *filepath; + + switch(filter_system_shlibs(name, NULL, 0)) { + case EPKG_OK: /* A non-system library */ +@@ -100,6 +102,15 @@ + if (is_shlib) + return (EPKG_OK); + ++ /* Search in libraries we do provide */ ++ while (pkg_files(pkg, &file) == EPKG_OK) { ++ filepath = pkg_file_path(file); ++ if (strcmp(&filepath[strlen(filepath) - strlen(name)], name) == 0) { ++ pkg_addshlib_required(pkg, name); ++ return (EPKG_OK); ++ } ++ } ++ + pkg_get(pkg, PKG_NAME, &pkgname, PKG_VERSION, &pkgversion); + warnx("(%s-%s) %s - shared library %s not found", + pkgname, pkgversion, fpath, name); +@@ -271,6 +282,10 @@ ret = EPKG_END; /* Some error occurred, ignore this file */ goto cleanup; } @@ -11,7 +36,42 @@ osname = (const char *) data->d_buf + sizeof(Elf_Note); if (strncasecmp(osname, "freebsd", sizeof("freebsd")) != 0 && strncasecmp(osname, "dragonfly", sizeof("dragonfly")) != 0) { -@@ -484,7 +488,7 @@ +@@ -323,7 +338,7 @@ + if (dyn->d_tag != DT_RPATH && dyn->d_tag != DT_RUNPATH) + continue; + +- shlib_list_from_rpath(elf_strptr(e, sh_link, dyn->d_un.d_val), ++ shlib_list_from_rpath(elf_strptr(e, sh_link, dyn->d_un.d_val), + dirname(fpath)); + break; + } +@@ -377,11 +392,11 @@ + } + + int +-pkg_analyse_files(struct pkgdb *db, struct pkg *pkg) ++pkg_analyse_files(struct pkgdb *db, struct pkg *pkg, const char *stage) + { + struct pkg_file *file = NULL; + int ret = EPKG_OK; +- const char *fpath; ++ char fpath[MAXPATHLEN]; + bool autodeps = false; + bool developer = false; + int (*action)(void *, struct pkg *, const char *, const char *, bool); +@@ -410,7 +425,10 @@ + PKG_CONTAINS_H_OR_LA); + + while (pkg_files(pkg, &file) == EPKG_OK) { +- fpath = pkg_file_path(file); ++ if (stage != NULL) ++ snprintf(fpath, MAXPATHLEN, "%s/%s", stage, pkg_file_path(file)); ++ else ++ strlcpy(fpath, pkg_file_path(file), MAXPATHLEN); + + ret = analyse_elf(pkg, fpath, action, db); + if (developer) { +@@ -484,7 +502,7 @@ uint32_t version = 0; int ret = EPKG_OK; int i; @@ -20,7 +80,7 @@ if (elf_version(EV_CURRENT) == EV_NONE) { pkg_emit_error("ELF library initialization failed: %s", -@@ -569,10 +573,28 @@ +@@ -569,10 +587,28 @@ endian_corres_str = elf_corres_to_string(endian_corres, (int)elfhdr.e_ident[EI_DATA]); diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c b/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c new file mode 100644 index 000000000000..8f93324bab28 --- /dev/null +++ b/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c @@ -0,0 +1,11 @@ +--- ./libpkg/pkgdb.c.orig 2013-09-19 20:55:45.183234062 +0200 ++++ ./libpkg/pkgdb.c 2013-09-19 20:55:15.578236583 +0200 +@@ -2661,7 +2661,7 @@ + return (EPKG_FATAL); + } + +- if ((ret = pkg_analyse_files(db, pkg)) == EPKG_OK) { ++ if ((ret = pkg_analyse_files(db, pkg, NULL)) == EPKG_OK) { + if (!db->prstmt_initialized && + prstmt_initialize(db) != EPKG_OK) + return (EPKG_FATAL); diff --git a/ports-mgmt/pkg/files/patch-libpkg__private__elf_tables.h b/ports-mgmt/pkg/files/patch-libpkg__private__elf_tables.h new file mode 100644 index 000000000000..15f6fed982eb --- /dev/null +++ b/ports-mgmt/pkg/files/patch-libpkg__private__elf_tables.h @@ -0,0 +1,13 @@ +--- ./libpkg/private/elf_tables.h.orig 2013-07-06 12:48:19.000000000 +0200 ++++ ./libpkg/private/elf_tables.h 2013-09-19 21:52:03.661029778 +0200 +@@ -59,7 +59,9 @@ + { -1, NULL } + }; + +-#define EF_MIPS_ABI 0x0000F000 ++#ifndef EF_MIPS_ABI ++#define EF_MIPS_ABI 0x0000f000 ++#endif + #define E_MIPS_ABI_O32 0x00001000 + #define E_MIPS_ABI_N32 0x00000020 + diff --git a/ports-mgmt/pkg/files/patch-pkg__register.c b/ports-mgmt/pkg/files/patch-pkg__register.c new file mode 100644 index 000000000000..ddb4bccbf270 --- /dev/null +++ b/ports-mgmt/pkg/files/patch-pkg__register.c @@ -0,0 +1,11 @@ +--- ./pkg/register.c.orig 2013-09-19 20:56:18.299519000 +0200 ++++ ./pkg/register.c 2013-09-19 20:56:34.568231772 +0200 +@@ -285,7 +285,7 @@ + */ + + if (!testing_mode) +- pkg_analyse_files(db, pkg); ++ pkg_analyse_files(db, pkg, input_path); + + pkg_get(pkg, PKG_ARCH, &arch); + if (arch == NULL) { |