Date: Mon, 19 Jul 2004 22:42:14 +0300 From: Andrey Slusar <vasallia@ukr.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/69311: [NEW PORT] russian/rhythmbox: rhythmbox with selected charset for id3tags support Message-ID: <E1Bme1e-0003Cl-Br@santinel.home.ua> Resent-Message-ID: <200407191950.i6JJoJxE009179@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 69311 >Category: ports >Synopsis: [NEW PORT] russian/rhythmbox: rhythmbox with selected charset for id3tags support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 19 19:50:19 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andrey Slusar >Release: FreeBSD 5.2-CURRENT i386 >Organization: Santinel >Environment: System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Fri Jul 16 17:57:53 EEST 2004 root@santinel.home.ua:/usr/src/sys/i386/compile/ANRAY i386 >Description: Now rhythmbox using locale($LANG) or if this not defined ISO-8859-1 encoding for id3 tags and for metadata only UTF-8. This port added to rhythmbox support selected encoding for id3 tags and metadata. >How-To-Repeat: >Fix: --- ru-rhythmbox.port begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/russian/rhythmbox # /usr/ports/russian/rhythmbox/files # /usr/ports/russian/rhythmbox/files/patch-rb-string-helpers.c # /usr/ports/russian/rhythmbox/files/patch-mp3-stream-info-impl.c # /usr/ports/russian/rhythmbox/Makefile # /usr/ports/russian/rhythmbox/pkg-message # echo c - /usr/ports/russian/rhythmbox mkdir -p /usr/ports/russian/rhythmbox > /dev/null 2>&1 echo c - /usr/ports/russian/rhythmbox/files mkdir -p /usr/ports/russian/rhythmbox/files > /dev/null 2>&1 echo x - /usr/ports/russian/rhythmbox/files/patch-rb-string-helpers.c sed 's/^X//' >/usr/ports/russian/rhythmbox/files/patch-rb-string-helpers.c << 'END-of-/usr/ports/russian/rhythmbox/files/patch-rb-string-helpers.c' X--- lib/rb-string-helpers.c.orig Mon Jun 21 18:57:18 2004 X+++ lib/rb-string-helpers.c Mon Jul 19 18:16:05 2004 X@@ -137,14 +137,17 @@ X rb_unicodify (const char *str) X { X char *ret = NULL; X+#ifndef ID3TAGS_ENCODING X const char *char_encoding; X+#endif X X /* Try validating it as UTF-8 first */ X if (g_utf8_validate (str, -1, NULL)) X return g_strdup (str); X X /* Failing that, try the legacy encoding associated X- with the locale. */ X+ with the locale if ID3TAGS_ENCODING not defined. */ X+#ifndef ID3TAGS_ENCODING X char_encoding = get_encoding_from_locale (getenv ("LANG")); X if (char_encoding == NULL) X ret = NULL; X@@ -155,6 +158,10 @@ X if (!ret) X ret = g_convert (str, -1, "UTF-8", "ISO-8859-1", X NULL, NULL, NULL); X+#else X+ ret = g_convert (str, -1, "UTF-8", ID3TAGS_ENCODING, X+ NULL, NULL, NULL); X+#endif X X return ret; X } END-of-/usr/ports/russian/rhythmbox/files/patch-rb-string-helpers.c echo x - /usr/ports/russian/rhythmbox/files/patch-mp3-stream-info-impl.c sed 's/^X//' >/usr/ports/russian/rhythmbox/files/patch-mp3-stream-info-impl.c << 'END-of-/usr/ports/russian/rhythmbox/files/patch-mp3-stream-info-impl.c' X--- metadata/monkey-media/stream-info-impl/mp3-stream-info-impl.c.orig Mon Jun 21 18:57:18 2004 X+++ metadata/monkey-media/stream-info-impl/mp3-stream-info-impl.c Mon Jul 19 18:24:22 2004 X@@ -673,16 +673,28 @@ X nstrings = id3_field_getnstrings (field); X for (j = 0; j < nstrings; j++) X { X+#ifndef ID3TAGS_ENCODING X id3_utf8_t *tmp = NULL; X+#else X+ id3_latin1_t *tmp = NULL; X+#endif X X ucs4 = id3_field_getstrings (field, j); X X if (strcmp (field_name, ID3_FRAME_GENRE) == 0) X ucs4 = id3_genre_name (ucs4); X X+#ifndef ID3TAGS_ENCODING X tmp = id3_ucs4_utf8duplicate (ucs4); X if (strcmp (tmp, "") != 0) X utf8 = tmp; X+#else X+ tmp = id3_ucs4_latin1duplicate (ucs4); X+ if (strcmp (tmp, "") != 0) { X+ utf8 = g_convert (tmp, -1, "UTF-8", ID3TAGS_ENCODING, X+ NULL, NULL, NULL); X+ } X+#endif X else X g_free (tmp); X } END-of-/usr/ports/russian/rhythmbox/files/patch-mp3-stream-info-impl.c echo x - /usr/ports/russian/rhythmbox/Makefile sed 's/^X//' >/usr/ports/russian/rhythmbox/Makefile << 'END-of-/usr/ports/russian/rhythmbox/Makefile' X# New ports collection makefile for: ru-rhythmbox X# Date created: Jul 18 18:44:22 EEST 2004 X# Whom: Andrey Slusar <vasallia@ukr.net> X# X# $FreeBSD$ X# X XPORTNAME= rhythmbox XCATEGORIES= russian X XMAINTAINER= vasallia@ukr.net XCOMMENT= Rhythmbox with selected charset for id3tags support X XMASTERDIR= ${.CURDIR}/../../audio/rhythmbox X XCONFLICTS= rhythmbox-[0-9]* X XID3TAGS_CHRS?= WINDOWS-1251 XCFLAGS+= -DID3TAGS_ENCODING=${ID3TAGS_CHRS} X X.include "${MASTERDIR}/Makefile" END-of-/usr/ports/russian/rhythmbox/Makefile echo x - /usr/ports/russian/rhythmbox/pkg-message sed 's/^X//' >/usr/ports/russian/rhythmbox/pkg-message << 'END-of-/usr/ports/russian/rhythmbox/pkg-message' X******************************************************* X X If you not using only unicode or latin filenames, put X G_BROKEN_FILENAMES=1 to personal or system profile X X******************************************************* END-of-/usr/ports/russian/rhythmbox/pkg-message exit --- ru-rhythmbox.port ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Bme1e-0003Cl-Br>