From owner-svn-ports-all@freebsd.org Sun Jan 31 07:14:39 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84255A74170; Sun, 31 Jan 2016 07:14:39 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46B1C1FFD; Sun, 31 Jan 2016 07:14:39 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0V7EccB050007; Sun, 31 Jan 2016 07:14:38 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0V7EbNR050001; Sun, 31 Jan 2016 07:14:37 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201601310714.u0V7EbNR050001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Sun, 31 Jan 2016 07:14:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r407579 - in head/audio: . deadbeef-quick-search-plugin deadbeef-quick-search-plugin/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 07:14:39 -0000 Author: danfe Date: Sun Jan 31 07:14:37 2016 New Revision: 407579 URL: https://svnweb.freebsd.org/changeset/ports/407579 Log: This is a quick playlist search bar plugin for DeaDBeeF audio player. WWW: https://github.com/cboxdoerfer/ddb_quick_search Added: head/audio/deadbeef-quick-search-plugin/ head/audio/deadbeef-quick-search-plugin/Makefile (contents, props changed) head/audio/deadbeef-quick-search-plugin/distinfo (contents, props changed) head/audio/deadbeef-quick-search-plugin/files/ head/audio/deadbeef-quick-search-plugin/files/patch-Makefile (contents, props changed) head/audio/deadbeef-quick-search-plugin/files/patch-main.c (contents, props changed) head/audio/deadbeef-quick-search-plugin/pkg-descr (contents, props changed) Modified: head/audio/Makefile Modified: head/audio/Makefile ============================================================================== --- head/audio/Makefile Sun Jan 31 06:55:49 2016 (r407578) +++ head/audio/Makefile Sun Jan 31 07:14:37 2016 (r407579) @@ -95,6 +95,7 @@ SUBDIR += deadbeef-mpris-plugin SUBDIR += deadbeef-mpris2-plugin SUBDIR += deadbeef-musical-spectrum-plugin + SUBDIR += deadbeef-quick-search-plugin SUBDIR += deadbeef-waveform-seekbar-plugin SUBDIR += decibel-audio-player SUBDIR += deforaos-mixer Added: head/audio/deadbeef-quick-search-plugin/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/deadbeef-quick-search-plugin/Makefile Sun Jan 31 07:14:37 2016 (r407579) @@ -0,0 +1,39 @@ +# Created by: Alexey Dokuchaev +# $FreeBSD$ + +PORTNAME= deadbeef-quick-search-plugin +DISTVERSION= 0.0.2016.01.02 +CATEGORIES= audio + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Quick playlist search bar plugin for DeaDBeeF audio player + +BUILD_DEPENDS= ${LOCALBASE}/include/deadbeef/deadbeef.h:${PORTSDIR}/audio/deadbeef +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USE_GITHUB= yes +GH_ACCOUNT= cboxdoerfer +GH_PROJECT= ddb_quick_search +GH_TAGNAME= 332e994 + +USES= gmake pkgconfig + +OPTIONS_DEFINE= GTK2 GTK3 +OPTIONS_DEFAULT= GTK2 + +.for v in 2 3 +GTK${v}_USE= GNOME=gtk${v}0 + +GTK${v}_ALL_TARGET= gtk${v} +GTK${v}_PLIST_FILES= lib/deadbeef/ddb_misc_quick_search_GTK${v}.so + +do-install-GTK${v}-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/deadbeef + ${INSTALL_LIB} ${WRKSRC}/gtk${v}/ddb_misc_quick_search_GTK${v}.so \ + ${STAGEDIR}${PREFIX}/lib/deadbeef +.endfor + +do-install: + @${DO_NADA} + +.include Added: head/audio/deadbeef-quick-search-plugin/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/deadbeef-quick-search-plugin/distinfo Sun Jan 31 07:14:37 2016 (r407579) @@ -0,0 +1,2 @@ +SHA256 (cboxdoerfer-ddb_quick_search-0.0.2016.01.02-332e994_GH0.tar.gz) = b46a825b500759fe440d2ba5521d94793f67b5437cdd736d37d1c0d1f9b3bd1d +SIZE (cboxdoerfer-ddb_quick_search-0.0.2016.01.02-332e994_GH0.tar.gz) = 8114 Added: head/audio/deadbeef-quick-search-plugin/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/deadbeef-quick-search-plugin/files/patch-Makefile Sun Jan 31 07:14:37 2016 (r407579) @@ -0,0 +1,37 @@ +--- Makefile.orig 2016-01-02 12:26:07 UTC ++++ Makefile +@@ -26,7 +26,7 @@ GTK2_LIBS?=`pkg-config --libs gtk+-2.0` + GTK3_LIBS?=`pkg-config --libs gtk+-3.0` + + CC?=gcc +-CFLAGS+=-Wall -g -O2 -fPIC -std=c99 -D_GNU_SOURCE ++CFLAGS+=-Wall -fPIC -std=c99 -D_GNU_SOURCE + LDFLAGS+=-shared + + GTK2_DIR?=gtk2 +@@ -65,21 +65,21 @@ mkdir_gtk3: + + $(GTK2_DIR)/$(OUT_GTK2): $(OBJ_GTK2) + @echo "Linking GTK+2 version" +- @$(call link, $(OBJ_GTK2), $(GTK2_LIBS)) ++ $(call link, $(OBJ_GTK2), $(GTK2_LIBS)) + @echo "Done!" + + $(GTK3_DIR)/$(OUT_GTK3): $(OBJ_GTK3) + @echo "Linking GTK+3 version" +- @$(call link, $(OBJ_GTK3), $(GTK3_LIBS)) ++ $(call link, $(OBJ_GTK3), $(GTK3_LIBS)) + @echo "Done!" + + $(GTK2_DIR)/%.o: %.c + @echo "Compiling $(subst $(GTK2_DIR)/,,$@)" +- @$(call compile, $(GTK2_CFLAGS)) ++ $(call compile, $(GTK2_CFLAGS)) + + $(GTK3_DIR)/%.o: %.c + @echo "Compiling $(subst $(GTK3_DIR)/,,$@)" +- @$(call compile, $(GTK3_CFLAGS)) ++ $(call compile, $(GTK3_CFLAGS)) + + clean: + @echo "Cleaning files from previous build..." Added: head/audio/deadbeef-quick-search-plugin/files/patch-main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/deadbeef-quick-search-plugin/files/patch-main.c Sun Jan 31 07:14:37 2016 (r407579) @@ -0,0 +1,59 @@ +--- main.c.orig 2016-01-02 12:26:07 UTC ++++ main.c +@@ -101,9 +101,17 @@ check_dir (const char *dir, mode_t mode) + static int + make_cache_dir (char *path, int size) + { ++#if (DDB_API_LEVEL >= 8) + const char *cache_dir = deadbeef->get_system_dir (DDB_SYS_DIR_CACHE); ++#else ++ const char *cache_dir = getenv ("HOME"); ++#endif + if (cache_dir) { +- const int sz = snprintf (path, size, cache_dir ? "%s/quick_search/" : "%s/.cache/deadbeef/quick_search/", cache_dir ? cache_dir : getenv ("HOME")); ++#if (DDB_API_LEVEL >= 8) ++ const int sz = snprintf (path, size, "%s/quick_search/", cache_dir); ++#else ++ const int sz = snprintf (path, size, "%s/.cache/deadbeef/quick_search/", cache_dir); ++#endif + if (!check_dir (path, 0755)) { + return 0; + } +@@ -432,14 +440,13 @@ on_searchentry_activate ( + DB_playItem_t *it = deadbeef->plt_get_first (plt, PL_MAIN); + while (it) { + if (deadbeef->pl_is_selected (it)) { ++ int idx = deadbeef->plt_get_item_idx(plt, it, PL_MAIN); ++ deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, idx, 0); + break; + } + DB_playItem_t *next = deadbeef->pl_get_next (it, PL_MAIN); + deadbeef->pl_item_unref (it); + it = next; +- if (!it) { +- deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, 0, 0); +- } + } + if (it) { + deadbeef->pl_item_unref (it); +@@ -541,9 +548,9 @@ on_searchentry_key_press_event + gpointer user_data) + { + #if GTK_CHECK_VERSION(3,0,0) +- if (event->keyval == GDK_KEY_Return) { ++ if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter) { + #else +- if (event->keyval == GDK_Return) { ++ if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) { + #endif + if (!config_autosearch) { + GtkEntry *entry = GTK_ENTRY (widget); +@@ -1010,7 +1017,7 @@ quick_search_disconnect (void) + // define plugin interface + static DB_misc_t plugin = { + .plugin.api_vmajor = 1, +- .plugin.api_vminor = 8, ++ .plugin.api_vminor = 5, + .plugin.version_major = 0, + .plugin.version_minor = 1, + #if GTK_CHECK_VERSION(3,0,0) Added: head/audio/deadbeef-quick-search-plugin/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/deadbeef-quick-search-plugin/pkg-descr Sun Jan 31 07:14:37 2016 (r407579) @@ -0,0 +1,3 @@ +This is a quick playlist search bar plugin for DeaDBeeF audio player. + +WWW: https://github.com/cboxdoerfer/ddb_quick_search