anchor.diff:          match -> true;
           nomatch -> false
       end.
  -
  -port_env(Config) ->
  -    %% TODO: remove support for deprecated port_envs option
  -    PortEnv = rebar_utils:get_deprecated_list(Config, port_envs, port_env,
  -                                              [], "soon"),
  -    %% TODO: remove migration of deprecated port_env DRV_-/EXE_-less vars
  -    %%       when the deprecation grace period ends
  -    WarnAndConvertVar = fun(Var) ->
  -                                New = "DRV_" ++ Var,
  -                                rebar_utils:deprecated(Var, New, "soon"),
  -                                New
  -                        end,
  -    ConvertVar = fun(Var="CXX_TEMPLATE") -> WarnAndConvertVar(Var);
  -                    (Var="CC_TEMPLATE")  -> WarnAndConvertVar(Var);
  -                    (Var="LINK_TEMPLATE") -> WarnAndConvertVar(Var);
  -                    (Var) -> Var
  -                 end,
  -    %% Also warn about references to deprecated vars? omitted for
  -    %% performance reasons.
  -    ReplaceVars = fun(Val) ->
  -                          re:replace(Val, "\\$(CXX|CC|LINK)(_TEMPLATE)",
  -                                     "DRV_\\1\\2", [{return,list}, global])
  -                  end,
  -    Convert = fun({ArchRegex, Var, Val}) ->
  -                      {ArchRegex, ConvertVar(Var), ReplaceVars(Val)};
  -                 ({Var, Val}) ->
  -                      {ConvertVar(Var), ReplaceVars(Val)}
  -              end,
  -    [Convert(EnvVar) || EnvVar <- PortEnv].
   
   %%
   %% Filter a list of env vars such that only those which match the provided
  
positive.code: %% == port_specs ==
  %%
  
  get_specs(Config, AppFile) ->
      case rebar_config:get_local(Config, port_specs, undefined) of
          undefined ->
              %% TODO: DEPRECATED: remove support for non-port_specs syntax
              {Config1, Specs} = old_get_specs(Config, AppFile),
              {Config1, {old, Specs}};
          PortSpecs ->
              {Config, {new, get_port_specs(Config, PortSpecs)}}
      end.
  
  get_port_specs(Config, PortSpecs) ->
      Filtered = filter_port_specs(PortSpecs),
      OsType = os:type(),
      {[], [get_port_spec(Config, OsType, Spec) || Spec <- Filtered]}.
  
  filter_port_specs(Specs) ->
      [S || S <- Specs, filter_port_spec(S)].
  
negative.code:               end, Specs)
      end.
  
  clean(Config, _AppFile) ->
      case get_specs(Config) of
          [] ->
              ok;
          Specs ->
              lists:foreach(fun(#spec{target=Target, objects=Objects}) ->
                                    rebar_file_utils:delete_each([Target]),
                                    rebar_file_utils:delete_each(Objects)
                            end, Specs)
      end,
      ok.
  
  setup_env(Config) ->
      setup_env(Config, []).
  