libnotify 0.7.8
Closes #38721. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
c929056ea3
commit
ae43fe04f5
1 changed files with 46 additions and 3 deletions
|
@ -1,9 +1,8 @@
|
|||
class Libnotify < Formula
|
||||
desc "Library that sends desktop notifications to a notification daemon"
|
||||
homepage "https://developer.gnome.org/libnotify"
|
||||
url "https://download.gnome.org/sources/libnotify/0.7/libnotify-0.7.7.tar.xz"
|
||||
sha256 "9cb4ce315b2655860c524d46b56010874214ec27e854086c1a1d0260137efc04"
|
||||
revision 1
|
||||
url "https://download.gnome.org/sources/libnotify/0.7/libnotify-0.7.8.tar.xz"
|
||||
sha256 "69209e0b663776a00c7b6c0e560302a8dbf66b2551d55616304f240bba66e18c"
|
||||
|
||||
bottle do
|
||||
sha256 "d45147d1218ee584b2d67ce23e6bd60553a83424c3c0a69cd8a14f6e238a398c" => :mojave
|
||||
|
@ -12,11 +11,21 @@ class Libnotify < Formula
|
|||
sha256 "0139ddf8047c88ee6c29abfa8a112dce897150d54a0d83b9d2892d5033829a6d" => :el_capitan
|
||||
end
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "gobject-introspection" => :build
|
||||
depends_on "gtk-doc" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "gdk-pixbuf"
|
||||
|
||||
def install
|
||||
# the latest build does not include configure so we need to
|
||||
# generate it from configure.ac.
|
||||
# Upstream issue at https://gitlab.gnome.org/GNOME/libnotify/issues/5
|
||||
mkdir_p "m4"
|
||||
system "gtkdocize", "--copy"
|
||||
system "autoreconf", "-i"
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}",
|
||||
|
@ -24,4 +33,38 @@ class Libnotify < Formula
|
|||
"--enable-introspection"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <libnotify/notify.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
g_assert_true(notify_init("testapp"));
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
gettext = Formula["gettext"]
|
||||
glib = Formula["glib"]
|
||||
gdk_pixbuf = Formula["gdk-pixbuf"]
|
||||
flags = %W[
|
||||
-I#{gettext.opt_include}
|
||||
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
|
||||
-I#{glib.opt_include}/glib-2.0
|
||||
-I#{glib.opt_lib}/glib-2.0/include
|
||||
-I#{include}
|
||||
-D_REENTRANT
|
||||
-L#{gettext.opt_lib}
|
||||
-L#{glib.opt_lib}
|
||||
-L#{gdk_pixbuf.opt_lib}
|
||||
-L#{lib}
|
||||
-lnotify
|
||||
-lgdk_pixbuf-2.0
|
||||
-lgio-2.0
|
||||
-lglib-2.0
|
||||
-lgobject-2.0
|
||||
-lintl
|
||||
]
|
||||
system ENV.cc, "test.c", "-o", "test", *flags
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue