111 lines
4 KiB
Ruby
111 lines
4 KiB
Ruby
class Ghostscript < Formula
|
|
desc "Interpreter for PostScript and PDF"
|
|
homepage "https://www.ghostscript.com/"
|
|
url "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925/ghostpdl-9.25.tar.xz"
|
|
sha256 "9a6f382badeb86cc5474f0f8f85cde57c0b898bf236be00494754988d0aa0133"
|
|
|
|
bottle do
|
|
sha256 "1656cd0d6c7d2a2c0efca4af5c0f70cc96d233708cc0908a3bdfa77d01737af2" => :mojave
|
|
sha256 "18cfe88d14ecd3c60c053d218af67f3b1220a97a4fd066ff49d750e175d950b5" => :high_sierra
|
|
sha256 "a1222a6abf93355e5040c89a41a46fbcfb4036d0bab8142f8876cc96bc234055" => :sierra
|
|
sha256 "ab95b5d129618a49ceee70bb508ab4f6b336ab142f28b7a735062a135a7838ff" => :el_capitan
|
|
end
|
|
|
|
head do
|
|
# Can't use shallow clone. Doing so = fatal errors.
|
|
url "https://git.ghostscript.com/ghostpdl.git", :shallow => false
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
patch :DATA # Uncomment macOS-specific make vars
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "libtiff"
|
|
depends_on "little-cms2"
|
|
depends_on :x11 => :optional
|
|
|
|
# https://sourceforge.net/projects/gs-fonts/
|
|
resource "fonts" do
|
|
url "https://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz"
|
|
sha256 "0eb6f356119f2e49b2563210852e17f57f9dcc5755f350a69a46a0d641a0c401"
|
|
end
|
|
|
|
def install
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--disable-cups
|
|
--disable-compile-inits
|
|
--disable-gtk
|
|
--disable-fontconfig
|
|
--without-libidn
|
|
--with-system-libtiff
|
|
]
|
|
args << "--without-x" if build.without? "x11"
|
|
|
|
if build.head?
|
|
system "./autogen.sh", *args
|
|
else
|
|
system "./configure", *args
|
|
end
|
|
|
|
# Install binaries and libraries
|
|
system "make", "install"
|
|
system "make", "install-so"
|
|
|
|
(pkgshare/"fonts").install resource("fonts")
|
|
(man/"de").rmtree
|
|
end
|
|
|
|
test do
|
|
ps = test_fixtures("test.ps")
|
|
assert_match /Hello World!/, shell_output("#{bin}/ps2ascii #{ps}")
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git i/base/unix-dll.mak w/base/unix-dll.mak
|
|
index f50c09c00adb..8855133b400c 100644
|
|
--- i/base/unix-dll.mak
|
|
+++ w/base/unix-dll.mak
|
|
@@ -89,18 +89,33 @@ GPDL_SONAME_MAJOR_MINOR=$(GPDL_SONAME_BASE)$(GS_SOEXT)$(SO_LIB_VERSION_SEPARATOR
|
|
# similar linkers it must containt the trailing "="
|
|
# LDFLAGS_SO=-shared -Wl,$(LD_SET_DT_SONAME)$(LDFLAGS_SO_PREFIX)$(GS_SONAME_MAJOR)
|
|
|
|
|
|
# MacOS X
|
|
-#GS_SOEXT=dylib
|
|
-#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
|
|
-#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
|
|
-#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
|
|
+GS_SOEXT=dylib
|
|
+GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
|
|
+GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
|
|
+GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
|
|
#LDFLAGS_SO=-dynamiclib -flat_namespace
|
|
-#LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR)
|
|
+GS_LDFLAGS_SO=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR)
|
|
#LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME)
|
|
|
|
+PCL_SONAME=$(PCL_SONAME_BASE).$(GS_SOEXT)
|
|
+PCL_SONAME_MAJOR=$(PCL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
|
|
+PCL_SONAME_MAJOR_MINOR=$(PCL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
|
|
+PCL_LDFLAGS_SO=-dynamiclib -install_name $(PCL_SONAME_MAJOR_MINOR)
|
|
+
|
|
+XPS_SONAME=$(XPS_SONAME_BASE).$(GS_SOEXT)
|
|
+XPS_SONAME_MAJOR=$(XPS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
|
|
+XPS_SONAME_MAJOR_MINOR=$(XPS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
|
|
+XPS_LDFLAGS_SO=-dynamiclib -install_name $(XPS_SONAME_MAJOR_MINOR)
|
|
+
|
|
+GPDL_SONAME=$(GPDL_SONAME_BASE).$(GS_SOEXT)
|
|
+GPDL_SONAME_MAJOR=$(GPDL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
|
|
+GPDL_SONAME_MAJOR_MINOR=$(GPDL_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
|
|
+GPDL_LDFLAGS_SO=-dynamiclib -install_name $(GPDL_SONAME_MAJOR_MINOR)
|
|
+
|
|
GS_SO=$(BINDIR)/$(GS_SONAME)
|
|
GS_SO_MAJOR=$(BINDIR)/$(GS_SONAME_MAJOR)
|
|
GS_SO_MAJOR_MINOR=$(BINDIR)/$(GS_SONAME_MAJOR_MINOR)
|
|
|
|
PCL_SO=$(BINDIR)/$(PCL_SONAME)
|