jasper 2.0.3

Closes #7490.

Signed-off-by: William Woodruff <william@tuffbizz.com>
This commit is contained in:
ilovezfs 2016-12-02 14:33:41 -08:00 committed by William Woodruff
parent 398bfa4854
commit d0fd6d66b2
No known key found for this signature in database
GPG key ID: 85AE00C504833B3C

View file

@ -1,8 +1,8 @@
class Jasper < Formula
desc "Library for manipulating JPEG-2000 images"
homepage "https://www.ece.uvic.ca/~frodo/jasper/"
url "https://github.com/mdadams/jasper/archive/version-2.0.2.tar.gz"
sha256 "e6eb28c6c5dfe5730d26e1908f9be68f48f39461acd3c686544837de14103a4c"
url "https://github.com/mdadams/jasper/archive/version-2.0.3.tar.gz"
sha256 "220811235350a17ad134358549fb5163c415e6527f8e37ac3b94980bd8301ccc"
bottle do
sha256 "5e42b5b4ae2ff764079d2ee805058dd333ad7725685de8b712a702804f6dd83c" => :sierra
@ -18,17 +18,9 @@ class Jasper < Formula
def install
ENV.universal_binary if build.universal?
# Fix OpenGL support
# Upstream issue "Build fails to find and link system GLUT on macOS"
# Reported 1 Dec 2016 https://github.com/mdadams/jasper/issues/100
["CMakeLists.txt", "src/appl/jiv.c"].each do |f|
inreplace f, "GL/glut.h", "glut.h"
end
inreplace "src/appl/CMakeLists.txt",
"add_executable(jiv jiv.c)",
"add_executable(jiv jiv.c)\n\tinclude_directories(${GLUT_INCLUDE_DIR})"
mkdir "build" do
# Make sure macOS's GLUT.framework is used, not XQuartz or freeglut
# Reported to CMake upstream 4 Apr 2016 https://gitlab.kitware.com/cmake/cmake/issues/16045
glut_lib = "#{MacOS.sdk_path}/System/Library/Frameworks/GLUT.framework"
system "cmake", "..", "-DGLUT_glut_LIBRARY=#{glut_lib}", *std_cmake_args
system "make"