x11-misc/qtfm: Add live ebuild
authorJeroen Roovers <jer@gentoo.org>
Sun, 9 Jun 2019 13:46:33 +0000 (15:46 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 9 Jun 2019 13:46:47 +0000 (15:46 +0200)
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
x11-misc/qtfm/files/qtfm-99999-cmake.patch [new file with mode: 0644]
x11-misc/qtfm/qtfm-99999.ebuild [new file with mode: 0644]

diff --git a/x11-misc/qtfm/files/qtfm-99999-cmake.patch b/x11-misc/qtfm/files/qtfm-99999-cmake.patch
new file mode 100644 (file)
index 0000000..a89d090
--- /dev/null
@@ -0,0 +1,47 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,7 +36,7 @@
+         add_definitions(-DMAGICK7)
+     endif()
+     find_package(PkgConfig REQUIRED)
+-    pkg_check_modules(MAGICK REQUIRED ImageMagick++)
++    pkg_check_modules(MAGICK REQUIRED Magick++)
+     # ffmpeg
+     if(ENABLE_FFMPEG)
+         pkg_check_modules(AVDEVICE REQUIRED libavdevice)
+@@ -66,7 +66,7 @@
+ find_package(Qt5Concurrent REQUIRED)
+ # inotify
+-if("${CMAKE_SYSTEM}" NOT MATCHES "Linux")
++if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+     find_package(PkgConfig REQUIRED)
+     pkg_check_modules(NOTIFY REQUIRED libinotify)
+ endif()
+@@ -123,7 +123,7 @@
+     ${PROJECT_VERSION_MAJOR}
+ )
+ if(ENABLE_MAGICK OR ENABLE_MAGICK7)
+-    target_compile_definitions(QtFM PRIVATE ${MAGICK_CFLAGS_OTHER})
++    target_compile_options(QtFM PRIVATE ${MAGICK_CFLAGS_OTHER})
+     target_link_libraries(QtFM ${MAGICK_LIBRARIES})
+     if(ENABLE_FFMPEG)
+         target_include_directories(QtFM
+@@ -161,7 +161,7 @@
+ if(ENABLE_DBUS)
+     target_link_libraries(QtFM Qt5::DBus QtFMBus)
+ endif()
+-if("${CMAKE_SYSTEM}" NOT MATCHES "Linux")
++if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+     target_link_libraries(QtFM ${NOTIFY_LIBRARIES})
+ endif()
+ if(APPLE)
+@@ -192,7 +192,7 @@
+ if(ENABLE_DBUS)
+     target_link_libraries(${PROJECT_NAME} Qt5::DBus)
+ endif()
+-if("${CMAKE_SYSTEM}" NOT MATCHES "Linux")
++if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+     target_link_libraries(${PROJECT_NAME} ${NOTIFY_LIBRARIES})
+ endif()
+ if(APPLE)
diff --git a/x11-misc/qtfm/qtfm-99999.ebuild b/x11-misc/qtfm/qtfm-99999.ebuild
new file mode 100644 (file)
index 0000000..012984f
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit git-r3 xdg-utils cmake-utils
+
+DESCRIPTION="A small, lightweight file manager for desktops based on pure Qt"
+HOMEPAGE="https://qtfm.eu/"
+EGIT_REPO_URI="https://github.com/rodlie/qtfm/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS=""
+IUSE="+dbus ffmpeg imagemagick"
+
+RDEPEND="
+       dev-qt/qtconcurrent:5
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtnetwork:5
+       dev-qt/qtwidgets:5
+       sys-apps/file
+       dbus? ( dev-qt/qtdbus:5 )
+       ffmpeg? ( virtual/ffmpeg )
+       imagemagick? ( >=media-gfx/imagemagick-7:= )
+"
+DEPEND="
+       ${RDEPEND}
+       app-arch/unzip
+       dev-qt/linguist-tools:5
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-99999-cmake.patch
+)
+
+src_configure() {
+       mycmakeargs=(
+               -DENABLE_DBUS="$(usex dbus)"
+               -DENABLE_FFMPEG="$(usex ffmpeg)"
+               -DENABLE_MAGICK7="$(usex imagemagick)"
+       )
+       cmake-utils_src_configure
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}