New package: compton-conf-0.1.0.
This commit is contained in:
parent
ca8d948eb0
commit
5ab84e473a
2 changed files with 102 additions and 0 deletions
85
srcpkgs/compton-conf/patches/qt5.patch
Normal file
85
srcpkgs/compton-conf/patches/qt5.patch
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
commit 7407665b4948cb9eee6e3d89daf65a23e7977d34
|
||||||
|
Author: Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||||
|
Date: Sat Jun 21 06:04:09 2014 +0100
|
||||||
|
|
||||||
|
Add Qt5 support.
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f298def..e65aa5e 100644
|
||||||
|
--- CMakeLists.txt
|
||||||
|
+++ CMakeLists.txt
|
||||||
|
@@ -2,8 +2,22 @@ project(compton-conf)
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 2.8.6)
|
||||||
|
|
||||||
|
-# Qt
|
||||||
|
-find_package(Qt4 REQUIRED QtCore QtGui QtDbus)
|
||||||
|
+# Support Qt5
|
||||||
|
+option(USE_QT5 "Build with Qt5." $ENV{USE_QT5})
|
||||||
|
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
+set(CMAKE_AUTOMOC ON)
|
||||||
|
+if(USE_QT5)
|
||||||
|
+ cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
+ find_package(Qt5Widgets REQUIRED)
|
||||||
|
+ find_package(Qt5DBus REQUIRED)
|
||||||
|
+ find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||||
|
+ message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}")
|
||||||
|
+else()
|
||||||
|
+ find_package(Qt4 REQUIRED QtCore QtGui QtDbus)
|
||||||
|
+ include(${QT_USE_FILE})
|
||||||
|
+ message(STATUS "Building with Qt${QTVERSION}")
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
# libconfig using pkg-config
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
@@ -15,14 +29,20 @@ include(GNUInstallDirs REQUIRED)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-DQT_NO_KEYWORDS -fno-exceptions")
|
||||||
|
|
||||||
|
+if(USE_QT5)
|
||||||
|
+ set(QTX_INCLUDE_DIRS "")
|
||||||
|
+ set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus)
|
||||||
|
+else()
|
||||||
|
+ set(QTX_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTDBUS_DIR})
|
||||||
|
+ set(QTX_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDBUS_LIBRARY})
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
include_directories(
|
||||||
|
- ${QT_INCLUDES}
|
||||||
|
+ ${QTX_INCLUDE_DIRS}
|
||||||
|
${LIBCONFIG_INCLUDE_DIRS}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
-set(CMAKE_AUTOMOC TRUE)
|
||||||
|
-
|
||||||
|
set(compton-conf_SRCS
|
||||||
|
maindialog.cpp
|
||||||
|
compton-conf.cpp
|
||||||
|
@@ -32,9 +52,11 @@ set(compton-conf_UIS
|
||||||
|
maindialog.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
-qt4_wrap_ui(compton-conf_UI_H
|
||||||
|
- ${compton-conf_UIS}
|
||||||
|
-)
|
||||||
|
+if(USE_QT5)
|
||||||
|
+ qt5_wrap_ui(compton-conf_UI_H ${compton-conf_UIS})
|
||||||
|
+else()
|
||||||
|
+ qt4_wrap_ui(compton-conf_UI_H ${compton-conf_UIS})
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
add_definitions(
|
||||||
|
-DCOMPTON_CONF_DATA_DIR="${CMAKE_INSTALL_FULL_DATADIR}/compton-conf"
|
||||||
|
@@ -46,9 +68,7 @@ add_executable(compton-conf
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(compton-conf
|
||||||
|
- ${QT_QTCORE_LIBRARY}
|
||||||
|
- ${QT_QTGUI_LIBRARY}
|
||||||
|
- ${QT_QTDBUS_LIBRARY}
|
||||||
|
+ ${QTX_LIBRARIES}
|
||||||
|
${LIBCONFIG_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
17
srcpkgs/compton-conf/template
Normal file
17
srcpkgs/compton-conf/template
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Template file for 'compton-conf'
|
||||||
|
pkgname=compton-conf
|
||||||
|
version=0.1.0
|
||||||
|
revision=1
|
||||||
|
create_wrksrc=yes
|
||||||
|
build_style=cmake
|
||||||
|
configure_args="-DUSE_QT5=1"
|
||||||
|
hostmakedepends="cmake pkg-config"
|
||||||
|
makedepends="qt5-x11extras-devel qt5-tools-devel libconfig-devel"
|
||||||
|
depends="virtual?compton desktop-file-utils"
|
||||||
|
depends="desktop-file-utils"
|
||||||
|
short_desc="LXQT compton compositor UI"
|
||||||
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
license="LGPL-2.1"
|
||||||
|
homepage="http://lxqt.org/"
|
||||||
|
distfiles="http://lxqt.org/downloads/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
|
||||||
|
checksum=f362790ae1a20c7ac65790e411cb792200c2430199186affa70dba3ebb01dedf
|
Loading…
Reference in a new issue