mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
- Provide a custom patch which changes timeout units from seconds to
milliseconds (obviously, since it breaks API compatibility, it must be disabled by default) - Specify correct delay units in osd_cat program (including usage information), its manual page, and XMMS plugin code - Drop explicit shlib version numbers from LIB_DEPENDS (but not for libgdk-pixbuf, to avoid a clash with `graphics/gdk-pixbuf2') - Explicitly disable Beep Media Player plugin (just in case) - Cleanup Makefile, define LICENSE (GPLv2), sort the knobs - Install a few documentation files while I am here - Improve COMMENT and port description, update WWW line Feature safe: yes
This commit is contained in:
parent
eb3ee66084
commit
5f649f8a0a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=307272
@ -1,30 +1,27 @@
|
||||
# New ports collection makefile for: xosd
|
||||
# Date created: 2 May 2001
|
||||
# Whom: Hye-Shik Chang <perky@python.or.kr>
|
||||
#
|
||||
# Created by: Hye-Shik Chang <perky@python.or.kr>
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= xosd
|
||||
PORTVERSION= 2.2.14
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= SF
|
||||
MASTER_SITE_SUBDIR= libxosd/libxosd/${PORTNAME}-${PORTVERSION}
|
||||
MASTER_SITES= SF/libxosd/libxosd/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= X On-Screen-Display Library and XMMS plug-in
|
||||
COMMENT= X11 on-screen-display program and library
|
||||
|
||||
XMMS_CONFIG?= ${LOCALBASE}/bin/xmms-config
|
||||
LICENSE= GPLv2
|
||||
|
||||
USE_AUTOTOOLS= libtool
|
||||
USE_CSTD= gnu89
|
||||
USE_GMAKE= yes
|
||||
USE_XORG= x11 xext xt sm ice
|
||||
USE_AUTOTOOLS= libtool
|
||||
USE_LDCONFIG= yes
|
||||
USE_CSTD= gnu89
|
||||
CONFIGURE_ENV= LIBS=${PTHREAD_LIBS}' -L${LOCALBASE}/lib' \
|
||||
LOCALBASE='${LOCALBASE}' \
|
||||
GTK_CONFIG='${GTK_CONFIG}' GLIB_CONFIG='${GLIB_CONFIG}' \
|
||||
XMMS_PLUGINDIR=${LOCALBASE}/lib/xmms
|
||||
CONFIGURE_ARGS= --disable-beep_media_player_plugin
|
||||
|
||||
MAN1= osd_cat.1 xosd-config.1
|
||||
MAN3= xosd.3 xosd_create.3 xosd_destroy.3 xosd_display.3 \
|
||||
@ -33,27 +30,48 @@ MAN3= xosd.3 xosd_create.3 xosd_destroy.3 xosd_display.3 \
|
||||
xosd_set_horizontal_offset.3 xosd_set_pos.3 \
|
||||
xosd_set_shadow_offset.3 xosd_set_vertical_offset.3 \
|
||||
xosd_show.3 xosd_uninit.3
|
||||
PORTDOCS= AUTHORS ChangeLog TODO
|
||||
|
||||
OPTIONS_DEFINE= XMMS
|
||||
OPTIONS_DEFINE= XMMS MSEC
|
||||
OPTIONS_DEFAULT= XMMS
|
||||
XMMS_DESC= Install XMMS-OSD plugin
|
||||
XMMS_DESC= Build and install XMMS-OSD plugin
|
||||
MSEC_DESC= Use milliseconds timeout (breaks compatibility!)
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MXMMS}
|
||||
LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms \
|
||||
COMMENT+= (with XMMS plugin)
|
||||
LIB_DEPENDS= xmms:${PORTSDIR}/multimedia/xmms \
|
||||
gdk_pixbuf.2:${PORTSDIR}/graphics/gdk-pixbuf
|
||||
PLIST_SUB= WITH_XMMS=""
|
||||
# shlib version is needed for libgdk_pixbuf, otherwise it could be bogusly
|
||||
# satisfied by installed `graphics/gdk-pixbuf2'
|
||||
PLIST_SUB= XMMS=""
|
||||
.else
|
||||
CONFIGURE_ARGS= --disable-new-plugin
|
||||
PLIST_SUB= WITH_XMMS="@comment "
|
||||
CONFIGURE_ARGS+= --disable-new-plugin
|
||||
PLIST_SUB= XMMS="@comment "
|
||||
.endif
|
||||
|
||||
pre-patch:
|
||||
@${REINPLACE_CMD} -e 's,-lc_r,-lblahblah,g' ${WRKSRC}/ltmain.sh
|
||||
@${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g ; s,echo aout,echo elf,' ${WRKSRC}/configure
|
||||
.for f in src/libxosd/Makefile.in src/xmms_plugin/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's,^\(CFLAGS =\)\(.*\)$$,\1 -I.. \2,g' ${WRKSRC}/$f
|
||||
.endfor
|
||||
.if ${PORT_OPTIONS:MMSEC}
|
||||
DELAY_UNITS= milliseconds
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-msec-timeout
|
||||
.else
|
||||
DELAY_UNITS= seconds
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,-lc_r,-lblahblah,' ${WRKSRC}/ltmain.sh
|
||||
@${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS}, ; \
|
||||
s,echo aout,echo elf,' ${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's,^\(CFLAGS =\)\(.*\)$$,\1 -I..\2,' \
|
||||
${WRKSRC}/src/libxosd/Makefile.in \
|
||||
${WRKSRC}/src/xmms_plugin/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's,specified time,& (${DELAY_UNITS}),' \
|
||||
${WRKSRC}/src/osd_cat.c
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
76
misc/xosd/files/extra-patch-msec-timeout
Normal file
76
misc/xosd/files/extra-patch-msec-timeout
Normal file
@ -0,0 +1,76 @@
|
||||
--- src/xosd.h.orig
|
||||
+++ src/xosd.h
|
||||
@@ -64,7 +64,7 @@ extern "C"
|
||||
* font X Logical Font Descriptor, see "xfontsel".
|
||||
* colour X colour, see "rgb.txt" that comes with your X11
|
||||
* distribution.
|
||||
- * timeout Seconds before the display is hidden (-1 for
|
||||
+ * timeout Milliseconds before the display is hidden (-1 for
|
||||
* never).
|
||||
* pos Position to write text (top or bottom).
|
||||
* offset Number of pixels between the "pos" and the
|
||||
@@ -286,7 +286,7 @@ extern "C"
|
||||
*
|
||||
* ARGUMENTS
|
||||
* osd The xosd "object".
|
||||
- * timeout The number of seconds before the display is hidden.
|
||||
+ * timeout The number of milliseconds before the display is hidden.
|
||||
*
|
||||
* RETURNS
|
||||
* 0 on success
|
||||
--- src/libxosd/xosd.c.orig
|
||||
+++ src/libxosd/xosd.c
|
||||
@@ -402,15 +402,13 @@ event_loop(void *osdv)
|
||||
}
|
||||
/* Calculate timeout delta or hide display. */
|
||||
if (timerisset(&osd->timeout_start)) {
|
||||
+ struct timeval timo;
|
||||
+ timo.tv_sec = osd->timeout / 1000,
|
||||
+ timo.tv_usec = (osd->timeout % 1000) * 1000,
|
||||
gettimeofday(&tv, NULL);
|
||||
- tv.tv_sec -= osd->timeout;
|
||||
+ timersub(&tv, &timo, &tv);
|
||||
if (timercmp(&tv, &osd->timeout_start, <)) {
|
||||
- tv.tv_sec = osd->timeout_start.tv_sec - tv.tv_sec;
|
||||
- tv.tv_usec = osd->timeout_start.tv_usec - tv.tv_usec;
|
||||
- if (tv.tv_usec < 0) {
|
||||
- tv.tv_usec += 1000000;
|
||||
- tv.tv_sec -= 1;
|
||||
- }
|
||||
+ timersub(&osd->timeout_start, &tv, &tv);
|
||||
tvp = &tv;
|
||||
} else {
|
||||
timerclear(&osd->timeout_start);
|
||||
--- src/osd_cat.c.orig
|
||||
+++ src/osd_cat.c
|
||||
@@ -53,7 +53,7 @@ int percentage = 50;
|
||||
int outline_offset = 0;
|
||||
char *outline_colour = NULL;
|
||||
char *shadow_colour = NULL;
|
||||
-int delay = 5;
|
||||
+int delay = 5000;
|
||||
int forcewait = 0;
|
||||
xosd_pos pos = XOSD_top;
|
||||
int voffset = 0;
|
||||
--- man/osd_cat.1.orig
|
||||
+++ man/osd_cat.1
|
||||
@@ -37,7 +37,7 @@ This option specifies the \fIFONT\fP to
|
||||
This option specifies the \fICOLOR\fP to be used for displaying the text. The default is \fBred\fP.
|
||||
.TP
|
||||
\fB\-d\fP, \fB\-\-delay\fP=\fITIME\fP
|
||||
-This option specifies the number of seconds the text is displayed. The default is \fB5\fP seconds.
|
||||
+This option specifies the number of milliseconds the text is displayed. The default is \fB5000\fP.
|
||||
.TP
|
||||
\fB\-l\fP, \fB\-\-lines\fP=\fILINES\fP
|
||||
This option specifies the number of \fILINES\fP to scroll the display over. The default is \fB5\fP.
|
||||
--- src/xmms_plugin/xmms_osd.c.orig
|
||||
+++ src/xmms_plugin/xmms_osd.c
|
||||
@@ -260,7 +260,7 @@ apply_config(void)
|
||||
DEBUG("invalid font %s", font);
|
||||
|
||||
xosd_set_colour(osd, colour);
|
||||
- xosd_set_timeout(osd, timeout);
|
||||
+ xosd_set_timeout(osd, timeout * 1000);
|
||||
xosd_set_shadow_offset(osd, shadow_offset);
|
||||
xosd_set_outline_offset(osd, outline_offset);
|
||||
xosd_set_pos(osd, pos);
|
@ -1,8 +1,8 @@
|
||||
XOSD displays text on your screen, sounds simple right?
|
||||
The difference is it is unmanaged and shaped, so it appears
|
||||
transparent. This gives the effect of an On Screen Display,
|
||||
like your TV/VCR etc.. The package also includes an xmms
|
||||
plugin, which automatically displays various interesting
|
||||
things as they change (song name, volume etc...)
|
||||
XOSD displays text on your screen; sounds simple, right? The difference is
|
||||
that it is unmanaged and shaped, so it appears transparent. This gives the
|
||||
effect of an on-screen-display, just like on your TV/VCR, etc.
|
||||
|
||||
WWW: http://www.ignavus.net/software.html
|
||||
The port also includes XMMS plugin, which can automatically display various
|
||||
interesting things as they change (like song name and volume).
|
||||
|
||||
WWW: http://sourceforge.net/projects/libxosd/
|
||||
|
@ -16,5 +16,5 @@ share/aclocal/libxosd.m4
|
||||
%%DATADIR%%/top-right.png
|
||||
%%DATADIR%%/top.png
|
||||
@dirrm %%DATADIR%%
|
||||
%%WITH_XMMS%%lib/xmms/General/libxmms_osd.la
|
||||
%%WITH_XMMS%%lib/xmms/General/libxmms_osd.so
|
||||
%%XMMS%%lib/xmms/General/libxmms_osd.la
|
||||
%%XMMS%%lib/xmms/General/libxmms_osd.so
|
||||
|
Loading…
Reference in New Issue
Block a user