pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/glyr



Module Name:    pkgsrc
Committed By:   leot
Date:           Mon Nov  7 15:12:33 UTC 2016

Modified Files:
        pkgsrc/audio/glyr: Makefile distinfo
Added Files:
        pkgsrc/audio/glyr/patches: patch-lib_intern_lyrics_lyricswiki.c

Log Message:
Add a patch to fix lyricswiki provider (via upstream from pullup request #80)

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/audio/glyr/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/audio/glyr/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/glyr/patches/patch-lib_intern_lyrics_lyricswiki.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/glyr/Makefile
diff -u pkgsrc/audio/glyr/Makefile:1.12 pkgsrc/audio/glyr/Makefile:1.13
--- pkgsrc/audio/glyr/Makefile:1.12     Fri Oct  7 18:25:37 2016
+++ pkgsrc/audio/glyr/Makefile  Mon Nov  7 15:12:33 2016
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2016/10/07 18:25:37 adam Exp $
+# $NetBSD: Makefile,v 1.13 2016/11/07 15:12:33 leot Exp $
 #
 
 DISTNAME=      glyr-1.0.9
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=sahib/}
 

Index: pkgsrc/audio/glyr/distinfo
diff -u pkgsrc/audio/glyr/distinfo:1.7 pkgsrc/audio/glyr/distinfo:1.8
--- pkgsrc/audio/glyr/distinfo:1.7      Tue May 17 13:47:17 2016
+++ pkgsrc/audio/glyr/distinfo  Mon Nov  7 15:12:33 2016
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.7 2016/05/17 13:47:17 leot Exp $
+$NetBSD: distinfo,v 1.8 2016/11/07 15:12:33 leot Exp $
 
 SHA1 (glyr-1.0.9.tar.gz) = 28c6f5ffaaa568149762400cf0c8ebaf134cb3c0
 RMD160 (glyr-1.0.9.tar.gz) = b244631677a44d3fdb444bffac3c32d475413347
 SHA512 (glyr-1.0.9.tar.gz) = 77144202c99c6e429c8800a7d89d27de5376627194945116b7166d920375a59048d3e3102cf63646b1b57d795999f057977d7b13490e4ca3af44b8ddb3207652
 Size (glyr-1.0.9.tar.gz) = 425175 bytes
+SHA1 (patch-lib_intern_lyrics_lyricswiki.c) = b4eb47fbb9ef10e84561d87e0d230f4ef81e5bc0

Added files:

Index: pkgsrc/audio/glyr/patches/patch-lib_intern_lyrics_lyricswiki.c
diff -u /dev/null pkgsrc/audio/glyr/patches/patch-lib_intern_lyrics_lyricswiki.c:1.1
--- /dev/null   Mon Nov  7 15:12:33 2016
+++ pkgsrc/audio/glyr/patches/patch-lib_intern_lyrics_lyricswiki.c      Mon Nov  7 15:12:33 2016
@@ -0,0 +1,40 @@
+$NetBSD: patch-lib_intern_lyrics_lyricswiki.c,v 1.1 2016/11/07 15:12:33 leot Exp $
+
+Fix lyricswiki provider (from upstream and pull request #80).
+
+--- lib/intern/lyrics/lyricswiki.c.orig        2016-05-17 11:39:52.000000000 +0000
++++ lib/intern/lyrics/lyricswiki.c
+@@ -66,6 +66,8 @@ static gboolean lv_cmp_content (const gc
+ #define LYR_NODE  "<div class='lyricbox"
+ #define LYR_BEGIN ">"
+ #define LYR_ENDIN "<!--"
++#define LYR_FOOTER "<div id=\"songfooter"
++#define LYR_CREDITS "<table"
+ #define LYR_INSTRUMENTAL "/Category:Instrumental"
+ #define LYR_SCRIPT_TAG "</script"
+ 
+@@ -78,13 +80,23 @@ GList * parse_result_page (GlyrQuery * q
+         node += (sizeof LYR_NODE);
+         char *script_tag = strstr(node, LYR_SCRIPT_TAG);
+         char *end_tag = strstr(node, LYR_ENDIN);
++        char *footer_tag = strstr(node, LYR_FOOTER);
++        char *credits_tag = strstr(node, LYR_CREDITS);
++        char *ending_tag = LYR_ENDIN;
++
++        if (footer_tag && footer_tag < end_tag) {
++            ending_tag = LYR_FOOTER;
++        }
++        if (credits_tag && credits_tag < end_tag) {
++            ending_tag = LYR_CREDITS;
++        }
+ 
+         if(script_tag && script_tag < end_tag) {
+             node = script_tag + sizeof(LYR_SCRIPT_TAG) - 1;
+         }
+ 
+         bool is_instrumental = strstr(node, LYR_INSTRUMENTAL) != NULL;
+-        gchar * lyr = get_search_value (node,LYR_BEGIN,LYR_ENDIN);
++        gchar * lyr = get_search_value (node,LYR_BEGIN,ending_tag);
+         gchar * beautiness_test = beautify_string (lyr);
+ 
+         if (is_instrumental || (beautiness_test != NULL && beautiness_test[0]))



Home | Main Index | Thread Index | Old Index