libxkbcommon: the same version of libxkbcommon with backported xkbregistry
This commit is contained in:
parent
0db646362a
commit
6b119bdc8a
3461
base/libxkbcommon/afb26e7df9090a0b765eb294b6efff448f763b6f.patch
Normal file
3461
base/libxkbcommon/afb26e7df9090a0b765eb294b6efff448f763b6f.patch
Normal file
File diff suppressed because it is too large
Load Diff
114
base/libxkbcommon/import-functions-required-for-backport.patch
Normal file
114
base/libxkbcommon/import-functions-required-for-backport.patch
Normal file
@ -0,0 +1,114 @@
|
||||
diff -Naur a/src/utils.c b/src/utils.c
|
||||
--- a/src/utils.c 2019-10-21 02:08:47.000000000 +0600
|
||||
+++ b/src/utils.c 2024-06-28 11:13:17.092091027 +0600
|
||||
@@ -161,3 +161,48 @@
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+#if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF)
|
||||
+int
|
||||
+asprintf(char **strp, const char *fmt, ...)
|
||||
+{
|
||||
+ int ret;
|
||||
+ va_list ap;
|
||||
+ va_start(ap, fmt);
|
||||
+ ret = vasprintf(strp, fmt, ap);
|
||||
+ va_end(ap);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+# if !(defined(HAVE_VASPRINTF) && HAVE_VASPRINTF)
|
||||
+int
|
||||
+vasprintf(char **strp, const char *fmt, va_list ap)
|
||||
+{
|
||||
+ int ret;
|
||||
+ char *buf;
|
||||
+ va_list ap_copy;
|
||||
+
|
||||
+ /*
|
||||
+ * The value of the va_list parameter is undefined after the call to
|
||||
+ * vsnprintf() returns: pass a copy to make sure "ap" remains valid.
|
||||
+ */
|
||||
+ va_copy(ap_copy, ap);
|
||||
+ ret = vsnprintf(NULL, 0, fmt, ap_copy);
|
||||
+ va_end(ap_copy);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!(buf = malloc(ret + 1)))
|
||||
+ return -1;
|
||||
+
|
||||
+ if ((ret = vsnprintf(buf, ret + 1, fmt, ap)) < 0) {
|
||||
+ free(buf);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ *strp = buf;
|
||||
+ return ret;
|
||||
+}
|
||||
+# endif /* !HAVE_VASPRINTF */
|
||||
+#endif /* !HAVE_ASPRINTF */
|
||||
diff -Naur a/src/utils.h b/src/utils.h
|
||||
--- a/src/utils.h 2019-10-21 02:08:47.000000000 +0600
|
||||
+++ b/src/utils.h 2024-06-28 11:12:29.634354358 +0600
|
||||
@@ -186,6 +186,29 @@
|
||||
return pos;
|
||||
}
|
||||
|
||||
+static inline bool
|
||||
+streq_null(const char *s1, const char *s2)
|
||||
+{
|
||||
+ if (s1 == NULL || s2 == NULL)
|
||||
+ return s1 == s2;
|
||||
+ return streq(s1, s2);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static inline bool
|
||||
+check_eaccess(const char *path, int mode)
|
||||
+{
|
||||
+ #if defined(HAVE_EACCESS)
|
||||
+ if (eaccess(path, mode) != 0)
|
||||
+ return false;
|
||||
+ #elif defined(HAVE_EUIDACCESS)
|
||||
+ if (euidaccess(path, mode) != 0)
|
||||
+ return false;
|
||||
+ #endif
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static inline int
|
||||
one_bit_set(uint32_t x)
|
||||
{
|
||||
@@ -240,6 +263,28 @@
|
||||
# define ATTR_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
+#if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF)
|
||||
+int asprintf(char **strp, const char *fmt, ...) ATTR_PRINTF(2, 3);
|
||||
+# if !(defined(HAVE_VASPRINTF) && HAVE_VASPRINTF)
|
||||
+# include <stdarg.h>
|
||||
+int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
+# endif /* !HAVE_VASPRINTF */
|
||||
+#endif /* !HAVE_ASPRINTF */
|
||||
+
|
||||
+static inline bool
|
||||
+ATTR_PRINTF(3, 4)
|
||||
+snprintf_safe(char *buf, size_t sz, const char *format, ...)
|
||||
+{
|
||||
+ va_list ap;
|
||||
+ int rc;
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+ rc = vsnprintf(buf, sz, format, ap);
|
||||
+ va_end(ap);
|
||||
+
|
||||
+ return rc >= 0 && (size_t)rc < sz;
|
||||
+}
|
||||
+
|
||||
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|
||||
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
# define ATTR_NORETURN __attribute__((__noreturn__))
|
243
base/libxkbcommon/libxkbcommon.spec
Normal file
243
base/libxkbcommon/libxkbcommon.spec
Normal file
@ -0,0 +1,243 @@
|
||||
#global gitdate 20120917
|
||||
|
||||
Name: libxkbcommon
|
||||
Version: 0.9.1
|
||||
Release: 1%{?gitdate:.%{gitdate}}%{?dist}
|
||||
Summary: X.Org X11 XKB parsing library
|
||||
License: MIT
|
||||
URL: http://www.x.org
|
||||
|
||||
%if 0%{?gitdate}
|
||||
Source0: %{name}-%{gitdate}.tar.bz2
|
||||
%else
|
||||
Source0: http://xkbcommon.org/download/%{name}-%{version}.tar.xz
|
||||
%endif
|
||||
Source1: make-git-snapshot.sh
|
||||
|
||||
# Backport libxkbregistry
|
||||
Patch0: import-functions-required-for-backport.patch
|
||||
Patch1: afb26e7df9090a0b765eb294b6efff448f763b6f.patch
|
||||
|
||||
BuildRequires: git meson
|
||||
BuildRequires: xorg-x11-util-macros byacc flex bison
|
||||
BuildRequires: xorg-x11-proto-devel libX11-devel
|
||||
BuildRequires: xkeyboard-config-devel
|
||||
BuildRequires: pkgconfig(xcb-xkb) >= 1.10
|
||||
|
||||
Requires: xkeyboard-config
|
||||
|
||||
%description
|
||||
%{name} is the X.Org library for compiling XKB maps into formats usable by
|
||||
the X Server or other display servers.
|
||||
|
||||
%package devel
|
||||
Summary: X.Org X11 XKB parsing development package
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
X.Org X11 XKB parsing development package
|
||||
|
||||
%package x11
|
||||
Summary: X.Org X11 XKB keymap creation library
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description x11
|
||||
%{name}-x11 is the X.Org library for creating keymaps by querying the X
|
||||
server.
|
||||
|
||||
%package x11-devel
|
||||
Summary: X.Org X11 XKB keymap creation library
|
||||
Requires: %{name}-x11%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description x11-devel
|
||||
X.Org X11 XKB keymap creation library development package
|
||||
|
||||
%package -n libxkbregistry
|
||||
Summary: Library for handling xkb descriptions
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
|
||||
%description -n libxkbregistry
|
||||
libxkbregistry is a C library that lists available XKB models,
|
||||
layouts and variants for a given ruleset.
|
||||
|
||||
%package -n libxkbregistry-devel
|
||||
Summary: Header files for xkbregistry
|
||||
Requires: libxkbregistry%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n libxkbregistry-devel
|
||||
This package contains the header and pkg-config files for developing
|
||||
with libxkbcommon.
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
|
||||
%build
|
||||
%meson -Denable-docs=false \
|
||||
-Denable-x11=true \
|
||||
-Denable-wayland=false
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_libdir}/libxkbcommon.so.0.0.0
|
||||
%{_libdir}/libxkbcommon.so.0
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libxkbcommon.so
|
||||
%dir %{_includedir}/xkbcommon/
|
||||
%{_includedir}/xkbcommon/xkbcommon.h
|
||||
%{_includedir}/xkbcommon/xkbcommon-compat.h
|
||||
%{_includedir}/xkbcommon/xkbcommon-compose.h
|
||||
%{_includedir}/xkbcommon/xkbcommon-keysyms.h
|
||||
%{_includedir}/xkbcommon/xkbcommon-names.h
|
||||
%{_libdir}/pkgconfig/xkbcommon.pc
|
||||
|
||||
%ldconfig_scriptlets x11
|
||||
|
||||
%files x11
|
||||
%{_libdir}/libxkbcommon-x11.so.0.0.0
|
||||
%{_libdir}/libxkbcommon-x11.so.0
|
||||
|
||||
%files x11-devel
|
||||
%{_libdir}/libxkbcommon-x11.so
|
||||
%{_includedir}/xkbcommon/xkbcommon-x11.h
|
||||
%{_libdir}/pkgconfig/xkbcommon-x11.pc
|
||||
|
||||
%ldconfig_scriptlets -n libxkbregistry
|
||||
|
||||
%files -n libxkbregistry
|
||||
%license LICENSE
|
||||
%{_libdir}/libxkbregistry.so.0.0.0
|
||||
%{_libdir}/libxkbregistry.so.0
|
||||
|
||||
%files -n libxkbregistry-devel
|
||||
%{_libdir}/libxkbregistry.so
|
||||
%{_includedir}/xkbcommon/xkbregistry.h
|
||||
%{_libdir}/pkgconfig/xkbregistry.pc
|
||||
|
||||
%changelog
|
||||
* Fri Jun 28 2024 Raven <raven@sysadmins.ws> - 0.9.1-2
|
||||
- backport xkbregistry from 0.11.0
|
||||
|
||||
* Fri Nov 01 2019 Peter Hutterer <peter.hutterer@redhat.com> 0.9.1-1
|
||||
- libxkbcommon 0.9.1 (#1728801)
|
||||
|
||||
* Thu Aug 23 2018 Peter Hutterer <peter.hutterer@redhat.com> 0.8.2-1
|
||||
- libxkbcommon 0.8.2 (#1619541)
|
||||
|
||||
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-2
|
||||
- Switch to %%ldconfig_scriptlets
|
||||
|
||||
* Tue Dec 19 2017 Peter Hutterer <peter.hutterer@redhat.com> 0.8.0-1
|
||||
- libxkbcommon 0.8.0
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri May 12 2017 Hans de Goede <hdegoede@redhat.com> - 0.7.1-3
|
||||
- Add patch from upstream adding XF86Keyboard and XF86RFKill keysyms
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2017 Peter Hutterer <peter.hutterer@redhat.com> 0.7.1-1
|
||||
- xkbcommon 0.7.1
|
||||
|
||||
* Mon Nov 14 2016 Peter Hutterer <peter.hutterer@redhat.com> 0.7.0-1
|
||||
- xkbcommon 0.7.0
|
||||
|
||||
* Fri Jun 03 2016 Peter Hutterer <peter.hutterer@redhat.com> 0.6.1-1
|
||||
- xkbcommon 0.6.1
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Fri Jan 08 2016 Dan Horák <dan[at]danny.cz> - 0.5.0-3
|
||||
- always build the x11 subpackage
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Wed Oct 22 2014 Hans de Goede <hdegoede@redhat.com> - 0.5.0-1
|
||||
- Update to 0.5.0 (#1154574)
|
||||
|
||||
* Mon Sep 22 2014 Kalev Lember <kalevlember@gmail.com> - 0.4.3-2
|
||||
- Require xkeyboard-config (#1145260)
|
||||
|
||||
* Wed Aug 20 2014 Kalev Lember <kalevlember@gmail.com> - 0.4.3-1
|
||||
- Update to 0.4.3
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Tue May 27 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.4.2-3
|
||||
- make -x11 support conditional (f21+, #1000497)
|
||||
- --disable-silent-rules
|
||||
|
||||
* Fri May 23 2014 Hans de Goede <hdegoede@redhat.com> - 0.4.2-2
|
||||
- Bump release to 2 to avoid confusion with non official non scratch 0.4.2-1
|
||||
|
||||
* Thu May 22 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.4.2-1
|
||||
- xkbcommon 0.4.2 (#1000497)
|
||||
- own %%{_includedir}/xkbcommon/
|
||||
- -x11: +ldconfig scriptlets
|
||||
- -devel: don't include xkbcommon-x11.h
|
||||
- run reautoconf in %%prep (instead of %%build)
|
||||
- tighten subpkg deps via %%_isa
|
||||
- .spec cleanup, remove deprecated stuff
|
||||
- BR: pkgconfig(xcb-xkb) >= 1.10
|
||||
|
||||
* Wed Feb 05 2014 Peter Hutterer <peter.hutterer@redhat.com> 0.4.0-1
|
||||
- xkbcommon 0.4.0
|
||||
- Add new xkbcommon-x11 and xkbcommon-x11-devel subpackages
|
||||
|
||||
* Tue Aug 27 2013 Peter Hutterer <peter.hutterer@redhat.com> 0.3.1-1
|
||||
- xkbcommon 0.3.1
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Thu Apr 18 2013 Peter Hutterer <peter.hutterer@redhat.com> 0.3.0-1
|
||||
- xkbcommon 0.3.0
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Tue Oct 23 2012 Adam Jackson <ajax@redhat.com> 0.2.0-1
|
||||
- xkbcommon 0.2.0
|
||||
|
||||
* Mon Sep 17 2012 Thorsten Leemhuis <fedora@leemhuis.info> 0.1.0-8.20120917
|
||||
- Today's git snapshot
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-7.20120306
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Tue Mar 06 2012 Peter Hutterer <peter.hutterer@redhat.com> 0.1.0-6.20120306
|
||||
- BuildRequire xkeyboard-config-devel to get the right XKB target path (#799717)
|
||||
|
||||
* Tue Mar 06 2012 Peter Hutterer <peter.hutterer@redhat.com> 0.1.0-5.20120306
|
||||
- Today's git snapshot
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-4.20111109
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Wed Nov 09 2011 Adam Jackson <ajax@redhat.com> 0.1.0-3
|
||||
- Today's git snap
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-2.20101110
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Sat Nov 06 2010 Dave Airlie <airlied@redhat.com> 0.1.0-1.20101110
|
||||
- inital import
|
||||
|
17
base/libxkbcommon/make-git-snapshot.sh
Executable file
17
base/libxkbcommon/make-git-snapshot.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
DIRNAME=libxkbcommon-$( date +%Y%m%d )
|
||||
|
||||
rm -rf $DIRNAME
|
||||
git clone git://anongit.freedesktop.org/git/xorg/lib/libxkbcommon $DIRNAME
|
||||
cd $DIRNAME
|
||||
if [ -z "$1" ]; then
|
||||
git log | head -1
|
||||
else
|
||||
git checkout $1
|
||||
fi
|
||||
git log | head -1 | awk '{ print $2 }' > ../commitid
|
||||
git repack -a -d
|
||||
cd ..
|
||||
tar jcf $DIRNAME.tar.bz2 $DIRNAME
|
||||
rm -rf $DIRNAME
|
Loading…
x
Reference in New Issue
Block a user