Skip to content

Commit f63ade3

Browse files
committed
opencascade: remove freeimage support
Also: * move to GitHub tarball based on https://dev.opencascade.org/release * update checksum based on Open-Cascade-SAS/OCCT#751 (reply in thread) * remove inreplace as fixed in new tarball
1 parent 0a3cfab commit f63ade3

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Formula/o/opencascade.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
class Opencascade < Formula
22
desc "3D modeling and numerical simulation software for CAD/CAM/CAE"
33
homepage "https://dev.opencascade.org/"
4-
url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_9_2;sf=tgz"
5-
version "7.9.2"
6-
sha256 "e9f69bde521e718f10f1896e5bea070fbd5dfb205d8da422f5be2d521db666c5"
4+
url "https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_9_2.tar.gz"
5+
sha256 "3cd080d3fc33ba0c6c157e110afe3e015859524c4694dbb09812ec9d61595639"
76
license "LGPL-2.1-only"
87

98
# The first-party download page (https://dev.opencascade.org/release)
@@ -33,7 +32,6 @@ class Opencascade < Formula
3332
depends_on "doxygen" => :build
3433
depends_on "rapidjson" => :build
3534
depends_on "fontconfig"
36-
depends_on "freeimage"
3735
depends_on "freetype"
3836
depends_on "tbb"
3937
depends_on "tcl-tk@8" # TCL 9 issue: https://tracker.dev.opencascade.org/view.php?id=33725
@@ -44,20 +42,20 @@ class Opencascade < Formula
4442
end
4543

4644
def install
47-
# Fix incorrect version
48-
inreplace "adm/cmake/version.cmake", "set (OCC_VERSION_MAINTENANCE 1 )", "set (OCC_VERSION_MAINTENANCE 2 )"
45+
# FreeImage has multiple CVEs and has been dropped by distros like Arch Linux
46+
# Ref: https://archlinux.org/todo/drop-freeimage/
47+
odie "FreeImage should not be a dependency!" if deps.map(&:name).include?("freeimage")
4948

5049
tcltk = Formula["tcl-tk@8"]
5150
libtcl = tcltk.opt_lib/shared_library("libtcl#{tcltk.version.major_minor}")
5251
libtk = tcltk.opt_lib/shared_library("libtk#{tcltk.version.major_minor}")
5352

5453
system "cmake", "-S", ".", "-B", "build",
55-
"-DUSE_FREEIMAGE=ON",
54+
"-DUSE_FREEIMAGE=OFF",
5655
"-DUSE_RAPIDJSON=ON",
5756
"-DUSE_TBB=ON",
5857
"-DINSTALL_DOC_Overview=ON",
5958
"-DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF",
60-
"-D3RDPARTY_FREEIMAGE_DIR=#{Formula["freeimage"].opt_prefix}",
6159
"-D3RDPARTY_FREETYPE_DIR=#{Formula["freetype"].opt_prefix}",
6260
"-D3RDPARTY_RAPIDJSON_DIR=#{Formula["rapidjson"].opt_prefix}",
6361
"-D3RDPARTY_RAPIDJSON_INCLUDE_DIR=#{Formula["rapidjson"].opt_include}",

0 commit comments

Comments
 (0)