<commit_before>class SdlImage < Formula
  desc "Image file loading library"
  homepage "https://www.libsdl.org/projects/SDL_image/release-1.2.html"
  license "Zlib"
  revision 7

  stable do
    url "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz"
    sha256 "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699"

    # Fix graphical glitching
    # https://github.com/Homebrew/homebrew-python/issues/281
    # https://trac.macports.org/ticket/37453
    patch :p0 do
      url "https://raw.githubusercontent.com/Homebrew/formula-patches/41996822/sdl_image/IMG_ImageIO.m.patch"
      sha256 "c43c5defe63b6f459325798e41fe3fdf0a2d32a6f4a57e76a056e752372d7b09"
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "e69657726447aeb89029fa4fd47a615f8a53506f6ff594a947ae6fbf3d77b925"
    sha256 cellar: :any,                 arm64_big_sur:  "9720413694ba49519d1d1c5213607dbdf177939ae0ee081c03ab2c1d478e2fe3"
    sha256 cellar: :any,                 monterey:       "9d4fa42d89970868e4dc7779a6960f31790f25905e157e8e944963e98f4a850a"
    sha256 cellar: :any,                 big_sur:        "67495888095b02d6716cc51f5a522f2a872c29de418f19210ecd586d23684b81"
    sha256 cellar: :any,                 catalina:       "af782fa2905042005df213106578123c7fd1d6d3111af8bd16e1ec63e273bb8d"
    sha256 cellar: :any,                 mojave:         "eb27003d54259c16f08795435e2afc34086598e7f1d1f1ae4c2fe5a70a6bf57d"
    sha256 cellar: :any,                 high_sierra:    "eeb44401862df80a1d1f77dde4164b265d82993458325e753285566b56477695"
    sha256 cellar: :any,                 sierra:         "d74d6e853e78b65a7e7f266be6733bdb5839f956bcb19061b68a46c16e080a94"
    sha256 cellar: :any,                 el_capitan:     "4304e6b83a7afa176a0462e8ba20485bc098731a16bd375261f9f449a8f8f7d3"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "7d8a3d6067fce20c398a6cfbe5ba87136f9d5968569a613b8a29e3bc3eef4817"
  end

  head do
    url "https://github.com/libsdl-org/SDL_image.git", branch: "SDL-1.2"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  # SDL 1.2 is deprecated, unsupported, and not recommended for new projects.
  # Commented out while this formula still has dependents.
  # deprecate! date: "2013-08-17", because: :deprecated_upstream

  depends_on "pkg-config" => :build
  depends_on "jpeg"
  depends_on "libpng"
  depends_on "libtiff"
  depends_on "sdl"
  depends_on "webp"

  def install
    inreplace "SDL_image.pc.in", "@prefix@", HOMEBREW_PREFIX

    system "./autogen.sh" if build.head?

    system "./configure", "--prefix=#{prefix}",
                          "--disable-dependency-tracking",
                          "--disable-imageio",
                          "--disable-jpg-shared",
                          "--disable-png-shared",
                          "--disable-sdltest",
                          "--disable-tif-shared",
                          "--disable-webp-shared"
    system "make", "install"<commit_msg>sdl_image: migrate `jpeg` to `jpeg-turbo`<commit_after>class SdlImage < Formula
  desc "Image file loading library"
  homepage "https://github.com/libsdl-org/SDL_image"
  license "Zlib"
  revision 8

  stable do
    url "https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz"
    sha256 "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699"

    # Fix graphical glitching
    # https://github.com/Homebrew/homebrew-python/issues/281
    # https://trac.macports.org/ticket/37453
    patch :p0 do
      url "https://raw.githubusercontent.com/Homebrew/formula-patches/41996822/sdl_image/IMG_ImageIO.m.patch"
      sha256 "c43c5defe63b6f459325798e41fe3fdf0a2d32a6f4a57e76a056e752372d7b09"
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "e69657726447aeb89029fa4fd47a615f8a53506f6ff594a947ae6fbf3d77b925"
    sha256 cellar: :any,                 arm64_big_sur:  "9720413694ba49519d1d1c5213607dbdf177939ae0ee081c03ab2c1d478e2fe3"
    sha256 cellar: :any,                 monterey:       "9d4fa42d89970868e4dc7779a6960f31790f25905e157e8e944963e98f4a850a"
    sha256 cellar: :any,                 big_sur:        "67495888095b02d6716cc51f5a522f2a872c29de418f19210ecd586d23684b81"
    sha256 cellar: :any,                 catalina:       "af782fa2905042005df213106578123c7fd1d6d3111af8bd16e1ec63e273bb8d"
    sha256 cellar: :any,                 mojave:         "eb27003d54259c16f08795435e2afc34086598e7f1d1f1ae4c2fe5a70a6bf57d"
    sha256 cellar: :any,                 high_sierra:    "eeb44401862df80a1d1f77dde4164b265d82993458325e753285566b56477695"
    sha256 cellar: :any,                 sierra:         "d74d6e853e78b65a7e7f266be6733bdb5839f956bcb19061b68a46c16e080a94"
    sha256 cellar: :any,                 el_capitan:     "4304e6b83a7afa176a0462e8ba20485bc098731a16bd375261f9f449a8f8f7d3"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "7d8a3d6067fce20c398a6cfbe5ba87136f9d5968569a613b8a29e3bc3eef4817"
  end

  head do
    url "https://github.com/libsdl-org/SDL_image.git", branch: "SDL-1.2"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  # SDL 1.2 is deprecated, unsupported, and not recommended for new projects.
  # Commented out while this formula still has dependents.
  # deprecate! date: "2013-08-17", because: :deprecated_upstream

  depends_on "pkg-config" => :build
  depends_on "jpeg-turbo"
  depends_on "libpng"
  depends_on "libtiff"
  depends_on "sdl"
  depends_on "webp"

  def install
    inreplace "SDL_image.pc.in", "@prefix@", HOMEBREW_PREFIX

    system "./autogen.sh" if build.head?

    system "./configure", "--prefix=#{prefix}",
                          "--disable-dependency-tracking",
                          "--disable-imageio",
                          "--disable-jpg-shared",
                          "--disable-png-shared",
                          "--disable-sdltest",
                          "--disable-tif-shared",
                          "--disable-webp-shared"
    system "make", "install"
{'fraction_non_alphanumeric': 0.09206039941548953, 'fraction_numerical': 0.19516155220003248, 'mean_word_length': 2.8142414860681115, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 12, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7278628', 'n_tokens_mistral': 3058, 'n_tokens_neox': 2379, 'n_words': 329}