rpms/libchmxx/devel libchmxx-kchm-fixes.diff, NONE, 1.1 libchmxx.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Patrice Dumas (pertusus) fedora-extras-commits at redhat.com
Sun Apr 23 23:25:38 UTC 2006


Author: pertusus

Update of /cvs/extras/rpms/libchmxx/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22783/devel

Modified Files:
	.cvsignore sources 
Added Files:
	libchmxx-kchm-fixes.diff libchmxx.spec 
Log Message:
auto-import libchmxx-0.1-2 on branch devel from libchmxx-0.1-2.src.rpm

libchmxx-kchm-fixes.diff:

--- NEW FILE libchmxx-kchm-fixes.diff ---
diff -u --recursive libchmxx-0.1-orig/src/chm.cpp libchmxx-0.1/src/chm.cpp
--- libchmxx-0.1-orig/src/chm.cpp	2003-10-03 13:34:19.000000000 +0200
+++ libchmxx-0.1/src/chm.cpp	2006-03-13 10:15:16.000000000 +0100
@@ -14,6 +14,8 @@
 using std::vector;
 using std::list;
 using std::map;
+using std::find;
+using std::transform;
 using namespace chm;
 
 namespace {
@@ -29,7 +31,7 @@
       if ( buf_size == file_size ) underflow(); // force loading of entire buffer, no more loads are done
     }
 
-    chmstreambuf (const char *b, size_t buf_size) : buf((char *)buf), buf_size(buf_size)
+    chmstreambuf (const char *b, size_t buf_size) : buf((char *)b), buf_size(buf_size)
     {
       is_cached = true;
       setg (buf, buf, buf + buf_size);
@@ -177,6 +179,7 @@
             if ( topics_file.empty() )
               {
                 string t = string(data.begin(), data.end() - 1);
+//				std::cout << t << std::endl;
                 if ( file_exists (t + ".hhc") )
                     topics_file = "/" + t + ".hhc";
                 if ( file_exists (t + ".hhk") )
@@ -247,11 +250,12 @@
                         last->title = value;
                     } else if ( name == "Local" ) {
                         last->path = "/" + value;
+                    } else if ( name == "local" ) {
+                        last->path = "/" + value;
                     }
                 }
                 if ( !tr.has_next () ) break; // faulty file
                 s = tr.get_next();
-
             }
             continue;
           }
diff -u --recursive libchmxx-0.1-orig/src/chmxx.h libchmxx-0.1/src/chmxx.h
--- libchmxx-0.1-orig/src/chmxx.h	2003-10-03 13:29:08.000000000 +0200
+++ libchmxx-0.1/src/chmxx.h	2006-03-13 10:14:54.000000000 +0100
@@ -9,6 +9,22 @@
 #include <list>
 #include <map>
 
+#ifndef __BYTE_ORDER
+	#ifndef BYTE_ORDER
+		#error: define proper byte order
+	#endif
+
+	#if BYTE_ORDER == LITTLE_ENDIAN
+		#define __LITTLE_ENDIAN LITTLE_ENDIAN
+		#define __BYTE_ORDER __LITTLE_ENDIAN
+	#elif BYTE_ORDER == BIG_ENDIAN
+		#define __BIG_ENDIAN BIG_ENDIAN
+		#define __BYTE_ORDER __BIG_ENDIAN
+	#else
+		#error: define proper byte order
+	#endif
+#endif
+
 /**
  * @mainpage
  * This is a c++ library for accessing the Microsoft(TM)
@@ -179,7 +195,7 @@
     unsigned long res = 0;  // long guatanteed to be 4 bytes
     read ((char *)&res, 4);
     return res;
-#else
+#elif __BYTE_ORDER == __BIG_ENDIAN
     char buf[4];
     read (buf, 4);
     size_t res = buf[0];
@@ -187,6 +203,8 @@
     res |= buf[2] << 16;
     res |= buf[3] << 24;
     return res;
+#else
+#error: define proper byte order
 #endif
   }
 
@@ -198,19 +216,21 @@
     unsigned int res = 0;   // int guaranteed to be 2 bytes
     read ((char *)&res, 2);
     return res;
-#else
+#elif __BYTE_ORDER == __BIG_ENDIAN
     char buf[2];
     read (buf, 2);
     unsigned int res = buf[0];
     res |= buf[1] << 8;
     return res;
+#else
+#error: define proper byte order
 #endif
   }
 
   /** Get a s-r encoded value from the stream. Scale must alwqays be 2.
     * Use 0 for initial pos. When finished reading an entry of sr-s
     * call the get_sr_finish(pos).*/
-  inline unsigned long get_sr (int s, int r, int& pos)
+  inline unsigned long get_sr (int , int r, int& pos)
   {
     int b = peek();
     int p = 0;


--- NEW FILE libchmxx.spec ---
Name:           libchmxx
Version:        0.1
Release:        2%{?dist}
Summary:        C++ bindings for chmlib

Group:          System Environment/Libraries
License:        LGPL/GPL
URL:            http://www.mare.ee/indrek/libchmxx/
Source0:        http://www.mare.ee/indrek/libchmxx/libchmxx-%{version}.tar.gz
Patch0:         libchmxx-kchm-fixes.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  chmlib-devel
#Requires:       

%description
This is a C++ library for accessing Microsoft(tm) help
files (usually with extension chm).

%package devel
Summary:       Headers and development libraries for libchmxx
Group:         Development/Libraries
Requires:      %{name} = %{version}-%{release}
Requires:      chmlib-devel

%description devel
The libchmxx-devel package contains headers and development libraries
necessary for building programs against libchmxx.

%prep
%setup -q
%patch -p1

%build
%configure --disable-static
# fails with %{?_smp_mflags}
#make %{?_smp_mflags}
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/libchmxx.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS README COPYING COPYING.LIB
%{_bindir}/chmdissect
%{_libdir}/libchmxx.so.*

%files devel
%defattr(-,root,root,-)
%doc html/
%{_libdir}/libchmxx.so
%{_includedir}/chmxx.h

%changelog
* Mon Mar 13 2006 Patrice Dumas <pertusus at free.fr> 0.1-2
- disable static libs

* Mon Mar 13 2006 Patrice Dumas <pertusus at free.fr> 0.1-1
- initial release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/libchmxx/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	23 Apr 2006 23:24:56 -0000	1.1
+++ .cvsignore	23 Apr 2006 23:25:38 -0000	1.2
@@ -0,0 +1 @@
+libchmxx-0.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/libchmxx/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	23 Apr 2006 23:24:56 -0000	1.1
+++ sources	23 Apr 2006 23:25:38 -0000	1.2
@@ -0,0 +1 @@
+e2987a503d4d49ec4019b67c99921372  libchmxx-0.1.tar.gz




More information about the scm-commits mailing list