libxdg-basedir 1.2.0 (new formula)
Formula for the libxdg-basedir library which is an implementation of the XDG Base Directory specifications. Closes Homebrew/homebrew#35149. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
15ab156718
commit
d59eb6cc9e
1 changed files with 30 additions and 0 deletions
30
Formula/libxdg-basedir.rb
Normal file
30
Formula/libxdg-basedir.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class LibxdgBasedir < Formula
|
||||
desc "An implementation of the XDG Base Directory specifications"
|
||||
homepage "https://github.com/devnev/libxdg-basedir"
|
||||
url "http://github.com/devnev/libxdg-basedir/archive/libxdg-basedir-1.2.0.tar.gz"
|
||||
sha256 "1c2b0032a539033313b5be2e48ddd0ae94c84faf21d93956d53562eef4614868"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
|
||||
def install
|
||||
system "./autogen.sh", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.cpp").write <<-EOS.undent
|
||||
#include <basedir.h>
|
||||
int main() {
|
||||
xdgHandle handle;
|
||||
if (!xdgInitHandle(&handle)) return 1;
|
||||
xdgWipeHandle(&handle);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.cpp", "-lxdg-basedir", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue