Unbreak graphics/wings on Erlang 19: FUNCTION_NAME is now a predefined macro.

This commit is contained in:
Jimmy Olgeni 2016-09-23 14:36:09 +00:00
parent bc8550fa54
commit f56cee82df
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=422679
2 changed files with 27 additions and 3 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= wings
PORTVERSION= 1.4.1
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= graphics
MASTER_SITES= SF
DIST_SUBDIR= erlang
@ -16,8 +16,6 @@ LICENSE_NAME= Wings 3D License # similar to TclTk license
LICENSE_FILE= ${WRKSRC}/license.terms
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BROKEN= fails to build
BUILD_DEPENDS= erl:lang/erlang \
erlang-esdl>0:devel/erlang-esdl
RUN_DEPENDS:= ${BUILD_DEPENDS}

View file

@ -0,0 +1,26 @@
--- intl_tools/tools.erl.orig 2016-09-23 14:29:04 UTC
+++ intl_tools/tools.erl
@@ -244,7 +244,7 @@ get_en_template_1([_|T]) ->
%%%
-define(STRINGS, wings_lang_transform_strings).
--define(FUNCTION_NAME, wings_lang_transform_function_name).
+-define(WINGS_FUNCTION_NAME, wings_lang_transform_function_name).
-define(ERRORS, wings_lang_transform_errors).
-define(FILENAME, wings_lang_transform_filename).
@@ -269,12 +269,12 @@ transform({attribute,_,file,{Filename,_}
put(?FILENAME, Filename),
Form;
transform({function,L,Name,Arity,Cs}) ->
- put(?FUNCTION_NAME, Name),
+ put(?WINGS_FUNCTION_NAME, Name),
{function,L,Name,Arity,transform(Cs)};
transform({call,L,{remote,_,{atom,_,wings_lang},{atom,_,str}}=Rem,
[{tuple,_,[{atom,_,M}=Mod,Key]},
{string,_,S}=Str]}) ->
- FunName = get(?FUNCTION_NAME),
+ FunName = get(?WINGS_FUNCTION_NAME),
K = literal_key(Key),
add_string({{M,FunName,K},{S,L}}),
{call,L,Rem,[{tuple,L,[Mod,{atom,L,FunName},Key]},Str]};