ports/108015: [maintainer] x11-toolkits/wxd patch

Jona Joachim walkingshadow at grummel.net
Tue Jan 16 20:50:18 UTC 2007


>Number:         108015
>Category:       ports
>Synopsis:       [maintainer] x11-toolkits/wxd patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 16 20:50:17 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Jona Joachim
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
Universite Henri Poincare Nancy
>Environment:
System: FreeBSD nirvana.my.domain 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Wed Dec 20 11:44:14 CET 2006 jona at nirvana.my.domain:/usr/obj/usr/src/sys/HYPOCENTER i386
>Description:
This patch fixes some build errors that arised when lang/gdc was updated to version 0.21.
The reason for this is that GDC 0.21 is is not entirely backwards compatible with 0.19 and 0.20.
With this patch applied wxD should build fine again.
The issue will be fixed in future upstream versions.

At the same time I added an OPTION to let the user choose whether he wants to build wxD against
the UNICODE or the ANSI version of wxWidgets.

I also fixed a small imperfection in pkg-plist.
>How-To-Repeat:
>Fix:
--- wxd.diff begins here ---
diff -urN /usr/ports/x11-toolkits/wxd/Makefile wxd/Makefile
--- /usr/ports/x11-toolkits/wxd/Makefile	Wed Nov 22 09:54:36 2006
+++ wxd/Makefile	Tue Jan 16 20:12:02 2007
@@ -20,9 +20,16 @@
 USE_GMAKE=	yes
 USE_LDCONFIG=	yes
 USE_WX=		2.6
-WX_UNICODE=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
+OPTIONS=	UNICODE "Build the Unicode version" On
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_UNICODE)
+WX_UNICODE=	yes
+.endif
+
 pre-patch:
 	@${RM} ${WRKSRC}/Makefile
 	@${MV} ${WRKSRC}/GNUmakefile ${WRKSRC}/Makefile
