summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-02-14 13:22:03 +0100
committerFabian Groffen <grobian@gentoo.org>2016-02-14 13:22:35 +0100
commit48d743ff638e142773aa149b99f8d0e65684bc90 (patch)
tree3fefa86a3da3b2d2461c460f5db4e3273beb6fe4 /app-portage/portage-utils
parentdev-python/pyfeyn: bump to 1.0.0 (diff)
downloadgentoo-48d743ff638e142773aa149b99f8d0e65684bc90.tar.gz
gentoo-48d743ff638e142773aa149b99f8d0e65684bc90.tar.bz2
gentoo-48d743ff638e142773aa149b99f8d0e65684bc90.zip
app-portage/portage-utils: fix 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.61-solaris.patch27
-rw-r--r--app-portage/portage-utils/portage-utils-0.61.ebuild1
2 files changed, 28 insertions, 0 deletions
diff --git a/app-portage/portage-utils/files/portage-utils-0.61-solaris.patch b/app-portage/portage-utils/files/portage-utils-0.61-solaris.patch
new file mode 100644
index 00000000000..8bcc9c1b0ba
--- /dev/null
+++ b/app-portage/portage-utils/files/portage-utils-0.61-solaris.patch
@@ -0,0 +1,27 @@
+qcache: 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);
+
diff --git a/app-portage/portage-utils/portage-utils-0.61.ebuild b/app-portage/portage-utils/portage-utils-0.61.ebuild
index 205874bdf8b..1b266791166 100644
--- a/app-portage/portage-utils/portage-utils-0.61.ebuild
+++ b/app-portage/portage-utils/portage-utils-0.61.ebuild
@@ -22,6 +22,7 @@ DEPEND="${RDEPEND}
static? ( dev-libs/iniparser:0[static-libs] )"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-solaris.patch
epatch_user
}