summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-12-12 19:31:37 +0000
committerjoerg <joerg@pkgsrc.org>2006-12-12 19:31:37 +0000
commit28f1a65492ed66a50ae15a63255c316b52c58f8d (patch)
tree0751992e62275bf669976091172840f43a42e59c /misc
parentc075dd498ad7c38ceeedb083340439fafab017dd (diff)
downloadpkgsrc-28f1a65492ed66a50ae15a63255c316b52c58f8d.tar.gz
On DragonFly, fall back to glob(3) as wordexp(3) doesn't exist.
Diffstat (limited to 'misc')
-rw-r--r--misc/celestia/distinfo3
-rw-r--r--misc/celestia/patches/patch-am50
2 files changed, 52 insertions, 1 deletions
diff --git a/misc/celestia/distinfo b/misc/celestia/distinfo
index 1b9473ada94..dabcce89cc7 100644
--- a/misc/celestia/distinfo
+++ b/misc/celestia/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2006/08/14 22:43:07 wiz Exp $
+$NetBSD: distinfo,v 1.13 2006/12/12 19:31:37 joerg Exp $
SHA1 (celestia-1.4.1.tar.gz) = 37863498c43d3078b41027706bfa033bccd949a9
RMD160 (celestia-1.4.1.tar.gz) = c66c2540e329613dace12e5b12b2dae2a4c679e0
@@ -15,3 +15,4 @@ SHA1 (patch-ai) = d5abfae0b4c4395572f22b6fdd1e7ad7bda4032f
SHA1 (patch-aj) = 1ef7a10260a3b1476392c4cae17081ab0e7771b4
SHA1 (patch-ak) = 20506d8b2f7c8c9ff778e0844dc999b0e497d644
SHA1 (patch-al) = f998727c986145d3f298295bed1760221a686245
+SHA1 (patch-am) = 34a83573294e6ca41d817a19aef3e7d3e4f14945
diff --git a/misc/celestia/patches/patch-am b/misc/celestia/patches/patch-am
new file mode 100644
index 00000000000..4f2a11257ed
--- /dev/null
+++ b/misc/celestia/patches/patch-am
@@ -0,0 +1,50 @@
+$NetBSD: patch-am,v 1.1 2006/12/12 19:31:37 joerg Exp $
+
+--- src/celutil/unixdirectory.cpp.orig 2006-12-12 16:52:18.000000000 +0000
++++ src/celutil/unixdirectory.cpp
+@@ -7,11 +7,19 @@
+ // as published by the Free Software Foundation; either version 2
+ // of the License, or (at your option) any later version.
+
++#if defined(__DragonFly__)
++#define NO_WORDEXP
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <dirent.h>
++#ifdef NO_WORDEXP
++#include <glob.h>
++#else
+ #include <wordexp.h>
++#endif
+ #include "directory.h"
+
+ using namespace std;
+@@ -98,6 +106,19 @@ bool IsDirectory(const std::string& file
+ }
+
+ std::string WordExp(const std::string& filename) {
++#ifdef NO_WORDEXP
++ glob_t g;
++ std::string expanded;
++ glob(filename.c_str(), GLOB_NOSORT | GLOB_TILDE, NULL, &g);
++ if (g.gl_matchc != 1) {
++ globfree(&g);
++ return filename;
++ } else {
++ expanded = g.gl_pathv[0];
++ globfree(&g);
++ return expanded;
++ }
++#else
+ wordexp_t result;
+ std::string expanded;
+
+@@ -121,4 +142,5 @@ std::string WordExp(const std::string& f
+ wordfree(&result);
+
+ return expanded;
++#endif
+ }