Accepting request 195524 from home:Zaitor:branches:X11:XOrg
Update to ver 1.1.1 OBS-URL: https://build.opensuse.org/request/show/195524 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/mkfontscale?expand=0&rev=4
This commit is contained in:
parent
9783c30a0e
commit
79affaa90f
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce55f862679b8ec127d7f7315ac04a8d64a0d90a0309a70dc56c1ba3f9806994
|
||||
size 131478
|
3
mkfontscale-1.1.1.tar.bz2
Normal file
3
mkfontscale-1.1.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:244017992477ced2397a44fd0ddcfb0f1d9899128613f5c4db81471163b0b731
|
||||
size 139923
|
@ -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
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 17 22:46:09 UTC 2013 - zaitor@opensuse.org
|
||||
|
||||
- Update to version 1.1.1:
|
||||
+ Protect config.h inclusion like usual.
|
||||
+ Document -u/-U options in man page.
|
||||
+ Replace malloc(strlen);strcpy() calls with strdup.
|
||||
+ Since hash() returns unsigned int, store results in unsigned
|
||||
ints.
|
||||
+ Fix compilation for MinGW.
|
||||
+ Prefer original file over symlink (v2).
|
||||
- Drop mkfontscale-skip_symlinks.diff, fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 14 20:09:03 UTC 2012 - dimstar@opensuse.org
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package mkfontscale
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 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
|
||||
@ -15,16 +15,15 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: mkfontscale
|
||||
Version: 1.1.0
|
||||
Release: 1
|
||||
License: MIT
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: Utility to create index of scalable font files for X
|
||||
Url: http://xorg.freedesktop.org/
|
||||
License: MIT
|
||||
Group: System/X11/Utilities
|
||||
Url: http://xorg.freedesktop.org/
|
||||
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)
|
||||
@ -41,7 +40,7 @@ legacy X11 font system.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
##%%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
|
Loading…
Reference in New Issue
Block a user