libxpm 3.5.12 (new formula)

master
Michka Popoff 2020-09-26 19:32:12 +02:00 committed by Michka Popoff
parent cefa28a104
commit ab7a10ba16
1 changed files with 40 additions and 0 deletions

40
Formula/libxpm.rb Normal file
View File

@ -0,0 +1,40 @@
class Libxpm < Formula
desc "X.Org: X Pixmap (XPM) image file format library"
homepage "https://www.x.org/"
url "https://www.x.org/archive/individual/lib/libXpm-3.5.12.tar.bz2"
sha256 "fd6a6de3da48de8d1bb738ab6be4ad67f7cb0986c39bd3f7d51dd24f7854bdec"
license "MIT"
depends_on "gettext" => :build
depends_on "pkg-config" => :build
depends_on "gettext"
depends_on "libx11"
def install
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}
--localstatedir=#{var}
--disable-dependency-tracking
--disable-silent-rules
]
system "./configure", *args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include "X11/Xlib.h"
#include "X11/xpm.h"
int main(int argc, char* argv[]) {
XpmColor color;
return 0;
}
EOS
system ENV.cc, "test.c"
assert_equal 0, $CHILD_STATUS.exitstatus
end
end