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

sgolovan at alioth.debian.org sgolovan at alioth.debian.org
Mon May 6 09:03:48 UTC 2013


Author: sgolovan
Date: 2013-05-06 09:03:47 +0000 (Mon, 06 May 2013)
New Revision: 1502

Added:
   wings3d/trunk/debian/patches/stl.diff
   wings3d/trunk/debian/patches/volume.diff
   wings3d/trunk/debian/source/
   wings3d/trunk/debian/source/format
Modified:
   wings3d/trunk/debian/changelog
   wings3d/trunk/debian/compat
   wings3d/trunk/debian/control
   wings3d/trunk/debian/patches/series
   wings3d/trunk/debian/rules
Log:
[wings3d]
  * Replaced suggested dependency on no longer existing yafray package by
    the dependency on yafaray.
  * Fixed displaying numbers in a volume and area info dialog.
  * Fixed importing ASCII STL files (closes: #698349).
  * Switched to 3.0 (quilt) source format.
  * Bumped standards version to 3.9.4.


Modified: wings3d/trunk/debian/changelog
===================================================================
--- wings3d/trunk/debian/changelog	2013-05-06 08:37:01 UTC (rev 1501)
+++ wings3d/trunk/debian/changelog	2013-05-06 09:03:47 UTC (rev 1502)
@@ -1,8 +1,13 @@
-wings3d (1.4.1-5) UNRELEASED; urgency=low
+wings3d (1.4.1-5) unstable; urgency=low
 
-  * NOT RELEASED YET
+  * Replaced suggested dependency on no longer existing yafray package by
+    the dependency on yafaray.
+  * Fixed displaying numbers in a volume and area info dialog.
+  * Fixed importing ASCII STL files (closes: #698349).
+  * Switched to 3.0 (quilt) source format.
+  * Bumped standards version to 3.9.4.
 
- -- Sergei Golovan <sgolovan at debian.org>  Fri, 13 Jan 2012 13:58:02 +0400
+ -- Sergei Golovan <sgolovan at debian.org>  Mon, 06 May 2013 12:44:48 +0400
 
 wings3d (1.4.1-4) unstable; urgency=low
 

Modified: wings3d/trunk/debian/compat
===================================================================
--- wings3d/trunk/debian/compat	2013-05-06 08:37:01 UTC (rev 1501)
+++ wings3d/trunk/debian/compat	2013-05-06 09:03:47 UTC (rev 1502)
@@ -1 +1 @@
-7
+8

Modified: wings3d/trunk/debian/control
===================================================================
--- wings3d/trunk/debian/control	2013-05-06 08:37:01 UTC (rev 1501)
+++ wings3d/trunk/debian/control	2013-05-06 09:03:47 UTC (rev 1502)
@@ -3,8 +3,8 @@
 Uploaders: Sergei Golovan <sgolovan at debian.org>
 Section: graphics
 Priority: optional
-Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 7.2.5), quilt (>= 0.46-7), grep-dctrl,
+Standards-Version: 3.9.4
+Build-Depends: debhelper (>= 8.0.0), grep-dctrl,
  erlang-dev (>= 1:15.b), erlang-esdl-dev (>= 1.2),
  libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libjpeg-dev
 Homepage: http://www.wings3d.com
@@ -14,7 +14,7 @@
 Architecture: any
 Depends: ${erlang-base:Depends}, ${erlang-abi:Depends}, ${erlang-wx:Depends},
  ${erlang-xmerl:Depends}, ${erlang-esdl:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Suggests: ${erlang-dialyzer:Depends}, ${erlang-tools:Depends}, yafray | aqsis
+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
  user interface was designed to be easy to use for both beginners and

Modified: wings3d/trunk/debian/patches/series
===================================================================
--- wings3d/trunk/debian/patches/series	2013-05-06 08:37:01 UTC (rev 1501)
+++ wings3d/trunk/debian/patches/series	2013-05-06 09:03:47 UTC (rev 1502)
@@ -5,3 +5,5 @@
 lang.diff
 drivers.diff
 wx.diff
+volume.diff
+stl.diff

Added: wings3d/trunk/debian/patches/stl.diff
===================================================================
--- wings3d/trunk/debian/patches/stl.diff	                        (rev 0)
+++ wings3d/trunk/debian/patches/stl.diff	2013-05-06 09:03:47 UTC (rev 1502)
@@ -0,0 +1,58 @@
+Author: Sergei Golovan
+Description: ASCII STL files import added (still throws cryptic error message
+ in case of incorrect file format)
+Debian-bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698349
+Last-updated: Wed, 30 Jan 2013 22:00:12 +0400
+
+--- wings3d-1.4.1.orig/plugins_src/import_export/wpc_stl.erl
++++ wings3d-1.4.1/plugins_src/import_export/wpc_stl.erl
+@@ -114,21 +114,46 @@
+ %%% ================================
+ stl_import(Name) ->
+     case file:read_file(Name) of
++    {ok,<<"solid", Bin/binary>>} ->
++	print_boxed("FileName: " ++ Name),
++	{Vs,Fs} = read_stl_ascii(Bin),
++	Res = import(Vs,Fs),
++	Res;
+     {ok,Bin} ->
+ 	print_boxed("FileName: " ++ Name),
+-	Res = import(Bin),
++	{Vs,Fs} = read_stl(Bin),
++	Res = import(Vs,Fs),
+ 	Res;
+     {error,Reason} ->
+ 	{error,file:format_error(Reason)}
+     end.
+ 
+-import(Data) ->
+-    {Vs,Fs} = read_stl(Data),
++import(Vs,Fs) ->
+     Efs = faces_to_e3dfaces(Fs),
+     Mesh = #e3d_mesh{type=polygon,vs=Vs,fs=Efs},
+     Obj = #e3d_object{name="STL object",obj=Mesh},
+     {ok, #e3d_file{objs=[Obj]}}.
+ 
++read_stl_ascii(Data) ->
++    RawTriangles = case re:run(Data, "facet normal\\s+\\S+\\s+\\S+\\s+\\S+\\s+"
++				     "outer loop\\s+"
++				     "vertex\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+"
++				     "vertex\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+"
++				     "vertex\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+"
++				     "endloop\\s+"
++				     "endfacet",
++			       [global,{capture,all_but_first,list}]) of
++			{match, Triangles} ->
++			    lists:map(fun([X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3]) ->
++					    [{list_to_float(X1), list_to_float(Y1), list_to_float(Z1)},
++					     {list_to_float(X2), list_to_float(Y2), list_to_float(Z2)},
++					     {list_to_float(X3), list_to_float(Y3), list_to_float(Z3)}]
++				      end, Triangles);
++			_ ->
++			    []
++		   end,
++    e3d_util:raw_to_indexed(RawTriangles).
++
+ read_stl(Data) ->
+     <<Header:80/binary, NumFs:32/little, Rest/binary>> = Data,
+     print_header(Header),

Added: wings3d/trunk/debian/patches/volume.diff
===================================================================
--- wings3d/trunk/debian/patches/volume.diff	                        (rev 0)
+++ wings3d/trunk/debian/patches/volume.diff	2013-05-06 09:03:47 UTC (rev 1502)
@@ -0,0 +1,15 @@
+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/rules
===================================================================
--- wings3d/trunk/debian/rules	2013-05-06 08:37:01 UTC (rev 1501)
+++ wings3d/trunk/debian/rules	2013-05-06 09:03:47 UTC (rev 1502)
@@ -9,7 +9,7 @@
 SUBDIRS := ebin fonts plugins shaders textures
 
 %:
-	dh --with quilt $@
+	dh $@
 
 override_dh_clean:
 	rm -rf plugins/accel
@@ -38,4 +38,4 @@
 	wget -O - http://downloads.sourceforge.net/sourceforge/wings/wings-1.4.1.tar.bz2 | \
 	    bunzip2 -c | gzip -9c >wings3d_1.4.1.orig.tar.gz
 
-.PHONY: get-orig-source
+.PHONY: override_dh_clean override_dh_auto_build override_dh_install get-orig-source

Added: wings3d/trunk/debian/source/format
===================================================================
--- wings3d/trunk/debian/source/format	                        (rev 0)
+++ wings3d/trunk/debian/source/format	2013-05-06 09:03:47 UTC (rev 1502)
@@ -0,0 +1 @@
+3.0 (quilt)




More information about the Pkg-erlang-commits mailing list