[Pkg-erlang-commits] r1556 - in wings3d/trunk/debian: . patches

sgolovan at alioth.debian.org sgolovan at alioth.debian.org
Thu Oct 17 19:09:56 UTC 2013


Author: sgolovan
Date: 2013-10-17 19:09:56 +0000 (Thu, 17 Oct 2013)
New Revision: 1556

Removed:
   wings3d/trunk/debian/patches/drivers.diff
   wings3d/trunk/debian/patches/include.diff
   wings3d/trunk/debian/patches/pm.diff
   wings3d/trunk/debian/patches/volume.diff
Modified:
   wings3d/trunk/debian/changelog
   wings3d/trunk/debian/control
   wings3d/trunk/debian/patches/autouv.diff
   wings3d/trunk/debian/patches/build.diff
   wings3d/trunk/debian/patches/jpeg.diff
   wings3d/trunk/debian/patches/lang.diff
   wings3d/trunk/debian/patches/series
   wings3d/trunk/debian/patches/wx.diff
   wings3d/trunk/debian/rules
Log:
[wings3d]
  * New upstream release.
  * Removed no longer necessary patches.
  * Added build-dependency and dependency on erlang-cl.


Modified: wings3d/trunk/debian/changelog
===================================================================
--- wings3d/trunk/debian/changelog	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/changelog	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,8 +1,10 @@
-wings3d (1.4.1-6) UNRELEASED; urgency=low
+wings3d (1.5.1-1) unstable; urgency=low
 
-  * NOT RELEASED YET
+  * New upstream release.
+  * Removed no longer necessary patches.
+  * Added build-dependency and dependency on erlang-cl.
 
- -- Sergei Golovan <sgolovan at debian.org>  Thu, 09 May 2013 22:12:06 +0400
+ -- Sergei Golovan <sgolovan at debian.org>  Thu, 17 Oct 2013 23:09:08 +0400
 
 wings3d (1.4.1-5) unstable; urgency=low
 

Modified: wings3d/trunk/debian/control
===================================================================
--- wings3d/trunk/debian/control	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/control	2013-10-17 19:09:56 UTC (rev 1556)
@@ -4,7 +4,7 @@
 Section: graphics
 Priority: optional
 Build-Depends: debhelper (>= 8.0.0), grep-dctrl,
- erlang-dev (>= 1:15.b), erlang-esdl-dev (>= 1.2),
+ erlang-dev (>= 1:15.b), erlang-esdl-dev (>= 1.2), erlang-cl,
  libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libjpeg-dev
 Standards-Version: 3.9.4
 Homepage: http://www.wings3d.com
@@ -13,7 +13,8 @@
 Package: wings3d
 Architecture: any
 Depends: ${erlang-base:Depends}, ${erlang-abi:Depends}, ${erlang-wx:Depends},
