mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
This is a quick playlist search bar plugin for DeaDBeeF audio player.
WWW: https://github.com/cboxdoerfer/ddb_quick_search
This commit is contained in:
parent
6b61eebefe
commit
7a747491eb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=407579
6 changed files with 141 additions and 0 deletions
|
@ -95,6 +95,7 @@
|
||||||
SUBDIR += deadbeef-mpris-plugin
|
SUBDIR += deadbeef-mpris-plugin
|
||||||
SUBDIR += deadbeef-mpris2-plugin
|
SUBDIR += deadbeef-mpris2-plugin
|
||||||
SUBDIR += deadbeef-musical-spectrum-plugin
|
SUBDIR += deadbeef-musical-spectrum-plugin
|
||||||
|
SUBDIR += deadbeef-quick-search-plugin
|
||||||
SUBDIR += deadbeef-waveform-seekbar-plugin
|
SUBDIR += deadbeef-waveform-seekbar-plugin
|
||||||
SUBDIR += decibel-audio-player
|
SUBDIR += decibel-audio-player
|
||||||
SUBDIR += deforaos-mixer
|
SUBDIR += deforaos-mixer
|
||||||
|
|
39
audio/deadbeef-quick-search-plugin/Makefile
Normal file
39
audio/deadbeef-quick-search-plugin/Makefile
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
|
||||||
|
# $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 <bsd.port.mk>
|
2
audio/deadbeef-quick-search-plugin/distinfo
Normal file
2
audio/deadbeef-quick-search-plugin/distinfo
Normal file
|
@ -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
|
37
audio/deadbeef-quick-search-plugin/files/patch-Makefile
Normal file
37
audio/deadbeef-quick-search-plugin/files/patch-Makefile
Normal file
|
@ -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..."
|
59
audio/deadbeef-quick-search-plugin/files/patch-main.c
Normal file
59
audio/deadbeef-quick-search-plugin/files/patch-main.c
Normal file
|
@ -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)
|
3
audio/deadbeef-quick-search-plugin/pkg-descr
Normal file
3
audio/deadbeef-quick-search-plugin/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
This is a quick playlist search bar plugin for DeaDBeeF audio player.
|
||||||
|
|
||||||
|
WWW: https://github.com/cboxdoerfer/ddb_quick_search
|
Loading…
Add table
Reference in a new issue