Skip to content

Commit

Permalink
Merge pull request #198521 from Homebrew/fltk-std_configure_args
Browse files Browse the repository at this point in the history
fltk [email protected]: declare indirect deps with linkage, use `std_*_args`
  • Loading branch information
chenrui333 authored Nov 21, 2024
2 parents 0b11290 + 7ba55c0 commit 66940ae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
36 changes: 18 additions & 18 deletions Formula/f/fltk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Fltk < Formula

depends_on "jpeg-turbo"
depends_on "libpng"
uses_from_macos "zlib"

on_linux do
depends_on "pkgconf" => :build
Expand All @@ -42,25 +43,24 @@ class Fltk < Formula

def install
if build.head?
args = std_cmake_args

# Don't build docs / require doxygen
args << "-DOPTION_BUILD_HTML_DOCUMENTATION=OFF"
args << "-DOPTION_BUILD_PDF_DOCUMENTATION=OFF"

# Don't build tests
args << "-DFLTK_BUILD_TEST=OFF"

# Build both shared & static libs
args << "-DOPTION_BUILD_SHARED_LIBS=ON"

system "cmake", ".", *args
system "cmake", "--build", "."
system "cmake", "--install", "."
args = [
# Don't build docs / require doxygen
"-DOPTION_BUILD_HTML_DOCUMENTATION=OFF",
"-DOPTION_BUILD_PDF_DOCUMENTATION=OFF",
# Don't build tests
"-DFLTK_BUILD_TEST=OFF",
# Build both shared & static libs
"-DOPTION_BUILD_SHARED_LIBS=ON",
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
else
system "./configure", "--prefix=#{prefix}",
"--enable-threads",
"--enable-shared"
args = %w[
--enable-threads
--enable-shared
]
system "./configure", *args, *std_configure_args
system "make", "install"
end
end
Expand Down
8 changes: 5 additions & 3 deletions Formula/f/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ class FltkAT13 < Formula
end

def install
system "./configure", "--prefix=#{prefix}",
"--enable-threads",
"--enable-shared"
args = %w[
--enable-threads
--enable-shared
]
system "./configure", *args, *std_configure_args
system "make", "install"
end

Expand Down

0 comments on commit 66940ae

Please sign in to comment.