- ${erlang-xmerl:Depends}, ${erlang-esdl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+ ${erlang-xmerl:Depends}, ${erlang-esdl:Depends}, erlang-cl,
+ ${shlibs:Depends}, ${misc:Depends}
 Suggests: ${erlang-dialyzer:Depends}, ${erlang-tools:Depends}, yafaray | aqsis
 Description: Nendo-inspired 3D polygon mesh modeller
  Wings 3D is a polygon mesh modeller written entirely in Erlang.  The

Modified: wings3d/trunk/debian/patches/autouv.diff
===================================================================
--- wings3d/trunk/debian/patches/autouv.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/autouv.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,5 +1,5 @@
---- wings3d-1.4.1.orig/plugins_src/autouv/Makefile
-+++ wings3d-1.4.1/plugins_src/autouv/Makefile
+--- a/plugins_src/autouv/Makefile
++++ b/plugins_src/autouv/Makefile
 @@ -67,6 +67,7 @@
  	erl -pa $(WINGS_INTL) -noinput -run tools diff_lang_files $(EBIN)
  

Modified: wings3d/trunk/debian/patches/build.diff
===================================================================
--- wings3d/trunk/debian/patches/build.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/build.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,5 +1,5 @@
---- wings3d-1.4.1.orig/plugins_src/Makefile
-+++ wings3d-1.4.1/plugins_src/Makefile
+--- a/plugins_src/Makefile
++++ b/plugins_src/Makefile
 @@ -51,6 +51,7 @@
  	(cd primitives; $(MAKE))
  	(cd commands; $(MAKE))

Deleted: wings3d/trunk/debian/patches/drivers.diff
===================================================================
--- wings3d/trunk/debian/patches/drivers.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/drivers.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,204 +0,0 @@
-Patch fixes loading external drivers into Erlang R15B.
-
---- wings3d-1.4.1.orig/plugins_src/accel/wings_pick_drv.c
-+++ wings3d-1.4.1/plugins_src/accel/wings_pick_drv.c
-@@ -14,6 +14,11 @@
- #include <stdio.h>
- #include "erl_driver.h"
- 
-+#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2
-+typedef int ErlDrvSizeT;
-+typedef int ErlDrvSSizeT;
-+#endif
-+
- #ifdef __WIN32__
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
-@@ -25,9 +30,9 @@
-  */
- static ErlDrvData wings_file_start(ErlDrvPort port, char *buff);
- static void wings_file_stop(ErlDrvData handle);
--static int control(ErlDrvData handle, unsigned int command,
--                   char* buff, int count,
--                   char** res, int res_size);
-+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command,
-+                   char* buff, ErlDrvSizeT count,
-+                   char** res, ErlDrvSizeT res_size);
- static void outputv(ErlDrvData drv_data, ErlIOVec* ev);
- 
- /*
-@@ -47,7 +52,18 @@
-     NULL,                  /* void * that is not used (BC) */
-     control,               /* F_PTR control, port_control callback */
-     NULL,                  /* F_PTR timeout, driver_set_timer callback */
--    outputv                /* F_PTR outputv, reserved */
-+    outputv,               /* F_PTR outputv, reserved */
-+    NULL,
-+    NULL,
-+    NULL,
-+    NULL,
-+    ERL_DRV_EXTENDED_MARKER,
-+    ERL_DRV_EXTENDED_MAJOR_VERSION,
-+    ERL_DRV_EXTENDED_MINOR_VERSION,
-+    0,
-+    NULL,
-+    NULL,
-+    NULL
- };
- 
- struct vertex_struct {
-@@ -107,14 +123,14 @@
-  * Handle commands.
-  */
- 
--static int
-+static ErlDrvSSizeT
- control(ErlDrvData handle, unsigned int command,
--        char* buf, int count,
--        char** res, int res_size)
-+        char* buf, ErlDrvSizeT count,
-+        char** res, ErlDrvSizeT res_size)
- {
-   switch (command) {
-   case 0: {			/* Define matrix */
--    memcpy((void *) m, (void *) buf, count);
-+    memcpy((void *) m, (void *) buf, (size_t) count);
- #if 0
-     {
-       int i, j;
---- wings3d-1.4.1.orig/plugins_src/accel/perlin_noise_drv.c
-+++ wings3d-1.4.1/plugins_src/accel/perlin_noise_drv.c
-@@ -14,6 +14,11 @@
- #include <stdio.h>
- #include "erl_driver.h"
- 
-+#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2
-+typedef int ErlDrvSizeT;
-+typedef int ErlDrvSSizeT;
-+#endif
-+
- #ifdef __WIN32__
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
-@@ -57,9 +62,9 @@
-  */
- static ErlDrvData perlin_noise_start(ErlDrvPort port, char *buff);
- static void perlin_noise_stop(ErlDrvData handle);
--static int control(ErlDrvData handle, unsigned int command, 
--                   char* buff, int count, 
--                   char** res, int res_size);
-+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, 
-+                   char* buff, ErlDrvSizeT count, 
-+                   char** res, ErlDrvSizeT res_size);
- 
- /*
-  * Internal routines
-@@ -82,7 +87,18 @@
-    NULL,                  /* void * that is not used (BC) */
-    control,               /* F_PTR control, port_control callback */
-    NULL,                  /* F_PTR timeout, driver_set_timer callback */
--   NULL                   /* F_PTR outputv, reserved */
-+   NULL,                  /* F_PTR outputv, reserved */
-+   NULL,
-+   NULL,
-+   NULL,
-+   NULL,
-+   ERL_DRV_EXTENDED_MARKER,
-+   ERL_DRV_EXTENDED_MAJOR_VERSION,
-+   ERL_DRV_EXTENDED_MINOR_VERSION,
-+   0,
-+   NULL,
-+   NULL,
-+   NULL
- };
- 
- /*
-@@ -114,9 +130,9 @@
-    
- }
- 
--static int control(ErlDrvData handle, unsigned int command,
--		   char* buff, int count, 
--		   char** res, int res_size)
-+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command,
-+		   char* buff, ErlDrvSizeT count, 
-+		   char** res, ErlDrvSizeT res_size)
- {
-    ErlDrvBinary* bin;
- 
---- wings3d-1.4.1.orig/plugins_src/jpeg/wings_jpeg_image_drv.c
-+++ wings3d-1.4.1/plugins_src/jpeg/wings_jpeg_image_drv.c
-@@ -21,6 +21,11 @@
- #include <setjmp.h>
- #include "erl_driver.h"
- 
-+#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2
-+typedef int ErlDrvSizeT;
-+typedef int ErlDrvSSizeT;
-+#endif
-+
- #include "jpeglib.h"
- #include "jerror.h"
- 
-@@ -29,14 +34,14 @@
-  */
- static ErlDrvData jpeg_image_start(ErlDrvPort port, char *buff);
- static void jpeg_image_stop(ErlDrvData handle);
--static int jpeg_image_control(ErlDrvData handle, unsigned int command, 
--			      char* buff, int count, 
--			      char** res, int res_size);
-+static ErlDrvSSizeT jpeg_image_control(ErlDrvData handle, unsigned int command, 
-+			      char* buff, ErlDrvSizeT count, 
-+			      char** res, ErlDrvSizeT res_size);
- 
- /*
-  * Internal functions.
-  */
--static void jpeg_buffer_src(j_decompress_ptr cinfo, char* buf, int count);
-+static void jpeg_buffer_src(j_decompress_ptr cinfo, char* buf, ErlDrvSizeT count);
- static void jpeg_buffer_dest(j_compress_ptr cinfo, ErlDrvBinary* bin);
- static ErlDrvBinary* jpeg_buffer_dest_get_bin(j_compress_ptr cinfo);
- 
-@@ -58,7 +63,18 @@
-     NULL,                  /* void * that is not used (BC) */
-     jpeg_image_control,    /* F_PTR control, port_control callback */
-     NULL,                  /* F_PTR timeout, driver_set_timer callback */
--    NULL                   /* F_PTR outputv, reserved */
-+    NULL,                  /* F_PTR outputv, reserved */
-+    NULL,
-+    NULL,
-+    NULL,
-+    NULL,
-+    ERL_DRV_EXTENDED_MARKER,
-+    ERL_DRV_EXTENDED_MAJOR_VERSION,
-+    ERL_DRV_EXTENDED_MINOR_VERSION,
-+    0,
-+    NULL,
-+    NULL,
-+    NULL
- };
- 
- /*
-@@ -118,10 +134,10 @@
-   longjmp(myerr->setjmp_buffer, 1);
- }
- 
--static int
-+static ErlDrvSSizeT
- jpeg_image_control(ErlDrvData handle, unsigned int command, 
--		   char* buf, int count, 
--		   char** res, int res_size)
-+		   char* buf, ErlDrvSizeT count, 
-+		   char** res, ErlDrvSizeT res_size)
- {
-   JSAMPROW row;
-   ErlDrvBinary* bin = 0;
-@@ -286,7 +302,7 @@
-  */
- 
- static void
--jpeg_buffer_src(j_decompress_ptr cinfo, char* buf, int count)
-+jpeg_buffer_src(j_decompress_ptr cinfo, char* buf, ErlDrvSizeT count)
- {
-   MemSourceMgr* src;
- 

Deleted: wings3d/trunk/debian/patches/include.diff
===================================================================
--- wings3d/trunk/debian/patches/include.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/include.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,24 +0,0 @@
-Patch by Sergei Golovan fixes including a header from esdl.
-
---- wings3d-1.4.1.orig/src/wings_body.erl
-+++ wings3d-1.4.1/src/wings_body.erl
-@@ -16,7 +16,7 @@
- -export([auto_smooth/1]).
- 
- -include("wings.hrl").
---include("sdl_keyboard.hrl").
-+-include_lib("esdl/include/sdl_keyboard.hrl").
- -import(lists, [foldl/3,reverse/1,sort/1,seq/2]).
- 
- menu(X, Y, St) ->
---- wings3d-1.4.1.orig/plugins_src/commands/wpc_constraints.erl
-+++ wings3d-1.4.1/plugins_src/commands/wpc_constraints.erl
-@@ -15,7 +15,7 @@
- -export([init/0,menu/2,command/2]).
- -include("wings.hrl").
- -include("e3d.hrl").
---include("sdl_keyboard.hrl").
-+-include_lib("esdl/include/sdl_keyboard.hrl").
- -define(NONZERO, 1.0e-6).
- 
- init() ->

Modified: wings3d/trunk/debian/patches/jpeg.diff
===================================================================
--- wings3d/trunk/debian/patches/jpeg.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/jpeg.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,6 +1,6 @@
---- wings3d-1.4.1.orig/plugins_src/jpeg/Makefile
-+++ wings3d-1.4.1/plugins_src/jpeg/Makefile
-@@ -72,3 +72,6 @@
+--- a/plugins_src/jpeg/Makefile
++++ b/plugins_src/jpeg/Makefile
+@@ -79,3 +79,6 @@
  
  endif
  

Modified: wings3d/trunk/debian/patches/lang.diff
===================================================================
--- wings3d/trunk/debian/patches/lang.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/lang.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,5 +1,5 @@
---- wings3d-1.4.1.orig/intl_tools/tools.erl
-+++ wings3d-1.4.1/intl_tools/tools.erl
+--- a/intl_tools/tools.erl
++++ b/intl_tools/tools.erl
 @@ -47,7 +47,7 @@
      end;
  diff_files_1([], Acc) ->

Deleted: wings3d/trunk/debian/patches/pm.diff
===================================================================
--- wings3d/trunk/debian/patches/pm.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/pm.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,523 +0,0 @@
-Author: upstream
-Description: Patch eliminates usage of parametrized modules which allows
- wings3d to be built with Erlang R16B. The patch is taken from
- https://github.com/dgud/wings/commit/1e0f547fd58921dfae8bc04cdc87461bacba55c7
-Last-modified: Thu, 09 May 2013 21:55:26 +0400
-
---- wings3d-1.4.1.orig/src/Makefile
-+++ wings3d-1.4.1/src/Makefile
-@@ -67,8 +67,6 @@
- 	wings_file \
- 	wings_ff_ndo \
- 	wings_ff_wings \
--	wings_font_table \
--	wings__font \
- 	wings_gl \
- 	wings_help \
- 	wings_hotkey \
---- wings3d-1.4.1.orig/src/wings_console.erl
-+++ wings3d-1.4.1/src/wings_console.erl
-@@ -171,9 +171,9 @@
-     Height0 = wings_pref:get_value(console_height),
-     wings_wm:delete(Name),
-     {X1,_,W1,H1} = wings_wm:viewport(desktop),
--    Font = wings_pref:get_value(new_console_font),
--    CwLh = wings_io:use_font(Font, fun() -> {?CHAR_WIDTH,?LINE_HEIGHT} end),
--    {Cw,Lh} = CwLh,
-+    Font = console_font,
-+    {Cw,Lh} = CwLh = wings_text:font_cw_lh(Font),
-+    io:format("w h: ~p ~p\n", [Cw,Lh]),
-     Sw = wings_wm:vscroller_width(),
-     Th = wings_wm:title_height(),
-     %%
-@@ -184,8 +184,8 @@
-     do_window(Name, Font, CwLh, PosUR, Size, []).
- 
- do_window(Name, Pos, Size, Ps) ->
--    Font = wings_pref:get_value(new_console_font),
--    CwLh = wings_io:use_font(Font, fun() -> {?CHAR_WIDTH,?LINE_HEIGHT} end),
-+    Font = console_font,
-+    CwLh = wings_text:font_cw_lh(Font),
-     do_window(Name, Font, CwLh, Pos, Size, Ps).
- 
- do_window(Name, Font, {Cw,Lh}, {X,Y}, {W,H}=Size, Ps) -> % {X,Y} is upper right
---- wings3d-1.4.1.orig/src/wings__font.erl
-+++ /dev/null
-@@ -1,75 +0,0 @@
--%%
--%%  wings__font.erl --
--%%
--%%     Generic font operations.
--%%
--%%  Copyright (c) 2005-2011 Bjorn Gustavsson.
--%%
--%%  See the file "license.terms" for information on usage and redistribution
--%%  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
--%%
--%%     $Id$
--%%
--
---module(wings__font, [Key,Desc,Width,Height,GlyphTab,Bitmaps]).
---export([key/0,desc/0,width/0,height/0,draw/1,char/1,char_width/1,
--	bold_char/1,bold_char_width/1]).
--
--draw([C|T]) ->
--    char(C),
--    draw(T);
--draw([]) -> ok.
--
--key() -> Key.
--desc() -> Desc.
--
--char_width(C) ->
--    element(1, glyph_info(C)).
--width() ->
--    insert_glyph(char_width, Width),
--    Width.
--height() ->
--    insert_glyph(char_height, Height),
--    Height.
--
--bold_char(C) ->
--    Glyph = glyph_info(C),
--    draw_glyph(Glyph),
--    Cw = glyph_width(Glyph),
--    gl:bitmap(1, 1, 0, 0, -Cw+1, 0, <<0>>),
--    draw_glyph(Glyph).
--
--bold_char_width(C) ->
--    Glyph = glyph_info(C),
--    glyph_width(Glyph)+1.
--
--char(C) ->
--    draw_glyph(glyph_info(C)).
--
--draw_glyph({W,H,Xorig,Yorig,Xmove,B}) ->
--    gl:bitmap(W, H, Xorig, Yorig, Xmove, 0, B).
--
--glyph_info(C) ->
--    BitMap = case ets:lookup(GlyphTab, C) of
--	[] when is_integer(C), C > 0 ->
--	    %% Undefined character. Return a filled box.
--	    NumBytes = ((Width+7) div 8) * Height,
--	    B = <<(-1):NumBytes/unit:8>>,
--	    {Width,Height,0,0,Width+1,B};
--	[{_,W,H,Xorig,Yorig,Xmove,Offset}] ->
--	    %% Valid character.
--	    NumBytes = ((W+7) div 8)*H,
--	    <<_:Offset/binary,B:NumBytes/binary,_/binary>> = Bitmaps,
--	    {W,H,Xorig,Yorig,Xmove,B}
--    end,
--    insert_glyph(C, BitMap),
--    BitMap.
--
--glyph_width({_,_,_,_,Xmove,_}) -> Xmove.
--
--insert_glyph(C, BitMap) ->
--    Font = case wings_wm:this() of
--        console -> console_font;
--        _ -> system_font
--    end,
--    ets:insert(Font, {C,BitMap}).
---- wings3d-1.4.1.orig/src/wings_font_table.erl
-+++ /dev/null
-@@ -1,73 +0,0 @@
--%%
--%%  wings_font_table.erl --
--%%
--%%     Functions to access the accumulated font table in ets comprised of seen
--%%     glyphs. Seen returns the glyph, unseen returns 'undefined' and then
--%%     proceeds to look up the glyph in the full font table.
--%%
--%%  Copyright (c) 2010-2011 Richard Jones.
--%%
--%%  See the file "license.terms" for information on usage and redistribution
--%%  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
--%%
--%%
--
---module(wings_font_table).
---export([draw/1,char/1,bold_char/1,bold_char_width/1,char_width/1]).
--
--draw([C|T]) ->
--    char(C),
--    draw(T);
--draw([]) -> ok.
--
--bold_char_width(C) ->
--    case glyph_info(C) of
--        undefined -> undefined;
--    Glyph ->
--        glyph_width(Glyph)+1
--    end.
--
--char_width(C) ->
--    case glyph_info(C) of
--        undefined -> undefined;
--    Glyph ->
--        glyph_width(Glyph)
--    end.
--
--bold_char(C) ->
--    case glyph_info(C) of
--        undefined -> undefined;
--    Glyph ->
--        draw_glyph(Glyph),
--        Cw = glyph_width(Glyph),
--        gl:bitmap(1, 1, 0, 0, -Cw+1, 0, <<0>>),
--        draw_glyph(Glyph)
--    end.
--
--char(C) when C=:=char_width; C=:=char_height ->
--    case glyph_info(C) of
--        undefined -> undefined;
--        Glyph -> Glyph
--    end;
--char(C) ->
--    case glyph_info(C) of
--        undefined -> undefined;
--        Glyph -> draw_glyph(Glyph)
--    end.
--
--draw_glyph({W,H,Xorig,Yorig,Xmove,B}) -> 
--    gl:bitmap(W, H, Xorig, Yorig, Xmove, 0, B).
--
--glyph_info(C) ->
--    Font = case wings_wm:this() of
--        console -> console_font;
--        _ -> system_font
--    end,
--    case ets:lookup(Font, C) of
--        [] ->
--            undefined;
--        [{C,BitMap}] ->
--            BitMap
--    end.
--
--glyph_width({_,_,_,_,Xmove,_}) -> Xmove.
---- wings3d-1.4.1.orig/src/wings_io.erl
-+++ wings3d-1.4.1/src/wings_io.erl
-@@ -3,7 +3,7 @@
- %%
- %%     This module is a wrapper for the different backends
- %%
--%%  Copyright (c) 2001-2011 Bjorn Gustavsson
-+%%  Copyright (c) 2001-2013 Bjorn Gustavsson
- %%
- %%  See the file "license.terms" for information on usage and redistribution
- %%  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-@@ -36,7 +36,7 @@
- 	 sunken_gradient/7,
- 	 raised_rect/4,raised_rect/5,raised_rect/6,
- 	 gradient_rect/5,gradient_rect_burst/5,
--	 use_font/2,text_at/2,text_at/3,unclipped_text/3,
-+	 text_at/2,text_at/3,unclipped_text/3,
- 	 draw_icons/1,draw_icon/3,draw_char/1,
- 	 set_color/1]).
- -export([putback_event/1,putback_event_once/1,get_event/0,get_matching_events/1,
-@@ -434,22 +434,6 @@
-     gl:'end'(),
-     gl:shadeModel(?GL_FLAT).
- 
--use_font(Font, Fun) ->
--    case wings_wm:this() of
--	none ->
--	    OldFont = wings_pref:get_value(new_system_font),
--	    wings_pref:set_value(new_system_font, Font),
--	    Res = Fun(),
--	    wings_pref:set_value(new_system_font, OldFont),
--	    Res;
--	This ->
--	    OldFont = wings_wm:get_prop(This, font),
--	    wings_wm:set_prop(This, font, Font),
--	    Res = Fun(),
--	    wings_wm:set_prop(This, font, OldFont),
--	    Res
--    end.
--
- text_at(X, S) ->
-     text_at(X, 0, S).
- 
---- wings3d-1.4.1.orig/src/wings_pref_dlg.erl
-+++ wings3d-1.4.1/src/wings_pref_dlg.erl
-@@ -650,8 +650,6 @@
- 		          delayed_set_value(Key, OldVal, Val),
- 		          wings_u:message(?__(5,"The language change will take effect\nthe next time Wings 3D is started."));
- 		      _ ->
--		          ets:delete_all_objects(system_font),
--		          ets:delete_all_objects(console_font),
- 		          wings_lang:load_language(Val)
- 		    end;
- 		polygon_offset_f ->
---- wings3d-1.4.1.orig/src/wings_text.erl
-+++ wings3d-1.4.1/src/wings_text.erl
-@@ -3,7 +3,7 @@
- %%
- %%     Text and font support.
- %%
--%%  Copyright (c) 2001-2011 Bjorn Gustavsson
-+%%  Copyright (c) 2001-2013 Bjorn Gustavsson
- %%
- %%  See the file "license.terms" for information on usage and redistribution
- %%  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-@@ -13,9 +13,9 @@
- 
- -module(wings_text).
- -export([init/0,resize/0,width/0,width/1,height/0,draw/1,char/1,bold/1]).
-+-export([font_cw_lh/1]).
- -export([break_lines/2]).
- -export([fonts/0]).
---export([current_font/0]).
- 
- -define(NEED_ESDL, 1).
- -define(NEED_OPENGL, 1).
-@@ -25,13 +25,16 @@
- -import(lists, [reverse/1,foreach/2]).
- 
- init() ->
--    wings_pref:set_default(new_system_font, '7x14'),
--    wings_pref:set_default(new_console_font, 'fixed7x14'),
-+    set_font_default(new_system_font),
-+    set_font_default(new_console_font),
-     ets:new(system_font, [named_table,ordered_set,public]),
-     ets:new(console_font, [named_table,ordered_set,public]),
-     ets:new(wings_fonts, [named_table,ordered_set,public]),
-     load_fonts().
- 
-+set_font_default(PrefKey) ->
-+    wings_pref:set_default(PrefKey, get_font_default(PrefKey)).
-+
- resize() ->
-     %% Force rebuild of display lists next time each font
-     %% is needed.
-@@ -64,31 +67,23 @@
- width_1([], W) -> W.
- 
- bold_string_width([C|S], W) ->
--    BCW = case wings_font_table:bold_char_width(C) of
--        undefined -> (current_font()):bold_char_width(C);
--        Other -> Other
--    end,
-+    BCW = glyph_width(glyph_info(C)) + 1,
-     bold_string_width(S, BCW+W);
- bold_string_width([], W) ->
-     W.
- 
- char_width(C) ->
--    case wings_font_table:char_width(C) of
--        undefined -> (current_font()):char_width(C);
--        Other -> Other
--    end.
-+    glyph_width(glyph_info(C)).
- 
- width() ->
--    case wings_font_table:char(char_width) of
--        undefined -> (current_font()):width();
--        Other -> Other
--    end.
-+    glyph_info(char_width).
- 
- height() ->
--    case wings_font_table:char(char_height) of
--        undefined -> (current_font()):height();
--        Other -> Other
--    end.
-+    glyph_info(char_height).
-+
-+font_cw_lh(Font) ->
-+    {glyph_info(Font, char_width),
-+     glyph_info(Font, char_height)}.
- 
- draw([{bold,S}|Cs]) ->
-     bold(S),
-@@ -109,41 +104,27 @@
- draw([]) -> ok.
- 
- char(C) when is_atom(C) -> special(C);
--char(C) ->
--    case wings_font_table:char(C) of
--        undefined -> (current_font()):char(C);
--        Other -> Other
--    end.
-+char(C) -> draw_glyph(glyph_info(C)).
- 
- bold([C|S]) ->
--    case wings_font_table:bold_char(C) of
--        undefined -> (current_font()):bold_char(C);
--        Other -> Other
--    end,
-+    Glyph = glyph_info(C),
-+    draw_glyph(Glyph),
-+    Cw = glyph_width(Glyph),
-+    gl:bitmap(1, 1, 0, 0, -Cw+1, 0, <<0>>),
-+    draw_glyph(Glyph),
-     bold(S);
- bold([]) -> ok.
- 
--%% Table of characters already seen.
--%% Because the CJK fonts are HUGE (+30000 glyphs), I wrote a character
--%% accumulator. The reason for this is due to the nature of the ets, which when
--%% accessed, copies the requested data to the memory of the local process. With
--%% the smaller font libraries, this wasn't a problem, but with the CJK font for
--%% supporting Chinese, Japanese, and Korean - this became an issue.
--
- current_font() ->
-     case wings_wm:this() of
- 	none ->
--	    FontKey = wings_pref:get_value(new_system_font),
--	    ets:lookup_element(wings_fonts, FontKey, 2);
-+	    system_font;
- 	This ->
--	    FontKey = wings_wm:get_prop(This, font),
--	    ets:lookup_element(wings_fonts, FontKey, 2)
-+	    wings_wm:get_prop(This, font)
-     end.
--
-+	    
- fonts() ->
--    MatchSpec = ets:fun2ms(fun({Key,_Font,Desc}) -> {Desc,Key} end),
--    ets:select(wings_fonts, MatchSpec).
--
-+    [{Desc,Key} || {Key,Desc} <- ets:tab2list(wings_fonts)].
- 
- %% Formats strings to fit the width of a line length given in PIXELS
- 
-@@ -227,6 +208,39 @@
- reverse_list(A) when length(A) < 2 -> A;
- reverse_list(A) -> reverse(A).
- 
-+draw_glyph({W,H,Xorig,Yorig,Xmove,B}) -> 
-+    gl:bitmap(W, H, Xorig, Yorig, Xmove, 0, B).
-+
-+glyph_width({_,_,_,_,Xmove,_}) -> Xmove.
-+
-+glyph_info(C) ->
-+    glyph_info(current_font(), C).
-+
-+glyph_info(Font, C) ->
-+    case ets:lookup(Font, C) of
-+	[] when is_integer(C), C > 0 ->
-+	    %% Undefined character. Return a filled box.
-+	    [{char_width,Width}] = ets:lookup(Font, char_width),
-+	    [{char_height,Height}] = ets:lookup(Font, char_height),
-+	    NumBytes = ((Width+7) div 8) * Height,
-+	    B = <<(-1):NumBytes/unit:8>>,
-+	    {Width,Height,0,0,Width+1,B};
-+	[{C,Bitmap}] ->
-+	    %% Bitmap ready for display.
-+	    Bitmap;
-+	[{C,W,H,Xorig,Yorig,Xmove,Offset}] ->
-+	    %% Raw valid character. We will need to extract a sub-binary
-+	    %% from the binary of all fonts, and write back the result
-+	    %% to the ets table to speed up the next access to this
-+	    %% character.
-+	    [{bitmap,Bitmaps}] = ets:lookup(Font, bitmap),
-+	    NumBytes = ((W+7) div 8)*H,
-+	    <<_:Offset/binary,B:NumBytes/binary,_/binary>> = Bitmaps,
-+	    Bitmap = {W,H,Xorig,Yorig,Xmove,B},
-+	    ets:insert(Font, {C,Bitmap}),
-+	    Bitmap
-+    end.
-+
- %%%
- %%% Special characters.
- %%%
-@@ -466,52 +480,40 @@
- %%%
- 
- load_fonts() ->
--    SystemFont = wings_pref:get_value(new_system_font),
--    ConsoleFont = wings_pref:get_value(new_console_font),
-+    Wc = font_file("*"),
-+    Fonts = [begin
-+		 FontNameStr = filename:basename(F, ".wingsfont"),
-+		 FontNameAtom = list_to_atom(FontNameStr),
-+		 {FontNameAtom,FontNameStr}
-+	     end || F <- filelib:wildcard(Wc)],
-+    ets:insert(wings_fonts, Fonts),
-+    load_font(system_font),
-+    load_font(console_font).
-+
-+load_font(FontTab) ->
-+    PrefKey = list_to_atom(lists:concat(["new_",FontTab])),
-+    FontName = wings_pref:get_value(PrefKey),
-+    FontFile0 = font_file(FontName),
-+    FontFile = case filelib:is_file(FontFile0) of
-+		   true ->
-+		       FontFile0;
-+		   false ->
-+		       DefFont = get_font_default(PrefKey),
-+		       wings_pref:set_value(PrefKey, DefFont),
-+		       font_file(DefFont)
-+	       end,
-+    {ok,Bin} = file:read_file(FontFile),
-+    {wings_font,?wings_version,Font} = binary_to_term(Bin),
-+    {_Key,_Desc,Width,Height,GlyphInfo,Bitmaps} = Font,
-+    ets:insert(FontTab, GlyphInfo),
-+    ets:insert(FontTab, [{char_width,Width},
-+			 {char_height,Height},
-+			 {bitmap,Bitmaps}|GlyphInfo]).
-+
-+font_file(FontName) ->
-     WingsDir = wings_util:lib_dir(wings),
--    WF = ".wingsfont",
--    SFont = filename:join([WingsDir,"fonts",atom_to_list(SystemFont)++WF]),
--    CFont = filename:join([WingsDir,"fonts",atom_to_list(ConsoleFont)++WF]),
--    %% Make sure font is available, otherwise load default font
--    System = case filelib:is_file(SFont) of
--        true -> SystemFont;
--        false ->
--            wings_pref:set_value(new_system_font, '7x14'),
--            '7x14'
--    end,
--    Console = case filelib:is_file(CFont) of
--        true -> ConsoleFont;
--        false ->
--            wings_pref:set_value(new_console_font, 'fixed7x14'),
--            'fixed7x14'
--    end,
--    Wc = filename:join([WingsDir,"fonts","*.wingsfont"]),
--    Fonts = filelib:wildcard(Wc),
--    foreach(fun(F) ->
--        load_font(System, Console, F)
--    end, Fonts).
--
--load_font(SystemFont, ConsoleFont, FontDir) ->
--    FontNameStr = filename:basename(FontDir, ".wingsfont"),
--    FontNameAtom = list_to_atom(FontNameStr),
--    case FontNameAtom of
--        SystemFont -> load_font_0(FontDir);
--        ConsoleFont -> load_font_0(FontDir);
--        _other -> ets:insert(wings_fonts, {FontNameAtom,ok,FontNameStr})
--    end.
-+    FontFileBase = lists:concat([FontName,".wingsfont"]),
-+    filename:join([WingsDir,"fonts",FontFileBase]).
- 
--load_font_0(FontDir) ->
--    {ok,Bin} = file:read_file(FontDir),
--    Font = binary_to_term(Bin),
--    Mod = load_font_1(Font),
--    Key = Mod:key(),
--    Desc = Mod:desc(),
--    ets:insert(wings_fonts, {Key,Mod,Desc}).
--
--load_font_1({wings_font,?wings_version,Font}) ->
--    load_font_2(Font).
--
--load_font_2({Key,Desc,Width,Height,GlyphInfo,Bitmaps}) ->
--    T = ets:new(font, [set,public]),
--    ets:insert(T, GlyphInfo),
--    wings__font:new(Key, Desc, Width, Height, T, Bitmaps).
-+get_font_default(new_system_font) -> '7x14';
-+get_font_default(new_console_font) -> 'fixed7x14'.
---- wings3d-1.4.1.orig/src/wings_wm.erl
-+++ wings3d-1.4.1/src/wings_wm.erl
-@@ -204,7 +204,7 @@
- 				    is_integer(W), is_integer(H) ->
-     Z = new_resolve_z(Z0),
-     Stk = handle_response(Op, dummy_event, default_stack(Name)),
--    Props = gb_trees:from_orddict([{font,wings_pref:get_value(new_system_font)}]),
-+    Props = gb_trees:from_orddict([{font,system_font}]),
-     Win = #win{x=X,y=Y,z=Z,w=W,h=H,name=Name,stk=Stk,props=Props},
-     put(wm_windows, gb_trees:insert(Name, Win, get(wm_windows))),
-     dirty().

Modified: wings3d/trunk/debian/patches/series
===================================================================
--- wings3d/trunk/debian/patches/series	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/series	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,10 +1,6 @@
-include.diff
 build.diff
 autouv.diff
 jpeg.diff
-lang.diff
-drivers.diff
+#lang.diff
 wx.diff
-volume.diff
 stl.diff
-pm.diff

Deleted: wings3d/trunk/debian/patches/volume.diff
===================================================================
--- wings3d/trunk/debian/patches/volume.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/volume.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,15 +0,0 @@
-Author: Sergei Golovan
-Description: Patch fixes scene info dialog which shows objects volume and area
-Last-updated: Tue, 29 Jan 2013 23:03:07 +0400
-
---- wings3d-1.4.1.orig/src/wings.erl
-+++ wings3d-1.4.1/src/wings.erl
-@@ -1795,7 +1795,7 @@
-     ToString = fun(Item) ->
- 	case Item of
- 	    Item when is_float(Item) ->
--		lists:concat(hd(io_lib:fwrite("~12f", [Item])));
-+		lists:flatten(io_lib:fwrite("~12f", [Item]));
- 	    Item when is_integer(Item) ->
- 		integer_to_list(Item);
- 	    Item when is_list(Item) ->

Modified: wings3d/trunk/debian/patches/wx.diff
===================================================================
--- wings3d/trunk/debian/patches/wx.diff	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/patches/wx.diff	2013-10-17 19:09:56 UTC (rev 1556)
@@ -1,5 +1,6 @@
-Patch declares wx target as a phony one. Also, it switches to wxErlang
-gl header.
+Author: Sergei Golovan
+Description: Patch declares wx target as a phony one.
+Last-Modified: Thu, 17 Oct 2013 16:01:13 +0400
 
 --- wings3d-1.4.1.orig/Makefile
 +++ wings3d-1.4.1/Makefile
@@ -12,27 +13,3 @@
  
  all:
  	(cd intl_tools; $(MAKE))
---- wings3d-1.4.1.orig/plugins_src/primitives/wpc_image.erl
-+++ wings3d-1.4.1/plugins_src/primitives/wpc_image.erl
-@@ -14,7 +14,7 @@
- -module(wpc_image).
- -export([init/0,menu/2,command/2]).
- 
---include_lib("esdl/include/gl.hrl").
-+-include_lib("wx/include/gl.hrl").
- -include("e3d.hrl").
- -include("e3d_image.hrl").
- -include("wings_intl.hrl").
---- wings3d-1.4.1.orig/src/wings.hrl
-+++ wings3d-1.4.1/src/wings.hrl
-@@ -27,6 +27,10 @@
- -endif.
- 
- -ifndef(USE_WX).
-+-define(USE_WX, 1).
-+-endif.
-+
-+-ifndef(USE_WX).
- -ifdef(NEED_OPENGL).
- -include_lib("esdl/include/gl.hrl").
- -include_lib("esdl/include/glu.hrl").

Modified: wings3d/trunk/debian/rules
===================================================================
--- wings3d/trunk/debian/rules	2013-10-17 18:57:33 UTC (rev 1555)
+++ wings3d/trunk/debian/rules	2013-10-17 19:09:56 UTC (rev 1556)
@@ -11,6 +11,9 @@
 %:
 	dh $@
 
+vsn.mk:
+	$(MAKE) vsn.mk
+
 override_dh_clean:
 	rm -rf plugins/accel
 	rm -rf plugins/jpeg
@@ -21,8 +24,8 @@
 	dh_clean vsn.mk erl_crash.dump '*.beam' '*.so'
 
 override_dh_auto_build:
-	make wx
-	make lang
+	$(MAKE) wx
+	$(MAKE) lang
 
 override_dh_install:
 	dh_install -XREADME $(SUBDIRS) $(LIBDIR)
@@ -35,7 +38,7 @@
 	    >> debian/wings3d.substvars
 
 get-orig-source:
-	wget -O wings3d_1.4.1.orig.tar.bz2 \
-	    http://prdownloads.sourceforge.net/wings/wings-1.4.1.tar.bz2
+	wget -O wings3d_1.5.1.orig.tar.bz2 \
+	    http://prdownloads.sourceforge.net/wings/wings-1.5.1.tar.bz2
 
 .PHONY: override_dh_clean override_dh_auto_build override_dh_install get-orig-source




More information about the Pkg-erlang-commits mailing list