@@ -36,8 +43,6 @@
 	@${MKDIR} ${EXAMPLESDIR}
 	@${CP} -R ${WRKSRC}/Samples/* ${EXAMPLESDIR}
 .endif
-
-.include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 500000
 IGNORE=	needs FreeBSD 5.x or later
diff -urN /usr/ports/x11-toolkits/wxd/files/patch-wx-pointers wxd/files/patch-wx-pointers
--- /usr/ports/x11-toolkits/wxd/files/patch-wx-pointers	Thu Jan  1 01:00:00 1970
+++ wxd/files/patch-wx-pointers	Tue Jan 16 20:03:27 2007
@@ -0,0 +1,297 @@
+diff -urN work/wxd/wx/Choice.d work_new/wxd/wx/Choice.d
+--- work/wxd/wx/Choice.d	Fri Aug 18 15:02:24 2006
++++ wx/Choice.d	Tue Jan 16 19:30:57 2007
+@@ -88,7 +88,7 @@
+ 		{
+ 			super(wxChoice_ctor());
+ 			if(!wxChoice_Create(wxobj, wxObject.SafePtr(parent), id, pos,
+-								size, choices.length, choices, style, 
++								size, choices.length, choices.ptr, style, 
+ 								wxObject.SafePtr(validator), name)) 
+ 			{
+ 				throw new InvalidOperationException("Failed to create ListBox");
+@@ -108,7 +108,7 @@
+ 						   string name)
+ 		{
+ 			return wxChoice_Create(wxobj, wxObject.SafePtr(parent), id,
+-								   pos, size, choices.length, choices, 
++								   pos, size, choices.length, choices.ptr, 
+ 								   cast(uint)style, wxObject.SafePtr(validator), name);
+ 		}
+ 		
+@@ -135,7 +135,7 @@
+ 		
+ 		public void Append(string[] strings)
+ 		{
+-			wxChoice_AppendArrayString(wxobj, strings.length, strings);
++			wxChoice_AppendArrayString(wxobj, strings.length, strings.ptr);
+ 		}
+ 		
+ 		//-----------------------------------------------------------------------------
+diff -urN work/wxd/wx/ChoiceDialog.d work_new/wxd/wx/ChoiceDialog.d
+--- work/wxd/wx/ChoiceDialog.d	Fri Aug 18 15:02:24 2006
++++ wx/ChoiceDialog.d	Tue Jan 16 19:41:26 2007
+@@ -45,7 +45,7 @@
+             { super(wxobj);}
+ 
+         public  this(Window parent, string message, string caption, string[] choices, ClientData clientData = null, int style =  wxCHOICEDLG_STYLE, Point pos = wxDefaultPosition)
+-            { super(wxSingleChoiceDialog_ctor(wxObject.SafePtr(parent), message, caption, choices.length, choices, wxObject.SafePtr(clientData), style, pos));}
++            { super(wxSingleChoiceDialog_ctor(wxObject.SafePtr(parent), message, caption, choices.length, choices.ptr, wxObject.SafePtr(clientData), style, pos));}
+ 
+         //-----------------------------------------------------------------------------
+ 
+@@ -93,13 +93,13 @@
+             { super(wxobj);}
+ 
+         public  this(Window parent, string message, string caption, string[] choices, int style = SingleChoiceDialog.wxCHOICEDLG_STYLE, Point pos = wxDefaultPosition)
+-            { super(wxMultiChoiceDialog_ctor(wxObject.SafePtr(parent), message, caption, choices.length, choices, style, pos));}
++            { super(wxMultiChoiceDialog_ctor(wxObject.SafePtr(parent), message, caption, choices.length, choices.ptr, style, pos));}
+ 
+         //-----------------------------------------------------------------------------
+ 
+         public void SetSelections(int[] sel)
+         {
+-            wxMultiChoiceDialog_SetSelections(wxobj, sel, sel.length);
++            wxMultiChoiceDialog_SetSelections(wxobj, sel.ptr, sel.length);
+         }
+ 
+         //-----------------------------------------------------------------------------
+@@ -122,22 +122,22 @@
+ 
+ 	public string GetSingleChoice(string message, string caption, string[] choices, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
+ 	{
+-		return wxGetSingleChoice_func(message, caption, choices.length, choices, wxObject.SafePtr(parent), x, y, centre, width, height).dup;
++		return wxGetSingleChoice_func(message, caption, choices.length, choices.ptr, wxObject.SafePtr(parent), x, y, centre, width, height).dup;
+ 	}
+ 
+ 	public int GetSingleChoiceIndex(string message, string caption, string[] choices, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
+ 	{
+-		return wxGetSingleChoiceIndex_func(message, caption, choices.length, choices, wxObject.SafePtr(parent), x, y, centre, width, height);
++		return wxGetSingleChoiceIndex_func(message, caption, choices.length, choices.ptr, wxObject.SafePtr(parent), x, y, centre, width, height);
+ 	}
+ 
+ 	public void* GetSingleChoiceData(string message, string caption, string[] choices, void **client_data, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
+ 	{
+-		return wxGetSingleChoiceData_func(message, caption, choices.length, choices, client_data, wxObject.SafePtr(parent), x, y, centre, width, height);
++		return wxGetSingleChoiceData_func(message, caption, choices.length, choices.ptr, client_data, wxObject.SafePtr(parent), x, y, centre, width, height);
+ 	}
+ 
+ 	public int[] GetMultipleChoices(string message, string caption, string[] choices, Window parent = null, int x = -1, int y= -1, bool centre = true, int width = SingleChoiceDialog.wxCHOICE_WIDTH, int height = SingleChoiceDialog.wxCHOICE_HEIGHT)
+ 	{
+ 		ArrayInt ari = new ArrayInt();
+-		uint sz = wxGetMultipleChoices_func(wxObject.SafePtr(ari), message, caption, choices.length, choices, wxObject.SafePtr(parent), x, y, centre, width, height);
++		uint sz = wxGetMultipleChoices_func(wxObject.SafePtr(ari), message, caption, choices.length, choices.ptr, wxObject.SafePtr(parent), x, y, centre, width, height);
+ 		return ari.toArray();
+ 	}
+diff -urN work/wxd/wx/ComboBox.d work_new/wxd/wx/ComboBox.d
+--- work/wxd/wx/ComboBox.d	Fri Aug 18 15:02:24 2006
++++ wx/ComboBox.d	Tue Jan 16 19:42:51 2007
+@@ -89,7 +89,7 @@
+ 			super(wxComboBox_ctor());
+ 			if(!wxComboBox_Create(wxobj, wxObject.SafePtr(parent), id, 
+ 						value, pos, size, 
+-						choices.length, choices, cast(uint)style, 
++						choices.length, choices.ptr, cast(uint)style, 
+ 						wxObject.SafePtr(validator), name)) 
+ 			{
+ 				throw new InvalidOperationException("Failed to create ListBox");
+@@ -114,7 +114,7 @@
+ 		{
+ 			return wxComboBox_Create(wxobj, wxObject.SafePtr(parent), id,
+ 					value, pos, size, 
+-					choices.length, choices, 
++					choices.length, choices.ptr, 
+ 					cast(uint)style, wxObject.SafePtr(validator), name);
+ 		}
+ 
+diff -urN work/wxd/wx/DC.d work_new/wxd/wx/DC.d
+--- work/wxd/wx/DC.d	Tue Sep  5 11:47:46 2006
++++ wx/DC.d	Tue Jan 16 19:44:42 2007
+@@ -267,7 +267,7 @@
+ 		
+ 		public void DrawPolygon(int n, Point[] points, int xoffset, int yoffset, FillStyle fill_style)
+ 		{
+-			wxDC_DrawPolygon(wxobj, n, points, xoffset, yoffset, cast(int)fill_style);
++			wxDC_DrawPolygon(wxobj, n, points.ptr, xoffset, yoffset, cast(int)fill_style);
+ 		}
+ 
+ 		//---------------------------------------------------------------------
+@@ -543,7 +543,7 @@
+ 		
+ 		public void DrawLines(Point[] points, int xoffset, int yoffset)
+ 		{
+-			wxDC_DrawLines(wxobj, points.length, points, xoffset, yoffset);
++			wxDC_DrawLines(wxobj, points.length, points.ptr, xoffset, yoffset);
+ 		}
+ 		
+ 		public void DrawLines(Point[] points)
+@@ -643,7 +643,7 @@
+ 		
+ 		public void DrawSpline(Point[] points)
+ 		{
+-			wxDC_DrawSpline2(wxobj, points.length, points);
++			wxDC_DrawSpline2(wxobj, points.length, points.ptr);
+ 		}
+ 		
+ 		//---------------------------------------------------------------------
+diff -urN work/wxd/wx/Frame.d work_new/wxd/wx/Frame.d
+--- work/wxd/wx/Frame.d	Fri Aug 18 15:02:24 2006
++++ wx/Frame.d	Tue Jan 16 19:45:26 2007
+@@ -211,7 +211,7 @@
+ 
+ 		public void SetStatusWidths(int n, int[] widths)
+ 		{
+-			wxFrame_SetStatusWidths(wxobj, n, widths);
++			wxFrame_SetStatusWidths(wxobj, n, widths.ptr);
+ 		}
+ 
+ 		//---------------------------------------------------------------------
+diff -urN work/wxd/wx/Grid.d work_new/wxd/wx/Grid.d
+--- work/wxd/wx/Grid.d	Sun Oct  1 23:30:40 2006
++++ wx/Grid.d	Tue Jan 16 19:54:56 2007
+@@ -767,7 +767,7 @@
+         
+         public this(string[] choices, bool allowOthers)
+ 	{ 
+-		this(wxGridCellChoiceEditor_ctor(choices.length, choices, allowOthers), true);
++		this(wxGridCellChoiceEditor_ctor(choices.length, choices.ptr, allowOthers), true);
+ 		wxGridCellChoiceEditor_RegisterDisposable(wxobj, &VirtualDispose);
+ 	}
+ 
+diff -urN work/wxd/wx/GridCtrl.d work_new/wxd/wx/GridCtrl.d
+--- work/wxd/wx/GridCtrl.d	Fri Aug 18 15:02:25 2006
++++ wx/GridCtrl.d	Tue Jan 16 19:55:26 2007
+@@ -95,7 +95,7 @@
+ 			{ this(cast(string[])null);}
+ 			
+ 		public this(string[] choices)
+-			{ this(wxGridCellEnumRenderer_ctor(choices.length, choices), true);}
++			{ this(wxGridCellEnumRenderer_ctor(choices.length, choices.ptr), true);}
+ 				
+ 		public this(IntPtr wxobj)
+ 		{
+diff -urN work/wxd/wx/HTML.d work_new/wxd/wx/HTML.d
+--- work/wxd/wx/HTML.d	Fri Aug 18 15:02:25 2006
++++ wx/HTML.d	Tue Jan 16 19:46:40 2007
+@@ -942,7 +942,7 @@
+ 
+         public void SetFonts(string normal_face, string fixed_face, int[] sizes)
+         {
+-            wxHtmlWinParser_SetFonts(wxobj, normal_face, fixed_face, sizes);
++            wxHtmlWinParser_SetFonts(wxobj, normal_face, fixed_face, sizes.ptr);
+         }
+ 
+         //-----------------------------------------------------------------------------
+@@ -1536,7 +1536,7 @@
+ 		
+ 		public void SetFonts(string normal_face, string fixed_face, int[] sizes)
+ 		{
+-			wxHtmlEasyPrinting_SetFonts(wxobj, normal_face, fixed_face, sizes);
++			wxHtmlEasyPrinting_SetFonts(wxobj, normal_face, fixed_face, sizes.ptr);
+ 		}
+ 		
+ 		//-----------------------------------------------------------------------------
+@@ -1725,7 +1725,7 @@
+ 		
+ 		public void SetFonts(string normal_face, string fixed_face, int[] sizes)
+ 		{
+-			wxHtmlWindow_SetFonts(wxobj, normal_face, fixed_face, sizes);
++			wxHtmlWindow_SetFonts(wxobj, normal_face, fixed_face, sizes.ptr);
+ 		}
+ 		
+ 		//-----------------------------------------------------------------------------
+diff -urN work/wxd/wx/ListBox.d work_new/wxd/wx/ListBox.d
+--- work/wxd/wx/ListBox.d	Sat Aug 26 14:41:22 2006
++++ wx/ListBox.d	Tue Jan 16 19:50:51 2007
+@@ -81,7 +81,7 @@
+ 		{
+ 			super(wxListBox_ctor());
+ 			if(!wxListBox_Create(wxobj, wxObject.SafePtr(parent), id,
+-					pos, size, choices.length, choices, cast(uint)style,
++					pos, size, choices.length, choices.ptr, cast(uint)style,
+ 					wxObject.SafePtr(validator), name))
+ 			{
+ 				throw new InvalidOperationException("Failed to create ListBox");
+@@ -101,7 +101,7 @@
+ 				string[] choices, int style, Validator validator, string name)
+ 		{
+ 			return wxListBox_Create(wxobj, wxObject.SafePtr(parent), id,
+-					pos, size, n, choices, cast(uint)style,
++					pos, size, n, choices.ptr, cast(uint)style,
+ 					wxObject.SafePtr(validator), name);
+ 		}
+ 		
+@@ -186,19 +186,19 @@
+ 	
+ 		public void InsertItems(string[] items, int pos)
+ 		{
+-			wxListBox_InsertItems(wxobj, items.length, items, pos);
++			wxListBox_InsertItems(wxobj, items.length, items.ptr, pos);
+ 		}
+ 	
+ 		//---------------------------------------------------------------------
+ 	
+ 		public void Set(string[] items, ClientData data)
+ 		{
+-			wxListBox_Set(wxobj, items.length, items, wxObject.SafePtr(data));
++			wxListBox_Set(wxobj, items.length, items.ptr, wxObject.SafePtr(data));
+ 		}
+ 	
+ 		public void Set(string[] items)
+ 		{
+-			wxListBox_Set(wxobj, items.length, items, wxObject.SafePtr(null));
++			wxListBox_Set(wxobj, items.length, items.ptr, wxObject.SafePtr(null));
+ 		}
+ 	
+ 		//---------------------------------------------------------------------
+@@ -302,7 +302,7 @@
+ 			{ super(wxCheckListBox_ctor1());}
+ 			
+ 		public this(Window parent, int id, Point pos = wxDefaultPosition, Size size = wxDefaultSize, string[] choices = null, int style = 0, Validator validator = null, string name = wxListBoxNameStr)
+-			{ super(wxCheckListBox_ctor2(wxObject.SafePtr(parent), id, pos, size, choices.length, choices, cast(uint)style, wxObject.SafePtr(validator), name));}
++			{ super(wxCheckListBox_ctor2(wxObject.SafePtr(parent), id, pos, size, choices.length, choices.ptr, cast(uint)style, wxObject.SafePtr(validator), name));}
+ 			
+ 		//---------------------------------------------------------------------
+ 		// ctors with self created id
+diff -urN work/wxd/wx/RadioBox.d work_new/wxd/wx/RadioBox.d
+--- work/wxd/wx/RadioBox.d	Fri Aug 18 15:02:25 2006
++++ wx/RadioBox.d	Tue Jan 16 19:52:15 2007
+@@ -67,7 +67,7 @@
+ 		{
+ 			super(wxRadioBox_ctor());
+ 			if (!wxRadioBox_Create(wxobj, wxObject.SafePtr(parent), id, label, pos, size,
+-			                       choices.length, choices, majorDimension, cast(uint)style, wxObject.SafePtr(val), name))
++			                       choices.length, choices.ptr, majorDimension, cast(uint)style, wxObject.SafePtr(val), name))
+ 			{
+ 				throw new InvalidOperationException("failed to create checkbox");
+ 			}
+diff -urN work/wxd/wx/StatusBar.d work_new/wxd/wx/StatusBar.d
+--- work/wxd/wx/StatusBar.d	Fri Aug 18 15:02:26 2006
++++ wx/StatusBar.d	Tue Jan 16 19:54:13 2007
+@@ -81,7 +81,7 @@
+         
+ 		public void SetFieldsCount(int number, int[] widths)
+ 		{
+-			wxStatusBar_SetFieldsCount(wxobj, number, widths);
++			wxStatusBar_SetFieldsCount(wxobj, number, widths.ptr);
+ 		}
+ 		
+ 		public int FieldsCount() { return wxStatusBar_GetFieldsCount(wxobj); }
+@@ -120,7 +120,7 @@
+ 
+ 		public void StatusWidths(int[] value)
+ 		{
+-			SetStatusWidths(value.length, value);
++			SetStatusWidths(value.length, value.ptr);
+ 		}
+ 
+ 		public void SetStatusWidths(int n, int* widths)
+@@ -163,7 +163,7 @@
+ 		
+ 		public void StatusStyles(int[] value)
+ 		{
+-			wxStatusBar_SetStatusStyles(wxobj, value.length, value);
++			wxStatusBar_SetStatusStyles(wxobj, value.length, value.ptr);
+ 		}
+ 
+ 	}
diff -urN /usr/ports/x11-toolkits/wxd/pkg-plist wxd/pkg-plist
--- /usr/ports/x11-toolkits/wxd/pkg-plist	Wed Nov 22 09:54:36 2006
+++ wxd/pkg-plist	Tue Jan 16 20:44:50 2007
@@ -465,7 +465,7 @@
 @dirrm include/d/wx/ogl
 @dirrm include/d/wx/aui
 @dirrm include/d/wx
- at dirrm include/d
+ at dirrmtry include/d
 %%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/Xrc/rc
 %%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/Xrc
 %%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/Wizard
--- wxd.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list