Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=3612f9468302e6d4e8027031a536ea84057e0ef5

commit 3612f9468302e6d4e8027031a536ea84057e0ef5
Author: crazy <[EMAIL PROTECTED]>
Date:   Sun Oct 14 21:36:12 2007 +0200

zinf-2.2.5-3-i686
* relbump
* added 2 patches to fix some crashes ( still one left :| )
* killed off gdk-pixbux from depends while isn't
* fixed url bug
* added missing scriptlet option
* ( this package need some more work )

diff --git a/source/xmultimedia-extra/zinf/FrugalBuild 
b/source/xmultimedia-extra/zinf/FrugalBuild
index acf9be7..cb317b0 100644
--- a/source/xmultimedia-extra/zinf/FrugalBuild
+++ b/source/xmultimedia-extra/zinf/FrugalBuild
@@ -3,17 +3,20 @@

pkgname=zinf
pkgver=2.2.5
-pkgrel=2
+pkgrel=3
pkgdesc="The Zinf audio player is a simple, but powerful audio player for 
Linux."
-url="http://www.zinf.org";
-depends=('esd' 'gtk+2' 'gdbm' 'ncurses' 'libmusicbrainz' 'arts' 'id3lib' 
'gdk-pixbuf' 'libx11')
+depends=('esd' 'gtk+2' 'gdbm' 'ncurses' 'libmusicbrainz' 'arts' 'id3lib' 
'libx11')
groups=('xmultimedia-extra')
archs=('i686' 'x86_64')
Finclude sourceforge
+options=('scriptlet')
+url="http://www.zinf.org";
up2date="lynx -dump http://www.zinf.org/download.php |grep zinf.*.tar.gz |sed 
-ne 's/.*f-\(.*\)\.t.*/\1/;1 p'"
-source=([EMAIL PROTECTED] zinf_gcc4.patch)
+source=([EMAIL PROTECTED] zinf_gcc4.patch zinf-ds.patch sem_fix.diff)
sha1sums=('5ef056e476fa3bfedcb2d0f7de7859b97a22ca6b' \
-         '73eeafe8c3f46386878e95e4ad7ebae5e62a0a8b')
+          '73eeafe8c3f46386878e95e4ad7ebae5e62a0a8b' \
+          'd1ade23f5ac9496146c122c825518d52f2492d3a' \
+          'e5dc31d63a4a043cdaf790d8f795d6f3e952b19f')

