From 12285c05c5f87563b2899fc6606f7100b6aa641b Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 21 Oct 2013 08:21:04 +0000 Subject: Add patch from Akira TAGOH for fixing test/test-migration.c on Solaris. --- fonts/fontconfig/distinfo | 4 +- fonts/fontconfig/patches/patch-test_Makefile.in | 18 --------- .../fontconfig/patches/patch-test_test-migration.c | 47 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 20 deletions(-) delete mode 100644 fonts/fontconfig/patches/patch-test_Makefile.in create mode 100644 fonts/fontconfig/patches/patch-test_test-migration.c (limited to 'fonts') 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 + #include + #include ++#ifndef HAVE_STRUCT_DIRENT_D_TYPE ++#include ++#include ++#include ++#endif + #include + + 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)) + { -- cgit v1.2.3