summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-05 11:34:15 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-05 11:34:15 -0800
commit5cbeac2db0a912fbb039ee0bbbad3452a5de3134 (patch)
tree218582f5611cab6ecd8803b33a74e4641aaff5fb
parent00040d8439c9e62932689274cee0cf4d01c7ec3c (diff)
downloadmkfontscale-5cbeac2db0a912fbb039ee0bbbad3452a5de3134.tar.gz
mkfontscale-5cbeac2db0a912fbb039ee0bbbad3452a5de3134.tar.bz2
mkfontscale-5cbeac2db0a912fbb039ee0bbbad3452a5de3134.zip
add packaging
-rw-r--r--packaging/mkfontscale-skip_symlinks.diff57
-rw-r--r--packaging/mkfontscale.spec22
2 files changed, 0 insertions, 79 deletions
diff --git a/packaging/mkfontscale-skip_symlinks.diff b/packaging/mkfontscale-skip_symlinks.diff
deleted file mode 100644
index 77b74fc..0000000
--- a/packaging/mkfontscale-skip_symlinks.diff
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: mkfontscale-1.0.6/mkfontscale.c
-===================================================================
---- mkfontscale-1.0.6.orig/mkfontscale.c
-+++ mkfontscale-1.0.6/mkfontscale.c
-@@ -27,6 +27,7 @@
- #include <string.h>
-
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <dirent.h>
- #include <unistd.h>
- #include <errno.h>
-@@ -826,6 +827,8 @@ doDirectory(char *dirname_given, int num
- while((entry = readdir(dirp)) != NULL) {
- int have_face = 0;
- char *xlfd_name = NULL;
-+ struct stat file_stat;
-+ int ret = 0;
- xlfd = NULL;
-
- if (xl) {
-@@ -836,6 +839,35 @@ doDirectory(char *dirname_given, int num
-
- filename = dsprintf("%s%s", dirname, entry->d_name);
-
-+ /* check if file is a symbolic link*/
-+ ret = lstat (filename, &file_stat);
-+ if (!ret) {
-+ if (S_ISLNK(file_stat.st_mode)) {
-+
-+ /* Use realpath to get the absolute path
-+ by removing the ./ and ../ */
-+
-+ char base_canon_fname[PATH_MAX] = {0,};
-+ char *canon_fname = NULL, *canon_dirname = NULL;
-+ int base_strlen = 0;
-+
-+ canon_dirname = realpath (dirname, NULL);
-+ canon_fname = realpath (filename, NULL);
-+ /* skip broken symlinks (Novell Bug #529815) */
-+ if (!canon_fname) {
-+ continue;
-+ }
-+ base_strlen = strlen (strrchr (canon_fname, '/'));
-+
-+ strncpy (base_canon_fname, canon_fname, strlen(canon_fname) - base_strlen);
-+
-+ /* skip the symbolic, if both the symlink and reference file
-+ are residing in the same directory */
-+ if (strcmp (base_canon_fname, canon_dirname) == 0)
-+ continue;
-+ }
-+ }
-+
- if(doBitmaps)
- rc = bitmapIdentify(filename, &xlfd_name);
- else
diff --git a/packaging/mkfontscale.spec b/packaging/mkfontscale.spec
index 90259ac..2d03468 100644
--- a/packaging/mkfontscale.spec
+++ b/packaging/mkfontscale.spec
@@ -1,20 +1,3 @@
-#
-# spec file for package mkfontscale
-#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
-#
-# All modifications and additions to the file contributed by third parties
-# remain the property of their copyright owners, unless otherwise agreed
-# upon. The license for this file, and modifications and additions to the
-# file, is the same license as for the pristine package itself (unless the
-# license for the pristine package is not an Open Source License, in which
-# case the license is the MIT License). An "Open Source License" is a
-# license that conforms to the Open Source Definition (Version 1.9)
-# published by the Open Source Initiative.
-
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
Name: mkfontscale
Version: 1.1.0
Release: 1
@@ -23,17 +6,12 @@ Summary: Utility to create index of scalable font files for X
Url: http://xorg.freedesktop.org/
Group: System/X11/Utilities
Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
-# PATCH-FIX-UPSTREAM mkfontscale-skip_symlinks.diff fdo#48639 -- Ignore symlinks pointing to files in the same directory
-Patch0: mkfontscale-skip_symlinks.diff
BuildRequires: pkg-config
BuildRequires: zlib-devel
BuildRequires: pkgconfig(fontenc)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(xorg-macros) >= 1.8
BuildRequires: pkgconfig(xproto)
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# This was part of the xorg-x11 package up to version 7.6
-Conflicts: xorg-x11 <= 7.6
%description
mkfontscale creates the fonts.scale and fonts.dir index files used by the