aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-07-17 12:11:59 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-07-17 12:11:59 +0000
commite144a95e3b5244cc814ae2ffce88bf6172928737 (patch)
tree8accc298ca611f69e71bfa0d2103110c605c5c31 /ports-mgmt
parentf008362baf91453ea68185b039f52484ec4af19b (diff)
downloadports-e144a95e3b5244cc814ae2ffce88bf6172928737.tar.gz
ports-e144a95e3b5244cc814ae2ffce88bf6172928737.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-arm-eabi58
2 files changed, 59 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 9f03726d189f..2d3e4ef7060a 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.1.4
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= http://files.etoilebsd.net/pkg/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
diff --git a/ports-mgmt/pkg/files/patch-arm-eabi b/ports-mgmt/pkg/files/patch-arm-eabi
new file mode 100644
index 000000000000..8af1a6cf310b
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-arm-eabi
@@ -0,0 +1,58 @@
+diff --git libpkg/pkg_elf.c libpkg/pkg_elf.c
+index 8ac65ba..2abfc0e 100644
+--- libpkg/pkg_elf.c
++++ libpkg/pkg_elf.c
+@@ -484,7 +484,7 @@ pkg_get_myarch(char *dest, size_t sz)
+ uint32_t version = 0;
+ int ret = EPKG_OK;
+ int i;
+- const char *abi, *endian_corres_str, *wordsize_corres_str;
++ const char *abi, *endian_corres_str, *wordsize_corres_str, *fpu;
+
+ if (elf_version(EV_CURRENT) == EV_NONE) {
+ pkg_emit_error("ELF library initialization failed: %s",
+@@ -569,10 +569,28 @@ pkg_get_myarch(char *dest, size_t sz)
+ endian_corres_str = elf_corres_to_string(endian_corres,
+ (int)elfhdr.e_ident[EI_DATA]);
+
++ /* FreeBSD doesn't support the hard-float ABI yet */
++ fpu = "softfp";
++ if ((elfhdr.e_flags & 0xFF000000) != 0) {
++ /* This is an EABI file, the conformance level is set */
++ abi = "eabi";
++ } else if (elfhdr.e_ident[EI_OSABI] != ELFOSABI_NONE) {
++ /*
++ * EABI executables all have this field set to
++ * ELFOSABI_NONE, therefore it must be an oabi file.
++ */
++ abi = "oabi";
++ } else {
++ /*
++ * We may have failed to positively detect the ABI,
++ * set the ABI to unknown. If we end up here one of
++ * the above cases should be fixed for the binary.
++ */
++ pkg_emit_error("unknown ARM ABI");
++ goto cleanup;
++ }
+ snprintf(dest + strlen(dest), sz - strlen(dest), ":%s:%s:%s",
+- endian_corres_str,
+- (elfhdr.e_flags & EF_ARM_NEW_ABI) > 0 ? "eabi" : "oabi",
+- (elfhdr.e_flags & EF_ARM_VFP_FLOAT) > 0 ? "softfp" : "vfp");
++ endian_corres_str, abi, fpu);
+ break;
+ case EM_MIPS:
+ /*
+diff --git newvers.sh newvers.sh
+index 8eefca3..30241fa 100755
+--- newvers.sh
++++ newvers.sh
+@@ -41,7 +41,7 @@
+ : ${PKG_MINOR_VERSION="1"}
+ : ${PKG_PATCH_LEVEL="4"}
+
+-: ${PORTREVISION:=}
++: ${PORTREVISION:=1}
+ : ${PORTEPOCH:=}
+
+ # ------------------------------------------------------------------