OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 22-Feb-2006 22:01:53 Branch: HEAD Handle: 2006022221015200 Modified files: openpkg-src/gmime gmime.patch gmime.spec Log: add optional Perl API Summary: Revision Changes Path 1.2 +79 -3 openpkg-src/gmime/gmime.patch 1.57 +30 -3 openpkg-src/gmime/gmime.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/gmime/gmime.patch ============================================================================ $ cvs diff -u -r1.1 -r1.2 gmime.patch --- openpkg-src/gmime/gmime.patch 12 Jan 2005 14:56:27 -0000 1.1 +++ openpkg-src/gmime/gmime.patch 22 Feb 2006 21:01:52 -0000 1.2 @@ -1,7 +1,83 @@ +Index: MIME-Fast-1.6/Fast/Part.xs +--- MIME-Fast-1.6/Fast/Part.xs.orig 2004-12-17 12:55:42 +0100 ++++ MIME-Fast-1.6/Fast/Part.xs 2006-02-22 21:56:02 +0100 +@@ -48,7 +48,6 @@ + XSINTERFACE_FUNC_MIMEFAST_PART_SET + INTERFACE: + set_content_description +- set_content_md5 + set_content_location + set_content_disposition + set_filename +@@ -240,6 +239,9 @@ + g_mime_part_set_content_object(mime_part, mime_data_wrapper); + + g_mime_stream_unref(mime_stream); ++ } else if (SvPOKp(svval)) { ++ data = (char *)SvPV(svval, len); ++ g_mime_part_set_content(mime_part, data, len); + } else if (svvaltype == SVt_PVMG) { // possible STDIN/STDOUT etc. + int fd0 = (int)SvIV( svval ); + int fd; +@@ -256,9 +258,6 @@ + g_mime_part_set_content_object(mime_part, mime_data_wrapper); + + g_mime_stream_unref(mime_stream); +- } else if (SvPOK(svval)) { +- data = (char *)SvPV(svval, len); +- g_mime_part_set_content(mime_part, data, len); + } else { + croak("mime_set_content: Unknown type: %d", (int)svvaltype); + } +Index: MIME-Fast-1.6/Makefile.PL +--- MIME-Fast-1.6/Makefile.PL.orig 2003-10-16 11:01:46 +0200 ++++ MIME-Fast-1.6/Makefile.PL 2006-02-22 21:57:46 +0100 +@@ -5,7 +5,13 @@ + require 5.8.0; # require perl v5.8.0 or higher + + # my $libs = `pkg-config --libs gmime-2.0`; +-my $libs = `gmime-config --libs`; ++my $libs = "-L../gmime/.libs [EMAIL PROTECTED]@/lib ".`gmime-config --libs`." -lgmime-2.0 ".`pkg-config --libs glib-2.0`; ++$libs =~ s/-lgthread-\d\.\d//s; ++$libs =~ s/-pthread//s; ++$libs =~ s/\n/ /sg; ++my $cflags = "-I. -Icinclude -I.. [EMAIL PROTECTED]@/include ".`pkg-config --cflags glib-2.0`." ".`gmime-config --cflags`; ++$cflags =~ s/-pthread//s; ++$cflags =~ s/\n/ /sg; + my $vers = `gmime-config --version`; + + if ($libs eq '') { +@@ -77,6 +83,5 @@ + # 'Fast.so' => qw{cinclude/gmime-stream-perlio.o} + }, + 'clean' => { FILES => "gmime-version.h" }, +- # 'INC' => `pkg-config --cflags gmime-2.0` # e.g., '-I/usr/include/other' +- 'INC' => "-I. -Icinclude " . `gmime-config --cflags`, ++ 'INC' => $cflags, + ); +Index: MIME-Fast-1.6/gmime-stream-perlio.h +--- MIME-Fast-1.6/gmime-stream-perlio.h.orig 2004-12-16 21:28:51 +0100 ++++ MIME-Fast-1.6/gmime-stream-perlio.h 2006-02-22 21:56:02 +0100 +@@ -36,11 +36,11 @@ + #include <gmime/gmime-stream.h> + + #define GMIME_TYPE_STREAM_PERLIO (g_mime_stream_perlio_get_type ()) +-#define GMIME_STREAM_PERLIO(obj) (GMIME_CHECK_CAST ((obj), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIO)) +-#define GMIME_STREAM_PERLIO_CLASS(klass) (GMIME_CHECK_CLASS_CAST ((klass), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIOClass)) +-#define GMIME_IS_STREAM_PERLIO(obj) (GMIME_CHECK_TYPE ((obj), GMIME_TYPE_STREAM_PERLIO)) +-#define GMIME_IS_STREAM_PERLIO_CLASS(klass) (GMIME_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_STREAM_PERLIO)) +-#define GMIME_STREAM_PERLIO_GET_CLASS(obj) (GMIME_CHECK_GET_CLASS ((obj), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIOClass)) ++#define GMIME_STREAM_PERLIO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIO)) ++#define GMIME_STREAM_PERLIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIOClass)) ++#define GMIME_IS_STREAM_PERLIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMIME_TYPE_STREAM_PERLIO)) ++#define GMIME_IS_STREAM_PERLIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_STREAM_PERLIO)) ++#define GMIME_STREAM_PERLIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_STREAM_PERLIO, GMimeStreamPerlIOClass)) + + typedef struct _GMimeStreamPerlIO GMimeStreamPerlIO; + typedef struct _GMimeStreamPerlIOClass GMimeStreamPerlIOClass; Index: gmime/gmime-gpg-context.c -diff -Nau gmime/gmime-gpg-context.c.orig gmime/gmime-gpg-context.c ---- gmime/gmime-gpg-context.c.orig 2004-11-30 20:20:31 +0100 -+++ gmime/gmime-gpg-context.c 2005-01-12 15:16:54 +0100 +--- gmime/gmime-gpg-context.c.orig 2005-05-03 19:34:17 +0200 ++++ gmime/gmime-gpg-context.c 2006-02-22 21:56:02 +0100 @@ -25,13 +25,12 @@ #include <config.h> #endif @@ . patch -p0 <<'@@ .' Index: openpkg-src/gmime/gmime.spec ============================================================================ $ cvs diff -u -r1.56 -r1.57 gmime.spec --- openpkg-src/gmime/gmime.spec 22 Feb 2006 17:39:29 -0000 1.56 +++ openpkg-src/gmime/gmime.spec 22 Feb 2006 21:01:52 -0000 1.57 @@ -23,8 +23,9 @@ ## # package version -%define V_major 2.1 -%define V_minor 19 +%define V_major 2.1 +%define V_minor 19 +%define V_perl 1.6 # package information Name: gmime @@ -39,8 +40,12 @@ Version: %{V_major}.%{V_minor} Release: 20060222 +# package options +%option with_perl no + # list of sources Source0: http://spruce.sourceforge.net/gmime/sources/v%{V_major}/gmime-%{version}.tar.gz +Source1: http://www.cpan.org/modules/by-module/MIME/MIME-Fast-%{V_perl}.tar.gz Patch0: gmime.patch # build information @@ -50,6 +55,10 @@ PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: glib2, libiconv, zlib PreReq: glib2, libiconv, zlib +%if "%{with_perl}" == "yes" +BuildPreReq: perl, perl-openpkg +PreReq: perl +%endif AutoReq: no AutoReqProv: no @@ -66,12 +75,20 @@ url = http://spruce.sourceforge.net/gmime/sources/__NEWVER__/ regex = gmime-(__VER__)\.tar\.gz } + prog gmime:MIME-Fast = { + version = %{V_perl} + url = http://www.cpan.org/modules/by-module/MIME/ + regex = MIME-Fast-(__VER__)\.tar\.gz + } %prep %setup -q + %setup -q -D -T -a 1 %patch -p0 %build + %{l_shtool} subst %{l_value -s -a} \ + MIME-Fast-%{V_perl}/Makefile.PL CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ @@ -85,6 +102,10 @@ --disable-mono \ --disable-shared %{l_make} %{l_mflags -O} +%if "%{with_perl}" == "yes" + %{l_prefix}/bin/perl-openpkg prepare + %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} configure build +%endif %install rm -rf $RPM_BUILD_ROOT @@ -92,6 +113,12 @@ prefix=$RPM_BUILD_ROOT%{l_prefix} \ exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ datadir=$RPM_BUILD_ROOT%{l_prefix}/share/gmime +%if "%{with_perl}" == "yes" + %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} install + %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup +%else + >perl-openpkg-files +%endif rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/uu* rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gmime mv $RPM_BUILD_ROOT%{l_prefix}/include/gmime-*/gmime \ @@ -104,7 +131,7 @@ -e 's;includedir}/gmime-[0-9.]*;includedir};g' \ $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/gmime*.pc %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ - %{l_files_std} \ + %{l_files_std} `cat perl-openpkg-files` \ '%not %dir %{l_prefix}/lib/pkgconfig' %files -f files @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org