aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-04-03 21:30:39 +0800
committerbapt <bapt@FreeBSD.org>2014-04-03 21:30:39 +0800
commite500cc907e07f7a58fc1f46deda9ed39450392a6 (patch)
tree8e3b255dc4749076fb4815e9edbf611cfcd0a3fd /ports-mgmt
parent639fc5d30401f9244900e8e2d2109647361b1a62 (diff)
downloadfreebsd-ports-graphics-e500cc907e07f7a58fc1f46deda9ed39450392a6.tar.gz
freebsd-ports-graphics-e500cc907e07f7a58fc1f46deda9ed39450392a6.tar.zst
freebsd-ports-graphics-e500cc907e07f7a58fc1f46deda9ed39450392a6.zip
Add the ability to specifiy the file where the ABI string will be determined from
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile2
-rw-r--r--ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 7059515e330..9f27a61a3df 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -2,7 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.2.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= ports-mgmt
MASTER_SITES= \
http://files.etoilebsd.net/${PORTNAME}/ \
diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
new file mode 100644
index 00000000000..8eaa598a03d
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
@@ -0,0 +1,25 @@
+diff --git a/libpkg/pkg_elf.c b/libpkg/pkg_elf.c
+index 7c75606..165b65d 100644
+--- libpkg/pkg_elf.c
++++ libpkg/pkg_elf.c
+@@ -636,6 +636,11 @@
+ int ret = EPKG_OK;
+ int i;
+ const char *arch, *abi, *endian_corres_str, *wordsize_corres_str, *fpu;
++ const char *path;
++
++ path = getenv("ABI_FILE");
++ if (path == NULL)
++ path = _PATH_BSHELL;
+
+ if (elf_version(EV_CURRENT) == EV_NONE) {
+ pkg_emit_error("ELF library initialization failed: %s",
+@@ -643,7 +648,7 @@
+ return (EPKG_FATAL);
+ }
+
+- if ((fd = open(_PATH_BSHELL, O_RDONLY)) < 0) {
++ if ((fd = open(path, O_RDONLY)) < 0) {
+ pkg_emit_errno("open", _PATH_BSHELL);
+ snprintf(dest, sz, "%s", "unknown");
+ return (EPKG_FATAL);