!1 package init

Merge pull request !1 from huanghaitao/master
This commit is contained in:
openeuler-ci-bot 2020-06-20 11:26:44 +08:00 committed by Gitee
commit f76b8e03b9
4 changed files with 136 additions and 0 deletions

BIN
libeasyfc-0.14.0.tar.bz2 Normal file

Binary file not shown.

View File

@ -0,0 +1,70 @@
From 0729d8db8db8e6d237b33c454b90dbfc9337abf1 Mon Sep 17 00:00:00 2001
From: Akira TAGOH <akira@tagoh.org>
Date: Wed, 11 Sep 2019 12:16:03 +0000
Subject: [PATCH] Fix an issue that config can't be turned on when config dir
isn't available
https://bugzilla.redhat.com/show_bug.cgi?id=1750732
---
libeasyfc/ezfc-font-config.c | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/libeasyfc/ezfc-font-config.c b/libeasyfc/ezfc-font-config.c
index 9c8c0a0..bf163a9 100644
--- a/libeasyfc/ezfc-font-config.c
+++ b/libeasyfc/ezfc-font-config.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <unistd.h>
#include "ezfc-font-config-private.h"
+#include "ezfc-error.h"
/**
* SECTION: ezfc-font-config
@@ -256,6 +257,43 @@ ezfc_font_config_set_enable(ezfc_font_config_t *info,
break;
}
}
+ if (ll == NULL) {
+ const gchar *xdgcfgdir = g_get_user_config_dir();
+ gchar *fcconfdir = g_build_filename(xdgcfgdir, "fontconfig", "conf.d", NULL);
+
+ if (!g_file_test(fcconfdir, G_FILE_TEST_EXISTS)) {
+ g_mkdir_with_parents(fcconfdir, 0755);
+ } else {
+ if (!g_file_test(fcconfdir, G_FILE_TEST_IS_DIR)) {
+ g_set_error(error, EZFC_ERROR, EZFC_ERR_NO_CONFIG_DIR,
+ "Unable to create a config dir: %s",
+ fcconfdir);
+ retval = FALSE;
+ goto bail;
+ }
+ }
+ if (g_access(fcconfdir, W_OK) == 0) {
+ gchar *fn = g_path_get_basename(priv->name);
+ gchar *lfn = g_build_filename(fcconfdir, fn, NULL);
+
+ if (symlink(priv->name, lfn) == -1) {
+ if (error) {
+ save_errno = errno;
+ g_set_error(error, G_FILE_ERROR,
+ g_file_error_from_errno(save_errno),
+ "%s", g_strerror(save_errno));
+ }
+ } else {
+ g_free(priv->name);
+ priv->name = g_strdup(lfn);
+ priv->is_enabled = TRUE;
+ retval = TRUE;
+ }
+ g_free(fn);
+ g_free(lfn);
+ }
+ }
+ bail:
g_list_free(l);
} else {
if (g_file_test(priv->name, G_FILE_TEST_IS_SYMLINK)) {
--
2.21.0

62
libeasyfc.spec Normal file
View File

@ -0,0 +1,62 @@
Name: libeasyfc
Version: 0.14.0
Release: 7
Summary: Easy to configure fontconfig generator interface
License: LGPLv3+
URL: http://tagoh.bitbucket.org/libeasyfc/
Source0: https://bitbucket.org/tagoh/libeasyfc/downloads/libeasyfc-%{version}.tar.bz2
Patch0000: libeasyfc-fix-config.patch
BuildRequires: glib2-devel gobject-introspection-devel libxml2-devel fontconfig-devel >= 2.12.93 harfbuzz-devel
BuildRequires: gettext
Requires: fontconfig >= 2.12.93
Provides: libeasyfc-gobject = %{version}-%{release}
Obsoletes: libeasyfc-gobject < %{version}-%{release}
%description
libeasyfc aims to provide an easy interface to generate
fontconfig configuration on demand and provides GObject
interface for libeasyfc.
%package devel
Summary: Development files for libeasyfc and libeasyfc gobject
Requires: libeasyfc = %{version}-%{release} pkgconfig fontconfig-devel glib2-devel
Provides: libeasyfc-gobject-devel = %{version}-%{release}
Obsoletes: libeasyfc-gobject-devel < %{version}-%{release}
%description devel
This package contains the development files to make any
applications with libeasyfc and applications with libeasyfc-gobject.
%prep
%autosetup -n libeasyfc-%{version} -p1
%build
%configure
%make_build V=1
%install
%make_install
%delete_la
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc COPYING README AUTHORS ChangeLog
%{_libdir}/{libeasyfc.so.*,libeasyfc-gobject.so.*}
%{_libdir}/girepository-*/Easyfc-*.typelib
%files devel
%{_includedir}/libeasyfc
%{_libdir}/{libeasyfc.so,libeasyfc-gobject.so}
%{_libdir}/pkgconfig/{libeasyfc.pc,libeasyfc-gobject.pc}
%{_datadir}/gir-*/Easyfc-*.gir
%{_datadir}/gtk-doc/html/libeasyfc
%changelog
* Tue Apr 14 2020 huanghaitao <huanghaitao@huawei.com> - 0.14.0-7
- Package init

4
libeasyfc.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: git
src_repo: https://bitbucket.org/tagoh/libeasyfc.git
tag_prefix: ^
seperator: .