summaryrefslogtreecommitdiff
path: root/x11-libs/libfm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-libs/libfm
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-libs/libfm')
-rw-r--r--x11-libs/libfm/Manifest11
-rw-r--r--x11-libs/libfm/files/libfm-fix-use-after-free.diff23
-rw-r--r--x11-libs/libfm/libfm-1.2.3-r1.ebuild124
-rw-r--r--x11-libs/libfm/libfm-1.2.4.ebuild129
-rw-r--r--x11-libs/libfm/libfm-1.2.5.ebuild129
-rw-r--r--x11-libs/libfm/libfm-9999.ebuild124
-rw-r--r--x11-libs/libfm/metadata.xml25
7 files changed, 565 insertions, 0 deletions
diff --git a/x11-libs/libfm/Manifest b/x11-libs/libfm/Manifest
new file mode 100644
index 000000000000..13709b90f415
--- /dev/null
+++ b/x11-libs/libfm/Manifest
@@ -0,0 +1,11 @@
+AUX libfm-fix-use-after-free.diff 863 SHA256 fe8578f2fa37c08f0dcd6b3b6a9c3c19c9b07ded807bc9c742137d827fd850e2 SHA512 7d9cc8699b66ec3538c27ee65b03f892752036d57432e861acfa76983ffbaeac9c1252e400f9cae3d05e7b49a33cc0af8299236c5b74a86b4c967392b879e47e WHIRLPOOL b620443d0cacf52bc085de337ba991e86070b540d3834b31f71004856f9ad2c98a87319fb5bb55cb3c946f4be936dd63e710b2a633557e04263a34441412cff0
+DIST libfm-1.2.3.tar.xz 898256 SHA256 c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9 SHA512 f4c214daffc47f05ba31c65203ab0542a03f5a246ea4bb62b6b365ac3fa120a1a51e37b00f8a43afe56875eb69f9be327ac724dafb6fc2de13aa77deea23f443 WHIRLPOOL ae5354c5ef5154ebce8a9124b47e0a645171d50d4034fd1e6000ff084acc15261398029c58b067b9027d4ba68d36d8addf91a28678c91a3fbd9ce0806e9b6046
+DIST libfm-1.2.4.tar.gz 1259686 SHA256 30474f25e4fbf78f50c7e2493cc4eca5970243089393d25a80f3d79b478a2ce7 SHA512 7196ae4af99ef41d77e1113dea62e35244b0be57c8cd7fcef2e0559daa5564ddfb163293225708c1697068e6a41d9842f96991145c34c41a7f510f38345d2f9c WHIRLPOOL d42d7ee5d7fefd1c100a0b7f741a20a2d98e84bbea57cfe3b3f197e7731538bda51c4c916a88e185ce937bab88fcda7b511d3da81660f6f36f32ef389f480f1b
+DIST libfm-1.2.5.tar.gz 1261152 SHA256 6b51b6ac65cc6da4d11febb29e497b97c3a5591941639ddc4757fcab451f64ba SHA512 0bc7910081cadc4c8c4648f3483fb5791e9480700400ded452dd5985e7fb0d8524f2c676f0171a5cd283422a13f240f40cfe5ccc8d10dce02dd784d62250b7cc WHIRLPOOL 3ec363725023cf7ab02a82d4242cc8e1ec5ff9658d89554afbe55ab3cc78df0858dfd400c85a284d069365de159a385552e55b4bf8397ed1767a2c0ba8c6d1e1
+EBUILD libfm-1.2.3-r1.ebuild 3505 SHA256 1e99af11e48131167a3d90233aaef385d61170e359d093871611a6a7ae7b184e SHA512 ba54347a14bc1c297561f10077ab02d67d9df2e5c18689e5d12a8dba3c5a5902d411b93b6f603d7b924ab8a7ae4804e8cfc79943a329204c96ed750fe268c0ef WHIRLPOOL 7d347ef5821e3262288dbe71cb9737c4eaf8461f4916e1155af5d5b7e06a796ef56be57b38f5db0df5fb7fbcc4569ca478a4daa696ad99fae6e77ca2cb3e3202
+EBUILD libfm-1.2.4.ebuild 3722 SHA256 5afc3d79a7d915bb6439ee2790b218078cec550a85ed76df3840a5246f9f55f3 SHA512 0fb24103c5ef222b11cc4bc555fce4de90e95c649798d69b394ed9ab7dd6c9dc822c2c95ceef56d82a3dc5fbe1630284dd2ffa6477d56d8f6df504934f7e8d3d WHIRLPOOL 4ed94fdc1c2a33ae6420e5dce03efca510d0e1ac4367feb5984c4ae3781e07be97b2b8bf2bd510dc5c22d7394a12caee0cba6743625cb50f2d3f404995c09f1f
+EBUILD libfm-1.2.5.ebuild 3726 SHA256 d4a3cbd6d6d0580385732b8f4d54ef7fb5a92e63eb1e997144f632459c77db19 SHA512 f65c0014a6a8253e12e5f3f36fae13ae9db24a58398cb6f3eea005d182fbc022d108aa67d0fcd529d76b68a1804d1db197b4bfa7413aedc6b04cfbb0880ed4b3 WHIRLPOOL c3a67ee9e96576cb50da3af11b8bee679443b0bfe4c88f59180f9d23c3a5ee9d25d79f51d369ecd1db6defe932495e26c9c5728a2f6e85bcfeec5d8b6ab0f7bf
+EBUILD libfm-9999.ebuild 3434 SHA256 a6b85cd910c0e101f22450f3b9037307bdd1366975f65cf58d8aeeaf45fdcc08 SHA512 c53f08c820bb24c4c53c2fcf66bccf15313cdeea793d8d0595ed2587a6bb34e529006e7f5c8543f3780ac5ff35ab588300aeb329ec34d60cb549170564df7d1d WHIRLPOOL b28ab025d7b880881b1e802260a2653af08d9f63367883ba539b62d0395d67ef8998d37ca497ec250e927824a1d1ccfbd727d6aec3a307c9374eb923f98f2031
+MISC ChangeLog 4489 SHA256 dc6a5b84921525dc92c863ab69e524240aaabb5f61f64b109b09658774408fb8 SHA512 0f5d78bc164cd504acfe22704295b853307d19fe8969769f99429ac980b65c4f8cf82000423a4244d6e8f573f6935f79df008208d66cdb25abf2164ca23f38e4 WHIRLPOOL 8f6eb6ebe79998204e156ac621d470c6af4c1e860386495c732c7a1f8d7d0e4c576d0345aedec00cc721567a46e18881367add1daba7f32336d07f4677f3e5a4
+MISC ChangeLog-2015 16180 SHA256 d25dc00079a73d70c7e02c8a34d574555100eb2e7fb443ba14a34ca676fd4d40 SHA512 eaf4fcb1f62667e0cf4ac458118da5286b67f4403eb7fb66131867aeadd72181f7daa31cc4a26f6e9865a08f851fde66211a745571bdcd7acaf6ae60e660b2fe WHIRLPOOL cbfe2af7d54290eeaa99eeefc9c9f44cf0c4727cc0551060f76e4756ef1b1e8b7ef63b981d91a1e59fd5c1429ad09880895c0dcb8685df40156453f26d644c22
+MISC metadata.xml 891 SHA256 dcfa279f1a89f44cd5ac7b3d482635431c933e1a2a1f4c5408bc5c63aeeef68b SHA512 de30c6bbfed377885da535958c50c726e8e9b69a10b322b5d228b0aa5031c7601e006d8721c2d12a820960e2208c860bb0d8d97af69f8c88f4e6e34591e643b5 WHIRLPOOL 69ff0f38745da0603d1aa09a8b7a4f676ad6e89e753992831af80a388d48f60b40d83bafec404d002d2810b578125f31032d8ea0322907de416bcf5d079d2e8c
diff --git a/x11-libs/libfm/files/libfm-fix-use-after-free.diff b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
new file mode 100644
index 000000000000..4a0ae61c40b4
--- /dev/null
+++ b/x11-libs/libfm/files/libfm-fix-use-after-free.diff
@@ -0,0 +1,23 @@
+diff -Naur libfm-1.2.3/src/base/fm-config.c libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c
+--- libfm-1.2.3/src/base/fm-config.c 2014-10-14 18:29:21.000000000 +0200
++++ libfm-1.2.3-fix-uaf-new2/src/base/fm-config.c 2016-06-18 18:23:35.721837971 +0200
+@@ -346,7 +346,8 @@
+ cfg->modules_blacklist = NULL;
+ cfg->system_modules_blacklist = NULL;
+ _cfg_monitor_free(cfg);
+- g_free(cfg->_cfg_name);
++ if(name != cfg->_cfg_name)
++ g_free(cfg->_cfg_name);
+ if(G_LIKELY(!name))
+ name = "libfm/libfm.conf";
+ else
+@@ -363,7 +364,8 @@
+ }
+ }
+
+- cfg->_cfg_name = g_strdup(name);
++ if(name != cfg->_cfg_name)
++ cfg->_cfg_name = g_strdup(name);
+ dirs = g_get_system_config_dirs();
+ /* bug SF #887: first dir in XDG_CONFIG_DIRS is the most relevant
+ so we shoult process the list in reverse order */
diff --git a/x11-libs/libfm/libfm-1.2.3-r1.ebuild b/x11-libs/libfm/libfm-1.2.3-r1.ebuild
new file mode 100644
index 000000000000..aa6f3273385c
--- /dev/null
+++ b/x11-libs/libfm/libfm-1.2.3-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fdo-mime multilib vala
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="A library for file management"
+HOMEPAGE="http://pcmanfm.sourceforge.net/"
+SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.xz"
+
+KEYWORDS="~alpha amd64 arm ~arm64 ~mips ppc x86 ~amd64-linux ~x86-linux"
+LICENSE="GPL-2"
+SLOT="0/4.3.0" #copy ABI_VERSION because it seems upstream change it randomly
+IUSE="+automount debug doc examples exif gtk udisks vala"
+
+COMMON_DEPEND=">=dev-libs/glib-2.18:2
+ gtk? ( >=x11-libs/gtk+-2.16:2 )
+ >=lxde-base/menu-cache-0.3.2:=
+ ~x11-libs/libfm-extra-${PV}"
+RDEPEND="${COMMON_DEPEND}
+ !lxde-base/lxshortcut
+ x11-misc/shared-mime-info
+ automount? (
+ udisks? ( gnome-base/gvfs[udev,udisks] )
+ !udisks? ( gnome-base/gvfs[udev] )
+ )
+ exif? ( media-libs/libexif )"
+DEPEND="${COMMON_DEPEND}
+ vala? ( $(vala_depend) )
+ doc? (
+ dev-util/gtk-doc
+ )
+ app-arch/xz-utils
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+S="${WORKDIR}"/${MY_P}
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+src_prepare() {
+ if ! use doc; then
+ sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
+ sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
+ fi
+ sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
+ configure.ac || die "sed failed"
+
+ #disable unused translations. Bug #356029
+ for trans in app-chooser ask-rename exec-file file-prop preferred-apps \
+ progress;do
+ echo "data/ui/"${trans}.ui >> po/POTFILES.in
+ done
+ #Remove -Werror for automake-1.12. Bug #421101
+ sed -i "s:-Werror::" configure.ac || die
+
+ # subslot sanity check
+ local sub_slot=${SLOT#*/}
+ local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+ if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+ eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+ eerror "Please update SLOT variable as follows:"
+ eerror " SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+ eerror
+ die "sub-slot sanity check failed"
+ fi
+
+ eautoreconf
+ rm -r autom4te.cache || die
+ use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}/etc" \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable examples demo) \
+ $(use_enable exif) \
+ $(use_enable debug) \
+ $(use_enable udisks) \
+ $(use_enable vala actions) \
+ $(use_with gtk) \
+ $(use_enable doc gtk-doc) \
+ --with-html-dir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+ # Sometimes a directory is created instead of a symlink. No idea why...
+ # It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+ # symlink to it.
+ if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+ rm -r "${D}"/usr/include/${PN}
+ fi
+ # Remove files installed by split-off libfm-extra package
+ rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h
+ rm "${D}"/usr/$(get_libdir)/libfm-extra*
+ rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc
+}
+
+pkg_preinst() {
+ # Resolve the symlink mess. Bug #439570
+ [[ -d "${ROOT}"/usr/include/${PN} ]] && \
+ rm -rf "${ROOT}"/usr/include/${PN}
+ if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+ cd "${D}"/usr/include
+ ln -s --force ${PN}-1.0 ${PN}
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/x11-libs/libfm/libfm-1.2.4.ebuild b/x11-libs/libfm/libfm-1.2.4.ebuild
new file mode 100644
index 000000000000..6b60fec10a32
--- /dev/null
+++ b/x11-libs/libfm/libfm-1.2.4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fdo-mime multilib vala
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="A library for file management"
+HOMEPAGE="http://pcmanfm.sourceforge.net/"
+SRC_URI="https://github.com/lxde/libfm/archive/1.2.4.tar.gz -> ${MY_P}.tar.gz"
+
+KEYWORDS="~alpha amd64 arm ~arm64 ~mips ppc x86 ~amd64-linux ~x86-linux"
+LICENSE="GPL-2"
+SLOT="0/4.4.0" #copy ABI_VERSION because it seems upstream change it randomly
+IUSE="+automount debug doc examples exif gtk udisks vala"
+
+COMMON_DEPEND=">=dev-libs/glib-2.18:2
+ gtk? ( >=x11-libs/gtk+-2.16:2 )
+ >=lxde-base/menu-cache-0.3.2:=
+ ~x11-libs/libfm-extra-${PV}
+ udisks? ( dev-libs/dbus-glib )"
+RDEPEND="${COMMON_DEPEND}
+ !lxde-base/lxshortcut
+ x11-misc/shared-mime-info
+ automount? (
+ udisks? ( gnome-base/gvfs[udev,udisks] )
+ !udisks? ( gnome-base/gvfs[udev] )
+ )
+ exif? ( media-libs/libexif )"
+DEPEND="${COMMON_DEPEND}
+ vala? ( $(vala_depend) )
+ doc? (
+ dev-util/gtk-doc
+ )
+ app-arch/xz-utils
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+S="${WORKDIR}"/${MY_P}
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+src_prepare() {
+ # Fix use after free bug, see
+ # https://github.com/lxde/libfm/pull/11/commits/9e3a809c6a8a5079f05e04edac9457d317822321
+ epatch "${FILESDIR}"/libfm-fix-use-after-free.diff
+
+ if ! use doc; then
+ sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
+ sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
+ fi
+ sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
+ configure.ac || die "sed failed"
+
+ #disable unused translations. Bug #356029
+ for trans in app-chooser ask-rename exec-file file-prop preferred-apps \
+ progress;do
+ echo "data/ui/"${trans}.ui >> po/POTFILES.in
+ done
+ #Remove -Werror for automake-1.12. Bug #421101
+ sed -i "s:-Werror::" configure.ac || die
+
+ # subslot sanity check
+ local sub_slot=${SLOT#*/}
+ local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+ if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+ eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+ eerror "Please update SLOT variable as follows:"
+ eerror " SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+ eerror
+ die "sub-slot sanity check failed"
+ fi
+
+ eautoreconf
+ rm -r autom4te.cache || die
+ use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}/etc" \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable examples demo) \
+ $(use_enable exif) \
+ $(use_enable debug) \
+ $(use_enable udisks) \
+ $(use_enable vala actions) \
+ $(use_with gtk) \
+ $(use_enable doc gtk-doc) \
+ --with-html-dir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+ # Sometimes a directory is created instead of a symlink. No idea why...
+ # It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+ # symlink to it.
+ if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+ rm -r "${D}"/usr/include/${PN}
+ fi
+ # Remove files installed by split-off libfm-extra package
+ rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h
+ rm "${D}"/usr/$(get_libdir)/libfm-extra*
+ rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc
+}
+
+pkg_preinst() {
+ # Resolve the symlink mess. Bug #439570
+ [[ -d "${ROOT}"/usr/include/${PN} ]] && \
+ rm -rf "${ROOT}"/usr/include/${PN}
+ if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+ cd "${D}"/usr/include
+ ln -s --force ${PN}-1.0 ${PN}
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/x11-libs/libfm/libfm-1.2.5.ebuild b/x11-libs/libfm/libfm-1.2.5.ebuild
new file mode 100644
index 000000000000..29bc894e16d2
--- /dev/null
+++ b/x11-libs/libfm/libfm-1.2.5.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fdo-mime multilib vala
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="A library for file management"
+HOMEPAGE="http://pcmanfm.sourceforge.net/"
+SRC_URI="https://github.com/lxde/libfm/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+LICENSE="GPL-2"
+SLOT="0/4.5.0" #copy ABI_VERSION because it seems upstream change it randomly
+IUSE="+automount debug doc examples exif gtk udisks vala"
+
+COMMON_DEPEND=">=dev-libs/glib-2.18:2
+ gtk? ( >=x11-libs/gtk+-2.16:2 )
+ >=lxde-base/menu-cache-0.3.2:=
+ ~x11-libs/libfm-extra-${PV}
+ udisks? ( dev-libs/dbus-glib )"
+RDEPEND="${COMMON_DEPEND}
+ !lxde-base/lxshortcut
+ x11-misc/shared-mime-info
+ automount? (
+ udisks? ( gnome-base/gvfs[udev,udisks] )
+ !udisks? ( gnome-base/gvfs[udev] )
+ )
+ exif? ( media-libs/libexif )"
+DEPEND="${COMMON_DEPEND}
+ vala? ( $(vala_depend) )
+ doc? (
+ dev-util/gtk-doc
+ )
+ app-arch/xz-utils
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+S="${WORKDIR}"/${MY_P}
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+src_prepare() {
+ # Fix use after free bug, see
+ # https://github.com/lxde/libfm/pull/11/commits/9e3a809c6a8a5079f05e04edac9457d317822321
+ epatch "${FILESDIR}"/libfm-fix-use-after-free.diff
+
+ if ! use doc; then
+ sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
+ sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
+ fi
+ sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
+ configure.ac || die "sed failed"
+
+ #disable unused translations. Bug #356029
+ for trans in app-chooser ask-rename exec-file file-prop preferred-apps \
+ progress;do
+ echo "data/ui/"${trans}.ui >> po/POTFILES.in
+ done
+ #Remove -Werror for automake-1.12. Bug #421101
+ sed -i "s:-Werror::" configure.ac || die
+
+ # subslot sanity check
+ local sub_slot=${SLOT#*/}
+ local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+ if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+ eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+ eerror "Please update SLOT variable as follows:"
+ eerror " SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+ eerror
+ die "sub-slot sanity check failed"
+ fi
+
+ eautoreconf
+ rm -r autom4te.cache || die
+ use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}/etc" \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable examples demo) \
+ $(use_enable exif) \
+ $(use_enable debug) \
+ $(use_enable udisks) \
+ $(use_enable vala actions) \
+ $(use_with gtk) \
+ $(use_enable doc gtk-doc) \
+ --with-html-dir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+ # Sometimes a directory is created instead of a symlink. No idea why...
+ # It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+ # symlink to it.
+ if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+ rm -r "${D}"/usr/include/${PN}
+ fi
+ # Remove files installed by split-off libfm-extra package
+ rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h
+ rm "${D}"/usr/$(get_libdir)/libfm-extra*
+ rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc
+}
+
+pkg_preinst() {
+ # Resolve the symlink mess. Bug #439570
+ [[ -d "${ROOT}"/usr/include/${PN} ]] && \
+ rm -rf "${ROOT}"/usr/include/${PN}
+ if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+ cd "${D}"/usr/include
+ ln -s --force ${PN}-1.0 ${PN}
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/x11-libs/libfm/libfm-9999.ebuild b/x11-libs/libfm/libfm-9999.ebuild
new file mode 100644
index 000000000000..447a8fc27f50
--- /dev/null
+++ b/x11-libs/libfm/libfm-9999.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/lxde/${PN}"
+inherit autotools git-r3 fdo-mime vala
+
+DESCRIPTION="A library for file management"
+HOMEPAGE="http://pcmanfm.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0/4.4.0" #copy ABI_VERSION because it seems upstream change it randomly
+IUSE="+automount debug doc examples exif gtk udisks vala"
+KEYWORDS=""
+
+COMMON_DEPEND=">=dev-libs/glib-2.18:2
+ gtk? ( >=x11-libs/gtk+-2.16:2 )
+ >=lxde-base/menu-cache-0.3.2:=
+ x11-libs/libfm-extra"
+RDEPEND="${COMMON_DEPEND}
+ !lxde-base/lxshortcut
+ x11-misc/shared-mime-info
+ automount? (
+ udisks? ( gnome-base/gvfs[udev,udisks] )
+ !udisks? ( gnome-base/gvfs[udev] )
+ )
+ exif? ( media-libs/libexif )"
+DEPEND="${COMMON_DEPEND}
+ vala? ( $(vala_depend) )
+ doc? (
+ dev-util/gtk-doc
+ )
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+DOCS=( AUTHORS TODO )
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+src_prepare() {
+ if ! use doc; then
+ sed -ie '/^SUBDIR.*=/s#docs##' "${S}"/Makefile.am || die "sed failed"
+ sed -ie '/^[[:space:]]*docs/d' configure.ac || die "sed failed"
+ else
+ gtkdocize --copy || die
+ fi
+ sed -i -e "s:-O0::" -e "/-DG_ENABLE_DEBUG/s: -g::" \
+ configure.ac || die "sed failed"
+
+ intltoolize --force --copy --automake || die
+ #disable unused translations. Bug #356029
+ for trans in app-chooser ask-rename exec-file file-prop preferred-apps \
+ progress;do
+ echo "data/ui/"${trans}.ui >> po/POTFILES.in
+ done
+ #Remove -Werror for automake-1.12. Bug #421101
+ sed -i "s:-Werror::" configure.ac || die
+
+ # subslot sanity check
+ local sub_slot=${SLOT#*/}
+ local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+ if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+ eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+ eerror "Please update SLOT variable as follows:"
+ eerror " SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+ eerror
+ die "sub-slot sanity check failed"
+ fi
+
+ eautoreconf
+ rm -r autom4te.cache || die
+ use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}/etc" \
+ --disable-dependency-tracking \
+ --disable-static \
+ $(use_enable examples demo) \
+ $(use_enable exif) \
+ $(use_enable debug) \
+ $(use_enable udisks) \
+ $(use_enable vala actions) \
+ $(use_with gtk) \
+ $(use_enable doc gtk-doc) \
+ --with-html-dir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f '{}' +
+ # Sometimes a directory is created instead of a symlink. No idea why...
+ # It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+ # symlink to it.
+ if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+ rm -r "${D}"/usr/include/${PN}
+ fi
+ # Remove files installed by split-off libfm-extra package
+ rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h
+ rm "${D}"/usr/$(get_libdir)/libfm-extra*
+ rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc
+}
+
+pkg_preinst() {
+ # Resolve the symlink mess. Bug #439570
+ [[ -d "${ROOT}"/usr/include/${PN} ]] && \
+ rm -rf "${ROOT}"/usr/include/${PN}
+ if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+ cd "${D}"/usr/include
+ ln -s --force ${PN}-1.0 ${PN}
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}
diff --git a/x11-libs/libfm/metadata.xml b/x11-libs/libfm/metadata.xml
new file mode 100644
index 000000000000..0bf4befbb5cf
--- /dev/null
+++ b/x11-libs/libfm/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>lxde@gentoo.org</email>
+ <name>Gentoo LXDE Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>lxqt@gentoo.org</email>
+ <name>LXQt</name>
+ </maintainer>
+ <use>
+ <flag name="vala">Support custom actions in menus</flag>
+ <flag name="udisks">Use libfm's udisks-based volume monitor implementation instead of using the one from gvfs</flag>
+ <flag name="automount">Use <pkg>gnome-base/gvfs</pkg> for automounting</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">pcmanfm</remote-id>
+ <remote-id type="github">lxde/libfm</remote-id>
+ </upstream>
+</pkgmetadata>