summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-01-14 19:17:54 +0100
committerFabian Groffen <grobian@gentoo.org>2016-01-14 19:18:34 +0100
commit53aa03a44b9665eac0aaae2b0224a1f9c16e3917 (patch)
treef2aca96fa438aeab248629c981ee59edfb9302fc /app-portage/portage-utils
parentdev-qt/qtquickcontrols: revision bump to ensure that Qt dependencies are of t... (diff)
downloadgentoo-53aa03a44b9665eac0aaae2b0224a1f9c16e3917.tar.gz
gentoo-53aa03a44b9665eac0aaae2b0224a1f9c16e3917.tar.bz2
gentoo-53aa03a44b9665eac0aaae2b0224a1f9c16e3917.zip
app-portage/portage-utils: add patch to allow compilation on Solaris
Package-Manager: portage-2.2.20-prefix
Diffstat (limited to 'app-portage/portage-utils')
-rw-r--r--app-portage/portage-utils/files/portage-utils-0.60-solaris.patch48
-rw-r--r--app-portage/portage-utils/portage-utils-0.60.ebuild1
2 files changed, 49 insertions, 0 deletions
diff --git a/app-portage/portage-utils/files/portage-utils-0.60-solaris.patch b/app-portage/portage-utils/files/portage-utils-0.60-solaris.patch
new file mode 100644
index 00000000000..c938844e846
--- /dev/null
+++ b/app-portage/portage-utils/files/portage-utils-0.60-solaris.patch
@@ -0,0 +1,48 @@
+- remove non-compatible xasprintf wrapper (compared to statement
+ expression version in libq/xasprintf.c
+- work around missing d_type/DT_DIR
+
+--- qcache.c
++++ qcache.c
+@@ -750,13 +750,21 @@
+
+ xasprintf(&catpath, "%s/dep/%s", portedb, data->overlay);
+ dir = opendir(catpath);
+- while ((de = readdir(dir)))
++ while ((de = readdir(dir))) {
++#ifndef DT_DIR
++ struct stat s;
++ if (stat(de->d_name, &s))
++ continue;
++ if (S_ISDIR(s.st_mode) && de->d_name[0] != '.') {
++#else
+ if (de->d_type == DT_DIR && de->d_name[0] != '.') {
++#endif
+ bool ok;
+ allcats = add_set_unique(de->d_name, allcats, &ok);
+ if (ok)
+ ++numcat;
+ }
++ }
+ closedir(dir);
+ free(catpath);
+
+--- libq/compat.c
++++ libq/compat.c
+@@ -20,16 +20,6 @@
+ return(off == NULL ? off : (char*)(big + (off - b)));
+ }
+
+-#undef xasprintf
+-#define xasprintf(strp, fmt, args...) \
+- do { /* xasprintf() */ \
+- char str[BUFSIZ]; \
+- if ((snprintf(str, sizeof(str)-1, fmt , ## args)) == -1) \
+- err("Out of stack space?"); \
+- str[sizeof(str)-1] = '\0'; \
+- *strp = xstrdup(str); \
+- } while (0)
+-
+ #elif defined(__hpux__) || defined(__MINT__)
+ /* must not include both dir.h and dirent.h on hpux11..11 & FreeMiNT */
+ #elif defined(__linux__)
diff --git a/app-portage/portage-utils/portage-utils-0.60.ebuild b/app-portage/portage-utils/portage-utils-0.60.ebuild
index 4b100d0e1a3..ae43b8c8611 100644
--- a/app-portage/portage-utils/portage-utils-0.60.ebuild
+++ b/app-portage/portage-utils/portage-utils-0.60.ebuild
@@ -22,6 +22,7 @@ DEPEND="${RDEPEND}
static? ( dev-libs/iniparser:0[static-libs] )"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-solaris.patch
epatch_user
}