This commit is contained in:
Rex Dieter 2014-07-16 19:54:35 -05:00
parent d49d31d322
commit abedbd1964
5 changed files with 85 additions and 59 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/AppStream-0.6.2.tar.gz
/AppStream-0.7.0.tar.xz

View File

@ -0,0 +1,66 @@
From 2382796e9f22be8b1af4669c9e0bc09da524412c Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Wed, 16 Jul 2014 18:06:32 +0200
Subject: [PATCH 3/3] qt: Respect the global install paths set by the toplevel
CMake file
---
qt/CMakeLists.txt | 12 ++++++++++++
qt/src/CMakeLists.txt | 12 ++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt
index 6ec18d3..67cce18 100644
--- a/qt/CMakeLists.txt
+++ b/qt/CMakeLists.txt
@@ -26,4 +26,16 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
+if (NOT DEFINED INSTALL_DIR_LIB)
+ set(INSTALL_DIR_LIB lib${LIB_SUFFIX}/${CMAKE_LIBRARY_ARCHITECTURE} CACHE PATH "Installation directory for libraries")
+endif()
+
+if (NOT DEFINED INSTALL_DIR_BIN)
+ set(INSTALL_DIR_BIN bin CACHE PATH "Installation directory for executables")
+endif()
+
+if (NOT DEFINED INSTALL_DIR_INC)
+ set(INSTALL_DIR_INC include CACHE PATH "Installation directory for headers")
+endif()
+
add_subdirectory(src)
diff --git a/qt/src/CMakeLists.txt b/qt/src/CMakeLists.txt
index 69cb8a3..b05108b 100644
--- a/qt/src/CMakeLists.txt
+++ b/qt/src/CMakeLists.txt
@@ -32,20 +32,20 @@ set_property(TARGET AppstreamQt PROPERTY VERSION "${APPSTREAMQT_SO_VERSION}.0.0"
set_property(TARGET AppstreamQt PROPERTY SOVERSION "${APPSTREAMQT_SO_VERSION}" )
install(TARGETS AppstreamQt EXPORT AppstreamQtTargets
- RUNTIME DESTINATION "bin"
- LIBRARY DESTINATION "lib"
- ARCHIVE DESTINATION "lib"
- INCLUDES DESTINATION "include"
+ RUNTIME DESTINATION ${INSTALL_DIR_BIN}
+ LIBRARY DESTINATION ${INSTALL_DIR_LIB}
+ ARCHIVE DESTINATION ${INSTALL_DIR_LIB}
+ INCLUDES DESTINATION ${INSTALL_DIR_INC}
)
-install(FILES ${APPSTREAMQT_PUBLIC_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/appstreamqt_export.h DESTINATION "include/AppstreamQt")
+install(FILES ${APPSTREAMQT_PUBLIC_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/appstreamqt_export.h DESTINATION "${INSTALL_DIR_INC}/AppstreamQt")
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfigVersion.cmake VERSION ${APPSTREAMQT_VERSION} COMPATIBILITY SameMajorVersion )
export(TARGETS AppstreamQt
FILE "${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtTargets.cmake")
-set(ConfigPackageLocation lib/cmake/AppstreamQt)
+set(ConfigPackageLocation ${INSTALL_DIR_LIB}/cmake/AppstreamQt)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/AppstreamQtConfig.cmake.in"
--
1.9.3

View File

@ -1,47 +0,0 @@
From 5cadebe553d6bfdf0e9dde555ed084f4bb735f09 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Sat, 28 Jun 2014 22:20:48 +0200
Subject: [PATCH 55/55] Fix issue when loading compressed metadata files
Prevents an infinite loop which happens for some compressed files.
---
src/data-providers/appstream-xml.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/data-providers/appstream-xml.c b/src/data-providers/appstream-xml.c
index e9f2d2c..b1b512d 100644
--- a/src/data-providers/appstream-xml.c
+++ b/src/data-providers/appstream-xml.c
@@ -129,7 +129,7 @@ as_provider_appstream_xml_process_compressed_file (AsProviderAppstreamXML* self,
{
GFileInputStream* src_stream;
GMemoryOutputStream* mem_os;
- GConverterOutputStream* conv_stream;
+ GInputStream *conv_stream;
GZlibDecompressor* zdecomp;
guint8* data;
gboolean ret;
@@ -140,10 +140,10 @@ as_provider_appstream_xml_process_compressed_file (AsProviderAppstreamXML* self,
src_stream = g_file_read (infile, NULL, NULL);
mem_os = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
zdecomp = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP);
- conv_stream = (GConverterOutputStream*) g_converter_output_stream_new ((GOutputStream*) mem_os, (GConverter*) zdecomp);
+ conv_stream = g_converter_input_stream_new (G_INPUT_STREAM (src_stream), G_CONVERTER (zdecomp));
g_object_unref (zdecomp);
- g_output_stream_splice ((GOutputStream*) conv_stream, (GInputStream*) src_stream, 0, NULL, NULL);
+ g_output_stream_splice ((GOutputStream*) mem_os, conv_stream, 0, NULL, NULL);
data = g_memory_output_stream_get_data (mem_os);
ret = as_provider_appstream_xml_process_single_document (self, (const gchar*) data);
@@ -153,7 +153,6 @@ as_provider_appstream_xml_process_compressed_file (AsProviderAppstreamXML* self,
return ret;
}
-
gboolean
as_provider_appstream_xml_process_file (AsProviderAppstreamXML* self, GFile* infile)
{
--
1.9.3

View File

@ -1,16 +1,16 @@
Summary: Utilities to generate, maintain and access the AppStream Xapian database
Name: appstream
Version: 0.6.2
Release: 6%{?dist}
Version: 0.7.0
Release: 1%{?dist}
# lib LGPLv3+, tools GPLv3+
License: GPLv3+ and LGPLv3+
# lib LGPLv2+, tools GPLv2+
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software
Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.gz
Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz
## upstream patches
Patch55: 0055-Fix-issue-when-loading-compressed-metadata-files.patch
Patch103: 0003-qt-Respect-the-global-install-paths-set-by-the-tople.patch
## upstreamable patches
@ -69,6 +69,8 @@ mkdir -p %{buildroot}%{_datadir}/app-info/{icons,xmls}
mkdir -p %{buildroot}/var/cache/app-info/{icons,xapian,xmls}
touch %{buildroot}/var/cache/app-info/cache.watch
%find_lang appstream
%check
# all/many tests currently fail, make non-fatal for now
@ -83,16 +85,17 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%files -f appstream.lang
%doc AUTHORS
%doc LICENSE.GPLv3 LICENSE.LGPLv3
%doc LICENSE.GPLv2 LICENSE.LGPLv2.1
%config(noreplace) %{_sysconfdir}/appstream.conf
%{_bindir}/appstream-index
%{_bindir}/appstream-validate
%{_mandir}/man1/appstream-validate.1*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Appstream-0.6.typelib
%{_libdir}/libappstream.so.0*
%{_libdir}/girepository-1.0/Appstream-0.7.typelib
%{_libdir}/libappstream.so.1*
%{_libdir}/libappstream.so.%{version}
%dir %{_libdir}/packagekit-plugins
%{_libdir}/packagekit-plugins/libpk_plugin_appstream.so
%dir %{_datadir}/app-info/
@ -111,13 +114,16 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
%{_libdir}/libappstream.so
%{_libdir}/pkgconfig/appstream.pc
%dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Appstream-0.6.gir
%{_datadir}/gir-1.0/Appstream-0.7.gir
%files vala
%{_datadir}/vala/vapi/appstream.vapi
%changelog
* Wed Jul 16 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.0-1
- 0.7.0
* Sat Jun 28 2014 Rex Dieter <rdieter@fedoraproject.org> 0.6.2-6
- Requires: appstream-data

View File

@ -1 +1 @@
c5df357df76156f7a6d4dd9a27b50b66 AppStream-0.6.2.tar.gz
0626feadb9b64babda4a292ec9ebb684 AppStream-0.7.0.tar.xz