Update sysutils/kshutdown-kde4 to 4.0

* Update to 4.0
* Define the LICENSE
* Make qa.sh happy by adding some Qt and KDE dependencies
* Replace install/strip patch by upstreamed one by rakuco@ [1]

[1] https://sourceforge.net/p/kshutdown/patches/6/

Reviewed by:	rakuco
Approved by:	rakuco (mentor)
Differential Revision:	https://reviews.freebsd.org/D7727
This commit is contained in:
Tobias C. Berner 2016-10-11 05:37:13 +00:00
parent 680e72d7ec
commit c182d0d8aa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423745
4 changed files with 64 additions and 20 deletions

View file

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= kshutdown
DISTVERSION= 3.2
DISTVERSION= 4.0
CATEGORIES= sysutils kde
MASTER_SITES= SF/${PORTNAME}/KShutdown/${DISTVERSION}/
DISTNAME= ${PORTNAME}-source-${DISTVERSION}
@ -9,10 +9,17 @@ DISTNAME= ${PORTNAME}-source-${DISTVERSION}
MAINTAINER= kde@FreeBSD.org
COMMENT= Advanced shutdown utility for KDE
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= alias cmake:outsource compiler:c++0x gettext kde:4 zip
USE_QT4= moc_build qmake_build rcc_build uic_build
USE_KDE= automoc4 workspace
USE_QT4= corelib dbus gui moc_build qmake_build rcc_build svg uic_build
USE_KDE= automoc4 kdelibs workspace
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
# Make sure, we're building the KDE4 version.
CMAKE_ARGS= -DKS_KF5:BOOL=FALSE \
-DKS_PURE_QT:BOOL=FALSE
.include <bsd.port.mk>

View file

@ -1,2 +1,3 @@
SHA256 (kshutdown-source-3.2.zip) = 8be6c2a15bb539919f94ec0caf20f00b144185f996b7663c464fbf7ce8f4a39f
SIZE (kshutdown-source-3.2.zip) = 435553
TIMESTAMP = 1472666353
SHA256 (kshutdown-source-4.0.zip) = 75733e5b55b36add775a2788365ee6f5fe8b3d21598e2a17e68b2f8dd62199fc
SIZE (kshutdown-source-4.0.zip) = 459493

View file

@ -1,14 +1,51 @@
--- src/CMakeLists.txt.orig 2014-10-12 13:00:51 UTC
+++ src/CMakeLists.txt
@@ -47,10 +47,7 @@
target_link_libraries(kshutdown kdecore kdeui kio ${KDE4_KNOTIFYCONFIG_LIBS} ${KDE4_KUTILS_LIBS})
-install(
- PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/kshutdown"
- DESTINATION bin
-)
+install(TARGETS kshutdown RUNTIME DESTINATION bin)
install(FILES kshutdown.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES kshutdown.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kshutdown)
From https://sourceforge.net/p/kshutdown/patches/6/:
The attached patch switches the INSTALL(PROGRAMS) calls in src/CMakeLists.txt
to calls to INSTALL(TARGETS).
CMake's documentation for INSTALL(PROGRAMS) says:
This form is intended to install programs that are not
targets, such as shell scripts. Use the TARGETS form to
install targets built within the project.
Additionally, installing a target also causes CMake to create additional
targets, suchas install/strip, to automatically strip the binary (useful
for packagers and people building in release mode).
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt (revision 835)
+++ src/CMakeLists.txt (working copy)
@@ -54,6 +54,7 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(KS_PURE_QT)
+ set_target_properties(kshutdown PROPERTIES OUTPUT_NAME kshutdown-qt)
target_link_libraries(kshutdown ${Qt5Widgets_LIBRARIES} ${Qt5DBus_LIBRARIES})
elseif(KS_KF5)
target_link_libraries(kshutdown Qt5::DBus Qt5::Widgets KF5::ConfigCore KF5::ConfigWidgets KF5::DBusAddons KF5::GlobalAccel KF5::I18n KF5::IdleTime KF5::Notifications KF5::NotifyConfig KF5::XmlGui)
@@ -66,14 +67,13 @@
set(XDG_APPS_INSTALL_DIR ${DATA_INSTALL_DIR}/applications)
install(
- PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/kshutdown"
+ TARGETS kshutdown
DESTINATION bin
- RENAME kshutdown-qt
)
install(FILES kshutdown-qt.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
elseif(KS_KF5)
install(
- PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/kshutdown"
+ TARGETS kshutdown
DESTINATION bin
)
install(FILES kshutdown.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
@@ -80,7 +80,7 @@
install(FILES kshutdown.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
else()
install(
- PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/kshutdown"
+ TARGETS kshutdown
DESTINATION bin
)
install(FILES kshutdown.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})

View file

@ -18,7 +18,6 @@ share/icons/hicolor/22x22/apps/kshutdown.png
share/icons/hicolor/32x32/apps/kshutdown.png
share/icons/hicolor/48x48/apps/kshutdown.png
share/icons/hicolor/64x64/apps/kshutdown.png
share/icons/hicolor/scalable/apps/kshutdown.svgz
share/locale/ar/LC_MESSAGES/kshutdown.mo
share/locale/bg/LC_MESSAGES/kshutdown.mo
share/locale/cs/LC_MESSAGES/kshutdown.mo