    # File lib/chef/provider/package/freebsd.rb, line 104
            def package_name
              if ::File.exist?("/usr/ports/Makefile")
                if ports_makefile_variable_value("PKGNAME") =~ /^(.+)-[^-]+$/
                  $1
                else
                  raise Chef::Exceptions::Package, "Unexpected form for PKGNAME variable in #{port_path}/Makefile"
                end
              else
                @new_resource.package_name
              end
            end