rpms/pinot/devel pinot-0.89-gmime24.patch, NONE, 1.1 pinot.spec, 1.36, 1.37

Adel Gadllah drago01 at fedoraproject.org
Fri Dec 26 10:30:39 UTC 2008


Author: drago01

Update of /cvs/pkgs/rpms/pinot/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4756

Modified Files:
	pinot.spec 
Added Files:
	pinot-0.89-gmime24.patch 
Log Message:
Port to gmime-2.4 api

pinot-0.89-gmime24.patch:

--- NEW FILE pinot-0.89-gmime24.patch ---
diff -upNr pinot-0.89.orign/configure.in pinot-0.89/configure.in
--- pinot-0.89.orign/configure.in	2008-09-18 17:38:03.000000000 +0200
+++ pinot-0.89/configure.in	2008-12-25 21:27:19.000000000 +0100
@@ -357,7 +357,7 @@ HTTP_CFLAGS="$NEON_CFLAGS $CURL_CFLAGS $
 HTTP_LIBS="$NEON_LIBS $CURL_LIBS $SSL_LIBS"
 AC_SUBST(HTTP_CFLAGS)
 AC_SUBST(HTTP_LIBS)
-PKG_CHECK_MODULES(GMIME, gmime-2.0 >= 2.0 )
+PKG_CHECK_MODULES(GMIME, gmime-2.4 >= 2.4 )
 AC_SUBST(GMIME_CFLAGS)
 AC_SUBST(GMIME_LIBS)
 PKG_CHECK_MODULES(XML, libxml++-2.6 >= 2.12 )
