summaryrefslogtreecommitdiff
path: root/fonts
diff options
context:
space:
mode:
authorwiz <wiz>2013-10-21 08:21:04 +0000
committerwiz <wiz>2013-10-21 08:21:04 +0000
commit9c21a2ec6428deec1e6d539e20ccd8db5f400f57 (patch)
tree4cd7e80f5914b888519e8d12522b0d26b06e7bad /fonts
parent1a01ae1fab9543239bf10eeaa9d4e3c3380041fc (diff)
downloadpkgsrc-9c21a2ec6428deec1e6d539e20ccd8db5f400f57.tar.gz
Add patch from Akira TAGOH for fixing test/test-migration.c on Solaris.
Diffstat (limited to 'fonts')
-rw-r--r--fonts/fontconfig/distinfo4
-rw-r--r--fonts/fontconfig/patches/patch-test_Makefile.in18
-rw-r--r--fonts/fontconfig/patches/patch-test_test-migration.c47
3 files changed, 49 insertions, 20 deletions
diff --git a/fonts/fontconfig/distinfo b/fonts/fontconfig/distinfo
index 8791f9e6cef..274a453f690 100644
--- a/fonts/fontconfig/distinfo
+++ b/fonts/fontconfig/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2013/10/19 10:36:08 richard Exp $
+$NetBSD: distinfo,v 1.47 2013/10/21 08:21:04 wiz Exp $
SHA1 (fontconfig-2.11.0.tar.bz2) = 969818b0326ac08241b11cbeaa4f203699f9b550
RMD160 (fontconfig-2.11.0.tar.bz2) = a77063d43caecc6090e6b942ae4fca08a2f1f62c
@@ -9,4 +9,4 @@ SHA1 (patch-ac) = 4a0b7b55aa4b5c106fd256c4ef81df2240224803
SHA1 (patch-af) = d351265c894738284215f0bb38d47cc1c8f28ec7
SHA1 (patch-ba) = 025148291320df10e4976ab1380b525f1ab0ee60
SHA1 (patch-src_fcstat.c) = 9cb2d9b656bcb79d33be84a053e928ecf957dfd7
-SHA1 (patch-test_Makefile.in) = 2414d523cea20d6d904b0a82c3747631a2357b0b
+SHA1 (patch-test_test-migration.c) = 3e174b43b45a131b7bbdce7e417a768b7ff210c5
diff --git a/fonts/fontconfig/patches/patch-test_Makefile.in b/fonts/fontconfig/patches/patch-test_Makefile.in
deleted file mode 100644
index 45ad76dd6aa..00000000000
--- a/fonts/fontconfig/patches/patch-test_Makefile.in
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-test_Makefile.in,v 1.1 2013/10/19 10:36:08 richard Exp $
-
-disable tests, at least on WIN32 and SOLARIS as
-struct dirent has no member named d_type
-adapted from upstream patches in progress
-http://cgit.freedesktop.org/fontconfig/commit/?id=5406919c5e186f74ccdade1a65344ce7b5c56a64
-
---- test/Makefile.in.orig 2013-10-11 04:28:47.000000000 +0000
-+++ test/Makefile.in
-@@ -78,7 +78,7 @@ PRE_UNINSTALL = :
- POST_UNINSTALL = :
- build_triplet = @build@
- host_triplet = @host@
--check_PROGRAMS = test-migration$(EXEEXT) $(am__EXEEXT_1)
-+check_PROGRAMS =
- @HAVE_PTHREAD_TRUE@am__append_1 = test-pthread
- subdir = test
- DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
diff --git a/fonts/fontconfig/patches/patch-test_test-migration.c b/fonts/fontconfig/patches/patch-test_test-migration.c
new file mode 100644
index 00000000000..2f783d6d9fc
--- /dev/null
+++ b/fonts/fontconfig/patches/patch-test_test-migration.c
@@ -0,0 +1,47 @@
+$NetBSD: patch-test_test-migration.c,v 1.1 2013/10/21 08:21:04 wiz Exp $
+
+Fix build on Solaris.
+From Akira TAGOH (upstream).
+
+--- test/test-migration.c.orig 2013-10-11 03:10:18.000000000 +0000
++++ test/test-migration.c
+@@ -4,6 +4,11 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#endif
+ #include <fontconfig/fontconfig.h>
+
+ FcBool
+@@ -36,6 +41,9 @@ unlink_dirs(const char *dir)
+ size_t len = strlen (dir);
+ char *n = NULL;
+ FcBool ret = FcTrue;
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++ struct stat statb;
++#endif
+
+ if (!d)
+ return FcFalse;
+@@ -53,7 +61,17 @@ unlink_dirs(const char *dir)
+ strcpy (n, dir);
+ n[len] = '/';
+ strcpy (&n[len + 1], e->d_name);
++#ifdef HAVE_STRUCT_DIRENT_D_TYPE
+ if (e->d_type == DT_DIR)
++#else
++ if (stat (n, &statb) == -1)
++ {
++ fprintf (stderr, "E: %s\n", n);
++ ret = FcFalse;
++ break;
++ }
++ if (S_ISDIR (statb.st_mode))
++#endif
+ {
+ if (!unlink_dirs (n))
+ {