ports/79746: [PATCH] audio/wsoundprefs: unbreak, make work with new WindowMaker

Sam Lawrance boris at brooknet.com.au
Sun Apr 10 12:00:37 UTC 2005


>Number:         79746
>Category:       ports
>Synopsis:       [PATCH] audio/wsoundprefs: unbreak, make work with new WindowMaker
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 10 12:00:35 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sam Lawrance
>Release:        FreeBSD 5.4-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD dirk.no.domain 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #11: Sun Mar  6 12:44:50 EST
>Description:

- link against fontconfig [1] and libXft [2]
- misc WM api changes [1] and [2]
- XClearArea -> XFillRectangle with gray [1] because XClearArea
  is for Window not Drawable (was causing X BadWindow error)

[1] me
[2] ports/75000 Serge Gagnon <ser_gagnon at sympatico.ca>

If you hit "play" with a nonexistant file, the program dies - but
apart from that it's now functional again.

>How-To-Repeat:
>Fix:

--- wsoundprefs-1.1.1_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/audio/wsoundprefs/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	18 Nov 2004 08:05:42 -0000	1.18
+++ Makefile	10 Apr 2005 11:31:09 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	wsoundprefs
 PORTVERSION=	1.1.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	audio windowmaker
 MASTER_SITES=	${MASTER_SITE_NETBSD}
 DISTNAME=	WSoundPrefs-${PORTVERSION}
@@ -15,8 +15,6 @@
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	A utility for configuring sounds to play for Window Maker events
 
-BROKEN=		"Does not build with new version of windowmaker"
-
 BUILD_DEPENDS=	wmaker:${PORTSDIR}/x11-wm/windowmaker
 LIB_DEPENDS=	PropList.2:${PORTSDIR}/devel/libPropList \
 		wsound.1:${PORTSDIR}/audio/wsoundserver
Index: files/patch-ab
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/audio/wsoundprefs/files/patch-ab,v
retrieving revision 1.5
diff -u -r1.5 patch-ab
--- files/patch-ab	12 Mar 2001 09:29:49 -0000	1.5
+++ files/patch-ab	9 Apr 2005 07:20:47 -0000
@@ -1,5 +1,5 @@
---- src/Imakefile.orig	Mon Oct 18 17:35:58 1999
-+++ src/Imakefile	Sun Dec 10 17:09:01 2000
+--- src/Imakefile.orig	Mon Oct 18 18:35:58 1999
++++ src/Imakefile	Sat Apr  9 17:20:36 2005
 @@ -5,9 +5,9 @@
  
  ICONS = WSoundPrefs.xpm WSoundPrefs.tiff
@@ -12,7 +12,7 @@
  
  XCOMM EFENCELIB = -lefence
  EFENCELIB =
-@@ -18,9 +18,9 @@
+@@ -18,19 +18,19 @@
  WRASTERCFLAGS = `get-wraster-flags --cflags`
  WRASTERLFLAGS = `get-wraster-flags --lflags`
  WRASTERLIBS = `get-wraster-flags --libs`
@@ -24,8 +24,11 @@
 +STD_INCLUDES = $(WRASTERCFLAGS) -I${LOCALBASE}/include -I${X11BASE}/include -I${X11BASE}/include/WINGs
  DEPLIBS = $(DEPXLIB) 
  
- LOCAL_LIBRARIES =	$(XLIB) $(WINGSLIBS) $(WSOUNDLFLAGS) $(WSOUNDLIBS) $(WRASTERLFLAGS) $(WRASTERLIBS) $(EFENCELIB)
-@@ -30,7 +30,7 @@
+-LOCAL_LIBRARIES =	$(XLIB) $(WINGSLIBS) $(WSOUNDLFLAGS) $(WSOUNDLIBS) $(WRASTERLFLAGS) $(WRASTERLIBS) $(EFENCELIB)
++LOCAL_LIBRARIES =	$(XLIB) $(WINGSLIBS) $(WSOUNDLFLAGS) $(WSOUNDLIBS) $(WRASTERLFLAGS) $(WRASTERLIBS) $(EFENCELIB) $(FONTCONFIGLIB) $(XFTLIB)
+ 
+ LINTLIBS = $(LINTXLIB)
+ 
  SRCS = PLFunctions.c SoundEvents.c SoundPaths.c SystemInfo.c WSoundPrefs.c main.c
  OBJS = PLFunctions.o SoundEvents.o SoundPaths.o SystemInfo.o WSoundPrefs.o main.o
  