diff -upNr pinot-0.89.orign/Makefile.am pinot-0.89/Makefile.am
--- pinot-0.89.orign/Makefile.am	2008-09-12 17:15:26.000000000 +0200
+++ pinot-0.89/Makefile.am	2008-12-26 11:22:15.000000000 +0100
@@ -45,10 +45,10 @@ install-data-local:
 	$(INSTALL_DATA) $(srcdir)/IndexSearch/Plugins/*.xml $(DESTDIR)$(datadir)/pinot/engines/
 	@mv $(DESTDIR)$(datadir)/pinot/engines/YahooBOSS.src $(DESTDIR)$(datadir)/pinot/
 	@mkdir -p $(DESTDIR)$(libdir)/pinot/filters
-	@rm $(DESTDIR)$(libdir)/lib*filter.a $(DESTDIR)$(libdir)/lib*filter.la
+	@rm -f $(DESTDIR)$(libdir)/lib*filter.a $(DESTDIR)$(libdir)/lib*filter.la
 	@mv $(DESTDIR)$(libdir)/lib*filter* $(DESTDIR)$(libdir)/pinot/filters/
 	@mkdir -p $(DESTDIR)$(libdir)/pinot/backends
-	@rm $(DESTDIR)$(libdir)/lib*backend.a $(DESTDIR)$(libdir)/lib*backend.la
+	@rm -f $(DESTDIR)$(libdir)/lib*backend.a $(DESTDIR)$(libdir)/lib*backend.la
 	@mv $(DESTDIR)$(libdir)/lib*backend* $(DESTDIR)$(libdir)/pinot/backends/
 	@mkdir -p $(DESTDIR)$(datadir)/pinot/stopwords
 	@mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/
diff -upNr pinot-0.89.orign/Tokenize/filters/GMimeMboxFilter.cc pinot-0.89/Tokenize/filters/GMimeMboxFilter.cc
--- pinot-0.89.orign/Tokenize/filters/GMimeMboxFilter.cc	2008-08-04 17:28:53.000000000 +0200
+++ pinot-0.89/Tokenize/filters/GMimeMboxFilter.cc	2008-12-26 11:29:11.000000000 +0100
@@ -81,7 +81,7 @@ GMimeMboxFilter::GMimeMboxFilter(const s
 	m_foundDocument(false)
 {
 	// Initialize gmime
-	g_mime_init(GMIME_INIT_FLAG_UTF8);
+	g_mime_init(GMIME_ENABLE_RFC2047_WORKAROUNDS);
 }
 
 GMimeMboxFilter::~GMimeMboxFilter()
@@ -296,7 +296,7 @@ void GMimeMboxFilter::finalize(bool full
 {
 	if (m_pMimeMessage != NULL)
 	{
-		g_mime_object_unref(GMIME_OBJECT(m_pMimeMessage));
+		g_object_unref(G_OBJECT(m_pMimeMessage));
 		m_pMimeMessage = NULL;
 	}
 	if (m_pParser != NULL)
@@ -339,13 +339,13 @@ char *GMimeMboxFilter::extractPart(GMime
 #endif
 		GMimeMessage *partMessage = g_mime_message_part_get_message(GMIME_MESSAGE_PART(part));
 		part = g_mime_message_get_mime_part(partMessage);
-		g_mime_object_unref(GMIME_OBJECT(partMessage));
+		g_object_unref(G_OBJECT(partMessage));
 	}
 
 	// Is this a multipart ?
 	if (GMIME_IS_MULTIPART(part))
 	{
-		m_partsCount = g_mime_multipart_get_number(GMIME_MULTIPART(part));
+		m_partsCount = g_mime_multipart_get_count(GMIME_MULTIPART(part));
 #ifdef DEBUG
 		cout << "GMimeMboxFilter::extractPart: message has " << m_partsCount << " parts" << endl;
 #endif
@@ -362,7 +362,7 @@ char *GMimeMboxFilter::extractPart(GMime
 			}
 
 			char *pPart = extractPart(multiMimePart, contentType, partLen);
-			g_mime_object_unref(multiMimePart);
+
 			if (pPart != NULL)
 			{
 				m_partNum = ++partNum;
@@ -385,7 +385,7 @@ char *GMimeMboxFilter::extractPart(GMime
 	GMimeFilter *charsetFilter = NULL;
 
 	// Check the content type
-	const GMimeContentType *mimeType = g_mime_part_get_content_type(mimePart);
+	GMimeContentType *mimeType = g_mime_object_get_content_type(GMIME_OBJECT(mimePart));
 	// Set this for caller
 	char *partType = g_mime_content_type_to_string(mimeType);
 	if (partType != NULL)
@@ -397,11 +397,11 @@ char *GMimeMboxFilter::extractPart(GMime
 		g_free(partType);
 	}
 
-	GMimePartEncodingType encodingType = g_mime_part_get_encoding(mimePart);
+	GMimeContentEncoding encodingType = g_mime_part_get_content_encoding(mimePart);
 #ifdef DEBUG
 	cout << "GMimeMboxFilter::extractPart: encoding is " << encodingType << endl;
 #endif
-	g_mime_part_set_encoding(mimePart, GMIME_PART_ENCODING_QUOTEDPRINTABLE);
+	g_mime_part_set_content_encoding(mimePart, GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE);
 
 	// Create a in-memory output stream
 	GMimeStream *memStream = g_mime_stream_mem_new();
@@ -450,7 +450,7 @@ char *GMimeMboxFilter::extractPart(GMime
 #ifdef DEBUG
 	cout << "GMimeMboxFilter::extractPart: read " << readLen << " bytes" << endl;
 #endif
-	g_mime_stream_unref(memStream);
+	g_object_unref(memStream);
 
 	return pBuffer;
 }
@@ -469,7 +469,7 @@ bool GMimeMboxFilter::extractMessage(con
 			// No, it doesn't
 			if (m_pMimeMessage != NULL)
 			{
-				g_mime_object_unref(GMIME_OBJECT(m_pMimeMessage));
+				g_object_unref(G_OBJECT(m_pMimeMessage));
 				m_pMimeMessage = NULL;
 			}
 
@@ -485,7 +485,7 @@ bool GMimeMboxFilter::extractMessage(con
 			if (messageEnd > m_messageStart)
 			{
 				// FIXME: this only applies to Mozilla
-				const char *pMozStatus = g_mime_message_get_header(m_pMimeMessage, "X-Mozilla-Status");
+				const char *pMozStatus = g_mime_object_get_header(GMIME_OBJECT(m_pMimeMessage), "X-Mozilla-Status");
 				if (pMozStatus != NULL)
 				{
 					long int mozStatus = strtol(pMozStatus, NULL, 16);
@@ -503,7 +503,7 @@ bool GMimeMboxFilter::extractMessage(con
 				}
 
 				// How old is this message ?
-				const char *pDate = g_mime_message_get_header(m_pMimeMessage, "Date");
+				const char *pDate = g_mime_object_get_header(GMIME_OBJECT(m_pMimeMessage), "Date");
 				if (pDate != NULL)
 				{
 					m_messageDate = pDate;
@@ -557,7 +557,7 @@ bool GMimeMboxFilter::extractMessage(con
 						(contentType.length() >= 10) &&
 						(strncasecmp(contentType.c_str(), "text/plain", 10) == 0))
 					{
-						char *pHeaders = g_mime_message_get_headers(m_pMimeMessage);
+						char *pHeaders = g_mime_object_get_headers(GMIME_OBJECT(m_pMimeMessage));
 
 						if (pHeaders != NULL)
 						{
@@ -589,15 +589,13 @@ bool GMimeMboxFilter::extractMessage(con
 #endif
 
 					free(pPart);
-					g_mime_object_unref(pMimePart);
 
 					return true;
 				}
 
-				g_mime_object_unref(pMimePart);
 			}
 
-			g_mime_object_unref(GMIME_OBJECT(m_pMimeMessage));
+			g_object_unref(G_OBJECT(m_pMimeMessage));
 			m_pMimeMessage = NULL;
 		}
 


Index: pinot.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pinot/devel/pinot.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- pinot.spec	1 Dec 2008 15:00:38 -0000	1.36
+++ pinot.spec	26 Dec 2008 10:30:09 -0000	1.37
@@ -1,6 +1,6 @@
 Name:  pinot
 Version: 0.89
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Personal search and metasearch for the Desktop      
 
 Group: User Interface/Desktops        
@@ -8,6 +8,7 @@
 URL: http://pinot.berlios.de/            
 Source0: http://download2.berlios.de/pinot/%{name}-%{version}.tar.gz  
 Patch0: fix_lang_detect.patch
+Patch1: pinot-0.89-gmime24.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: sqlite-devel >= 3.3.1
@@ -25,6 +26,7 @@
 BuildRequires: desktop-file-utils
 BuildRequires: shared-mime-info
 BuildRequires: libexif-devel
+BuildRequires: libtool
 
 Requires: shared-mime-info
 Requires: unzip
@@ -53,8 +55,10 @@
 %prep
 %setup -q 
 %patch0 -p1 -b .lang_detect
+%patch1 -p1 -b .gmime24
 
 %build
+autoreconf --force --install
 %configure
 make %{?_smp_mflags}
 
@@ -117,6 +121,9 @@
 
 
 %changelog
+* Fri Dec 26 2008 Adel Gadllah <adel.gadllah at gmail.com> 0.89-3
+- Port to gmime-2.4 api
+
 * Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.89-2
 - Rebuild for Python 2.6
 




More information about the fedora-extras-commits mailing list