rpms/hardinfo/F-7 libzfix.patch,NONE,1.1 hardinfo.spec,1.4,1.5
Adel Gadllah (drago01)
fedora-extras-commits at redhat.com
Sun Sep 2 09:04:50 UTC 2007
Author: drago01
Update of /cvs/pkgs/rpms/hardinfo/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16917
Modified Files:
hardinfo.spec
Added Files:
libzfix.patch
Log Message:
fix bug 274381
libzfix.patch:
--- NEW FILE libzfix.patch ---
diff -upNr hardinfo-0.4.2.2.orign/arch/common/zlib.h hardinfo-0.4.2.2/arch/common/zlib.h
--- hardinfo-0.4.2.2.orign/arch/common/zlib.h 2007-07-20 16:44:59.000000000 +0200
+++ hardinfo-0.4.2.2/arch/common/zlib.h 2007-09-02 11:01:14.000000000 +0200
@@ -24,15 +24,20 @@ benchmark_zlib(void)
static gint (*compress) (gchar *dst, glong *dstlen,
const gchar *src, glong srclen) = NULL;
+ char* libz_locations[5] = {"libz","/usr/lib/libz.so","/usr/lib64/libz.so","/usr/lib/libz.so.1","/usr/lib64/libz.so.1"};
+ int z;
+
if (!(compress && compressBound)) {
- libz = g_module_open("libz", G_MODULE_BIND_LAZY);
+
+ for(z = 0; z<5; z++) {
+ libz = g_module_open(libz_locations[z] , G_MODULE_BIND_LAZY);
+ if(libz) break;
+ }
+
if (!libz) {
- libz = g_module_open("/usr/lib/libz.so", G_MODULE_BIND_LAZY);
- if (!libz) {
g_warning("Cannot load ZLib: %s", g_module_error());
return;
- }
- }
+ }
if (!g_module_symbol(libz, "compress", (gpointer) & compress)
|| !g_module_symbol(libz, "compressBound", (gpointer) & compressBound)) {
Index: hardinfo.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hardinfo/F-7/hardinfo.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- hardinfo.spec 3 Aug 2007 08:28:02 -0000 1.4
+++ hardinfo.spec 2 Sep 2007 09:04:17 -0000 1.5
@@ -1,6 +1,6 @@
Name: hardinfo
Version: 0.4.2.2
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: System Profiler and Benchmark
Group: Applications/System
@@ -10,6 +10,7 @@
Patch0: multilibfix.patch
Patch1: fixsensors.patch
Patch2: fixuserdsp.patch
+Patch3: libzfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel
@@ -32,6 +33,8 @@
%patch1 -p1 -b .fixsensors
#use correct uids
%patch2 -p1 -b .fixuserdsp
+#fix libz.so detection
+%patch3 -p1 -b .libzfix
%build
export LIBDIR=%{_libdir}
@@ -63,6 +66,9 @@
%changelog
+* Sun Sep 02 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.4.2.2-6
+- Fix libz detection RH #274381
+
* Fri Aug 03 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.4.2.2-5
- Update License tag
More information about the fedora-extras-commits
mailing list