67 lines
2.3 KiB
Ruby
67 lines
2.3 KiB
Ruby
class Ki18n < Formula
|
|
desc "KDE Gettext-based UI text internationalization"
|
|
homepage "https://api.kde.org/frameworks/ki18n/html/index.html"
|
|
url "https://download.kde.org/stable/frameworks/5.86/ki18n-5.86.0.tar.xz"
|
|
sha256 "b8d9ea53b75e79a5b003af89771371d0748cdfe9dd0b3ae7209aa959ce41bcd1"
|
|
license all_of: [
|
|
"BSD-3-Clause",
|
|
"LGPL-2.0-or-later",
|
|
any_of: ["LGPL-2.1-only", "LGPL-3.0-only"],
|
|
]
|
|
head "https://invent.kde.org/frameworks/ki18n.git"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "d7308d32a59b56fff442009ee28270bc9038139589984bcf1500aa0aa61052fc"
|
|
sha256 cellar: :any, big_sur: "959d67afee36f3a5ee45f123331816e9f6bf1d408bd70ae40d06c8a80741df9c"
|
|
sha256 cellar: :any, catalina: "b7ec05e56eea61f52e881b0237fdfeb306c00e609ad7903802fce43e7d717d4d"
|
|
sha256 cellar: :any, mojave: "770b3a4fdc60d190c762fdc9c67880e7d2afdd3d3c4b81d0b5116c2308914923"
|
|
end
|
|
|
|
depends_on "cmake" => [:build, :test]
|
|
depends_on "doxygen" => :build
|
|
depends_on "extra-cmake-modules" => [:build, :test]
|
|
depends_on "graphviz" => :build
|
|
depends_on "gettext"
|
|
depends_on "qt@5"
|
|
|
|
def install
|
|
args = std_cmake_args
|
|
args << "-DBUILD_TESTING=OFF"
|
|
args << "-DBUILD_QCH=ON"
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
pkgshare.install "autotests"
|
|
(pkgshare/"cmake").install "cmake/FindLibIntl.cmake"
|
|
end
|
|
|
|
test do
|
|
(testpath/"CMakeLists.txt").write <<~EOS
|
|
cmake_minimum_required(VERSION 3.5)
|
|
include(FeatureSummary)
|
|
find_package(ECM 5.71.0 NO_MODULE)
|
|
set_package_properties(ECM PROPERTIES TYPE REQUIRED)
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "#{pkgshare}/cmake")
|
|
find_package(Qt5 5.12.0 REQUIRED Core)
|
|
find_package(KF5I18n REQUIRED)
|
|
INCLUDE(CheckCXXSourceCompiles)
|
|
find_package(LibIntl)
|
|
set_package_properties(LibIntl PROPERTIES TYPE REQUIRED)
|
|
add_subdirectory(autotests)
|
|
EOS
|
|
|
|
cp_r (pkgshare/"autotests"), testpath
|
|
|
|
args = std_cmake_args
|
|
args << "-DQt5_DIR=#{Formula["qt@5"].opt_prefix/"lib/cmake/Qt5"}"
|
|
args << "-DLibIntl_INCLUDE_DIRS=#{Formula["gettext"].include}"
|
|
args << "-DLibIntl_LIBRARIES=#{Formula["gettext"].lib/"libintl.dylib"}"
|
|
|
|
system "cmake", testpath.to_s, *args
|
|
system "make"
|
|
end
|
|
end
|