summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-03-21 14:19:31 +0000
committerjperkin <jperkin@pkgsrc.org>2014-03-21 14:19:31 +0000
commit051f1b06e25222ff26ee29c052566b433815fa0e (patch)
tree61fa0eb810be7daf530a6ebeb98e5cb9c0d4eb3d /sysutils
parentb903c4de48e375c3b0e606c2cb9f1c43f513bbdf (diff)
downloadpkgsrc-051f1b06e25222ff26ee29c052566b433815fa0e.tar.gz
Various portability fixes. Now builds on SunOS.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/deforaos-browser/distinfo7
-rw-r--r--sysutils/deforaos-browser/patches/patch-data_pkgconfig.sh16
-rw-r--r--sysutils/deforaos-browser/patches/patch-src_callbacks.c15
-rw-r--r--sysutils/deforaos-browser/patches/patch-src_plugins_dirtree.c39
-rw-r--r--sysutils/deforaos-browser/patches/patch-src_vfs.c16
-rw-r--r--sysutils/deforaos-browser/patches/patch-tools_dirtree.c43
6 files changed, 135 insertions, 1 deletions
diff --git a/sysutils/deforaos-browser/distinfo b/sysutils/deforaos-browser/distinfo
index f0e7c95d353..6c65eb28d3e 100644
--- a/sysutils/deforaos-browser/distinfo
+++ b/sysutils/deforaos-browser/distinfo
@@ -1,5 +1,10 @@
-$NetBSD: distinfo,v 1.5 2014/01/11 21:11:53 khorben Exp $
+$NetBSD: distinfo,v 1.6 2014/03/21 14:19:31 jperkin Exp $
SHA1 (Browser-0.4.13.tar.gz) = 2a7eec2032bc224864000a149ba0afc2b8562cbd
RMD160 (Browser-0.4.13.tar.gz) = 0cee3c24a8bc40a513aab6bd794bbd9865ac73f7
Size (Browser-0.4.13.tar.gz) = 129587 bytes
+SHA1 (patch-data_pkgconfig.sh) = 4d331028b647bcd671fadeda613ecc29d56d3017
+SHA1 (patch-src_callbacks.c) = 81cc77f99c58a1c0de61f4096808d77d99cce4fd
+SHA1 (patch-src_plugins_dirtree.c) = 9abeac0ad6947d19435276708aefe0c9235e9b92
+SHA1 (patch-src_vfs.c) = e604b316be270e210c95b889d2c853aefd8bbc46
+SHA1 (patch-tools_dirtree.c) = 1c404e749464d30773360a43485117010d1cbd15
diff --git a/sysutils/deforaos-browser/patches/patch-data_pkgconfig.sh b/sysutils/deforaos-browser/patches/patch-data_pkgconfig.sh
new file mode 100644
index 00000000000..67794135aed
--- /dev/null
+++ b/sysutils/deforaos-browser/patches/patch-data_pkgconfig.sh
@@ -0,0 +1,16 @@
+$NetBSD: patch-data_pkgconfig.sh,v 1.1 2014/03/21 14:19:31 jperkin Exp $
+
+Use correct rpath flag on SunOS.
+
+--- data/pkgconfig.sh.orig 2013-01-12 02:44:39.000000000 +0000
++++ data/pkgconfig.sh
+@@ -114,6 +114,9 @@ while [ $# -gt 0 ]; do
+ Darwin)
+ RPATH="-Wl,-rpath,\${libdir}"
+ ;;
++ SunOS)
++ RPATH="-Wl,-R\${libdir}"
++ ;;
+ esac
+ fi
+
diff --git a/sysutils/deforaos-browser/patches/patch-src_callbacks.c b/sysutils/deforaos-browser/patches/patch-src_callbacks.c
new file mode 100644
index 00000000000..a14cadbbc8c
--- /dev/null
+++ b/sysutils/deforaos-browser/patches/patch-src_callbacks.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_callbacks.c,v 1.1 2014/03/21 14:19:31 jperkin Exp $
+
+Support unmount() on SunOS.
+
+--- src/callbacks.c.orig 2013-03-11 01:38:09.000000000 +0000
++++ src/callbacks.c
+@@ -18,7 +18,7 @@
+ #include <sys/param.h>
+ #ifndef __GNU__ /* XXX hurd portability */
+ # include <sys/mount.h>
+-# if defined(__linux__) || defined(__CYGWIN__)
++# if defined(__linux__) || defined(__CYGWIN__) || defined(__sun)
+ # define unmount(a, b) umount(a)
+ # endif
+ # ifndef unmount
diff --git a/sysutils/deforaos-browser/patches/patch-src_plugins_dirtree.c b/sysutils/deforaos-browser/patches/patch-src_plugins_dirtree.c
new file mode 100644
index 00000000000..87b094affad
--- /dev/null
+++ b/sysutils/deforaos-browser/patches/patch-src_plugins_dirtree.c
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_plugins_dirtree.c,v 1.1 2014/03/21 14:19:31 jperkin Exp $
+
+Portable directory tests.
+
+--- src/plugins/dirtree.c.orig 2013-02-28 01:03:34.000000000 +0000
++++ src/plugins/dirtree.c
+@@ -232,6 +232,9 @@ static gboolean _dirtree_refresh_folder(
+ gboolean ret = FALSE;
+ DIR * dir;
+ struct dirent * de;
++#ifdef __sun
++ struct stat st;
++#endif
+ GtkTreeModel * model = GTK_TREE_MODEL(dirtree->store);
+ GtkTreeIter iter;
+ GtkTreePath * s;
+@@ -256,14 +259,22 @@ static gboolean _dirtree_refresh_folder(
+ path = "";
+ while((de = readdir(dir)) != NULL)
+ {
++#ifdef __sun
++ stat(de->d_name, &st);
++#endif
+ /* skip hidden folders except if we traverse it */
+ if(basename != NULL && strcmp(de->d_name, basename) == 0)
+ ret = TRUE;
+ else if(de->d_name[0] == '.')
+ continue;
++#ifdef __sun
++ else if (!(st.st_mode & S_IFDIR))
++ continue;
++#else
+ /* XXX d_type is not portable */
+ else if(de->d_type != DT_DIR)
+ continue;
++#endif
+ q = string_new_append(path, "/", de->d_name, NULL);
+ /* FIXME check if the node already exists */
+ r = (q != NULL) ? g_filename_display_basename(q) : NULL;
diff --git a/sysutils/deforaos-browser/patches/patch-src_vfs.c b/sysutils/deforaos-browser/patches/patch-src_vfs.c
new file mode 100644
index 00000000000..a41f404cc43
--- /dev/null
+++ b/sysutils/deforaos-browser/patches/patch-src_vfs.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_vfs.c,v 1.1 2014/03/21 14:19:31 jperkin Exp $
+
+Need sys/fcntl.h for O_RDONLY on SunOS.
+
+--- src/vfs.c.orig 2013-10-04 23:47:17.000000000 +0000
++++ src/vfs.c
+@@ -18,6 +18,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <libgen.h>
++#ifdef __sun
++#include <sys/fcntl.h>
++#endif
+ #include "vfs.h"
+
+
diff --git a/sysutils/deforaos-browser/patches/patch-tools_dirtree.c b/sysutils/deforaos-browser/patches/patch-tools_dirtree.c
new file mode 100644
index 00000000000..7240ba3b80f
--- /dev/null
+++ b/sysutils/deforaos-browser/patches/patch-tools_dirtree.c
@@ -0,0 +1,43 @@
+$NetBSD: patch-tools_dirtree.c,v 1.1 2014/03/21 14:19:31 jperkin Exp $
+
+Portable directory tests.
+
+--- tools/dirtree.c.orig 2013-01-02 03:37:28.000000000 +0000
++++ tools/dirtree.c
+@@ -22,6 +22,9 @@
+ #include <string.h>
+ #include <libgen.h>
+ #include <gtk/gtk.h>
++#ifdef __sun
++#include <sys/stat.h>
++#endif
+
+
+ /* dirtree */
+@@ -111,6 +114,9 @@ static int _dirtree_add(GtkTreeStore * s
+ char * str;
+ DIR * dir;
+ struct dirent * de;
++#ifdef __sun
++ struct stat st;
++#endif
+ char * q;
+ GtkTreeIter iter2;
+
+@@ -128,9 +134,16 @@ static int _dirtree_add(GtkTreeStore * s
+ snprintf(str, len + 1, "%s/", p);
+ while((de = readdir(dir)) != NULL)
+ {
++#ifdef __sun
++ stat(de->d_name, &st);
++ if(!(st.st_mode & S_IFDIR)
++ || strcmp(".", de->d_name) == 0
++ || strcmp("..", de->d_name) == 0)
++#else
+ if(!(de->d_type & DT_DIR)
+ || strcmp(".", de->d_name) == 0
+ || strcmp("..", de->d_name) == 0)
++#endif
+ continue;
+ if((q = realloc(str, len + strlen(de->d_name) + 1)) == NULL)
+ continue;