    # File lib/chef/provider/package/freebsd.rb, line 93
            def install_package(name, version)
              unless @current_resource.version
                case @new_resource.source
                when /^ports$/
                  shell_out!("make -DBATCH install", :cwd => port_path, :env => nil).status
                when /^http/, /^ftp/
                  shell_out!("pkg_add -r #{package_name}", :env => { "PACKAGESITE" => @new_resource.source, 'LC_ALL' => nil }).status
                  Chef::Log.debug("#{@new_resource} installed from: #{@new_resource.source}")
                when /^\//
                  shell_out!("pkg_add #{@new_resource.name}", :env => { "PKG_PATH" => @new_resource.source , 'LC_ALL'=>nil}).status
                  Chef::Log.debug("#{@new_resource} installed from: #{@new_resource.source}")
                else
                  shell_out!("pkg_add -r #{latest_link_name}", :env => nil).status
                end
              end
            end