<commit_before>require "formula"

class Openvpn < Formula
  homepage "https://openvpn.net/index.php/download/community-downloads.html"
  url "http://build.openvpn.net/downloads/releases/openvpn-2.3.4.tar.gz"
  mirror "http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.gz"
  sha256 "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a"
  revision 1

  bottle do
    sha1 "126ac2407abc24948fb125fe5f40fee7f5730f57" => :mavericks
    sha1 "89914a561787f2d78bf2b0121c19f275ca11fade" => :mountain_lion
    sha1 "3b9d94774429fbaada9b2e1cead67ea425481e5b" => :lion
  end

  depends_on "lzo"
  depends_on "tuntap"
  depends_on "openssl"

  def install
    # pam_appl header is installed in a different location on Leopard
    # and older; reported upstream https://community.openvpn.net/openvpn/ticket/326
    if MacOS.version < :snow_leopard
      %w[auth-pam.c pamdl.c].each do |file|
        inreplace "src/plugins/auth-pam/#{file}",
          "security/pam_appl.h", "pam/pam_appl.h"
      end
    end

    # Build and install binary
    system "./configure", "--disable-debug",<commit_msg>openvpn: pass array to inreplace rather than looping<commit_after>require "formula"

class Openvpn < Formula
  homepage "https://openvpn.net/index.php/download/community-downloads.html"
  url "http://build.openvpn.net/downloads/releases/openvpn-2.3.4.tar.gz"
  mirror "http://swupdate.openvpn.org/community/releases/openvpn-2.3.4.tar.gz"
  sha256 "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a"
  revision 1

  bottle do
    sha1 "126ac2407abc24948fb125fe5f40fee7f5730f57" => :mavericks
    sha1 "89914a561787f2d78bf2b0121c19f275ca11fade" => :mountain_lion
    sha1 "3b9d94774429fbaada9b2e1cead67ea425481e5b" => :lion
  end

  depends_on "lzo"
  depends_on "tuntap"
  depends_on "openssl"

  def install
    # pam_appl header is installed in a different location on Leopard
    # and older; reported upstream https://community.openvpn.net/openvpn/ticket/326
    if MacOS.version < :snow_leopard
      inreplace Dir["src/plugins/auth-pam/{auth-pam,pamdl}.c"],
        "security/pam_appl.h", "pam/pam_appl.h"
    end

    # Build and install binary
    system "./configure", "--disable-debug",
{'fraction_non_alphanumeric': 0.1106612685560054, 'fraction_numerical': 0.11336032388663968, 'mean_word_length': 4.043083900226757, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '720696', 'n_tokens_mistral': 1032, 'n_tokens_neox': 897, 'n_words': 141}