2013-02-18 09:44:37 +00:00
|
|
|
|
class Paps < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
|
desc "Pango to PostScript converter"
|
2014-05-25 16:54:15 +00:00
|
|
|
|
homepage "http://paps.sourceforge.net/"
|
|
|
|
|
url "https://downloads.sourceforge.net/paps/paps-0.6.8.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
|
sha256 "db214c4ea7ecde2f7986b869f6249864d3ff364e6f210c15aa2824bcbd850a20"
|
2013-02-18 09:44:37 +00:00
|
|
|
|
|
2014-05-25 16:54:15 +00:00
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
|
depends_on "pango"
|
2014-05-25 20:43:31 +00:00
|
|
|
|
depends_on "freetype"
|
|
|
|
|
depends_on "fontconfig"
|
|
|
|
|
depends_on "glib"
|
|
|
|
|
depends_on "gettext"
|
2013-02-18 09:44:37 +00:00
|
|
|
|
|
2014-05-25 16:54:15 +00:00
|
|
|
|
# Find freetype headers
|
2014-05-25 12:56:56 +00:00
|
|
|
|
patch :DATA
|
|
|
|
|
|
2013-02-18 09:44:37 +00:00
|
|
|
|
def install
|
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
2014-05-25 16:54:15 +00:00
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
|
"--mandir=#{man}"
|
|
|
|
|
system "make", "install"
|
2013-02-18 09:44:37 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test do
|
|
|
|
|
# http://paps.sourceforge.net/small-hello.utf8
|
|
|
|
|
utf8 = <<-EOS
|
|
|
|
|
paps by Dov Grobgeld (דב גרובגלד)
|
|
|
|
|
Printing through Παν語 (Pango)
|
|
|
|
|
|
|
|
|
|
Arabic السلام عليكم
|
|
|
|
|
Bengali (বাঙ্লা) ষাগতোম
|
|
|
|
|
Greek (Ελληνικά) Γειά σας
|
|
|
|
|
Hebrew שָׁלוֹם
|
|
|
|
|
Japanese (日本語) こんにちは, コンニチハ
|
|
|
|
|
Chinese (中文,普通话,汉语) 你好
|
|
|
|
|
Vietnamese (Tiếng Việt) Xin Chào
|
|
|
|
|
EOS
|
|
|
|
|
safe_system "echo '#{utf8}' | #{bin}/paps > paps.ps"
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-05-25 12:56:56 +00:00
|
|
|
|
|
|
|
|
|
__END__
|
2014-05-25 20:44:01 +00:00
|
|
|
|
diff --git a/src/libpaps.c b/src/libpaps.c
|
|
|
|
|
index 6081d0d..d502b68 100644
|
|
|
|
|
--- a/src/libpaps.c
|
|
|
|
|
+++ b/src/libpaps.c
|
|
|
|
|
@@ -25,8 +25,10 @@
|
|
|
|
|
|
2014-05-25 12:56:56 +00:00
|
|
|
|
#include <pango/pango.h>
|
|
|
|
|
#include <pango/pangoft2.h>
|
|
|
|
|
-#include <freetype/ftglyph.h>
|
|
|
|
|
-#include <freetype/ftoutln.h>
|
2014-05-25 20:44:01 +00:00
|
|
|
|
+#include <ft2build.h>
|
|
|
|
|
+#include FT_FREETYPE_H
|
|
|
|
|
+#include FT_GLYPH_H
|
|
|
|
|
+#include FT_OUTLINE_H
|
2014-05-25 12:56:56 +00:00
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdio.h>
|