build() {
Fpatchall
diff --git a/source/xmultimedia-extra/zinf/sem_fix.diff 
b/source/xmultimedia-extra/zinf/sem_fix.diff
new file mode 100644
index 0000000..1e8a9c0
--- /dev/null
+++ b/source/xmultimedia-extra/zinf/sem_fix.diff
@@ -0,0 +1,14 @@
+diff -NruBb zinf-2.2.5ori/base/unix/src/bootstrap.cpp 
zinf-2.2.5/base/unix/src/bootstrap.cpp
+--- zinf-2.2.5ori/base/unix/src/bootstrap.cpp  2003-11-21 01:21:58.000000000 
+0100
++++ zinf-2.2.5/base/unix/src/bootstrap.cpp     2005-05-19 16:57:50.000000000 
+0200
+@@ -149,7 +149,9 @@
+                         ResolvePath(path);
+
+                     strncpy(pPtr, path.c_str(),path.length());
+-                    pPtr += strlen(pPtr) + 1;
++
++                  pPtr[path.length()]='\0';
++                  pPtr += path.length() + 1;
+                 }
+                 *pPtr = 0;
+
diff --git a/source/xmultimedia-extra/zinf/zinf-ds.patch 
b/source/xmultimedia-extra/zinf/zinf-ds.patch
new file mode 100644
index 0000000..4e4b839
--- /dev/null
+++ b/source/xmultimedia-extra/zinf/zinf-ds.patch
@@ -0,0 +1,229 @@
+diff -dPNur zinf-2.2.5/plm/metadata/id3lib/id3lib.cpp 
zinf-2.2.5-new/plm/metadata/id3lib/id3lib.cpp
+--- zinf-2.2.5/plm/metadata/id3lib/id3lib.cpp  2004-01-30 13:06:02.000000000 
+0100
++++ zinf-2.2.5-new/plm/metadata/id3lib/id3lib.cpp      2005-07-19 
23:37:11.000000000 +0200
+@@ -304,10 +304,45 @@
+ }
+
+
++static int rccGetCurrentEncoding(char *result, unsigned int n) {
++    unsigned int i;
++    char *l;
++
++    if ((!result)||(!n)) return -1;
++
++      l = getenv("CHARSET");
++#ifdef HAVE_CODESET
++      if (!l) l = nl_langinfo(CODESET);
++#endif
++      if (l) {
++          if (strlen(l)>=n) return -1;
++          strcpy(result, l);
++          return 0;
++      }
++
++      l = setlocale(LC_CTYPE, NULL);
++      if (!l) return -1;
++
++    for (i=0;((l[i])&&(l[i]!='.')&&(l[i]!='_'));i++);
++    if (i>=n) return -1;
++
++    l = strrchr(l, '.');
++    if (!l) return -1;
++
++    for (i=0;((l[i])&&(l[i]!='@'));i++);
++    if (i>=n) return -1;
++
++    strncpy(result,l+1,i-1);
++    result[i]=0;
++
++    return 0;
++}
++
+ static
+ bool getTag(ID3_Tag&tag, ID3_FrameID frameid, string &result)
+ {
+-    static char buffer[1024];
++    int err;
++    static char buffer[1024], locale[64];
+ #ifdef HAVE_GLIB
+     gchar *utfbuffer;
+ #endif
+@@ -326,7 +361,8 @@
+           return true;
+         }
+         else {
+-          utfbuffer=g_convert(buffer, sizeof buffer, "UTF-8", 
charset.c_str(), NULL, NULL, NULL);
++          err = rccGetCurrentEncoding(locale, 64);
++          utfbuffer=g_convert(buffer, sizeof buffer, "UTF-8", 
err?charset.c_str():locale, NULL, NULL, NULL);
+           result=utfbuffer;
+           g_free(utfbuffer);
+           return true;
+diff -dPNur zinf-2.2.5/ui/ncurses/Makefile.am 
zinf-2.2.5-new/ui/ncurses/Makefile.am
+--- zinf-2.2.5/ui/ncurses/Makefile.am  2003-09-16 19:35:31.000000000 +0200
++++ zinf-2.2.5-new/ui/ncurses/Makefile.am      2005-07-19 23:51:02.000000000 
+0200
+@@ -3,11 +3,11 @@
+ plugin_LTLIBRARIES = ncurses-ui.la
+
+ ncurses_ui_la_SOURCES = ncursesUI.cpp
+-ncurses_ui_la_LIBADD = $(NCURSES_LIBS)
++ncurses_ui_la_LIBADD = $(NCURSES_LIBS) $(GLIB_LIBS)
+ ncurses_ui_la_LDFLAGS = $(plugin_ldflags)
+
+ noinst_HEADERS = ncursesUI.h
+
+-AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes)
++AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes) $(GLIB_CFLAGS)
+
+ # arch-tag: 19b44c0b-0802-4cfc-9d47-519f9049c888
+diff -dPNur zinf-2.2.5/ui/ncurses/Makefile.in 
zinf-2.2.5-new/ui/ncurses/Makefile.in
+--- zinf-2.2.5/ui/ncurses/Makefile.in  2004-02-09 01:48:25.000000000 +0100
++++ zinf-2.2.5-new/ui/ncurses/Makefile.in      2005-07-20 00:23:03.823574339 
+0200
+@@ -231,7 +231,7 @@
+
+ noinst_HEADERS = ncursesUI.h
+
+-AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes)
++AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes) $(GLIB_CFLAGS)
+ subdir = ui/ncurses
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+diff -dPNur zinf-2.2.5/ui/ncurses/ncursesUI.cpp 
zinf-2.2.5-new/ui/ncurses/ncursesUI.cpp
+--- zinf-2.2.5/ui/ncurses/ncursesUI.cpp        2003-09-16 19:35:31.000000000 
+0200
++++ zinf-2.2.5-new/ui/ncurses/ncursesUI.cpp    2005-07-20 00:03:31.000000000 
+0200
+@@ -32,6 +32,7 @@
+ #include <termios.h>
+ #include <signal.h>
+
++
+ using namespace std;
+ #include "config.h"
+ #include "i18n.h"
+@@ -41,6 +42,10 @@
+ #include "thread.h"
+ #include "eventdata.h"
+
++#ifdef HAVE_GLIB
++#include <glib.h>
++#endif
++
+ #define stdinfd 0
+
+ extern "C" {
+@@ -262,6 +267,40 @@
+
+ }
+
++static int rccGetCurrentEncoding(char *result, unsigned int n) {
++    unsigned int i;
++    char *l;
++
++    if ((!result)||(!n)) return -1;
++
++      l = getenv("CHARSET");
++#ifdef HAVE_CODESET
++      if (!l) l = nl_langinfo(CODESET);
++#endif
++      if (l) {
++          if (strlen(l)>=n) return -1;
++          strcpy(result, l);
++          return 0;
++      }
++
++      l = setlocale(LC_CTYPE, NULL);
++      if (!l) return -1;
++
++    for (i=0;((l[i])&&(l[i]!='.')&&(l[i]!='_'));i++);
++    if (i>=n) return -1;
++
++    l = strrchr(l, '.');
++    if (!l) return -1;
++
++    for (i=0;((l[i])&&(l[i]!='@'));i++);
++    if (i>=n) return -1;
++
++    strncpy(result,l+1,i-1);
++    result[i]=0;
++
++    return 0;
++}
++
+ Error ncursesUI::AcceptEvent(Event *e) {
+     if (e) {
+         switch (e->Type()) {
+@@ -342,36 +381,69 @@
+                     break;
+                 md = pItem->GetMetaData();
+
++              char *recoded;
++              char locale[64];
++#ifdef HAVE_GLIB
++              if (rccGetCurrentEncoding(locale, 64)) strcpy(locale, "UTF-8");
++#else
++              recoded = NULL;
++#endif
++
++
+                 clear();
+                 move(0,0);
+                 showInfo();
+                 move(2, 0);
+                 addstr(_("Title  : "));
+-                if (md.Title().c_str()[0] != '\0')
+-                    addstr((char *)md.Title().c_str());
+-                else
++                if (md.Title().c_str()[0] != '\0') {
++#ifdef HAVE_GLIB
++                  recoded = g_convert(md.Title().c_str(), -1, locale, 
"UTF-8", NULL, NULL, NULL);
++#endif
++                    addstr(recoded?recoded:(char *)md.Title().c_str());
++                } else
+                     addstr(pmvi->m_filename.c_str());
++
++#ifdef HAVE_GLIB
++              if (recoded) free(recoded);
++              recoded = g_convert(md.Artist().c_str(), -1, locale, "UTF-8", 
NULL, NULL, NULL);
++#endif
+                 addstr(_("\nArtist : "));
+-                addstr((char *)md.Artist().c_str());
++                addstr(recoded?recoded:(char *)md.Artist().c_str());
++#ifdef HAVE_GLIB
++              if (recoded) free(recoded);
++              recoded = g_convert(md.Album().c_str(), -1, locale, "UTF-8", 
NULL, NULL, NULL);
++#endif
+                 addstr(_("\nAlbum  : "));
+-                addstr((char *)md.Album().c_str());
++                addstr(recoded?recoded:(char *)md.Album().c_str());
+                 addstr(_("\nYear   : "));
+                 if (md.Year() != 0)
+                 {
+                     sprintf(buf, "%d", md.Year());
+                     addstr(buf);
+                 }
++#ifdef HAVE_GLIB
++              if (recoded) free(recoded);
++              recoded = g_convert(md.Genre().c_str(), -1, locale, "UTF-8", 
NULL, NULL, NULL);
++#endif
+                 addstr(_("\nGenre  : "));
+-                addstr((char *)md.Genre().c_str());
++                addstr(recoded?recoded:(char *)md.Genre().c_str());
+                 addstr(_("\nTrack  : "));
+                 if (md.Track() != 0)
+                 {
+                     sprintf(buf, "%d", md.Track());
+                     addstr(buf);
+                 }
++#ifdef HAVE_GLIB
++              if (recoded) free(recoded);
++              recoded = g_convert(md.Comment().c_str(), -1, locale, "UTF-8", 
NULL, NULL, NULL);
++#endif
+                 addstr(_("\nComment: "));
+-                addstr((char *)md.Comment().c_str());
++                addstr(recoded?recoded:(char *)md.Comment().c_str());
+                 addstr("\n");
++
++#ifdef HAVE_GLIB
++              if (recoded) free(recoded);
++#endif
+                 refresh();
+
+                 counter = 0;
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to