Accepting request 113553 from home:vuntz:branches:X11:XOrg
Split mkfontscale out of xorg-x11; update mkfontscale-skip_symlinks.diff to use non-GNU specific function OBS-URL: https://build.opensuse.org/request/show/113553 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/mkfontscale?expand=0&rev=1
This commit is contained in:
commit
67543a93ce
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
mkfontscale-1.0.8.tar.bz2
Normal file
3
mkfontscale-1.0.8.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6eb57786cd79eebfbaca386fe24dcfe50689dbf433d052e58291c2925f2050f9
|
||||||
|
size 120005
|
57
mkfontscale-skip_symlinks.diff
Normal file
57
mkfontscale-skip_symlinks.diff
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
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
|
11
mkfontscale.changes
Normal file
11
mkfontscale.changes
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 13 11:33:51 UTC 2012 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
- Update mkfontscale-skip_symlinks.diff to use realpath() instead
|
||||||
|
of the GNU-specific canonicalize_file_name().
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 13 08:46:08 UTC 2012 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
- Split mkfontscale from xorg-x11. Initial version: 1.0.8.
|
||||||
|
|
59
mkfontscale.spec
Normal file
59
mkfontscale.spec
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#
|
||||||
|
# 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.0.8
|
||||||
|
Release: 0
|
||||||
|
License: MIT
|
||||||
|
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)
|
||||||
|
# This was part of the xorg-x11 package up to version 7.6
|
||||||
|
Conflicts: xorg-x11 <= 7.6
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
|
%description
|
||||||
|
mkfontscale creates the fonts.scale and fonts.dir index files used by the
|
||||||
|
legacy X11 font system.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc ChangeLog COPYING README
|
||||||
|
%{_bindir}/mkfontscale
|
||||||
|
%{_mandir}/man1/mkfontscale.1%{?ext_man}
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user