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

sgolovan at alioth.debian.org sgolovan at alioth.debian.org
Mon Aug 7 21:54:05 UTC 2017


Author: sgolovan
Date: 2017-08-07 21:54:05 +0000 (Mon, 07 Aug 2017)
New Revision: 1945

Added:
   wings3d/trunk/debian/patches/e20.diff
Modified:
   wings3d/trunk/debian/changelog
   wings3d/trunk/debian/patches/series
Log:
[wings3d]
  * Added a patch by upstream which fixes FTBFS when building with
    Erlang/OTP 20 (closes: #871369).


Modified: wings3d/trunk/debian/changelog
===================================================================
--- wings3d/trunk/debian/changelog	2017-07-10 09:28:29 UTC (rev 1944)
+++ wings3d/trunk/debian/changelog	2017-08-07 21:54:05 UTC (rev 1945)
@@ -1,8 +1,9 @@
-wings3d (2.1.5-2) UNRELEASED; urgency=medium
+wings3d (2.1.5-2) unstable; urgency=medium
 
-  * NOT RELEASED YET
+  * Added a patch by upstream which fixes FTBFS when building with
+    Erlang/OTP 20 (closes: #871369).
 
- -- Sergei Golovan <sgolovan at debian.org>  Sun, 22 Jan 2017 11:53:53 +0300
+ -- Sergei Golovan <sgolovan at debian.org>  Tue, 08 Aug 2017 00:40:12 +0300
 
 wings3d (2.1.5-1) unstable; urgency=medium
 

Added: wings3d/trunk/debian/patches/e20.diff
===================================================================
--- wings3d/trunk/debian/patches/e20.diff	                        (rev 0)
+++ wings3d/trunk/debian/patches/e20.diff	2017-08-07 21:54:05 UTC (rev 1945)
@@ -0,0 +1,122 @@
+Author: Dan Gudmundsson <dgud at users.sourceforge.net>
+Last-Modified: Mon, 12 Jun 2017 23:24:22 +0200
+Subject: [PATCH] Fix compilation on OTP-20
+
+--- a/e3d/e3d_qbvh.erl
++++ b/e3d/e3d_qbvh.erl
+@@ -23,6 +23,8 @@
+ 
+ -export([ray/2, ray/4, ray_trace/2]). 
+ 
++-compile({no_auto_import,[ceil/1]}).
++
+ %%-define(DEBUG,1).
+ -ifdef(DEBUG).
+ -export([print_tree/3, print_stack/1, print_split/4]).
+--- a/plugins_src/import_export/collada_import.erl
++++ b/plugins_src/import_export/collada_import.erl
+@@ -13,8 +13,25 @@
+ -module(collada_import).
+ -export([import/1]).
+ -include("e3d.hrl").
+-%% Sigh using local function in state machine
+--compile(export_all).
++%% Local exports callbacks
++-export([ignored/4, asset/3, lib_geom/4, mesh/4, source/4,
++         param/4, vertices/4, make_polys/1, polys/4,
++         lib_material/4, lib_images/4, effects/4,
++         scene/3, lib_scenes/4, node/4, matrix/4,
++         common_mat/4, common_newparam/4, surface/4,
++         sampler2D/4, sloppy_color/3, chars/3,
++         pop/1, replace/2, to_floats/1, make_float/1,
++         make_float2/1, make_float3/1, make_float4/2,
++         to_ints/1, to_tuple/2, to_tuple2/1, to_tuple3/1,
++         to_tuple4/1, to_tuple5/1,
++         pack_source/1, make_mesh/1, pick_source/2, pick_src_1/2,
++         pick_mesh/2, pick_mesh_1/2, mesh_type/2,
++         polygon_type/1, polygon_type_1/2,
++         make_faces/2, sort_inputs/2, remove_duplicates/1,
++         pick_faces/5, pick_tristrips/5, pick_polygons/4,
++         pick_polygon/3, pick_verts/4, pick_vert/4,
++         add_vert_info/3, rev_face/2, rev_face/1
++        ]).
+ 
+ -record(mat,
+         {refs=#{},
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -46,7 +46,6 @@
+ 	wings_camera \
+ 	wings_cl \
+ 	wings_cc \
+-	wings_cc_ref \
+ 	wings_collapse \
+ 	wings_color \
+ 	wings_console \
+--- a/src/wings_glfont.erl
++++ b/src/wings_glfont.erl
+@@ -30,8 +30,6 @@
+ 	 render/2,
+ 	 render_to_binary/2, render_to_binary/3]).
+ 
+--compile(export_all).
+-
+ -include_lib("wx/include/wx.hrl").
+ -include_lib("wx/include/gl.hrl").
+ 
+@@ -390,14 +388,6 @@
+ calc_tex_size(_, _, _, _, _, _, BestCoord) ->
+     BestCoord.
+ 
+-floor(T,N) ->
+-    X = T div N,
+-    if (T rem N) =:= 0 ->
+-	    X;
+-       true ->
+-	    X+1
+-    end.
+-
+ tsize(X0) ->
+     Pow = trunc(log2(X0)),
+     case (1 bsl Pow) of
+@@ -408,24 +398,19 @@
+ log2(X) ->
+     math:log(X) / math:log(2).
+ 
+-check_pow2(NoX, W, Pow2) when NoX * W > Pow2 ->
+-    check_pow2(NoX, W, Pow2*2);
+-check_pow2(NoX, W, Pow2) ->
+-    {trunc((Pow2 - NoX*W)/W), Pow2}.
+-
+-debug(W,H, Bin0) ->
+-    Bin = << <<G:8, G:8, G:8>> || <<_:8, G:8>> <= Bin0>>,
+-    Image = wxImage:new(W,H,Bin),
+-    Title = io_lib:format("DEBUG ~px~p", [W,H]),
+-    Frame = wxFrame:new(wx:null(), ?wxID_ANY, Title, [{size, {W+40, H+40}}]),
+-    Panel = wxPanel:new(Frame),
+-    Paint = fun(_,_) ->
+-		    DC=wxPaintDC:new(Panel),
+-		    Bmp = wxBitmap:new(Image),
+-		    wxDC:drawBitmap(DC, Bmp, {0,0}),
+-		    wxPaintDC:destroy(DC),
+-		    wxBitmap:destroy(Bmp)
+-	    end,
+-    %% wxImage:destroy(Image),
+-    wxFrame:connect(Panel, paint, [{callback, Paint}]),
+-    wxFrame:show(Frame).
++%% debug(W,H, Bin0) ->
++%%     Bin = << <<G:8, G:8, G:8>> || <<_:8, G:8>> <= Bin0>>,
++%%     Image = wxImage:new(W,H,Bin),
++%%     Title = io_lib:format("DEBUG ~px~p", [W,H]),
++%%     Frame = wxFrame:new(wx:null(), ?wxID_ANY, Title, [{size, {W+40, H+40}}]),
++%%     Panel = wxPanel:new(Frame),
++%%     Paint = fun(_,_) ->
++%% 		    DC=wxPaintDC:new(Panel),
++%% 		    Bmp = wxBitmap:new(Image),
++%% 		    wxDC:drawBitmap(DC, Bmp, {0,0}),
++%% 		    wxPaintDC:destroy(DC),
++%% 		    wxBitmap:destroy(Bmp)
++%% 	    end,
++%%     %% wxImage:destroy(Image),
++%%     wxFrame:connect(Panel, paint, [{callback, Paint}]),
++%%     wxFrame:show(Frame).

Modified: wings3d/trunk/debian/patches/series
===================================================================
--- wings3d/trunk/debian/patches/series	2017-07-10 09:28:29 UTC (rev 1944)
+++ wings3d/trunk/debian/patches/series	2017-08-07 21:54:05 UTC (rev 1945)
@@ -1,3 +1,4 @@
 autouv.diff
 stl.diff
 include.diff
+e20.diff




More information about the Pkg-erlang-commits mailing list