Index: radix-1.9/X11/app/pcmanfm/1.3.2/Makefile
===================================================================
--- radix-1.9/X11/app/pcmanfm/1.3.2/Makefile (nonexistent)
+++ radix-1.9/X11/app/pcmanfm/1.3.2/Makefile (revision 109)
@@ -0,0 +1,252 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/x/pcmanfm/pcmanfm
+
+REQUIRES = X11/libs/libfm/1.3.2
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 1.3.2
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/x/pcmanfm/pcmanfm/pcmanfm-1.3.2.tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/pcmanfm-$(version)
+src_dir_name = pcmanfm-$(version)
+doc_dir_name = pcmanfm-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = xapp
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+PCMFM_PKG_NAME = pcmanfm
+PCMFM_PKG_VERSION = 1.3.2
+PCMFM_PKG_ARCH = $(PKGARCH)
+PCMFM_PKG_DISTRO_NAME = $(DISTRO_NAME)
+PCMFM_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+PCMFM_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+PCMFM_PKG_SHORT_DESCRIPTION = PCMan File Manager
+PCMFM_PKG_URL = $(BUG_URL)
+PCMFM_PKG_LICENSE = GPLv2
+PCMFM_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(PCMFM_PKG_NAME)-pkg-description
+PCMFM_PKG_DESCRIPTION_FILE_IN = $(PCMFM_PKG_NAME)-pkg-description.in
+PCMFM_PKG_INSTALL_SCRIPT = $(PCMFM_PKG_NAME)-pkg-install.sh
+
+PCMFM_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(PCMFM_PKG_NAME)-package
+
+pkg_basename = $(PCMFM_PKG_NAME)-$(PCMFM_PKG_VERSION)-$(PCMFM_PKG_ARCH)-$(PCMFM_PKG_DISTRO_NAME)-$(PCMFM_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(PCMFM_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --disable-debug
+extra_configure_switches += --with-gtk=3
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+CFLAGS += -Wno-deprecated-declarations -Wno-incompatible-pointer-types
+CFLAGS += -Wno-discarded-qualifiers
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_BIN_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
+ @chmod a-x $(SRC_DIR)/COPYING
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && \
+ $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(PCMFM_PKG)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Setup pcmanfm.conf =======
+ @mv $(PCMFM_PKG)/etc/xdg/pcmanfm/default/pcmanfm.conf{,.new}
+ # ======= Install Documentation =======
+ @if [ -d $(PCMFM_PKG)/usr/share/man ]; then \
+ ( cd $(PCMFM_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ # ======= Install Documentation =======
+ @mkdir -p $(PCMFM_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING \
+ $(PCMFM_PKG)/usr/doc/$(src_dir_name)
+ @mkdir -p $(PCMFM_PKG)/usr/share/doc/$(src_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING README TODO \
+ $(PCMFM_PKG)/usr/share/doc/$(src_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog -a -s ChangeLog ]; then \
+ DOCSDIR=`echo $(PCMFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS -a -s NEWS ]; then \
+ DOCSDIR=`echo $(PCMFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(PCMFM_PKG))
+ # ======= Strip binaries =======
+ @( cd $(PCMFM_PKG); \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(PCMFM_PKG)/usr/bin ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(PCMFM_PKG_DESCRIPTION_FILE): $(PCMFM_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(PCMFM_PKG_DESCRIPTION_FILE) $(PCMFM_PKG_INSTALL_SCRIPT)
+ @cp $(PCMFM_PKG_DESCRIPTION_FILE) $(PCMFM_PKG)/.DESCRIPTION
+ @cp $(PCMFM_PKG_INSTALL_SCRIPT) $(PCMFM_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(PCMFM_PKG)/.REQUIRES
+ @echo "pkgname=$(PCMFM_PKG_NAME)" > $(PCMFM_PKG)/.PKGINFO ; \
+ echo "pkgver=$(PCMFM_PKG_VERSION)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "arch=$(PCMFM_PKG_ARCH)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "distroname=$(PCMFM_PKG_DISTRO_NAME)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "distrover=$(PCMFM_PKG_DISTRO_VERSION)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "group=$(PCMFM_PKG_GROUP)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(PCMFM_PKG_SHORT_DESCRIPTION)\"" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "url=$(PCMFM_PKG_URL)" >> $(PCMFM_PKG)/.PKGINFO ; \
+ echo "license=$(PCMFM_PKG_LICENSE)" >> $(PCMFM_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(PCMFM_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: radix-1.9/X11/app/pcmanfm/1.3.2/PATCHES
===================================================================
Index: radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-description.in
===================================================================
--- radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-description.in (nonexistent)
+++ radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-description.in (revision 109)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+pcmanfm: pcmanfm @VERSION@ (PCMan File Manager)
+pcmanfm:
+pcmanfm: PCManFM is an extremely fast and lightweight GTK+ based file
+pcmanfm: manager which features tabbed browsing and a user-friendly
+pcmanfm: interface.
+pcmanfm:
+pcmanfm:
+pcmanfm: Homepage: https://wiki.lxde.org/en/PCManFM
+pcmanfm:
+pcmanfm:
+pcmanfm:
Index: radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-install.sh
===================================================================
--- radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-install.sh (nonexistent)
+++ radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-install.sh (revision 109)
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ install_file etc/xdg/pcmanfm/default/pcmanfm.conf.new
+
+ # Update desktop database
+ if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications > /dev/null 2>&1
+ fi
+
+ # Notice we use an absolute path below, rather than usr/bin/update-mime-database.
+ # This is because we're testing to see if we are on the bootdisk, which will not
+ # have /usr/bin/update-mime-database.
+ # The presence of "/etc/system-installer" is under consideration as a better test.
+ # Also we have to check that we are not in the installer mode on the target system
+ # ("/etc/system-installer"), and we have to be sure that we are on the working system
+ # on the target hardware ("proc/sys/kernel/osrelease" - relative path).
+ if [ -r proc/sys/kernel/osrelease -a ! -r /etc/system-installer -a -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null
+ cat /etc/passwd | while read passwdline ; do
+ homedir=$(echo $passwdline | cut -f 6 -d :)
+ if [ -d $homedir/.local/share/mime ]; then
+ username=$(echo $passwdline | cut -f 1 -d :)
+ su $username -c "/usr/bin/update-mime-database $homedir/.local/share/mime 1>/dev/null 2>/dev/null" 2> /dev/null
+ fi
+ done
+ # This is just "cleanup" in case something might be missed in /home/*/
+ for homemimedir in /home/*/.local/share/mime ; do
+ if [ -d $homemimedir ]; then
+ username=$(echo $homemimedir | cut -f 3 -d /)
+ su $username -c "/usr/bin/update-mime-database $homemimedir 1>/dev/null 2>/dev/null" 2> /dev/null
+ fi
+ done
+ else
+ # We are not on the target system and we can make use build-machine's utility
+ if [ -x /usr/bin/update-mime-database ] ; then
+ update-mime-database usr/share/mime 1>/dev/null 2>/dev/null
+ fi
+ fi
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: radix-1.9/X11/app/pcmanfm/1.3.2/pcmanfm-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/X11/app/pcmanfm/1.3.2
===================================================================
--- radix-1.9/X11/app/pcmanfm/1.3.2 (nonexistent)
+++ radix-1.9/X11/app/pcmanfm/1.3.2 (revision 109)
Property changes on: radix-1.9/X11/app/pcmanfm/1.3.2
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/X11/libs/libfm/1.3.2/Makefile
===================================================================
--- radix-1.9/X11/libs/libfm/1.3.2/Makefile (nonexistent)
+++ radix-1.9/X11/libs/libfm/1.3.2/Makefile (revision 109)
@@ -0,0 +1,289 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/x/pcmanfm/libfm
+
+REQUIRES = X11/libs/gtk+3/3.24.37
+REQUIRES += X11/libs/lxmenu-data/0.1.5
+REQUIRES += X11/libs/cairo/1.17.8
+REQUIRES += libs/dbus-glib/0.112
+REQUIRES += libs/libexif/0.6.24
+REQUIRES += app/elogind/246.10
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 1.3.2
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/x/pcmanfm/libfm/libfm-1.3.2.tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/libfm-$(version)
+src_dir_name = libfm-$(version)
+doc_dir_name = libfm-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = xlibs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+LIBFM_PKG_NAME = libfm
+LIBFM_PKG_VERSION = 1.3.2
+LIBFM_PKG_ARCH = $(PKGARCH)
+LIBFM_PKG_DISTRO_NAME = $(DISTRO_NAME)
+LIBFM_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+LIBFM_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+LIBFM_PKG_SHORT_DESCRIPTION = pcmanfm library
+LIBFM_PKG_URL = $(BUG_URL)
+LIBFM_PKG_LICENSE = GPLv2
+LIBFM_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(LIBFM_PKG_NAME)-pkg-description
+LIBFM_PKG_DESCRIPTION_FILE_IN = $(LIBFM_PKG_NAME)-pkg-description.in
+LIBFM_PKG_INSTALL_SCRIPT = $(LIBFM_PKG_NAME)-pkg-install.sh
+
+LIBFM_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(LIBFM_PKG_NAME)-package
+
+pkg_basename = $(LIBFM_PKG_NAME)-$(LIBFM_PKG_VERSION)-$(LIBFM_PKG_ARCH)-$(LIBFM_PKG_DISTRO_NAME)-$(LIBFM_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(LIBFM_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --enable-udisks
+extra_configure_switches += --enable-actions
+extra_configure_switches += --with-gtk=3
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+CFLAGS += -Wno-deprecated-declarations -Wno-incompatible-pointer-types
+CFLAGS += -Wno-discarded-qualifiers
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && \
+ $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(LIBFM_PKG)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Remove libfm-extra stuff =======
+ @rm -f $(LIBFM_PKG)/usr/lib$(LIBSUFFIX)/libfm-extra.*
+ @rm -f $(LIBFM_PKG)/usr/lib$(LIBSUFFIX)/pkgconfig/libfm-extra.pc
+ @rm -f $(LIBFM_PKG)/usr/include/libfm-1.0/fm-extra.h
+ @rm -f $(LIBFM_PKG)/usr/include/libfm-1.0/fm-xml-file.h
+ @rm -f $(LIBFM_PKG)/usr/include/libfm-1.0/fm-version.h
+ # ======= Setup libfm.conf =======
+ @mv $(LIBFM_PKG)/etc/xdg/libfm/libfm.conf{,.new}
+ # ======= Install Documentation =======
+ @if [ -d $(LIBFM_PKG)/usr/share/man ]; then \
+ ( cd $(LIBFM_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ # ======= Install Documentation =======
+ @mkdir -p $(LIBFM_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING \
+ $(LIBFM_PKG)/usr/doc/$(src_dir_name)
+ @mkdir -p $(LIBFM_PKG)/usr/share/doc/$(src_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING README TODO \
+ $(LIBFM_PKG)/usr/share/doc/$(src_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog -a -s ChangeLog ]; then \
+ DOCSDIR=`echo $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS -a -s NEWS ]; then \
+ DOCSDIR=`echo $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= remove toolchain path from target libtool *.la files =======
+ @( cd $(LIBFM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libfm-gtk3.la libfm.la ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(LIBFM_PKG))
+ # ======= tune libtool *.la search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libfm-gtk3.la libfm.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libfm-gtk3.la libfm.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,prefix=/usr,prefix=$(TARGET_DEST_DIR)/usr,g" libfm-gtk3.pc libfm.pc ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(LIBFM_PKG); \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(LIBFM_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(LIBFM_PKG)/usr/bin ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(LIBFM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(LIBFM_PKG_DESCRIPTION_FILE): $(LIBFM_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(LIBFM_PKG_DESCRIPTION_FILE) $(LIBFM_PKG_INSTALL_SCRIPT)
+ @cp $(LIBFM_PKG_DESCRIPTION_FILE) $(LIBFM_PKG)/.DESCRIPTION
+ @cp $(LIBFM_PKG_INSTALL_SCRIPT) $(LIBFM_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(LIBFM_PKG)/.REQUIRES
+ @echo "pkgname=$(LIBFM_PKG_NAME)" > $(LIBFM_PKG)/.PKGINFO ; \
+ echo "pkgver=$(LIBFM_PKG_VERSION)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "arch=$(LIBFM_PKG_ARCH)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "distroname=$(LIBFM_PKG_DISTRO_NAME)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "distrover=$(LIBFM_PKG_DISTRO_VERSION)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "group=$(LIBFM_PKG_GROUP)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(LIBFM_PKG_SHORT_DESCRIPTION)\"" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "url=$(LIBFM_PKG_URL)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "license=$(LIBFM_PKG_LICENSE)" >> $(LIBFM_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(LIBFM_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: radix-1.9/X11/libs/libfm/1.3.2/PATCHES
===================================================================
Index: radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-description.in
===================================================================
--- radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-description.in (nonexistent)
+++ radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-description.in (revision 109)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libfm: libfm @VERSION@ (pcmanfm library)
+libfm:
+libfm: LibFM provides file management functions built on top of Glib/GIO,
+libfm: giving a convenient higher-level API.
+libfm:
+libfm: Homepage: https://wiki.lxde.org/en/Libfm
+libfm:
+libfm:
+libfm:
+libfm:
+libfm:
Index: radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-install.sh
===================================================================
--- radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-install.sh (nonexistent)
+++ radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-install.sh (revision 109)
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ install_file etc/xdg/libfm/libfm.conf.new
+
+ # Update desktop database
+ if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications > /dev/null 2>&1
+ fi
+
+ # Notice we use an absolute path below, rather than usr/bin/update-mime-database.
+ # This is because we're testing to see if we are on the bootdisk, which will not
+ # have /usr/bin/update-mime-database.
+ # The presence of "/etc/system-installer" is under consideration as a better test.
+ # Also we have to check that we are not in the installer mode on the target system
+ # ("/etc/system-installer"), and we have to be sure that we are on the working system
+ # on the target hardware ("proc/sys/kernel/osrelease" - relative path).
+ if [ -r proc/sys/kernel/osrelease -a ! -r /etc/system-installer -a -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null
+ cat /etc/passwd | while read passwdline ; do
+ homedir=$(echo $passwdline | cut -f 6 -d :)
+ if [ -d $homedir/.local/share/mime ]; then
+ username=$(echo $passwdline | cut -f 1 -d :)
+ su $username -c "/usr/bin/update-mime-database $homedir/.local/share/mime 1>/dev/null 2>/dev/null" 2> /dev/null
+ fi
+ done
+ # This is just "cleanup" in case something might be missed in /home/*/
+ for homemimedir in /home/*/.local/share/mime ; do
+ if [ -d $homemimedir ]; then
+ username=$(echo $homemimedir | cut -f 3 -d /)
+ su $username -c "/usr/bin/update-mime-database $homemimedir 1>/dev/null 2>/dev/null" 2> /dev/null
+ fi
+ done
+ else
+ # We are not on the target system and we can make use build-machine's utility
+ if [ -x /usr/bin/update-mime-database ] ; then
+ update-mime-database usr/share/mime 1>/dev/null 2>/dev/null
+ fi
+ fi
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: radix-1.9/X11/libs/libfm/1.3.2/libfm-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/X11/libs/libfm/1.3.2
===================================================================
--- radix-1.9/X11/libs/libfm/1.3.2 (nonexistent)
+++ radix-1.9/X11/libs/libfm/1.3.2 (revision 109)
Property changes on: radix-1.9/X11/libs/libfm/1.3.2
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/X11/libs/libfm-extra/1.3.2/Makefile
===================================================================
--- radix-1.9/X11/libs/libfm-extra/1.3.2/Makefile (nonexistent)
+++ radix-1.9/X11/libs/libfm-extra/1.3.2/Makefile (revision 109)
@@ -0,0 +1,267 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/x/pcmanfm/libfm
+
+REQUIRES = libs/glib2/2.76.0
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 1.3.2
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/x/pcmanfm/libfm/libfm-1.3.2.tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/libfm-$(version)
+src_dir_name = libfm-$(version)
+doc_dir_name = libfm-extra-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = xlibs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+LIBFM_PKG_NAME = libfm-extra
+LIBFM_PKG_VERSION = 1.3.2
+LIBFM_PKG_ARCH = $(PKGARCH)
+LIBFM_PKG_DISTRO_NAME = $(DISTRO_NAME)
+LIBFM_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+LIBFM_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+LIBFM_PKG_SHORT_DESCRIPTION = pcmanfm extra library
+LIBFM_PKG_URL = $(BUG_URL)
+LIBFM_PKG_LICENSE = GPLv2
+LIBFM_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(LIBFM_PKG_NAME)-pkg-description
+LIBFM_PKG_DESCRIPTION_FILE_IN = $(LIBFM_PKG_NAME)-pkg-description.in
+LIBFM_PKG_INSTALL_SCRIPT = $(LIBFM_PKG_NAME)-pkg-install.sh
+
+LIBFM_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(LIBFM_PKG_NAME)-package
+
+pkg_basename = $(LIBFM_PKG_NAME)-$(LIBFM_PKG_VERSION)-$(LIBFM_PKG_ARCH)-$(LIBFM_PKG_DISTRO_NAME)-$(LIBFM_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(LIBFM_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --with-extra-only
+extra_configure_switches += --with-gtk=no
+
+extra_configure_switches += --program-prefix=
+extra_configure_switches += --program-suffix=
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_LIB_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && \
+ $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(LIBFM_PKG)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Install Documentation =======
+ @if [ -d $(LIBFM_PKG)/usr/share/man ]; then \
+ ( cd $(LIBFM_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ # ======= Install Documentation =======
+ @mkdir -p $(LIBFM_PKG)/usr/doc/$(doc_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING \
+ $(LIBFM_PKG)/usr/doc/$(doc_dir_name)
+ @mkdir -p $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING README TODO \
+ $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog -a -s ChangeLog ]; then \
+ DOCSDIR=`echo $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS -a -s NEWS ]; then \
+ DOCSDIR=`echo $(LIBFM_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= remove toolchain path from target libtool *.la files =======
+ @( cd $(LIBFM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libfm-extra.la ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(LIBFM_PKG))
+ # ======= tune libtool *.la search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libfm-extra.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libfm-extra.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libfm-extra.pc ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(LIBFM_PKG); \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(LIBFM_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(LIBFM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(LIBFM_PKG_DESCRIPTION_FILE): $(LIBFM_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(LIBFM_PKG_DESCRIPTION_FILE) $(LIBFM_PKG_INSTALL_SCRIPT)
+ @cp $(LIBFM_PKG_DESCRIPTION_FILE) $(LIBFM_PKG)/.DESCRIPTION
+ @cp $(LIBFM_PKG_INSTALL_SCRIPT) $(LIBFM_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(LIBFM_PKG)/.REQUIRES
+ @echo "pkgname=$(LIBFM_PKG_NAME)" > $(LIBFM_PKG)/.PKGINFO ; \
+ echo "pkgver=$(LIBFM_PKG_VERSION)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "arch=$(LIBFM_PKG_ARCH)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "distroname=$(LIBFM_PKG_DISTRO_NAME)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "distrover=$(LIBFM_PKG_DISTRO_VERSION)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "group=$(LIBFM_PKG_GROUP)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(LIBFM_PKG_SHORT_DESCRIPTION)\"" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "url=$(LIBFM_PKG_URL)" >> $(LIBFM_PKG)/.PKGINFO ; \
+ echo "license=$(LIBFM_PKG_LICENSE)" >> $(LIBFM_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(LIBFM_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: radix-1.9/X11/libs/libfm-extra/1.3.2/PATCHES
===================================================================
Index: radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-description.in
===================================================================
--- radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-description.in (nonexistent)
+++ radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-description.in (revision 109)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libfm-extra: libfm-extra @VERSION@ (pcmanfm extra library)
+libfm-extra:
+libfm-extra: LibFM provides file management functions built on top of Glib/GIO,
+libfm-extra: giving a convenient higher-level API.
+libfm-extra:
+libfm-extra: This package contains a library and other files required by
+libfm-extra: menu-cache-gen libexec of the recent menu-cache >= 1.0.0.
+libfm-extra:
+libfm-extra: Homepage: https://wiki.lxde.org/en/Libfm
+libfm-extra:
+libfm-extra:
Index: radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-install.sh
===================================================================
--- radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-install.sh (nonexistent)
+++ radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-install.sh (revision 109)
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: radix-1.9/X11/libs/libfm-extra/1.3.2/libfm-extra-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/X11/libs/libfm-extra/1.3.2
===================================================================
--- radix-1.9/X11/libs/libfm-extra/1.3.2 (nonexistent)
+++ radix-1.9/X11/libs/libfm-extra/1.3.2 (revision 109)
Property changes on: radix-1.9/X11/libs/libfm-extra/1.3.2
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/X11/libs/lxmenu-data/0.1.5/Makefile
===================================================================
--- radix-1.9/X11/libs/lxmenu-data/0.1.5/Makefile (nonexistent)
+++ radix-1.9/X11/libs/lxmenu-data/0.1.5/Makefile (revision 109)
@@ -0,0 +1,220 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/x/lxmenu-data
+
+REQUIRES = X11/libs/menu-cache/1.1.0
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 0.1.5
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/x/lxmenu-data/lxmenu-data-$(version).tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/lxmenu-data-$(version)
+src_dir_name = lxmenu-data-$(version)
+doc_dir_name = lxmenu-data-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = xlibs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+MENUD_PKG_NAME = lxmenu-data
+MENUD_PKG_VERSION = 0.1.5
+MENUD_PKG_ARCH = $(PKGARCH)
+MENUD_PKG_DISTRO_NAME = $(DISTRO_NAME)
+MENUD_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+MENUD_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+MENUD_PKG_SHORT_DESCRIPTION = desktop menus for LXDE
+MENUD_PKG_URL = $(BUG_URL)
+MENUD_PKG_LICENSE = LGPLv2.1
+MENUD_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(MENUD_PKG_NAME)-pkg-description
+MENUD_PKG_DESCRIPTION_FILE_IN = $(MENUD_PKG_NAME)-pkg-description.in
+MENUD_PKG_INSTALL_SCRIPT = $(MENUD_PKG_NAME)-pkg-install.sh
+
+MENUD_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(MENUD_PKG_NAME)-package
+
+pkg_basename = $(MENUD_PKG_NAME)-$(MENUD_PKG_VERSION)-$(MENUD_PKG_ARCH)-$(MENUD_PKG_DISTRO_NAME)-$(MENUD_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(MENUD_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --program-prefix=
+extra_configure_switches += --program-suffix=
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && \
+ $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(MENUD_PKG)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ @mv $(MENUD_PKG)/etc/xdg/menus/lxde-applications.menu{,.new}
+ # ======= Install Documentation =======
+ @if [ -d $(MENUD_PKG)/usr/share/man ]; then \
+ ( cd $(MENUD_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ # ======= Install Documentation =======
+ @mkdir -p $(MENUD_PKG)/usr/doc/$(doc_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING \
+ $(MENUD_PKG)/usr/doc/$(doc_dir_name)
+ @mkdir -p $(MENUD_PKG)/usr/share/doc/$(doc_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING README TODO \
+ $(MENUD_PKG)/usr/share/doc/$(doc_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog -a -s ChangeLog ]; then \
+ DOCSDIR=`echo $(MENUD_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS -a -s NEWS ]; then \
+ DOCSDIR=`echo $(MENUD_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(MENUD_PKG))
+ @touch $@
+
+$(MENUD_PKG_DESCRIPTION_FILE): $(MENUD_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(MENUD_PKG_DESCRIPTION_FILE) $(MENUD_PKG_INSTALL_SCRIPT)
+ @cp $(MENUD_PKG_DESCRIPTION_FILE) $(MENUD_PKG)/.DESCRIPTION
+ @cp $(MENUD_PKG_INSTALL_SCRIPT) $(MENUD_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(MENUD_PKG)/.REQUIRES
+ @echo "pkgname=$(MENUD_PKG_NAME)" > $(MENUD_PKG)/.PKGINFO ; \
+ echo "pkgver=$(MENUD_PKG_VERSION)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "arch=$(MENUD_PKG_ARCH)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "distroname=$(MENUD_PKG_DISTRO_NAME)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "distrover=$(MENUD_PKG_DISTRO_VERSION)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "group=$(MENUD_PKG_GROUP)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(MENUD_PKG_SHORT_DESCRIPTION)\"" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "url=$(MENUD_PKG_URL)" >> $(MENUD_PKG)/.PKGINFO ; \
+ echo "license=$(MENUD_PKG_LICENSE)" >> $(MENUD_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(MENUD_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: radix-1.9/X11/libs/lxmenu-data/0.1.5/PATCHES
===================================================================
Index: radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-description.in
===================================================================
--- radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-description.in (nonexistent)
+++ radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-description.in (revision 109)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+lxmenu-data: lxmenu-data @VERSION@ (desktop menus for LXDE)
+lxmenu-data:
+lxmenu-data: This package provides files required to build freedesktop.org
+lxmenu-data: menu spec-compliant desktop menus for LXDE.
+lxmenu-data: The files are originally taken from gnome-menus, and some minor
+lxmenu-data: modifications were made.
+lxmenu-data: lxmenu-data package is required by lxpanel and lxlauncher.
+lxmenu-data:
+lxmenu-data: homepage: https://www.lxde.org/
+lxmenu-data:
+lxmenu-data:
Index: radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-install.sh
===================================================================
--- radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-install.sh (nonexistent)
+++ radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-install.sh (revision 109)
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ install_file etc/xdg/menus/lxde-applications.menu.new
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: radix-1.9/X11/libs/lxmenu-data/0.1.5/lxmenu-data-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/X11/libs/lxmenu-data/0.1.5
===================================================================
--- radix-1.9/X11/libs/lxmenu-data/0.1.5 (nonexistent)
+++ radix-1.9/X11/libs/lxmenu-data/0.1.5 (revision 109)
Property changes on: radix-1.9/X11/libs/lxmenu-data/0.1.5
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/X11/libs/menu-cache/1.1.0/Makefile
===================================================================
--- radix-1.9/X11/libs/menu-cache/1.1.0/Makefile (nonexistent)
+++ radix-1.9/X11/libs/menu-cache/1.1.0/Makefile (revision 109)
@@ -0,0 +1,277 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/x/menu-cache
+
+REQUIRES = X11/libs/libfm-extra/1.3.2
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 1.1.0
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/x/menu-cache/menu-cache-$(version).tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/menu-cache-$(version)
+src_dir_name = menu-cache-$(version)
+doc_dir_name = menu-cache-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = xlibs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+MENUC_PKG_NAME = menu-cache
+MENUC_PKG_VERSION = 1.1.0
+MENUC_PKG_ARCH = $(PKGARCH)
+MENUC_PKG_DISTRO_NAME = $(DISTRO_NAME)
+MENUC_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+MENUC_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+MENUC_PKG_SHORT_DESCRIPTION = replacement of libgnome-menu
+MENUC_PKG_URL = $(BUG_URL)
+MENUC_PKG_LICENSE = LGPLv2.1
+MENUC_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(MENUC_PKG_NAME)-pkg-description
+MENUC_PKG_DESCRIPTION_FILE_IN = $(MENUC_PKG_NAME)-pkg-description.in
+MENUC_PKG_INSTALL_SCRIPT = $(MENUC_PKG_NAME)-pkg-install.sh
+
+MENUC_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(MENUC_PKG_NAME)-package
+
+pkg_basename = $(MENUC_PKG_NAME)-$(MENUC_PKG_VERSION)-$(MENUC_PKG_ARCH)-$(MENUC_PKG_DISTRO_NAME)-$(MENUC_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(MENUC_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --program-prefix=
+extra_configure_switches += --program-suffix=
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_BIN_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && \
+ $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @( cd $(build_dir)/libmenu-cache ; \
+ sed -i 's|^libmenu_cache_la_LDFLAGS =|libmenu_cache_la_LDFLAGS = -Wl,-rpath,$(TARGET_LIB_RPATH)|' Makefile ; \
+ )
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(MENUC_PKG)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Install Documentation =======
+ @if [ -d $(MENUC_PKG)/usr/share/man ]; then \
+ ( cd $(MENUC_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ # ======= Install Documentation =======
+ @mkdir -p $(MENUC_PKG)/usr/doc/$(doc_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING \
+ $(MENUC_PKG)/usr/doc/$(doc_dir_name)
+ @mkdir -p $(MENUC_PKG)/usr/share/doc/$(doc_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING INSTALL README \
+ $(MENUC_PKG)/usr/share/doc/$(doc_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog -a -s ChangeLog ]; then \
+ DOCSDIR=`echo $(MENUC_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS -a -s NEWS ]; then \
+ DOCSDIR=`echo $(MENUC_PKG)/usr/share/doc/$(doc_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= remove toolchain path from target libtool *.la files =======
+ @( cd $(MENUC_PKG)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libmenu-cache.la ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(MENUC_PKG))
+ # ======= tune libtool *.la search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libmenu-cache.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libmenu-cache.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libmenu-cache.pc ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(MENUC_PKG); \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(MENUC_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(MENUC_PKG) ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(MENUC_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(MENUC_PKG_DESCRIPTION_FILE): $(MENUC_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(MENUC_PKG_DESCRIPTION_FILE) $(MENUC_PKG_INSTALL_SCRIPT)
+ @cp $(MENUC_PKG_DESCRIPTION_FILE) $(MENUC_PKG)/.DESCRIPTION
+ @cp $(MENUC_PKG_INSTALL_SCRIPT) $(MENUC_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(MENUC_PKG)/.REQUIRES
+ @echo "pkgname=$(MENUC_PKG_NAME)" > $(MENUC_PKG)/.PKGINFO ; \
+ echo "pkgver=$(MENUC_PKG_VERSION)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "arch=$(MENUC_PKG_ARCH)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "distroname=$(MENUC_PKG_DISTRO_NAME)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "distrover=$(MENUC_PKG_DISTRO_VERSION)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "group=$(MENUC_PKG_GROUP)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(MENUC_PKG_SHORT_DESCRIPTION)\"" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "url=$(MENUC_PKG_URL)" >> $(MENUC_PKG)/.PKGINFO ; \
+ echo "license=$(MENUC_PKG_LICENSE)" >> $(MENUC_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(MENUC_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: radix-1.9/X11/libs/menu-cache/1.1.0/PATCHES
===================================================================
--- radix-1.9/X11/libs/menu-cache/1.1.0/PATCHES (nonexistent)
+++ radix-1.9/X11/libs/menu-cache/1.1.0/PATCHES (revision 109)
@@ -0,0 +1,3 @@
+
+../../../../sources/packages/x/menu-cache/patches/menu-cache-1.1.0-gcc10.patch -p0
+../../../../sources/packages/x/menu-cache/patches/menu-cache-1.1.0-memory-leaks.patch -p0
Index: radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-description.in
===================================================================
--- radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-description.in (nonexistent)
+++ radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-description.in (revision 109)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+menu-cache: menu-cache @VERSION@ (replacement of libgnome-menu)
+menu-cache:
+menu-cache: Libmenu-cache is a library creating and utilizing caches to speed
+menu-cache: up the manipulation for freedesktop.org defined application menus.
+menu-cache: It can be used as a replacement of libgnome-menu of gnome-menus.
+menu-cache:
+menu-cache:
+menu-cache: Homepage: https://lxde.org
+menu-cache:
+menu-cache:
+menu-cache:
Index: radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-install.sh
===================================================================
--- radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-install.sh (nonexistent)
+++ radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-install.sh (revision 109)
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: radix-1.9/X11/libs/menu-cache/1.1.0/menu-cache-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/X11/libs/menu-cache/1.1.0
===================================================================
--- radix-1.9/X11/libs/menu-cache/1.1.0 (nonexistent)
+++ radix-1.9/X11/libs/menu-cache/1.1.0 (revision 109)
Property changes on: radix-1.9/X11/libs/menu-cache/1.1.0
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/base/radix-system/etc/skel/.config/openbox/menu.xml
===================================================================
--- radix-1.9/base/radix-system/etc/skel/.config/openbox/menu.xml (revision 108)
+++ radix-1.9/base/radix-system/etc/skel/.config/openbox/menu.xml (revision 109)
@@ -289,8 +289,8 @@
-->
</menu>
+<menu id="apps-fileman-menu" label="File Managers">
<!--
-<menu id="apps-fileman-menu" label="File Managers">
<item label="Nautilus">
<action name="Execute">
<command>nautilus --no-desktop --browser</command>
@@ -324,6 +324,7 @@
</startupnotify>
</action>
</item>
+ -->
<item label="PCMan File Manager">
<action name="Execute">
<command>pcmanfm</command>
@@ -333,7 +334,6 @@
</action>
</item>
</menu>
- -->
<!--
<menu id="apps-graphics-menu" label="Graphics">
Index: radix-1.9/products/X11/Makefile
===================================================================
--- radix-1.9/products/X11/Makefile (revision 108)
+++ radix-1.9/products/X11/Makefile (revision 109)
@@ -824,6 +824,7 @@
REQUIRES += X11/app/epiphany/44.3
REQUIRES += X11/app/gnome-text-editor/44.0
REQUIRES += X11/app/gnome-calculator/44.0
+REQUIRES += X11/app/pcmanfm/1.3.2
# ======= __END_OF_REQUIRES__ =======
Index: radix-1.9/sources/packages/x/lxmenu-data/Makefile
===================================================================
--- radix-1.9/sources/packages/x/lxmenu-data/Makefile (nonexistent)
+++ radix-1.9/sources/packages/x/lxmenu-data/Makefile (revision 109)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/x/lxmenu-data
+
+versions = 0.1.5
+pkgname = lxmenu-data
+suffix = tar.xz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s)
Index: radix-1.9/sources/packages/x/lxmenu-data
===================================================================
--- radix-1.9/sources/packages/x/lxmenu-data (nonexistent)
+++ radix-1.9/sources/packages/x/lxmenu-data (revision 109)
Property changes on: radix-1.9/sources/packages/x/lxmenu-data
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/sources/packages/x/menu-cache/Makefile
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/Makefile (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/Makefile (revision 109)
@@ -0,0 +1,58 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/x/menu-cache
+
+versions = 1.1.0
+pkgname = menu-cache
+suffix = tar.xz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+patches = $(CURDIR)/patches/menu-cache-1.1.0-gcc10.patch
+patches += $(CURDIR)/patches/menu-cache-1.1.0-memory-leaks.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+$(patches): $(sha1s)
+ @echo -e "\n======= Create Patches =======\n" ; \
+ ( cd create-1.1.0-gcc10-patch ; ./create.patch.sh ) ; \
+ ( cd create-1.1.0-memory-leaks-patch ; ./create.patch.sh ) ; \
+ echo -e "\n"
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s) $(patches)
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/create.patch.sh
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/create.patch.sh (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/create.patch.sh (revision 109)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.1.0
+
+tar --files-from=file.list -xJvf ../menu-cache-$VERSION.tar.xz
+mv menu-cache-$VERSION menu-cache-$VERSION-orig
+
+cp -rf ./menu-cache-$VERSION-new ./menu-cache-$VERSION
+
+diff --unified -Nr menu-cache-$VERSION-orig menu-cache-$VERSION > menu-cache-$VERSION-gcc10.patch
+
+mv menu-cache-$VERSION-gcc10.patch ../patches
+
+rm -rf ./menu-cache-$VERSION
+rm -rf ./menu-cache-$VERSION-orig
Property changes on: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/file.list
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/file.list (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/file.list (revision 109)
@@ -0,0 +1 @@
+menu-cache-1.1.0/menu-cache-gen/menu-tags.h
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h (revision 109)
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2014 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
+ *
+ * This file is a part of libmenu-cache package and created program
+ * should be not used without the library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <libfm/fm-extra.h>
+#include <menu-cache.h>
+
+extern FmXmlFileTag menuTag_AppDir;
+extern FmXmlFileTag menuTag_DirectoryDir;
+extern FmXmlFileTag menuTag_Include;
+extern FmXmlFileTag menuTag_Exclude;
+extern FmXmlFileTag menuTag_Filename;
+extern FmXmlFileTag menuTag_Or;
+extern FmXmlFileTag menuTag_And;
+extern FmXmlFileTag menuTag_Not;
+extern FmXmlFileTag menuTag_Category;
+extern FmXmlFileTag menuTag_All;
+extern FmXmlFileTag menuTag_LegacyDir;
+
+typedef enum {
+ MERGE_NONE, /* starting value */
+ MERGE_FILES, /* first set */
+ MERGE_MENUS,
+ MERGE_ALL, /* only set */
+ MERGE_FILES_MENUS, /* second set */
+ MERGE_MENUS_FILES
+} MenuMergeType;
+
+typedef struct {
+ MenuCacheType type : 2; /* used by MenuMenu, MENU_CACHE_TYPE_DIR */
+ gboolean only_unallocated : 1; /* for Menuname: TRUE if show_empty is set */
+ gboolean is_set : 1; /* used by MenuMenu, for Menuname: TRUE if allow_inline is set */
+ gboolean show_empty : 1;
+ gboolean allow_inline : 1;
+ gboolean inline_header : 1;
+ gboolean inline_alias : 1;
+ gboolean inline_header_is_set : 1; /* for Menuname */
+ gboolean inline_alias_is_set : 1; /* for Menuname */
+ gboolean inline_limit_is_set : 1; /* for Menuname; for MenuMenu is Legacy mark */
+ gboolean nodisplay : 1;
+ GList *items; /* items are MenuItem : Menuname or Filename or Separator or Merge */
+ int inline_limit;
+} MenuLayout;
+
+/* Menuname item */
+typedef struct {
+ MenuLayout layout;
+ char *name;
+} MenuMenuname;
+
+/* Filename item in layout */
+typedef struct {
+ MenuCacheType type : 2; /* MENU_CACHE_TYPE_APP */
+ char *id;
+} MenuFilename;
+
+/* Separator item */
+typedef struct {
+ MenuCacheType type : 2; /* MENU_CACHE_TYPE_SEP */
+} MenuSep;
+
+/* Merge item */
+typedef struct {
+ MenuCacheType type : 2; /* MENU_CACHE_TYPE_NONE */
+ MenuMergeType merge_type;
+} MenuMerge;
+
+/* Menu item */
+typedef struct {
+ MenuLayout layout; /* copied from hash on </Menu> */
+ char *name;
+ /* next fields are only for Menu */
+ char *key; /* for sorting */
+ GList *id; /* <Directory> for <Menu>, may be NULL, first is most relevant */
+ /* next fields are only for composer */
+ GList *children; /* items are MenuItem : MenuApp, MenuMenu, MenuSep, MenuRule */
+ char *title;
+ char *comment;
+ char *icon;
+ const char *dir;
+} MenuMenu;
+
+/* File item in menu */
+typedef struct {
+ MenuCacheType type : 2; /* MENU_CACHE_TYPE_APP */
+ gboolean excluded : 1;
+ gboolean allocated : 1;
+ gboolean matched : 1;
+ gboolean use_terminal : 1;
+ gboolean use_notification : 1;
+ gboolean hidden : 1;
+ GList *dirs; /* can be reordered until allocated */
+ GList *menus;
+ char *filename; /* if NULL then is equal to id */
+ char *key; /* for sorting */
+ char *id;
+ char *title;
+ char *comment;
+ char *icon;
+ char *generic_name;
+ char *exec;
+ char *try_exec;
+ char *wd;
+ const char **categories; /* all char ** keep interned values */
+ const char **keywords;
+ const char **show_in;
+ const char **hide_in;
+} MenuApp;
+
+/* a placeholder for matching */
+typedef struct {
+ MenuCacheType type : 2; /* MENU_CACHE_TYPE_NONE */
+ FmXmlFileItem *rule;
+} MenuRule;
+
+/* requested language(s) */
+extern char **languages;
+
+/* list of menu files to monitor */
+extern GSList *MenuFiles;
+
+/* list of menu dirs to monitor */
+extern GSList *MenuDirs;
+
+/* list of available app dirs */
+extern GSList *AppDirs;
+
+/* list of available dir dirs */
+extern GSList *DirDirs;
+
+/* parse and merge menu files */
+MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
+
+/* parse all files into layout and save cache file */
+gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *file,
+ gboolean with_hidden);
+
+/* free MenuLayout data */
+void _free_layout_items(GList *data);
+
+/* verbosity level */
+extern gint verbose;
+
+#define DBG if (verbose) g_debug
+#define VDBG if (verbose > 1) g_debug
+#define VVDBG if (verbose > 2) g_debug
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh (revision 109)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.1.0
+
+tar --files-from=file.list -xJvf ../menu-cache-$VERSION.tar.xz
+mv menu-cache-$VERSION menu-cache-$VERSION-orig
+
+cp -rf ./menu-cache-$VERSION-new ./menu-cache-$VERSION
+
+diff --unified -Nr menu-cache-$VERSION-orig menu-cache-$VERSION > menu-cache-$VERSION-memory-leaks.patch
+
+mv menu-cache-$VERSION-memory-leaks.patch ../patches
+
+rm -rf ./menu-cache-$VERSION
+rm -rf ./menu-cache-$VERSION-orig
Property changes on: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/file.list
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/file.list (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/file.list (revision 109)
@@ -0,0 +1 @@
+menu-cache-1.1.0/libmenu-cache/menu-cache.c
Index: radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c (revision 109)
@@ -0,0 +1,2261 @@
+/*
+ * menu-cache.c
+ *
+ * Copyright 2008 PCMan <pcman.tw@gmail.com>
+ * Copyright 2009 Jürgen Hötzel <juergen@archlinux.org>
+ * Copyright 2012-2017 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "version.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/fcntl.h>
+#include <errno.h>
+#include <sys/wait.h>
+
+#include <gio/gio.h>
+
+#include "menu-cache.h"
+
+#ifdef G_ENABLE_DEBUG
+#define DEBUG(...) g_debug(__VA_ARGS__)
+#else
+#define DEBUG(...)
+#endif
+
+#if GLIB_CHECK_VERSION(2, 32, 0)
+static GRecMutex _cache_lock;
+# define MENU_CACHE_LOCK g_rec_mutex_lock(&_cache_lock)
+# define MENU_CACHE_UNLOCK g_rec_mutex_unlock(&_cache_lock)
+/* for sync lookup */
+static GMutex sync_run_mutex;
+static GCond sync_run_cond;
+#define SET_CACHE_READY(_cache_) do { \
+ g_mutex_lock(&sync_run_mutex); \
+ _cache_->ready = TRUE; \
+ g_cond_broadcast(&sync_run_cond); \
+ g_mutex_unlock(&sync_run_mutex); } while(0)
+#else
+/* before 2.32 GLib had another entity for statically allocated mutexes */
+static GStaticRecMutex _cache_lock = G_STATIC_REC_MUTEX_INIT;
+# define MENU_CACHE_LOCK g_static_rec_mutex_lock(&_cache_lock)
+# define MENU_CACHE_UNLOCK g_static_rec_mutex_unlock(&_cache_lock)
+/* for sync lookup */
+static GMutex *sync_run_mutex = NULL;
+static GCond *sync_run_cond = NULL;
+#define SET_CACHE_READY(_cache_) do { \
+ g_mutex_lock(sync_run_mutex); \
+ _cache_->ready = TRUE; \
+ if(sync_run_cond) g_cond_broadcast(sync_run_cond); \
+ g_mutex_unlock(sync_run_mutex); } while(0)
+#endif
+
+typedef struct
+{
+ char *dir;
+ gint n_ref;
+} MenuCacheFileDir;
+
+struct _MenuCacheItem
+{
+ guint n_ref;
+ MenuCacheType type;
+ char* id;
+ char* name;
+ char* comment;
+ char* icon;
+ MenuCacheFileDir* file_dir;
+ char* file_name;
+ MenuCacheDir* parent;
+};
+
+struct _MenuCacheDir
+{
+ MenuCacheItem item;
+ GSList* children;
+ guint32 flags;
+};
+
+struct _MenuCacheApp
+{
+ MenuCacheItem item;
+ char* generic_name;
+ char* exec;
+ char* working_dir;
+ guint32 show_in_flags;
+ guint32 flags;
+ char* try_exec;
+ const char **categories;
+ char* keywords;
+};
+
+struct _MenuCache
+{
+ guint n_ref;
+ MenuCacheDir* root_dir;
+ char* menu_name;
+ char* reg; /* includes md5 sum */
+ char* md5; /* link inside of reg */
+ char* cache_file;
+ char** known_des;
+ GSList* notifiers;
+ GThread* thr;
+ GCancellable* cancellable;
+ guint version;
+ guint reload_id;
+ gboolean ready : 1; /* used for sync access */
+};
+
+static int server_fd = -1;
+G_LOCK_DEFINE(connect); /* for server_fd */
+
+static GHashTable* hash = NULL;
+
+/* Don't call this API directly. Use menu_cache_lookup instead. */
+static MenuCache* menu_cache_new( const char* cache_file );
+
+static gboolean connect_server(GCancellable* cancellable);
+static gboolean register_menu_to_server(MenuCache* cache);
+static void unregister_menu_from_server( MenuCache* cache );
+
+/* keep them for backward compatibility */
+#ifdef G_DISABLE_DEPRECATED
+MenuCacheDir* menu_cache_get_root_dir( MenuCache* cache );
+MenuCacheDir* menu_cache_item_get_parent( MenuCacheItem* item );
+MenuCacheDir* menu_cache_get_dir_from_path( MenuCache* cache, const char* path );
+GSList* menu_cache_dir_get_children( MenuCacheDir* dir );
+#endif
+
+void menu_cache_init(int flags)
+{
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+ g_type_init();
+#endif
+}
+
+static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache,
+ MenuCacheFileDir** all_used_files, int n_all_used_files);
+
+/* functions read_dir(), read_app(), and read_item() should be called for
+ items that aren't accessible yet, therefore no lock is required */
+static void read_dir(GDataInputStream* f, MenuCacheDir* dir, MenuCache* cache,
+ MenuCacheFileDir** all_used_files, int n_all_used_files)
+{
+ MenuCacheItem* item;
+ char *line;
+ gsize len;
+
+ /* nodisplay flag */
+ if (cache->version >= 2)
+ {
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if (G_UNLIKELY(line == NULL))
+ return;
+ dir->flags = (guint32)atoi(line);
+ g_free(line);
+ }
+
+ /* load child items in the dir */
+ while( (item = read_item( f, cache, all_used_files, n_all_used_files )) )
+ {
+ /* menu_cache_ref shouldn't be called here for dir.
+ * Otherwise, circular reference will happen. */
+ item->parent = dir;
+ dir->children = g_slist_prepend( dir->children, item );
+ }
+
+ dir->children = g_slist_reverse( dir->children );
+
+ /* set flag by children if working with old cache generator */
+ if (cache->version == 1)
+ {
+ if (dir->children == NULL)
+ dir->flags = FLAG_IS_NODISPLAY;
+ else if ((line = menu_cache_item_get_file_path(MENU_CACHE_ITEM(dir))) != NULL)
+ {
+ GKeyFile *kf = g_key_file_new();
+ if (g_key_file_load_from_file(kf, line, G_KEY_FILE_NONE, NULL) &&
+ g_key_file_get_boolean(kf, G_KEY_FILE_DESKTOP_GROUP,
+ G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL))
+ dir->flags = FLAG_IS_NODISPLAY;
+ g_key_file_free(kf);
+ g_free(line);
+ }
+ }
+}
+
+static char *_unescape_lf(char *str)
+{
+ char *c, *p = str;
+ gsize len = 0;
+
+ while ((c = strchr(p, '\\')) != NULL)
+ {
+ if (p != &str[len])
+ memmove(&str[len], p, c - p);
+ len += (c - p);
+ if (c[1] == 'n')
+ {
+ str[len++] = '\n';
+ c++;
+ }
+ else if (c != &str[len])
+ str[len++] = *c;
+ p = &c[1];
+ }
+ if (p != &str[len])
+ memmove(&str[len], p, strlen(p) + 1);
+ return str;
+}
+
+static void read_app(GDataInputStream* f, MenuCacheApp* app, MenuCache* cache)
+{
+ char *line;
+ gsize len;
+ GString *str;
+
+ /* generic name */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return;
+ if(G_LIKELY(len > 0))
+ app->generic_name = _unescape_lf(line);
+ else
+ g_free(line);
+
+ /* exec */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return;
+ if(G_LIKELY(len > 0))
+ app->exec = _unescape_lf(line);
+ else
+ g_free(line);
+
+ /* terminal / startup notify */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return;
+ app->flags = (guint32)atoi(line);
+ g_free(line);
+
+ /* ShowIn flags */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return;
+ app->show_in_flags = (guint32)atol(line);
+ g_free(line);
+
+ if (cache->version < 2)
+ return;
+
+ /* TryExec */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if (G_UNLIKELY(line == NULL))
+ return;
+ if (G_LIKELY(len > 0))
+ app->try_exec = g_strchomp(line);
+ else
+ g_free(line);
+
+ /* Path */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if (G_UNLIKELY(line == NULL))
+ return;
+ if (G_LIKELY(len > 0))
+ app->working_dir = line;
+ else
+ g_free(line);
+
+ /* Categories */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if (G_UNLIKELY(line == NULL))
+ return;
+ if (G_LIKELY(len > 0))
+ {
+ const char **x;
+
+ /* split and intern all the strings so categories can be processed
+ later for search doing g_quark_try_string()+g_quark_to_string() */
+ app->categories = x = (const char **)g_strsplit(line, ";", 0);
+ while (*x != NULL)
+ {
+ char *cat = (char *)*x;
+ *x = g_intern_string(cat);
+ g_free(cat);
+ x++;
+ }
+ }
+ g_free(line);
+
+ /* Keywords */
+ str = g_string_new(MENU_CACHE_ITEM(app)->name);
+ if (G_LIKELY(app->exec != NULL))
+ {
+ char *sp = strchr(app->exec, ' ');
+ char *bn = strrchr(app->exec, G_DIR_SEPARATOR);
+
+ g_string_append_c(str, ',');
+ if (bn == NULL && sp == NULL)
+ g_string_append(str, app->exec);
+ else if (bn == NULL || (sp != NULL && sp < bn))
+ g_string_append_len(str, app->exec, sp - app->exec);
+ else if (sp == NULL)
+ g_string_append(str, &bn[1]);
+ else
+ g_string_append_len(str, &bn[1], sp - &bn[1]);
+ }
+ if (app->generic_name != NULL)
+ {
+ g_string_append_c(str, ',');
+ g_string_append(str, app->generic_name);
+ }
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if (G_UNLIKELY(line == NULL))
+ return;
+ if (len > 0)
+ {
+ g_string_append_c(str, ',');
+ g_string_append(str, line);
+ }
+ app->keywords = g_utf8_casefold(str->str, str->len);
+ g_string_free(str, TRUE);
+ g_free(line);
+}
+
+static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache,
+ MenuCacheFileDir** all_used_files, int n_all_used_files)
+{
+ MenuCacheItem* item;
+ char *line;
+ gsize len;
+ gint idx;
+
+ /* desktop/menu id */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return NULL;
+
+ if( G_LIKELY(len >= 1) )
+ {
+ if( line[0] == '+' ) /* menu dir */
+ {
+ item = (MenuCacheItem*)g_slice_new0( MenuCacheDir );
+ item->n_ref = 1;
+ item->type = MENU_CACHE_TYPE_DIR;
+ }
+ else if( line[0] == '-' ) /* menu item */
+ {
+ item = (MenuCacheItem*)g_slice_new0( MenuCacheApp );
+ item->n_ref = 1;
+ if( G_LIKELY( len > 1 ) ) /* application item */
+ item->type = MENU_CACHE_TYPE_APP;
+ else /* separator */
+ {
+ item->type = MENU_CACHE_TYPE_SEP;
+ g_free(line);
+ return item;
+ }
+ }
+ else
+ {
+ g_free(line);
+ return NULL;
+ }
+
+ item->id = g_strndup( line + 1, len - 1 );
+ g_free(line);
+ }
+ else
+ {
+ g_free(line);
+ return NULL;
+ }
+
+ /* name */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ goto _fail;
+ if(G_LIKELY(len > 0))
+ item->name = _unescape_lf(line);
+ else
+ g_free(line);
+
+ /* comment */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ goto _fail;
+ if(G_LIKELY(len > 0))
+ item->comment = _unescape_lf(line);
+ else
+ g_free(line);
+
+ /* icon */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ goto _fail;
+ if(G_LIKELY(len > 0))
+ item->icon = line;
+ else
+ g_free(line);
+
+ /* file dir/basename */
+
+ /* file name */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ goto _fail;
+ if(G_LIKELY(len > 0))
+ item->file_name = line;
+ else if( item->type == MENU_CACHE_TYPE_APP )
+ {
+ /* When file name is the same as desktop_id, which is
+ * quite common in desktop files, we use this trick to
+ * save memory usage. */
+ item->file_name = item->id;
+ g_free(line);
+ }
+ else
+ g_free(line);
+
+ /* desktop file dir */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ {
+_fail:
+ g_free(item->id);
+ g_free(item->name);
+ g_free(item->comment);
+ g_free(item->icon);
+ if(item->file_name && item->file_name != item->id)
+ g_free(item->file_name);
+ if(item->type == MENU_CACHE_TYPE_DIR)
+ g_slice_free(MenuCacheDir, MENU_CACHE_DIR(item));
+ else
+ g_slice_free(MenuCacheApp, MENU_CACHE_APP(item));
+ return NULL;
+ }
+ idx = atoi( line );
+ g_free(line);
+ if( G_LIKELY( idx >=0 && idx < n_all_used_files ) )
+ {
+ item->file_dir = all_used_files[ idx ];
+ g_atomic_int_inc(&item->file_dir->n_ref);
+ }
+
+ if( item->type == MENU_CACHE_TYPE_DIR )
+ read_dir( f, MENU_CACHE_DIR(item), cache, all_used_files, n_all_used_files );
+ else if( item->type == MENU_CACHE_TYPE_APP )
+ read_app( f, MENU_CACHE_APP(item), cache );
+
+ return item;
+}
+
+static void menu_cache_file_dir_unref(MenuCacheFileDir *file_dir)
+{
+ if (file_dir && g_atomic_int_dec_and_test(&file_dir->n_ref))
+ {
+ g_free(file_dir->dir);
+ g_free(file_dir);
+ }
+}
+
+static gint read_all_used_files(GDataInputStream* f, MenuCache* cache,
+ MenuCacheFileDir*** all_used_files)
+{
+ char *line;
+ gsize len;
+ int i, n;
+ MenuCacheFileDir** dirs;
+
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return -1;
+
+ n = atoi( line );
+ g_free(line);
+ if (G_UNLIKELY(n <= 0))
+ return n;
+
+ dirs = g_new0( MenuCacheFileDir *, n );
+
+ for( i = 0; i < n; ++i )
+ {
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ {
+ while (i-- > 0)
+ menu_cache_file_dir_unref(dirs[i]);
+ g_free(dirs);
+ return -1;
+ }
+ dirs[i] = g_new(MenuCacheFileDir, 1);
+ dirs[i]->n_ref = 1;
+ dirs[i]->dir = line; /* don't include \n */
+ }
+ *all_used_files = dirs;
+ return n;
+}
+
+static gboolean read_all_known_des(GDataInputStream* f, MenuCache* cache)
+{
+ char *line;
+ gsize len;
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ return FALSE;
+ cache->known_des = g_strsplit_set( line, ";\n", 0 );
+ g_free(line);
+ return TRUE;
+}
+
+static MenuCache* menu_cache_new( const char* cache_file )
+{
+ MenuCache* cache;
+ cache = g_slice_new0( MenuCache );
+ cache->cache_file = g_strdup( cache_file );
+ cache->n_ref = 1;
+ return cache;
+}
+
+/**
+ * menu_cache_ref
+ * @cache: a menu cache descriptor
+ *
+ * Increases reference counter on @cache.
+ *
+ * Returns: @cache.
+ *
+ * Since: 0.1.0
+ */
+MenuCache* menu_cache_ref(MenuCache* cache)
+{
+ g_atomic_int_inc( &cache->n_ref );
+ return cache;
+}
+
+/**
+ * menu_cache_unref
+ * @cache: a menu cache descriptor
+ *
+ * Descreases reference counter on @cache. When reference count becomes 0
+ * then resources associated with @cache will be freed.
+ *
+ * Since: 0.1.0
+ */
+void menu_cache_unref(MenuCache* cache)
+{
+ /* DEBUG("cache_unref: %d", cache->n_ref); */
+ /* we need a lock here unfortunately because item in hash isn't protected
+ by reference therefore another thread may get access to it right now */
+ MENU_CACHE_LOCK;
+ if( g_atomic_int_dec_and_test(&cache->n_ref) )
+ {
+ /* g_assert(cache->reload_id != 0); */
+ unregister_menu_from_server( cache );
+ /* DEBUG("unregister to server"); */
+ g_hash_table_remove( hash, cache->menu_name );
+ if( g_hash_table_size(hash) == 0 )
+ {
+ /* DEBUG("destroy hash"); */
+ g_hash_table_destroy(hash);
+
+ /* DEBUG("disconnect from server"); */
+ G_LOCK(connect);
+ shutdown(server_fd, SHUT_RDWR); /* the IO thread will terminate itself */
+ server_fd = -1;
+ G_UNLOCK(connect);
+ hash = NULL;
+ }
+ MENU_CACHE_UNLOCK;
+
+ if(G_LIKELY(cache->thr))
+ {
+ g_cancellable_cancel(cache->cancellable);
+ g_thread_join(cache->thr);
+ }
+ g_object_unref(cache->cancellable);
+ if( G_LIKELY(cache->root_dir) )
+ {
+ /* DEBUG("unref root dir"); */
+ menu_cache_item_unref( MENU_CACHE_ITEM(cache->root_dir) );
+ /* DEBUG("unref root dir finished"); */
+ }
+ g_free( cache->cache_file );
+ g_free( cache->menu_name );
+ g_free(cache->reg);
+ /* g_free( cache->menu_file_path ); */
+ g_strfreev(cache->known_des);
+ g_slist_free(cache->notifiers);
+ g_slice_free( MenuCache, cache );
+ }
+ else
+ MENU_CACHE_UNLOCK;
+}
+
+/**
+ * menu_cache_get_root_dir
+ * @cache: a menu cache instance
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_dup_root_dir() instead.
+ */
+MenuCacheDir* menu_cache_get_root_dir( MenuCache* cache )
+{
+ MenuCacheDir* dir = menu_cache_dup_root_dir(cache);
+ /* NOTE: this is very ugly hack but cache->root_dir may be changed by
+ cache reload in server-io thread, so we should keep it alive :( */
+ if(dir)
+ g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref, dir);
+ return dir;
+}
+
+/**
+ * menu_cache_dup_root_dir
+ * @cache: a menu cache instance
+ *
+ * Retrieves root directory for @cache. Returned data should be freed
+ * with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): root item or %NULL in case of error.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheDir* menu_cache_dup_root_dir( MenuCache* cache )
+{
+ MenuCacheDir* dir;
+ MENU_CACHE_LOCK;
+ dir = cache->root_dir;
+ if(G_LIKELY(dir))
+ menu_cache_item_ref(MENU_CACHE_ITEM(dir));
+ MENU_CACHE_UNLOCK;
+ return dir;
+}
+
+/**
+ * menu_cache_item_ref
+ * @item: a menu cache item
+ *
+ * Increases reference counter on @item.
+ *
+ * Returns: @item.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheItem* menu_cache_item_ref(MenuCacheItem* item)
+{
+ g_atomic_int_inc( &item->n_ref );
+ /* DEBUG("item_ref %s: %d -> %d", item->id, item->n_ref-1, item->n_ref); */
+ return item;
+}
+
+static gboolean menu_cache_reload_idle(gpointer cache)
+{
+ /* do reload once */
+ if (!g_source_is_destroyed(g_main_current_source()))
+ menu_cache_reload(cache);
+ return FALSE;
+}
+
+typedef struct _CacheReloadNotifier
+{
+ MenuCacheReloadNotify func;
+ gpointer user_data;
+}CacheReloadNotifier;
+
+struct _MenuCacheNotifyId
+{
+ GSList l;
+};
+
+/**
+ * menu_cache_add_reload_notify
+ * @cache: a menu cache instance
+ * @func: callback to call when menu cache is reloaded
+ * @user_data: user data provided for @func
+ *
+ * Adds a @func to list of callbacks that are called each time menu cache
+ * is loaded.
+ *
+ * Returns: an ID of added callback.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheNotifyId menu_cache_add_reload_notify(MenuCache* cache, MenuCacheReloadNotify func, gpointer user_data)
+{
+ GSList* l = g_slist_alloc();
+ CacheReloadNotifier* n = g_slice_new(CacheReloadNotifier);
+ gboolean is_first;
+ n->func = func;
+ n->user_data = user_data;
+ l->data = n;
+ MENU_CACHE_LOCK;
+ is_first = (cache->root_dir == NULL && cache->notifiers == NULL);
+ cache->notifiers = g_slist_concat( cache->notifiers, l );
+ /* reload existing file first so it will be ready right away */
+ if(is_first && cache->reload_id == 0)
+ cache->reload_id = g_idle_add_full(G_PRIORITY_HIGH_IDLE,
+ menu_cache_reload_idle,
+ menu_cache_ref(cache),
+ (GDestroyNotify)menu_cache_unref);
+ MENU_CACHE_UNLOCK;
+ return (MenuCacheNotifyId)l;
+}
+
+/**
+ * menu_cache_remove_reload_notify
+ * @cache: a menu cache instance
+ * @notify_id: an ID of callback
+ *
+ * Removes @notify_id from list of callbacks added for @cache by previous
+ * call to menu_cache_add_reload_notify().
+ *
+ * Since: 0.1.0
+ */
+void menu_cache_remove_reload_notify(MenuCache* cache, MenuCacheNotifyId notify_id)
+{
+ MENU_CACHE_LOCK;
+ g_slice_free( CacheReloadNotifier, ((GSList*)notify_id)->data );
+ cache->notifiers = g_slist_delete_link( cache->notifiers, (GSList*)notify_id );
+ MENU_CACHE_UNLOCK;
+}
+
+static gboolean reload_notify(gpointer data)
+{
+ MenuCache* cache = (MenuCache*)data;
+ GSList* l;
+ MENU_CACHE_LOCK;
+ /* we have it referenced and there is no source removal so no check */
+ for( l = cache->notifiers; l; l = l->next )
+ {
+ CacheReloadNotifier* n = (CacheReloadNotifier*)l->data;
+ if(n->func)
+ n->func( cache, n->user_data );
+ }
+ MENU_CACHE_UNLOCK;
+ return FALSE;
+}
+
+/**
+ * menu_cache_reload
+ * @cache: a menu cache instance
+ *
+ * Reloads menu cache from file generated by menu-cached.
+ *
+ * Returns: %TRUE if reload was successful.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_reload( MenuCache* cache )
+{
+ char* line;
+ gsize len;
+ GFile* file;
+ GFileInputStream* istr = NULL;
+ GDataInputStream* f;
+ MenuCacheFileDir** all_used_files;
+ int i, n;
+ int ver_maj, ver_min;
+
+ MENU_CACHE_LOCK;
+ if (cache->reload_id)
+ g_source_remove(cache->reload_id);
+ cache->reload_id = 0;
+ MENU_CACHE_UNLOCK;
+ file = g_file_new_for_path(cache->cache_file);
+ if(!file)
+ return FALSE;
+ istr = g_file_read(file, cache->cancellable, NULL);
+ g_object_unref(file);
+ if(!istr)
+ return FALSE;
+ f = g_data_input_stream_new(G_INPUT_STREAM(istr));
+ g_object_unref(istr);
+ if( ! f )
+ return FALSE;
+
+ /* the first line is version number */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_LIKELY(line))
+ {
+ len = sscanf(line, "%d.%d", &ver_maj, &ver_min);
+ g_free(line);
+ if(len < 2)
+ goto _fail;
+ if( ver_maj != VER_MAJOR ||
+ ver_min > VER_MINOR || ver_min < VER_MINOR_SUPPORTED )
+ goto _fail;
+ }
+ else
+ goto _fail;
+
+ g_debug("menu cache: got file version 1.%d", ver_min);
+ /* the second line is menu name */
+ line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+ if(G_UNLIKELY(line == NULL))
+ goto _fail;
+ g_free(line);
+
+ /* FIXME: this may lock other threads for some time */
+ MENU_CACHE_LOCK;
+ if(cache->notifiers == NULL)
+ {
+ /* nobody aware of reloads, stupid clients may think root is forever */
+ MENU_CACHE_UNLOCK;
+ goto _fail;
+ }
+
+ /* get all used files */
+ n = read_all_used_files( f, cache, &all_used_files );
+ if (n <= 0)
+ {
+ MENU_CACHE_UNLOCK;
+ goto _fail;
+ }
+
+ /* read known DEs */
+ g_strfreev( cache->known_des );
+ if( ! read_all_known_des( f, cache ) )
+ {
+ cache->known_des = NULL;
+ MENU_CACHE_UNLOCK;
+ for (i = 0; i < n; i++)
+ menu_cache_file_dir_unref(all_used_files[i]);
+ g_free(all_used_files);
+_fail:
+ g_object_unref(f);
+ return FALSE;
+ }
+ cache->version = ver_min;
+
+ if(cache->root_dir)
+ menu_cache_item_unref( MENU_CACHE_ITEM(cache->root_dir) );
+
+ cache->root_dir = (MenuCacheDir*)read_item( f, cache, all_used_files, n );
+ g_object_unref(f);
+
+ g_idle_add_full(G_PRIORITY_HIGH_IDLE, reload_notify, menu_cache_ref(cache),
+ (GDestroyNotify)menu_cache_unref);
+ MENU_CACHE_UNLOCK;
+
+ for (i = 0; i < n; i++)
+ menu_cache_file_dir_unref(all_used_files[i]);
+ g_free(all_used_files);
+
+ return TRUE;
+}
+
+/**
+ * menu_cache_item_unref
+ * @item: a menu cache item
+ *
+ * Decreases reference counter on @item. When reference count becomes 0
+ * then resources associated with @item will be freed.
+ *
+ * Returns: %FALSE (since 0.5.0)
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_item_unref(MenuCacheItem* item)
+{
+ /* DEBUG("item_unref(%s): %d", item->id, item->n_ref); */
+ /* We need a lock here unfortunately since another thread may have access
+ to it via some child->parent which isn't protected by reference */
+ MENU_CACHE_LOCK; /* lock may be recursive here */
+ if( g_atomic_int_dec_and_test( &item->n_ref ) )
+ {
+ /* DEBUG("free item: %s", item->id); */
+ g_free( item->id );
+ g_free( item->name );
+ g_free( item->comment );
+ g_free( item->icon );
+
+ menu_cache_file_dir_unref(item->file_dir);
+
+ if( item->file_name && item->file_name != item->id )
+ g_free( item->file_name );
+
+ if( item->parent )
+ {
+ /* DEBUG("remove %s from parent %s", item->id, MENU_CACHE_ITEM(item->parent)->id); */
+ /* remove ourselve from the parent node. */
+ item->parent->children = g_slist_remove(item->parent->children, item);
+ }
+
+ if( item->type == MENU_CACHE_TYPE_DIR )
+ {
+ MenuCacheDir* dir = MENU_CACHE_DIR(item);
+ GSList* l;
+ for(l = dir->children; l; )
+ {
+ MenuCacheItem* child = MENU_CACHE_ITEM(l->data);
+ /* remove ourselve from the children. */
+ child->parent = NULL;
+ l = l->next;
+ menu_cache_item_unref(child);
+ }
+ g_slist_free( dir->children );
+ g_slice_free( MenuCacheDir, dir );
+ }
+ else
+ {
+ MenuCacheApp* app = MENU_CACHE_APP(item);
+ g_free(app->generic_name);
+ g_free( app->exec );
+ g_free(app->try_exec);
+ g_free(app->working_dir);
+ g_free(app->categories);
+ g_free(app->keywords);
+ g_slice_free( MenuCacheApp, app );
+ }
+ }
+ MENU_CACHE_UNLOCK;
+ return FALSE;
+}
+
+/**
+ * menu_cache_item_get_type
+ * @item: a menu cache item
+ *
+ * Checks type of @item.
+ *
+ * Returns: type of @item.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheType menu_cache_item_get_type( MenuCacheItem* item )
+{
+ return item->type;
+}
+
+/**
+ * menu_cache_item_get_id
+ * @item: a menu cache item
+ *
+ * Retrieves ID (short name such as 'application.desktop') of @item.
+ * Returned data are owned by menu cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item ID.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_id( MenuCacheItem* item )
+{
+ return item->id;
+}
+
+/**
+ * menu_cache_item_get_name
+ * @item: a menu cache item
+ *
+ * Retrieves display name of @item. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item display name or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_name( MenuCacheItem* item )
+{
+ return item->name;
+}
+
+/**
+ * menu_cache_item_get_comment
+ * @item: a menu cache item
+ *
+ * Retrieves comment of @item. The comment can be used to show tooltip
+ * on @item. Returned data are owned by menu cache and should be not
+ * freed by caller.
+ *
+ * Returns: (transfer none): @item comment or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_comment( MenuCacheItem* item )
+{
+ return item->comment;
+}
+
+/**
+ * menu_cache_item_get_icon
+ * @item: a menu cache item
+ *
+ * Retrieves name of icon of @item. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item icon name or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_icon( MenuCacheItem* item )
+{
+ return item->icon;
+}
+
+/**
+ * menu_cache_item_get_file_basename
+ * @item: a menu cache item
+ *
+ * Retrieves basename of @item. This API can return %NULL if @item is a
+ * directory and have no directory desktop entry file. Returned data are
+ * owned by menu cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item file basename or %NULL.
+ *
+ * Since: 0.2.0
+ */
+const char* menu_cache_item_get_file_basename( MenuCacheItem* item )
+{
+ return item->file_name;
+}
+
+/**
+ * menu_cache_item_get_file_dirname
+ * @item: a menu cache item
+ *
+ * Retrieves path to directory where @item desktop enrty file is located.
+ * This API can return %NULL if @item is a directory and have no
+ * desktop entry file. Returned data are owned by menu cache and should
+ * be not freed by caller.
+ *
+ * Returns: (transfer none): @item file parent directory path or %NULL.
+ *
+ * Since: 0.2.0
+ */
+const char* menu_cache_item_get_file_dirname( MenuCacheItem* item )
+{
+ return item->file_dir ? item->file_dir->dir + 1 : NULL;
+}
+
+/**
+ * menu_cache_item_get_file_path
+ * @item: a menu cache item
+ *
+ * Retrieves path to @item desktop enrty file. This API can return %NULL
+ * if @item is a directory and have no desktop entry file. Returned data
+ * should be freed with g_free() after usage.
+ *
+ * Returns: (transfer full): @item file path or %NULL.
+ *
+ * Since: 0.2.0
+ */
+char* menu_cache_item_get_file_path( MenuCacheItem* item )
+{
+ if( ! item->file_name || ! item->file_dir )
+ return NULL;
+ return g_build_filename( item->file_dir->dir + 1, item->file_name, NULL );
+}
+
+/**
+ * menu_cache_item_get_parent
+ * @item: a menu cache item
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_item_dup_parent() instead.
+ */
+MenuCacheDir* menu_cache_item_get_parent( MenuCacheItem* item )
+{
+ MenuCacheDir* dir = menu_cache_item_dup_parent(item);
+ /* NOTE: this is very ugly hack but parent may be changed by item freeing
+ so we should keep it alive :( */
+ if(dir)
+ g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref, dir);
+ return dir;
+}
+
+/**
+ * menu_cache_item_dup_parent
+ * @item: a menu item
+ *
+ * Retrieves parent (directory) for @item. Returned data should be freed
+ * with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): parent item or %NULL in case of error.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheDir* menu_cache_item_dup_parent( MenuCacheItem* item )
+{
+ MenuCacheDir* dir;
+ MENU_CACHE_LOCK;
+ dir = item->parent;
+ if(G_LIKELY(dir))
+ menu_cache_item_ref(MENU_CACHE_ITEM(dir));
+ MENU_CACHE_UNLOCK;
+ return dir;
+}
+
+/**
+ * menu_cache_dir_get_children
+ * @dir: a menu cache item
+ *
+ * Retrieves list of items contained in @dir. Returned data are owned by
+ * menu cache and should be not freed by caller.
+ * This API is thread unsafe and should be never called from outside of
+ * default main loop.
+ *
+ * Returns: (transfer none) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.4.0: Use menu_cache_dir_list_children() instead.
+ */
+GSList* menu_cache_dir_get_children( MenuCacheDir* dir )
+{
+ /* NOTE: this is very ugly hack but dir may be freed by cache reload
+ in server-io thread, so we should keep it alive :( */
+ g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref,
+ menu_cache_item_ref(MENU_CACHE_ITEM(dir)));
+ return dir->children;
+}
+
+/**
+ * menu_cache_dir_list_children
+ * @dir: a menu cache item
+ *
+ * Retrieves list of items contained in @dir. Returned data should be
+ * freed with g_slist_free_full(list, menu_cache_item_unref) after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.4.0
+ */
+GSList* menu_cache_dir_list_children(MenuCacheDir* dir)
+{
+ GSList *children, *l;
+
+ if(MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR)
+ return NULL;
+ MENU_CACHE_LOCK;
+ children = g_slist_copy(dir->children);
+ for(l = children; l; l = l->next)
+ menu_cache_item_ref(l->data);
+ MENU_CACHE_UNLOCK;
+ return children;
+}
+
+/**
+ * menu_cache_find_child_by_id
+ * @dir: a menu cache item
+ * @id: a string to find
+ *
+ * Checks if @dir has a child with given @id. Returned data should be
+ * freed with menu_cache_item_unref() when no longer needed.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_child_by_id(MenuCacheDir *dir, const char *id)
+{
+ GSList *child;
+ MenuCacheItem *item = NULL;
+
+ if (MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR || id == NULL)
+ return NULL;
+ MENU_CACHE_LOCK;
+ for (child = dir->children; child; child = child->next)
+ if (g_strcmp0(MENU_CACHE_ITEM(child->data)->id, id) == 0)
+ {
+ item = menu_cache_item_ref(child->data);
+ break;
+ }
+ MENU_CACHE_UNLOCK;
+ return item;
+}
+
+/**
+ * menu_cache_find_child_by_name
+ * @dir: a menu cache item
+ * @name: a string to find
+ *
+ * Checks if @dir has a child with given @name. Returned data should be
+ * freed with menu_cache_item_unref() when no longer needed.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_child_by_name(MenuCacheDir *dir, const char *name)
+{
+ GSList *child;
+ MenuCacheItem *item = NULL;
+
+ if (MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR || name == NULL)
+ return NULL;
+ MENU_CACHE_LOCK;
+ for (child = dir->children; child; child = child->next)
+ if (g_strcmp0(MENU_CACHE_ITEM(child->data)->name, name) == 0)
+ {
+ item = menu_cache_item_ref(child->data);
+ break;
+ }
+ MENU_CACHE_UNLOCK;
+ return item;
+}
+
+/**
+ * menu_cache_dir_is_visible
+ * @dir: a menu cache item
+ *
+ * Checks if @dir should be visible.
+ *
+ * Returns: %TRUE if @dir is visible.
+ *
+ * Since: 0.5.0
+ */
+gboolean menu_cache_dir_is_visible(MenuCacheDir *dir)
+{
+ return ((dir->flags & FLAG_IS_NODISPLAY) == 0);
+}
+
+/**
+ * menu_cache_app_get_generic_name
+ * @app: a menu cache item
+ *
+ * Retrieves generic name for @app. Returned data are owned by menu
+ * cache and should not be freed by caller.
+ *
+ * Returns: (transfer none): app's generic name or %NULL.
+ *
+ * Since: 1.0.3
+ */
+const char* menu_cache_app_get_generic_name( MenuCacheApp* app )
+{
+ return app->generic_name;
+}
+
+/**
+ * menu_cache_app_get_exec
+ * @app: a menu cache item
+ *
+ * Retrieves execution string for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item execution string or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_app_get_exec( MenuCacheApp* app )
+{
+ return app->exec;
+}
+
+/**
+ * menu_cache_app_get_working_dir
+ * @app: a menu cache item
+ *
+ * Retrieves working directory for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item working directory or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_app_get_working_dir( MenuCacheApp* app )
+{
+ return app->working_dir;
+}
+
+/**
+ * menu_cache_app_get_categories
+ * @app: a menu cache item
+ *
+ * Retrieves list of categories for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): list of categories or %NULL.
+ *
+ * Since: 1.0.0
+ */
+const char * const * menu_cache_app_get_categories(MenuCacheApp* app)
+{
+ return app->categories;
+}
+
+/**
+ * menu_cache_app_get_use_terminal
+ * @app: a menu cache item
+ *
+ * Checks if @app should be ran in terminal.
+ *
+ * Returns: %TRUE if @app requires terminal to run.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_app_get_use_terminal( MenuCacheApp* app )
+{
+ return ( (app->flags & FLAG_USE_TERMINAL) != 0 );
+}
+
+/**
+ * menu_cache_app_get_use_sn
+ * @app: a menu cache item
+ *
+ * Checks if @app wants startup notification.
+ *
+ * Returns: %TRUE if @app wants startup notification.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_app_get_use_sn( MenuCacheApp* app )
+{
+ return ( (app->flags & FLAG_USE_SN) != 0 );
+}
+
+/**
+ * menu_cache_app_get_show_flags
+ * @app: a menu cache item
+ *
+ * Retrieves list of desktop environments where @app should be visible.
+ *
+ * Returns: bit mask of DE.
+ *
+ * Since: 0.2.0
+ */
+guint32 menu_cache_app_get_show_flags( MenuCacheApp* app )
+{
+ return app->show_in_flags;
+}
+
+static gboolean _can_be_exec(MenuCacheApp *app)
+{
+ char *path;
+
+ if (app->try_exec == NULL)
+ return TRUE;
+ path = g_find_program_in_path(app->try_exec);
+ g_free(path);
+ return (path != NULL);
+}
+
+/**
+ * menu_cache_app_get_is_visible
+ * @app: a menu cache item
+ * @de_flags: bit mask of DE to test
+ *
+ * Checks if @app should be visible in any of desktop environments
+ * @de_flags.
+ *
+ * Returns: %TRUE if @app is visible.
+ *
+ * Since: 0.2.0
+ */
+gboolean menu_cache_app_get_is_visible( MenuCacheApp* app, guint32 de_flags )
+{
+ if(app->flags & FLAG_IS_NODISPLAY)
+ return FALSE;
+ return (!app->show_in_flags || (app->show_in_flags & de_flags)) &&
+ _can_be_exec(app);
+}
+
+/*
+MenuCacheApp* menu_cache_find_app_by_exec( const char* exec )
+{
+ return NULL;
+}
+*/
+
+/**
+ * menu_cache_get_dir_from_path
+ * @cache: a menu cache instance
+ * @path: item path
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_item_from_path() instead.
+ */
+MenuCacheDir* menu_cache_get_dir_from_path( MenuCache* cache, const char* path )
+{
+ char** names = g_strsplit( path + 1, "/", -1 );
+ int i = 0;
+ MenuCacheDir* dir = NULL;
+
+ if( !names )
+ return NULL;
+
+ if( G_UNLIKELY(!names[0]) )
+ {
+ g_strfreev(names);
+ return NULL;
+ }
+ /* the topmost dir of the path should be the root menu dir. */
+ MENU_CACHE_LOCK;
+ dir = cache->root_dir;
+ if (G_UNLIKELY(dir == NULL) || strcmp(names[0], MENU_CACHE_ITEM(dir)->id))
+ {
+ MENU_CACHE_UNLOCK;
+ return NULL;
+ }
+
+ for( ++i; names[i]; ++i )
+ {
+ GSList* l;
+ for( l = dir->children; l; l = l->next )
+ {
+ MenuCacheItem* item = MENU_CACHE_ITEM(l->data);
+ if( item->type == MENU_CACHE_TYPE_DIR && 0 == strcmp( item->id, names[i] ) )
+ dir = MENU_CACHE_DIR(item);
+ }
+ /* FIXME: we really should ref it on return since other thread may
+ destroy the parent at this time and returned data become invalid.
+ Therefore this call isn't thread-safe! */
+ if( ! dir )
+ {
+ MENU_CACHE_UNLOCK;
+ return NULL;
+ }
+ }
+ MENU_CACHE_UNLOCK;
+ return dir;
+}
+
+/**
+ * menu_cache_item_from_path
+ * @cache: cache to inspect
+ * @path: item path
+ *
+ * Searches item @path in the @cache. The @path consists of item IDs
+ * separated by slash ('/'). Returned data should be freed with
+ * menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): found item or %NULL if no item found.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheItem* menu_cache_item_from_path( MenuCache* cache, const char* path )
+{
+ char** names = g_strsplit( path + 1, "/", -1 );
+ int i;
+ MenuCacheDir* dir;
+ MenuCacheItem* item = NULL;
+
+ if( !names )
+ return NULL;
+
+ if( G_UNLIKELY(!names[0]) )
+ {
+ g_strfreev(names);
+ return NULL;
+ }
+ /* the topmost dir of the path should be the root menu dir. */
+ MENU_CACHE_LOCK;
+ dir = cache->root_dir;
+ if( G_UNLIKELY(!dir) || strcmp(names[0], MENU_CACHE_ITEM(dir)->id) != 0 )
+ goto _end;
+
+ for( i = 1; names[i]; ++i )
+ {
+ GSList* l;
+ item = NULL;
+ if( !dir )
+ break;
+ l = dir->children;
+ dir = NULL;
+ for( ; l; l = l->next )
+ {
+ item = MENU_CACHE_ITEM(l->data);
+ if( g_strcmp0( item->id, names[i] ) == 0 )
+ {
+ if( item->type == MENU_CACHE_TYPE_DIR )
+ dir = MENU_CACHE_DIR(item);
+ break;
+ }
+ item = NULL;
+ }
+ if( !item )
+ break;
+ }
+ if(item)
+ menu_cache_item_ref(item);
+_end:
+ MENU_CACHE_UNLOCK;
+ g_strfreev(names);
+ return item;
+}
+
+/**
+ * menu_cache_dir_make_path
+ * @dir: a menu cache item
+ *
+ * Retrieves path of @dir. The path consists of item IDs separated by
+ * slash ('/'). Returned data should be freed with g_free() after usage.
+ *
+ * Returns: (transfer full): item path.
+ *
+ * Since: 0.1.0
+ */
+char* menu_cache_dir_make_path( MenuCacheDir* dir )
+{
+ GString* path = g_string_sized_new(1024);
+ MenuCacheItem* it;
+
+ MENU_CACHE_LOCK;
+ while( (it = MENU_CACHE_ITEM(dir)) ) /* this is not top dir */
+ {
+ g_string_prepend( path, menu_cache_item_get_id(it) );
+ g_string_prepend_c( path, '/' );
+ /* FIXME: if parent is already unref'd by another thread then
+ path being made will be broken. Is there any way to avoid that? */
+ dir = it->parent;
+ }
+ MENU_CACHE_UNLOCK;
+ return g_string_free( path, FALSE );
+}
+
+static void get_socket_name( char* buf, int len )
+{
+ char* dpy = g_strdup(g_getenv("DISPLAY"));
+ if(dpy && *dpy)
+ {
+ char* p = strchr(dpy, ':');
+ for(++p; *p && *p != '.' && *p != '\n';)
+ ++p;
+ if(*p)
+ *p = '\0';
+ }
+#if GLIB_CHECK_VERSION(2, 28, 0)
+ g_snprintf( buf, len, "%s/menu-cached-%s", g_get_user_runtime_dir(),
+ dpy ? dpy : ":0" );
+#else
+ g_snprintf( buf, len, "%s/.menu-cached-%s-%s", g_get_tmp_dir(),
+ dpy ? dpy : ":0", g_get_user_name() );
+#endif
+ g_free(dpy);
+}
+
+#define MAX_RETRIES 25
+
+static gboolean fork_server(const char *path)
+{
+ int ret, pid, status;
+
+ if (!g_file_test (MENUCACHE_LIBEXECDIR "/menu-cached", G_FILE_TEST_IS_EXECUTABLE))
+ {
+ g_error("failed to find menu-cached");
+ }
+
+ /* Start daemon */
+ pid = fork();
+ if (pid == 0)
+ {
+ execl(MENUCACHE_LIBEXECDIR "/menu-cached", MENUCACHE_LIBEXECDIR "/menu-cached",
+ path, NULL);
+ g_print("failed to exec %s %s\n", MENUCACHE_LIBEXECDIR "/menu-cached", path);
+ }
+
+ /*
+ * do a waitpid on the intermediate process to avoid zombies.
+ */
+retry_wait:
+ ret = waitpid(pid, &status, 0);
+ if (ret < 0) {
+ if (errno == EINTR)
+ goto retry_wait;
+ }
+ return TRUE;
+}
+
+/* this thread is started by connect_server() */
+static gpointer server_io_thread(gpointer data)
+{
+ char buf[1024]; /* protocol has a lot shorter strings */
+ ssize_t sz;
+ size_t ptr = 0;
+ int fd = GPOINTER_TO_INT(data);
+ GHashTableIter it;
+ char* menu_name;
+ MenuCache* cache;
+
+ while(fd >= 0)
+ {
+ sz = read(fd, &buf[ptr], sizeof(buf) - ptr);
+ if(sz <= 0) /* socket error or EOF */
+ {
+ MENU_CACHE_LOCK;
+ ptr = hash ? g_hash_table_size(hash) : 0;
+ MENU_CACHE_UNLOCK;
+ if (ptr == 0) /* don't need it anymore */
+ break;
+ G_LOCK(connect);
+ if(fd != server_fd) /* someone replaced us?! go out immediately! */
+ {
+ G_UNLOCK(connect);
+ break;
+ }
+ server_fd = -1;
+ G_UNLOCK(connect);
+ DEBUG("connect failed, trying reconnect");
+ sleep(1);
+ if( ! connect_server(NULL) )
+ {
+ g_critical("fail to re-connect to the server.");
+ MENU_CACHE_LOCK;
+ if(hash)
+ {
+ g_hash_table_iter_init(&it, hash);
+ while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+ SET_CACHE_READY(cache);
+ }
+ MENU_CACHE_UNLOCK;
+ break;
+ }
+ DEBUG("successfully reconnected server, re-register menus.");
+ /* re-register all menu caches */
+ MENU_CACHE_LOCK;
+ if(hash)
+ {
+ g_hash_table_iter_init(&it, hash);
+ while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+ register_menu_to_server(cache);
+ /* FIXME: need we remove it from hash if failed? */
+ }
+ MENU_CACHE_UNLOCK;
+ break; /* next thread will do it */
+ }
+ while(sz > 0)
+ {
+ while(sz > 0)
+ {
+ if(buf[ptr] == '\n')
+ break;
+ sz--;
+ ptr++;
+ }
+ if(ptr == sizeof(buf)) /* EOB reached, seems we got garbage */
+ {
+ g_warning("menu cache: got garbage from server, break connect");
+ shutdown(fd, SHUT_RDWR); /* drop connection */
+ break; /* we handle it above */
+ }
+ else if(sz == 0) /* incomplete line, wait for data again */
+ break;
+ /* we got a line, let check what we got */
+ buf[ptr] = '\0';
+ if(memcmp(buf, "REL:", 4) == 0) /* reload */
+ {
+ DEBUG("server ask us to reload cache: %s", &buf[4]);
+ MENU_CACHE_LOCK;
+ if(hash)
+ {
+ g_hash_table_iter_init(&it, hash);
+ while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+ {
+ if(memcmp(cache->md5, &buf[4], 32) == 0)
+ {
+ DEBUG("RELOAD!");
+ menu_cache_reload(cache);
+ SET_CACHE_READY(cache);
+ break;
+ }
+ }
+ }
+ MENU_CACHE_UNLOCK;
+ /* DEBUG("cache reloaded"); */
+ }
+ else
+ g_warning("menu cache: unrecognized input: %s", buf);
+ /* go to next line */
+ sz--;
+ if(sz > 0)
+ memmove(buf, &buf[ptr+1], sz);
+ ptr = 0;
+ }
+ }
+ G_LOCK(connect);
+ if (fd == server_fd)
+ server_fd = -1;
+ G_UNLOCK(connect);
+ close(fd);
+ /* DEBUG("server io thread terminated"); */
+#if GLIB_CHECK_VERSION(2, 32, 0)
+ g_thread_unref(g_thread_self());
+#endif
+ return NULL;
+}
+
+static gboolean connect_server(GCancellable* cancellable)
+{
+ int fd, rc;
+ struct sockaddr_un addr;
+ int retries = 0;
+
+ G_LOCK(connect);
+ if(server_fd != -1 || (cancellable && g_cancellable_is_cancelled(cancellable)))
+ {
+ G_UNLOCK(connect);
+ return TRUE;
+ }
+
+retry:
+ fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ if (fd < 0)
+ {
+ g_print("Failed to create socket\n");
+ G_UNLOCK(connect);
+ return FALSE;
+ }
+
+ fcntl (fd, F_SETFD, FD_CLOEXEC);
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+
+ get_socket_name( addr.sun_path, sizeof( addr.sun_path ) );
+
+ if( connect(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0)
+ {
+ rc = errno;
+ close(fd);
+ if(cancellable && g_cancellable_is_cancelled(cancellable))
+ {
+ G_UNLOCK(connect);
+ return TRUE;
+ }
+ if((rc == ECONNREFUSED || rc == ENOENT) && retries == 0)
+ {
+ DEBUG("no running server found, starting it");
+ fork_server(addr.sun_path);
+ ++retries;
+ goto retry;
+ }
+ if(retries < MAX_RETRIES)
+ {
+ usleep(50000);
+ ++retries;
+ goto retry;
+ }
+ g_print("Unable to connect\n");
+ G_UNLOCK(connect);
+ return FALSE;
+ }
+ server_fd = fd;
+ G_UNLOCK(connect);
+#if GLIB_CHECK_VERSION(2, 32, 0)
+ g_thread_new("menu-cache-io", server_io_thread, GINT_TO_POINTER(fd));
+#else
+ g_thread_create(server_io_thread, GINT_TO_POINTER(fd), FALSE, NULL);
+#endif
+ return TRUE;
+}
+
+#define CACHE_VERSION __num2str(VER_MAJOR) "." __num2str(VER_MINOR)
+#define __num2str(s) __def2str(s)
+#define __def2str(s) #s
+
+static inline char *_validate_env(const char *env)
+{
+ char *res, *c;
+
+ if (env)
+ res = g_strdup(env);
+ else
+ res = g_strdup("");
+ for (c = res; *c; c++)
+ if (*c == '\n' || *c == '\t')
+ *c = ' ';
+ return res;
+}
+
+static MenuCache* menu_cache_create(const char* menu_name)
+{
+ MenuCache* cache;
+ const gchar * const * langs = g_get_language_names();
+ const char* xdg_cfg_env = g_getenv("XDG_CONFIG_DIRS");
+ const char* xdg_prefix_env = g_getenv("XDG_MENU_PREFIX");
+ const char* xdg_data_env = g_getenv("XDG_DATA_DIRS");
+ const char* xdg_cfg_home_env = g_getenv("XDG_CONFIG_HOME");
+ const char* xdg_data_home_env = g_getenv("XDG_DATA_HOME");
+ const char* xdg_cache_home_env = g_getenv("XDG_CACHE_HOME");
+ char *xdg_cfg, *xdg_prefix, *xdg_data, *xdg_cfg_home, *xdg_data_home, *xdg_cache_home;
+ char* buf;
+ const char* md5;
+ char* file_name;
+ int len = 0;
+ GChecksum *sum;
+ char *langs_list;
+
+ xdg_cfg = _validate_env(xdg_cfg_env);
+ xdg_prefix = _validate_env(xdg_prefix_env);
+ xdg_data = _validate_env(xdg_data_env);
+ xdg_cfg_home = _validate_env(xdg_cfg_home_env);
+ xdg_data_home = _validate_env(xdg_data_home_env);
+ xdg_cache_home = _validate_env(xdg_cache_home_env);
+
+ /* reconstruct languages list in form as it should be in $LANGUAGES */
+ langs_list = g_strjoinv(":", (char **)langs);
+ for (buf = langs_list; *buf; buf++) /* reusing buf var as char pointer */
+ if (*buf == '\n' || *buf == '\t')
+ *buf = ' ';
+
+ buf = g_strdup_printf( "REG:%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t" CACHE_VERSION
+ "\t00000000000000000000000000000000\n",
+ menu_name,
+ langs_list,
+ xdg_cache_home,
+ xdg_cfg,
+ xdg_prefix,
+ xdg_data,
+ xdg_cfg_home,
+ xdg_data_home );
+
+ /* calculate the md5 sum of menu name + lang + all environment variables */
+ sum = g_checksum_new(G_CHECKSUM_MD5);
+ len = strlen(buf);
+ g_checksum_update(sum, (guchar*)buf + 4, len - 38);
+ md5 = g_checksum_get_string(sum);
+ file_name = g_build_filename( g_get_user_cache_dir(), "menus", md5, NULL );
+ DEBUG("cache file_name = %s", file_name);
+ cache = menu_cache_new( file_name );
+ cache->reg = buf;
+ cache->md5 = buf + len - 33;
+ memcpy( cache->md5, md5, 32 );
+ cache->menu_name = g_strdup(menu_name);
+ g_free( file_name );
+ g_free(langs_list);
+ g_free(xdg_cfg);
+ g_free(xdg_prefix);
+ g_free(xdg_data);
+ g_free(xdg_cfg_home);
+ g_free(xdg_data_home);
+ g_free(xdg_cache_home);
+
+ g_checksum_free(sum); /* md5 is also freed here */
+
+ MENU_CACHE_LOCK;
+ g_hash_table_insert( hash, g_strdup(menu_name), cache );
+ MENU_CACHE_UNLOCK;
+
+ return cache;
+}
+
+static gboolean register_menu_to_server(MenuCache* cache)
+{
+ ssize_t len = strlen(cache->reg);
+ /* FIXME: do unblocking I/O */
+ if(write(server_fd, cache->reg, len) < len)
+ {
+ DEBUG("register_menu_to_server: sending failed");
+ return FALSE; /* socket write failed */
+ }
+ return TRUE;
+}
+
+static void unregister_menu_from_server( MenuCache* cache )
+{
+ char buf[38];
+ g_snprintf( buf, 38, "UNR:%s\n", cache->md5 );
+ /* FIXME: do unblocking I/O */
+ if(write( server_fd, buf, 37 ) <= 0)
+ {
+ DEBUG("unregister_menu_from_server: sending failed");
+ }
+}
+
+static gpointer menu_cache_loader_thread(gpointer data)
+{
+ MenuCache* cache = (MenuCache*)data;
+
+ /* try to connect server now */
+ if(!connect_server(cache->cancellable))
+ {
+ g_print("unable to connect to menu-cached.\n");
+ SET_CACHE_READY(cache);
+ return NULL;
+ }
+ /* and request update from server */
+ if ((cache->cancellable && g_cancellable_is_cancelled(cache->cancellable)) ||
+ !register_menu_to_server(cache))
+ SET_CACHE_READY(cache);
+ return NULL;
+}
+
+/**
+ * menu_cache_lookup
+ * @menu_name: a menu name
+ *
+ * Searches for connection to menu-cached for @menu_name. If there is no
+ * such connection exist then creates new one. Caller can be notified
+ * when cache is (re)loaded by adding callback. Caller should check if
+ * the cache is already loaded trying to retrieve its root.
+ *
+ * See also: menu_cache_add_reload_notify(), menu_cache_item_dup_parent().
+ *
+ * Returns: (transfer full): menu cache descriptor.
+ *
+ * Since: 0.1.0
+ */
+MenuCache* menu_cache_lookup( const char* menu_name )
+{
+ MenuCache* cache;
+
+ /* lookup in a hash table for already loaded menus */
+ MENU_CACHE_LOCK;
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+ /* FIXME: destroy them on application exit? */
+ if(!sync_run_mutex)
+ sync_run_mutex = g_mutex_new();
+ if(!sync_run_cond)
+ sync_run_cond = g_cond_new();
+#endif
+ if( G_UNLIKELY( ! hash ) )
+ hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL );
+ else
+ {
+ cache = (MenuCache*)g_hash_table_lookup(hash, menu_name);
+ if( cache )
+ {
+ menu_cache_ref(cache);
+ MENU_CACHE_UNLOCK;
+ return cache;
+ }
+ }
+ MENU_CACHE_UNLOCK;
+
+ cache = menu_cache_create(menu_name);
+ cache->cancellable = g_cancellable_new();
+#if GLIB_CHECK_VERSION(2, 32, 0)
+ cache->thr = g_thread_new(menu_name, menu_cache_loader_thread, cache);
+#else
+ cache->thr = g_thread_create(menu_cache_loader_thread, cache, TRUE, NULL);
+#endif
+ return cache;
+}
+
+/**
+ * menu_cache_lookup_sync
+ * @menu_name: a menu name
+ *
+ * Searches for data from menu-cached for @menu_name. If no connection
+ * exists yet then creates new one and retrieves all data.
+ *
+ * Returns: (transfer full): menu cache descriptor.
+ *
+ * Since: 0.3.1
+ */
+MenuCache* menu_cache_lookup_sync( const char* menu_name )
+{
+ MenuCache* mc = menu_cache_lookup(menu_name);
+ MenuCacheDir* root_dir = menu_cache_dup_root_dir(mc);
+ /* ensure that the menu cache is loaded */
+ if(root_dir)
+ menu_cache_item_unref(MENU_CACHE_ITEM(root_dir));
+ else /* if it's not yet loaded */
+ {
+ MenuCacheNotifyId notify_id;
+ /* add stub */
+ notify_id = menu_cache_add_reload_notify(mc, NULL, NULL);
+#if GLIB_CHECK_VERSION(2, 32, 0)
+ g_mutex_lock(&sync_run_mutex);
+ while(!mc->ready)
+ g_cond_wait(&sync_run_cond, &sync_run_mutex);
+ g_mutex_unlock(&sync_run_mutex);
+#else
+ g_mutex_lock(sync_run_mutex);
+ g_debug("menu_cache_lookup_sync: enter wait %p", mc);
+ while(!mc->ready)
+ g_cond_wait(sync_run_cond, sync_run_mutex);
+ g_debug("menu_cache_lookup_sync: leave wait");
+ g_mutex_unlock(sync_run_mutex);
+#endif
+ menu_cache_remove_reload_notify(mc, notify_id);
+ }
+ return mc;
+}
+
+static GSList* list_app_in_dir(MenuCacheDir* dir, GSList* list)
+{
+ GSList* l;
+ for( l = dir->children; l; l = l->next )
+ {
+ MenuCacheItem* item = MENU_CACHE_ITEM(l->data);
+ switch( menu_cache_item_get_type(item) )
+ {
+ case MENU_CACHE_TYPE_DIR:
+ list = list_app_in_dir( MENU_CACHE_DIR(item), list );
+ break;
+ case MENU_CACHE_TYPE_APP:
+ list = g_slist_prepend(list, menu_cache_item_ref(item));
+ break;
+ case MENU_CACHE_TYPE_NONE:
+ case MENU_CACHE_TYPE_SEP:
+ break;
+ }
+ }
+ return list;
+}
+
+/**
+ * menu_cache_list_all_apps
+ * @cache: a menu cache descriptor
+ *
+ * Retrieves full list of applications in menu cache. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.1.2
+ */
+GSList* menu_cache_list_all_apps(MenuCache* cache)
+{
+ GSList* list;
+ MENU_CACHE_LOCK;
+ if (G_UNLIKELY(!cache->root_dir)) /* empty cache */
+ list = NULL;
+ else
+ list = list_app_in_dir(cache->root_dir, NULL);
+ MENU_CACHE_UNLOCK;
+ return list;
+}
+
+/**
+ * menu_cache_get_desktop_env_flag
+ * @cache: a menu cache descriptor
+ * @desktop_env: desktop environment name
+ *
+ * Makes bit mask of desktop environment from its name. The @desktop_env
+ * may be simple string or colon separated list of compatible session
+ * names according to XDG_CURRENT_DESKTOP freedesktop.org specification.
+ *
+ * Returns: DE bit mask.
+ *
+ * Since: 0.2.0
+ */
+guint32 menu_cache_get_desktop_env_flag( MenuCache* cache, const char* desktop_env )
+{
+ char** de;
+ char **envs;
+ guint32 flags = 0;
+ int j;
+
+ if (desktop_env == NULL || desktop_env[0] == '\0')
+ return flags;
+
+ envs = g_strsplit(desktop_env, ":", -1);
+ MENU_CACHE_LOCK;
+ de = cache->known_des;
+ for (j = 0; envs[j]; j++)
+ {
+ if( de )
+ {
+ int i;
+ for( i = 0; de[i]; ++i )
+ if (strcmp(envs[j], de[i]) == 0)
+ break;
+ if (de[i])
+ {
+ flags |= 1 << (i + N_KNOWN_DESKTOPS);
+ continue;
+ }
+ }
+ if (strcmp(envs[j], "GNOME") == 0)
+ flags |= SHOW_IN_GNOME;
+ else if (strcmp(envs[j], "KDE") == 0)
+ flags |= SHOW_IN_KDE;
+ else if (strcmp(envs[j], "XFCE") == 0)
+ flags |= SHOW_IN_XFCE;
+ else if (strcmp(envs[j], "LXDE") == 0)
+ flags |= SHOW_IN_LXDE;
+ else if (strcmp(envs[j], "ROX") == 0)
+ flags |= SHOW_IN_ROX;
+ }
+ MENU_CACHE_UNLOCK;
+ g_strfreev(envs);
+ return flags;
+}
+
+static MenuCacheItem *_scan_by_id(MenuCacheItem *item, const char *id)
+{
+ GSList *l;
+
+ if (item)
+ switch (menu_cache_item_get_type(item))
+ {
+ case MENU_CACHE_TYPE_DIR:
+ for (l = MENU_CACHE_DIR(item)->children; l; l = l->next)
+ {
+ item = _scan_by_id(MENU_CACHE_ITEM(l->data), id);
+ if (item)
+ return item;
+ }
+ break;
+ case MENU_CACHE_TYPE_APP:
+ if (g_strcmp0(menu_cache_item_get_id(item), id) == 0)
+ return item;
+ break;
+ default: ;
+ }
+ return NULL;
+}
+
+/**
+ * menu_cache_find_item_by_id
+ * @cache: a menu cache descriptor
+ * @id: item ID (name such as 'application.desktop')
+ *
+ * Searches if @id already exists within @cache and returns found item.
+ * Returned data should be freed with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_item_by_id(MenuCache *cache, const char *id)
+{
+ MenuCacheItem *item = NULL;
+
+ MENU_CACHE_LOCK;
+ if (cache && id)
+ item = _scan_by_id(MENU_CACHE_ITEM(cache->root_dir), id);
+ if (item)
+ menu_cache_item_ref(item);
+ MENU_CACHE_UNLOCK;
+ return item;
+}
+
+static GSList* list_app_in_dir_for_cat(MenuCacheDir *dir, GSList *list, const char *id)
+{
+ const char **cat;
+ GSList *l;
+
+ for (l = dir->children; l; l = l->next)
+ {
+ MenuCacheItem *item = MENU_CACHE_ITEM(l->data);
+ switch (item->type)
+ {
+ case MENU_CACHE_TYPE_DIR:
+ list = list_app_in_dir_for_cat(MENU_CACHE_DIR(item), list, id);
+ break;
+ case MENU_CACHE_TYPE_APP:
+ cat = MENU_CACHE_APP(item)->categories;
+ if (cat) while (*cat)
+ if (*cat++ == id)
+ {
+ list = g_slist_prepend(list, menu_cache_item_ref(item));
+ break;
+ }
+ break;
+ case MENU_CACHE_TYPE_NONE:
+ case MENU_CACHE_TYPE_SEP:
+ break;
+ }
+ }
+ return list;
+}
+
+/**
+ * menu_cache_list_all_for_category
+ * @cache: a menu cache descriptor
+ * @category: category to list items
+ *
+ * Retrieves list of applications in menu cache which have @category in
+ * their list of categories. The search is case-sensitive. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 1.0.0
+ */
+GSList *menu_cache_list_all_for_category(MenuCache* cache, const char *category)
+{
+ GQuark q;
+ GSList *list;
+
+ g_return_val_if_fail(cache != NULL && category != NULL, NULL);
+ q = g_quark_try_string(category);
+ if (q == 0)
+ return NULL;
+ MENU_CACHE_LOCK;
+ if (G_UNLIKELY(cache->root_dir == NULL))
+ list = NULL;
+ else
+ list = list_app_in_dir_for_cat(cache->root_dir, NULL, g_quark_to_string(q));
+ MENU_CACHE_UNLOCK;
+ return list;
+}
+
+static GSList* list_app_in_dir_for_kw(MenuCacheDir *dir, GSList *list, const char *kw)
+{
+ GSList *l;
+
+ for (l = dir->children; l; l = l->next)
+ {
+ MenuCacheItem *item = MENU_CACHE_ITEM(l->data);
+ switch (item->type)
+ {
+ case MENU_CACHE_TYPE_DIR:
+ list = list_app_in_dir_for_kw(MENU_CACHE_DIR(item), list, kw);
+ break;
+ case MENU_CACHE_TYPE_APP:
+ if (strstr(MENU_CACHE_APP(item)->keywords, kw) != NULL)
+ list = g_slist_prepend(list, menu_cache_item_ref(item));
+ break;
+ case MENU_CACHE_TYPE_NONE:
+ case MENU_CACHE_TYPE_SEP:
+ break;
+ }
+ }
+ return list;
+}
+
+/**
+ * menu_cache_list_all_for_keyword
+ * @cache: a menu cache descriptor
+ * @keyword: a keyword to search
+ *
+ * Retrieves list of applications in menu cache which have a @keyword
+ * as either a word or part of word in exec command, name, generic name
+ * or defined keywords. The search is case-insensitive. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 1.0.0
+ */
+GSList *menu_cache_list_all_for_keyword(MenuCache* cache, const char *keyword)
+{
+ char *casefolded = g_utf8_casefold(keyword, -1);
+ GSList *list;
+
+ g_return_val_if_fail(cache != NULL && keyword != NULL, NULL);
+ MENU_CACHE_LOCK;
+ if (G_UNLIKELY(cache->root_dir == NULL))
+ list = NULL;
+ else
+ list = list_app_in_dir_for_kw(cache->root_dir, NULL, casefolded);
+ MENU_CACHE_UNLOCK;
+ g_free(casefolded);
+ return list;
+}
Index: radix-1.9/sources/packages/x/menu-cache/patches/README
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/patches/README (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/patches/README (revision 109)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+ TODO: Leave some comment here.
+
+ * end */
Index: radix-1.9/sources/packages/x/menu-cache/patches
===================================================================
--- radix-1.9/sources/packages/x/menu-cache/patches (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache/patches (revision 109)
Property changes on: radix-1.9/sources/packages/x/menu-cache/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/sources/packages/x/menu-cache
===================================================================
--- radix-1.9/sources/packages/x/menu-cache (nonexistent)
+++ radix-1.9/sources/packages/x/menu-cache (revision 109)
Property changes on: radix-1.9/sources/packages/x/menu-cache
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/sources/packages/x/pcmanfm/Makefile
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm/Makefile (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm/Makefile (revision 109)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+ @true
+
+.PHONY: download_clean
Index: radix-1.9/sources/packages/x/pcmanfm/libfm/Makefile
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm/libfm/Makefile (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm/libfm/Makefile (revision 109)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/x/pcmanfm/libfm
+
+versions = 1.3.2
+pkgname = libfm
+suffix = tar.xz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s)
Index: radix-1.9/sources/packages/x/pcmanfm/libfm
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm/libfm (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm/libfm (revision 109)
Property changes on: radix-1.9/sources/packages/x/pcmanfm/libfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/sources/packages/x/pcmanfm/pcmanfm/Makefile
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm/pcmanfm/Makefile (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm/pcmanfm/Makefile (revision 109)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/x/pcmanfm/pcmanfm
+
+versions = 1.3.2
+pkgname = pcmanfm
+suffix = tar.xz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s)
Index: radix-1.9/sources/packages/x/pcmanfm/pcmanfm
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm/pcmanfm (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm/pcmanfm (revision 109)
Property changes on: radix-1.9/sources/packages/x/pcmanfm/pcmanfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: radix-1.9/sources/packages/x/pcmanfm
===================================================================
--- radix-1.9/sources/packages/x/pcmanfm (nonexistent)
+++ radix-1.9/sources/packages/x/pcmanfm (revision 109)
Property changes on: radix-1.9/sources/packages/x/pcmanfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~