diff --git a/mtr-glib2.patch b/mtr-glib2.patch new file mode 100644 index 0000000..76a53fa --- /dev/null +++ b/mtr-glib2.patch @@ -0,0 +1,26 @@ +diff -up mtr-0.83/configure.in.glib2 mtr-0.83/configure.in +--- mtr-0.83/configure.in.glib2 2013-02-18 20:10:00.767417356 +0100 ++++ mtr-0.83/configure.in 2013-02-18 20:10:53.549513018 +0100 +@@ -59,6 +59,8 @@ else + GTK_OBJ="" + fi + ++PKG_CHECK_MODULES([GLIB2], [glib-2.0]) ++ + AC_CHECK_FUNC(socket, , + AC_CHECK_LIB(socket, socket, , AC_MSG_ERROR(No socket library found))) + +diff -up mtr-0.83/Makefile.am.glib2 mtr-0.83/Makefile.am +--- mtr-0.83/Makefile.am.glib2 2013-02-18 20:13:54.635841512 +0100 ++++ mtr-0.83/Makefile.am 2013-02-18 20:16:17.877101679 +0100 +@@ -19,8 +19,9 @@ mtr_SOURCES = mtr.c \ + mtr-gtk.h + EXTRA_mtr_SOURCES = curses.c \ + gtk.c ++AM_CFLAGS = $(GLIB2_CFLAGS) + mtr_DEPENDENCIES = $(GTK_OBJ) $(CURSES_OBJ) +-mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ) ++mtr_LDFLAGS = $(GTK_OBJ) $(GLIB2_LIBS) $(CURSES_OBJ) + + EXTRA_DIST = SECURITY mtr.8 Makefile Makefile.dist + distclean-local: diff --git a/mtr.spec b/mtr.spec index bdadf8b..52f8d4c 100644 --- a/mtr.spec +++ b/mtr.spec @@ -1,7 +1,7 @@ Summary: A network diagnostic tool Name: mtr Version: 0.83 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 Group: Applications/Internet License: GPLv2+ @@ -13,8 +13,10 @@ Source3: net-x%{name}.desktop Patch1: mtr-crash-in-xml-mode.patch Patch2: mtr-xml-format-fixes.patch +Patch3: mtr-glib2.patch BuildRequires: ncurses-devel gtk2-devel desktop-file-utils +BuildRequires: autoconf automake libtool Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -39,8 +41,11 @@ diagnostic tool. %patch1 -p1 %patch2 -p1 +touch ChangeLog +%patch3 -p1 -b .glib2 %build +autoreconf -fiv %configure --enable-gtk2 make %{?_smp_mflags} && mv mtr xmtr && make distclean %configure --without-gtk @@ -96,6 +101,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pixmaps/mtr_icon.xpm %changelog +* Mon Feb 18 2013 Adam Tkac - 2:0.83-2 +- make non-gtk version of mtr buildable + * Mon Feb 18 2013 Adam Tkac - 2:0.83-1 - update to 0.83 - patches merged