summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-05-16 17:36:45 +0900
committerMichele Calgaro <[email protected]>2024-05-16 17:36:45 +0900
commit247d5d3bd6fec5350e498c2cb0eb1505f97abc2e (patch)
treed8ad4bd89dfff80fd4e4eb055ecbc8bffd7e17e6
parent102f8c1e4f7e4a5bce61ee00dae95d9ebaee1e33 (diff)
downloadtde-ebook-reader-247d5d3bd6fec5350e498c2cb0eb1505f97abc2e.tar.gz
tde-ebook-reader-247d5d3bd6fec5350e498c2cb0eb1505f97abc2e.zip
Added libzlcore-data-tqt cmake files
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r--CMakeLists.txt77
-rw-r--r--ConfigureChecks.cmake25
-rw-r--r--config.h.cmake8
-rw-r--r--debian/compat1
-rw-r--r--debian/control6
-rw-r--r--debian/libzlcore-data-tqt.install2
-rwxr-xr-xdebian/rules1
-rw-r--r--zlibrary/CMakeLists.txt14
-rw-r--r--zlibrary/core/CMakeLists.txt24
-rw-r--r--zlibrary/core/data/config.xml (renamed from zlibrary/core/data/default/config.desktop.xml)0
10 files changed, 154 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..ce91642
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,77 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
+
+
+##### set project version ########################
+
+include( TDEVersion )
+cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
+tde_set_project_version( )
+
+
+#### general package setup
+
+project( tde-ebook-reader )
+
+
+#### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckSymbolExists )
+include( CheckIncludeFile )
+include( CheckLibraryExists )
+include( CheckCSourceCompiles )
+include( CheckCXXSourceCompiles )
+
+
+#### include our cmake modules
+
+include( TDEMacros )
+
+
+##### setup install paths
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### optional stuff
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+
+
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
+option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+
+
+##### configure checks
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+
+##### directories
+
+add_subdirectory( zlibrary )
+#add_subdirectory( tde-ebook-reader )
+
+
+##### write configure files
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..6460319
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,25 @@
+###########################################
+# #
+# Improvements and feedback are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+###########################################
+
+
+# required stuff
+find_package( TQt )
+
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+tde_setup_largefiles( )
+
+
+##### check for gcc visibility support
+
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+endif( WITH_GCC_VISIBILITY )
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..77aba21
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,8 @@
+#define VERSION "@VERSION@"
+
+// Defined if you have fvisibility and fvisibility-inlines-hidden support.
+#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+
+// Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+// significant byte first (like Motorola and SPARC, unlike Intel).
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
index 31e4c8e..97e81ed 100644
--- a/debian/control
+++ b/debian/control
@@ -3,10 +3,10 @@ Section: text
Priority: optional
Maintainer: TDE Debian Team <[email protected]>
XSBC-Original-Maintainer: Debian QA Group <[email protected]>
-Standards-Version: 4.7.0
-Build-Depends: cdbs, debhelper (>= 10~), quilt, tde-cmake, ninja-build, libtqtinterface-dev
+Build-Depends: cdbs, debhelper (>= 10~), quilt, tde-cmake, ninja-build, libtqtinterface-dev,
libbz2-dev, libcurl4-gnutls-dev, libexpat1-dev, libfribidi-dev,
- libjpeg-dev, libsqlite3-dev, libunibreak-dev, libz-dev, pkgconf
+ libjpeg-dev, libsqlite3-dev, libunibreak-dev, libz-dev, pkgconf
+Standards-Version: 4.7.0
Package: tde-ebook-reader
Architecture: any
diff --git a/debian/libzlcore-data-tqt.install b/debian/libzlcore-data-tqt.install
index b4c24af..01ddbe6 100644
--- a/debian/libzlcore-data-tqt.install
+++ b/debian/libzlcore-data-tqt.install
@@ -1 +1 @@
-#usr/share/zlibrary
+/usr/share/zlibrary-tqt
diff --git a/debian/rules b/debian/rules
index a6797f1..0589ec4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ include debian/cdbs/debian-tde.mk
DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-DCMAKE_INSTALL_PREFIX="/opt/trinity" \
+ -DCMAKE_ZLIBRARY_INSTALL_PREFIX="/usr" \
-DCONFIG_INSTALL_DIR="/etc/trinity" \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
diff --git a/zlibrary/CMakeLists.txt b/zlibrary/CMakeLists.txt
new file mode 100644
index 0000000..fcd0b42
--- /dev/null
+++ b/zlibrary/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+##### zlibrary-tqt install path
+
+_tde_internal_setup_path(
+ ZLIB_SHARE_INSTALL_PREFIX "${CMAKE_ZLIBRARY_INSTALL_PREFIX}/share/zlibrary-tqt"
+ "Base directory for zlibrary-tqt files which go to share/"
+)
+
+
+##### subfolders
+
+add_subdirectory( core )
+#add_subdirectory( text )
+#add_subdirectory( ui )
diff --git a/zlibrary/core/CMakeLists.txt b/zlibrary/core/CMakeLists.txt
new file mode 100644
index 0000000..6b17cdb
--- /dev/null
+++ b/zlibrary/core/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+##### install data files
+
+install(
+ FILES data/languagePatterns.zip data/unicode.xml.gz
+ DESTINATION ${ZLIB_SHARE_INSTALL_PREFIX}
+)
+
+install(
+ FILES data/config.xml
+ DESTINATION ${ZLIB_SHARE_INSTALL_PREFIX}/default
+)
+
+file( GLOB _enconding_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/data/encodings/* )
+install(
+ FILES ${_enconding_files}
+ DESTINATION ${ZLIB_SHARE_INSTALL_PREFIX}/encodings
+)
+
+file( GLOB _resources_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/data/resources/*.xml )
+install(
+ FILES ${_resources_files}
+ DESTINATION ${ZLIB_SHARE_INSTALL_PREFIX}/resources
+)
diff --git a/zlibrary/core/data/default/config.desktop.xml b/zlibrary/core/data/config.xml
index 90d029e..90d029e 100644
--- a/zlibrary/core/data/default/config.desktop.xml
+++ b/zlibrary/core/data/config.xml