Index: files/patch-ac
===================================================================
RCS file: /home/ncvs/FreeBSD/ports/audio/wsoundprefs/files/patch-ac,v
retrieving revision 1.2
diff -u -r1.2 patch-ac
--- files/patch-ac	22 Jun 1999 15:27:37 -0000	1.2
+++ files/patch-ac	10 Apr 2005 11:41:30 -0000
@@ -1,6 +1,37 @@
---- src/SoundPaths.c.orig	Sat Jun 19 02:08:04 1999
-+++ src/SoundPaths.c	Sat Jun 19 23:23:41 1999
-@@ -71,6 +71,7 @@
+--- src/SoundPaths.c.orig	Mon Jun 14 17:28:21 1999
++++ src/SoundPaths.c	Sun Apr 10 21:41:00 2005
+@@ -42,7 +42,8 @@
+ 	Panel		*panel = (Panel*)WMGetHangedData(lPtr);
+ 	WMScreen	*scr = WMWidgetScreen(lPtr);
+ 	Display		*dpy = WMScreenDisplay(scr);
+-	
++	WMColor		*gray = WMGrayColor(scr);
++
+ 	width = rect->size.width;
+ 	height = rect->size.height;
+ 	x = rect->pos.x;
+@@ -50,13 +51,16 @@
+ 	
+ 	if (state & WLDSSelected)
+ 		XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width, height);
+-	else
+-		XClearArea(dpy, d, x, y, width, height, False);
++	else 
++		XFillRectangle(dpy, d, WMColorGC(gray), x, y, width, height);
++	
+ 
+ 	if (state & 1)
+-		WMDrawString(scr, d, WMColorGC(panel->red), panel->font, x+4, y, text, strlen(text));
++		WMDrawString(scr, d, panel->red, panel->font, x+4, y, text, strlen(text));
+ 	else
+-		WMDrawString(scr, d, WMColorGC(panel->black), panel->font, x+4, y,text, strlen(text));
++		WMDrawString(scr, d, panel->black, panel->font, x+4, y,text, strlen(text));
++
++	WMReleaseColor(gray);
+ }
+ 
+ void
+@@ -71,6 +75,7 @@
  			wwarning(_("bad value in option SoundPath. Using default path list"));
  		addPathToList(panel->sndL, -1, "~/GNUstep/Library/WindowMaker/Sounds");
  		addPathToList(panel->sndL, -1, "/usr/local/share/WindowMaker/Sounds");
@@ -8,11 +39,3 @@
  	} else {
  		for (i=0; i<PLGetNumberOfElements(array); i++) {
  			val = PLGetArrayElement(array, i);
-@@ -91,6 +92,7 @@
- 			wwarning(_("bad value in option SoundSetPath. Using default path list"));
- 		addPathToList(panel->sndsetL, -1, "~/GNUstep/Library/WindowMaker/SoundSets");
- 		addPathToList(panel->sndsetL, -1, "/usr/local/share/WindowMaker/SoundSets");
-+		addPathToList(panel->sndsetL, -1, "/usr/X11R6/share/WindowMaker/SoundSets");
- 	} else {
- 		for (i=0; i<PLGetNumberOfElements(array); i++) {
- 			val = PLGetArrayElement(array, i);
--- wsoundprefs-1.1.1_2.patch ends here ---

--- /dev/null	Sun Apr 10 21:45:25 2005
+++ files/patch-src::WSoundPrefs.c	Sun Apr 10 21:38:20 2005
@@ -0,0 +1,20 @@
+--- src/WSoundPrefs.c.orig	Sat Mar  4 21:46:11 2000
++++ src/WSoundPrefs.c	Sun Apr 10 21:37:11 2005
+@@ -378,7 +378,7 @@
+ 		WMResizeWidget(panel->iconL, 72, 72);
+ 		WMMoveWidget(panel->iconL, 82, 10);
+ 		WMSetLabelImagePosition(panel->iconL, WIPImageOnly);
+-		WMSetLabelImage(panel->iconL, WMGetApplicationIconImage(scr));
++		WMSetLabelImage(panel->iconL, WMGetApplicationIconPixmap(scr));
+ 		
+ 		/* Title */
+ 		panel->titleL = WMCreateLabel(panel->aboutF);
+@@ -407,7 +407,7 @@
+ 		WMResizeWidget(panel->copyrightL, 448, 20);
+ 		WMMoveWidget(panel->copyrightL, 8, 178);
+ 		WMSetLabelTextAlignment(panel->copyrightL, WACenter);
+-		font = WMCreateNormalFont(scr, "-*-helvetica-medium-r-normal-*-10-*-*-*-*-*-*-*");
++		font = WMCreateFont(scr, "-*-helvetica-medium-r-normal-*-10-*-*-*-*-*-*-*");
+ 		if (font)
+ 			WMSetLabelText(panel->copyrightL, "Copyright \xa9 1999 The Az\xe5rg-r\xfbh");
+ 		else {
--- /dev/null	Sun Apr 10 21:45:25 2005
+++ files/patch-src::main.c	Sun Apr 10 20:52:05 2005
@@ -0,0 +1,14 @@
+--- src/main.c.orig	Mon Jun 14 17:28:23 1999
++++ src/main.c	Sun Apr 10 20:51:47 2005
+@@ -109,9 +109,9 @@
+ 			wwarning(_("could not load image file %s:%s"), path, RMessageForError(RErrorCode));
+ 		else {
+ 			icon = WMCreatePixmapFromRImage(scr, tmp, 0);
+-			RDestroyImage(tmp);
++			RReleaseImage(tmp);
+ 			if (icon) {
+-				WMSetApplicationIconImage(scr, icon);
++				WMSetApplicationIconPixmap(scr, icon);
+ 				WMReleasePixmap(icon);
+ 			}
+ 		}

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list