Skip to content

Commit

Permalink
Merge pull request #196906 from Homebrew/grokj2k-unbundle
Browse files Browse the repository at this point in the history
grokj2k: unbundle `jpeg-turbo` and `little-cms2`
  • Loading branch information
BrewTestBot authored Nov 6, 2024
2 parents da54b11 + 1373292 commit 046a59a
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Formula/g/grokj2k.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ class Grokj2k < Formula
end

bottle do
sha256 cellar: :any, arm64_sequoia: "2f57d841a1b025b17301d5d3593a1e90700bf0bb3d67c6ba4e77dc1303a70963"
sha256 cellar: :any, arm64_sonoma: "827e43cae8e8fdda84cb8f5c9cdcd716f5af8d9ee7aa31e9ccb3a9d95a3e8fcd"
sha256 cellar: :any, arm64_ventura: "cb977b952fca7f773b02dc1f673d42929ff35ebae08361875fd488ee54aedec7"
sha256 cellar: :any, sonoma: "2cb05e80dffaeff66267a50cac98633d26f4a5a64d72f87029276d514e9677c8"
sha256 cellar: :any, ventura: "ebb08300439206f232f4542f9163ff50a9176bb213d67b76712706c5990e0291"
sha256 cellar: :any_skip_relocation, x86_64_linux: "9e904aa9acda6e1d696f1e84ea93bfa0ef77df069d8fe654159a4bdc563b49ec"
rebuild 1
sha256 cellar: :any, arm64_sequoia: "7d98d439c8e8934860451a44dd70b8be13fdc2476baf761623a511503cfca7c2"
sha256 cellar: :any, arm64_sonoma: "40674037784abe4e7c1303e2a6e145987b94d947d584b49e515d5560feb7dc77"
sha256 cellar: :any, arm64_ventura: "4aad900ead14c54f28e4821e67a5a10a19e3fddcb918bca51797c0f55af60327"
sha256 cellar: :any, sonoma: "e0a4c61b0a16ff6643e95a2b9792b9dce7f32846c6d982c980df9273499d68d0"
sha256 cellar: :any, ventura: "8f83006b9afb880466a8bd0027ef6b0efcc0b248803b1e2c9633e00e8919d877"
sha256 cellar: :any_skip_relocation, x86_64_linux: "de23e73b5d41a860ccca182be18ae5c6cd022a63d9e8b19b0ba801b45f53a270"
end

depends_on "cmake" => :build
Expand Down Expand Up @@ -58,18 +59,15 @@ def install
# Fix: ExifTool Perl module not found
ENV.prepend_path "PERL5LIB", Formula["exiftool"].opt_libexec/"lib"

# Ensure we use Homebrew little-cms2
# Ensure we use Homebrew libraries
%w[liblcms2 libpng libtiff libz].each { |l| rm_r(buildpath/"thirdparty"/l) }
inreplace "thirdparty/CMakeLists.txt" do |s|
s.gsub! "add_subdirectory(liblcms2)", ""
s.gsub! %r{(set\(LCMS_INCLUDE_DIRNAME) \$\{GROK_SOURCE_DIR\}/thirdparty/liblcms2/include},
"\\1 #{Formula["little-cms2"].opt_include}"
end

perl = DevelopmentTools.locate("perl")
perl_archlib = Utils.safe_popen_read(perl.to_s, "-MConfig", "-e", "print $Config{archlib}")
args = %W[
-DGRK_BUILD_DOC=ON
-DGRK_BUILD_JPEG=OFF
-DGRK_BUILD_LCMS2=OFF
-DGRK_BUILD_LIBPNG=OFF
-DGRK_BUILD_LIBTIFF=OFF
-DPERL_EXECUTABLE=#{perl}
Expand All @@ -86,7 +84,7 @@ def install
ENV.append "LDFLAGS", "-Wl,-rpath,#{perl_archlib}/CORE"
end

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
include.install_symlink "grok-#{version.major_minor}" => "grok"
Expand Down

0 comments on commit 046a59a

Please sign in to comment.