menu_cache: add recipe for version 1.1.0

This commit is contained in:
Sergei Reznikov
2018-05-23 14:12:40 +03:00
parent a6aa592c0e
commit d0b45de156
2 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
SUMMARY="Library used to read freedesktop.org menus"
DESCRIPTION="Libmenu-cache is a library creating and utilizing caches to\
speed up the manipulation for freedesktop.org defined application menus.
It can be used as a replacement of libgnome-menu of gnome-menus.
Advantages:
1. Shorten time for loading menu entries.
2. Ease of use. (API is very similar to that of libgnome-menu)
3. Lightweight runtime library. (Parsing of the menu definition files
are done by menu-cache-gen when the menus are really changed.)
4. Less unnecessary and complicated file monitoring.
5. Heavily reduced disk I/O."
HOMEPAGE="https://lxde.org/"
COPYRIGHT="LXDE team"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://github.com/lxde/menu-cache/archive/$portVersion.tar.gz"
SOURCE_DIR="menu-cache-$portVersion"
CHECKSUM_SHA256="990857aa61a2894730e3749b6bc0f905967eed0c21aa2b62a7694007bdccbe8d"
PATCHES="menu_cache-$portVersion.patchset"
ARCHITECTURES="x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
menu_cache$secondaryArchSuffix = $portVersion
lib:libmenu_cache$secondaryArchSuffix = $portVersion
cmd:menu_cached$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfm_extra$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
"
PROVIDES_devel="
menu_cache${secondaryArchSuffix}_devel = $portVersion
devel:libmenu_cache$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
menu_cache$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfm_extra$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:gtkdoc_check
cmd:intltoolize$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
BUILD()
{
./autogen.sh
runConfigure ./configure
make
}
INSTALL()
{
make install
prepareInstalledDevelLibs libmenu-cache
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,47 @@
From 2e43736d542482a193de3db8daa8f9daaa1718eb Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Tue, 22 May 2018 15:25:48 +0300
Subject: Fix build on Haiku
diff --git a/libmenu-cache/menu-cache.c b/libmenu-cache/menu-cache.c
index 5025d72..f688d47 100644
--- a/libmenu-cache/menu-cache.c
+++ b/libmenu-cache/menu-cache.c
@@ -35,7 +35,7 @@
#include <time.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
diff --git a/menu-cache-daemon/Makefile.am b/menu-cache-daemon/Makefile.am
index 37f6f33..c32fdd9 100644
--- a/menu-cache-daemon/Makefile.am
+++ b/menu-cache-daemon/Makefile.am
@@ -18,6 +18,7 @@ menu_cached_SOURCES = \
menu_cached_LDADD = \
$(GLIB_LIBS) \
+ -lnetwork \
$(NULL)
menu_cached_LDFLAGS = \
-no-undefined \
diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c
index 69baee7..c126f2b 100644
--- a/menu-cache-daemon/menu-cached.c
+++ b/menu-cache-daemon/menu-cached.c
@@ -39,7 +39,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
--
2.16.2