From bc7518bdba609f90ee89de8b4e7ddaa1e567b1a8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 18 Jun 2022 22:59:25 +0900 Subject: [PATCH] CMake conversion. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michele Calgaro Signed-off-by: Slávek Banko --- CMakeLists.txt | 94 +++++++++ ConfigureChecks.cmake | 94 +++++++++ INSTALL | 15 +- README | 72 ------- README.md | 61 ++++++ TODO | 2 - config.h.cmake | 17 ++ convert-presets/CMakeLists.txt | 26 +++ convert-presets/po/CMakeLists.txt | 1 + doc/man/convert-presets.1 | 150 ++++++++++++++ doc/man/tderadio.1 | 147 ++++++++++++++ icons/CMakeLists.txt | 1 + plugins/CMakeLists.txt | 14 ++ plugins/alsa-sound/CMakeLists.txt | 31 +++ plugins/alsa-sound/icons/CMakeLists.txt | 1 + plugins/alsa-sound/po/CMakeLists.txt | 1 + plugins/gui-docking-menu/CMakeLists.txt | 28 +++ plugins/gui-docking-menu/po/CMakeLists.txt | 1 + plugins/gui-error-log/CMakeLists.txt | 27 +++ plugins/gui-error-log/po/CMakeLists.txt | 1 + plugins/gui-quickbar/CMakeLists.txt | 29 +++ plugins/gui-quickbar/po/CMakeLists.txt | 1 + plugins/gui-standard-display/CMakeLists.txt | 31 +++ .../gui-standard-display/po/CMakeLists.txt | 1 + plugins/lirc/CMakeLists.txt | 35 ++++ .../lirc/dot-lircrc.example | 0 plugins/lirc/lircsupport.cpp | 10 - plugins/lirc/lircsupport.h | 2 - plugins/lirc/po/CMakeLists.txt | 1 + .../lirc/po/tderadio-lirc/tderadio-lirc.pot | 22 +- plugins/oss-sound/CMakeLists.txt | 28 +++ plugins/oss-sound/icons/CMakeLists.txt | 1 + plugins/oss-sound/po/CMakeLists.txt | 1 + plugins/radio/CMakeLists.txt | 28 +++ plugins/radio/po/CMakeLists.txt | 1 + plugins/recording/CMakeLists.txt | 33 +++ plugins/recording/icons/CMakeLists.txt | 1 + plugins/recording/po/CMakeLists.txt | 1 + plugins/soundserver/CMakeLists.txt | 27 +++ plugins/soundserver/po/CMakeLists.txt | 1 + plugins/streaming/CMakeLists.txt | 31 +++ plugins/streaming/icons/CMakeLists.txt | 1 + plugins/streaming/po/CMakeLists.txt | 1 + plugins/timecontrol/CMakeLists.txt | 28 +++ plugins/timecontrol/icons/CMakeLists.txt | 1 + plugins/timecontrol/po/CMakeLists.txt | 1 + plugins/timeshifter/CMakeLists.txt | 28 +++ plugins/timeshifter/icons/CMakeLists.txt | 1 + plugins/timeshifter/po/CMakeLists.txt | 1 + plugins/v4lradio/CMakeLists.txt | 30 +++ plugins/v4lradio/po/CMakeLists.txt | 1 + plugins/v4lradio/v4lradio.cpp | 7 +- presets/CMakeLists.txt | 23 +++ src/CMakeLists.txt | 89 +++++++++ src/Makefile.am | 2 - src/debug-profiler.cpp | 4 +- src/include/alarm.h | 3 +- src/include/debug-profiler.h | 9 +- src/include/fileringbuffer.h | 3 +- src/include/frequencyradiostation.h | 4 +- src/include/frequencyseekhelper.h | 9 +- src/include/interfaces.h | 2 +- src/include/internetradiostation.h | 3 +- src/include/multibuffer.h | 3 +- src/include/pluginmanager.h | 5 +- src/include/plugins.h | 18 +- src/include/radiostation-config.h | 29 +-- src/include/radiostation-listview.h | 4 +- src/include/radiostation.h | 6 +- src/include/ringbuffer.h | 3 +- src/include/seekhelper.h | 6 +- src/include/soundformat.h | 2 +- src/include/soundstreamid.h | 4 +- src/include/standardscandialog.h | 11 +- src/include/station-drag-object.h | 3 +- src/include/stationlist.h | 5 +- src/include/stationselector.h | 11 +- src/include/widgetplugins.h | 2 +- src/po/CMakeLists.txt | 1 + src/radiostation.cpp | 4 +- src/stationlist.cpp | 2 +- src/stationselector-ui.ui | 1 + src/tderadio.xpm | 189 ++++++++++++++++++ 83 files changed, 1445 insertions(+), 184 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake delete mode 100644 README create mode 100644 README.md create mode 100644 config.h.cmake create mode 100644 convert-presets/CMakeLists.txt create mode 100644 convert-presets/po/CMakeLists.txt create mode 100644 doc/man/convert-presets.1 create mode 100644 doc/man/tderadio.1 create mode 100644 icons/CMakeLists.txt create mode 100644 plugins/CMakeLists.txt create mode 100644 plugins/alsa-sound/CMakeLists.txt create mode 100644 plugins/alsa-sound/icons/CMakeLists.txt create mode 100644 plugins/alsa-sound/po/CMakeLists.txt create mode 100644 plugins/gui-docking-menu/CMakeLists.txt create mode 100644 plugins/gui-docking-menu/po/CMakeLists.txt create mode 100644 plugins/gui-error-log/CMakeLists.txt create mode 100644 plugins/gui-error-log/po/CMakeLists.txt create mode 100644 plugins/gui-quickbar/CMakeLists.txt create mode 100644 plugins/gui-quickbar/po/CMakeLists.txt create mode 100644 plugins/gui-standard-display/CMakeLists.txt create mode 100644 plugins/gui-standard-display/po/CMakeLists.txt create mode 100644 plugins/lirc/CMakeLists.txt rename dot-lircrc.example => plugins/lirc/dot-lircrc.example (100%) create mode 100644 plugins/lirc/po/CMakeLists.txt create mode 100644 plugins/oss-sound/CMakeLists.txt create mode 100644 plugins/oss-sound/icons/CMakeLists.txt create mode 100644 plugins/oss-sound/po/CMakeLists.txt create mode 100644 plugins/radio/CMakeLists.txt create mode 100644 plugins/radio/po/CMakeLists.txt create mode 100644 plugins/recording/CMakeLists.txt create mode 100644 plugins/recording/icons/CMakeLists.txt create mode 100644 plugins/recording/po/CMakeLists.txt create mode 100644 plugins/soundserver/CMakeLists.txt create mode 100644 plugins/soundserver/po/CMakeLists.txt create mode 100644 plugins/streaming/CMakeLists.txt create mode 100644 plugins/streaming/icons/CMakeLists.txt create mode 100644 plugins/streaming/po/CMakeLists.txt create mode 100644 plugins/timecontrol/CMakeLists.txt create mode 100644 plugins/timecontrol/icons/CMakeLists.txt create mode 100644 plugins/timecontrol/po/CMakeLists.txt create mode 100644 plugins/timeshifter/CMakeLists.txt create mode 100644 plugins/timeshifter/icons/CMakeLists.txt create mode 100644 plugins/timeshifter/po/CMakeLists.txt create mode 100644 plugins/v4lradio/CMakeLists.txt create mode 100644 plugins/v4lradio/po/CMakeLists.txt create mode 100644 presets/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/po/CMakeLists.txt create mode 100644 src/tderadio.xpm diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ae228f3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,94 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 3.1 ) + + +#### general package setup + +project( tderadio ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +include( TDEMacros ) + + +##### set version number ######################## + +tde_set_project_version( ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_LAME "Enable lame support" ${WITH_ALL_OPTIONS} ) +option( WITH_OGG "Enable ogg/vorbis support" ${WITH_ALL_OPTIONS} ) + +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} ) + +option( BUILD_ALSA_PLUGIN "Build ALSA plugin" ${BUILD_ALL} ) +option( BUILD_LIRC_PLUGIN "Build LIRC plugin" ${BUILD_ALL} ) +option( BUILD_OSS_PLUGIN "Build OSS plugin" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H ) + +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( convert-presets ) +add_subdirectory( icons ) +add_subdirectory( plugins ) +add_subdirectory( presets ) +add_subdirectory( src ) + + +##### other data ################################ + +tde_conditional_add_project_docs( BUILD_DOC ) + + +##### 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..5a14d7f --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,94 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +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 ) + + +##### check for ALSA ##### + +if( BUILD_ALSA_PLUGIN ) + find_package( ALSA ) + if( NOT ALSA_FOUND ) + tde_message_fatal( "alsa support is requested, but was not found on your system" ) + endif( NOT ALSA_FOUND ) +endif( BUILD_ALSA_PLUGIN ) + + +###### check for LAME ##### + +if( WITH_LAME ) + check_include_file( lame/lame.h HAVE_LAME_H ) + if( NOT HAVE_LAME_H ) + tde_message_fatal( "lame is requested, but not found on your system" ) + endif( ) + check_library_exists( mp3lame lame_init "" HAVE_LAME ) + if( NOT HAVE_LAME ) + tde_message_fatal( "mp3lame is requested, but not found on your system" ) + endif( ) + set( HAVE_LAME 1 ) + set( LAME_LIBRARIES mp3lame CACHE INTERNAL "" FORCE ) +endif( WITH_LAME ) + + +##### check for LIRC ##### + +if( BUILD_LIRC_PLUGIN ) + pkg_search_module( LIRC lirc ) + if( NOT LIRC_FOUND ) + tde_message_fatal( "lirc support is requested, but was not found on your system" ) + endif( NOT LIRC_FOUND ) +endif( BUILD_LIRC_PLUGIN ) + + +##### check for OGG/Vorbis ##### + +if( WITH_OGG ) + pkg_search_module( VORBIS vorbis ) + pkg_search_module( VORBISFILE vorbisfile ) + pkg_search_module( VORBISENC vorbisenc ) + pkg_search_module( OGG ogg ) + if( NOT VORBIS_FOUND ) + tde_message_fatal( "vorbis is requested, but was not found on your system" ) + elseif( NOT VORBISFILE_FOUND OR NOT VORBISENC_FOUND OR NOT OGG_FOUND ) + tde_message_fatal( "vorbis is requested, but some of it's essential parts wasn't found on your system" ) + endif( ) + set( HAVE_OGG 1 ) +endif( WITH_OGG ) + + +##### check for sndfile ##### + +pkg_search_module( SNDFILE sndfile ) +if( NOT SNDFILE_FOUND ) + tde_message_fatal( "sndfile is required, but was not found on your system" ) +endif( ) + + +##### Check for videodev ##### + +check_include_file( "linux/videodev2.h" HAVE_VIDEODEV2_H ) +if( HAVE_VIDEODEV2_H ) + set( HAVE_V4L2 1 ) +endif( ) diff --git a/INSTALL b/INSTALL index 4bca1d7..cf92abe 100644 --- a/INSTALL +++ b/INSTALL @@ -1,16 +1,3 @@ -Note on automake/autoconf versions -================================== - -TDERadio should build with automake >= 1.6.1 and autoconf 2.5* - -If you have such a version but configure/make complains it needs e.g. -automake 1.7.x you should try to run - - make -f Makefile.dist - -before you run ./configure. - - Basic Installation ================== @@ -53,7 +40,7 @@ The simplest way to compile this package is: documentation. 4. You can remove the program binaries and object files from the - source code directory by typing `make clean'. + source code directory by typing `make clean'. Compilers and Options ===================== diff --git a/README b/README deleted file mode 100644 index d2fd9ea..0000000 --- a/README +++ /dev/null @@ -1,72 +0,0 @@ -This is a comfortable radio application for KDE 3.x. -You can get the latest version from - - http://sourceforge.net/projects/tderadio/ - ------------------- -Mailing Lists ------------------- - - http://lists.sourceforge.net/lists/listinfo/tderadio-user - http://lists.sourceforge.net/lists/listinfo/tderadio-devel - http://lists.sourceforge.net/lists/listinfo/tderadio-announce - ------------------- -Compile CVS tree ------------------- - -First checkout tderadio from CVS - - mkdir tderadio-cvs - cd tderadio-cvs - # next follow instructions on http://sourceforge.net/cvs/?group_id=45668 - cd tderadio - -and compile it - - make -f Makefile.dist - ./configure - make - make install - -------------------- -Configuration files -------------------- - -gui, alarms, etc.: - /share/config/tderadiorc - -stations (xml-format): - /share/apps/tderadio/stations.krp - -systemwide presets (xml-format): - /share/apps/tderadio/presets//-.krp - - ------------------- -lirc support ------------------- - -lirc support is realized by the lirc_client lib. It should be detected -automatically by ./configure. This library is used to translate the -remote control key names to names used by tderadio, and may additionally -be used for state management (tv, etc). An example for an apropriate -.lircrc file can be found in ./tderadio/dot-lircrc.example. - -Names used by tderadio: - - TV powerOff, give tv program a chance - 0..9 numerical station selection - CH+ frequency increment - CH- frequency decrement - VOL+ volume increment - VOL- volume decrement - CH-SEARCH beachward station search - CH+SEARCH forward statino search - POWER power tderadio on/off - RADIO power tderadio on - SLEEP enable sleep countdown - NEXT next station in list - PREV prev station in list - QUIT quit tderadio application - diff --git a/README.md b/README.md new file mode 100644 index 0000000..cdbe49e --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ + +TDERadio - a comfortable radio application for TDE + + +Requirements +------------ +- v4l or v4l2 enabled kernel +- libsndfile (development package or header for compilation, library for execution) +- libmp3lame (for mp3 encoding) +- oss support (mixer, dsp/pcm) ?? +- radio card ;) + +Configuration files +--------------------- + +gui, alarms, etc.: + .trinity/share/config/tderadiorc + +stations (xml-format): + .trinity/share/apps/tderadio/stations.krp + +systemwide presets (xml-format): + /share/apps/tderadio/presets//-.krp + + +lirc support +-------------- + +lirc support is realized by the lirc_client lib. This library is used to +translate the remote control key names to names used by tderadio, and may +additionally be used for state management (tv, etc). + +Names used by tderadio: + + TV powerOff, give tv program a chance + 0..9 numerical station selection + CH+ frequency increment + CH- frequency decrement + VOL+ volume increment + VOL- volume decrement + CH-SEARCH beachward station search + CH+SEARCH forward statino search + POWER power tderadio on/off + RADIO power tderadio on + SLEEP enable sleep countdown + NEXT next station in list + PREV prev station in list + QUIT quit tderadio application + +. + +Contributing +-------------- + +If you wish to contribute to TDERadio, you might do so: + +- TDE Gitea Workspace (TGW) collaboration tool. + https://mirror.git.trinitydesktop.org/gitea + +- TDE Weblate Translation Workspace (TWTW) collaboration tool. + https://mirror.git.trinitydesktop.org/weblate diff --git a/TODO b/TODO index 0a71772..ee9288e 100644 --- a/TODO +++ b/TODO @@ -57,8 +57,6 @@ FUTURE ====== * mediacontrol applet integration * dcop interface - * compile with -DTQT_NO_ASCII_CAST (see src/Makefile.am) - (necessary for Qt4) * just grep for FIXME and TODO... diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..01752bb --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,17 @@ +#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@ + +// Defined if LAME support found +#cmakedefine HAVE_LAME + +// Defined if OGG/Vorbis support found +#cmakedefine HAVE_OGG + +// Defined if videodev2 support found +#cmakedefine HAVE_V4L2 diff --git a/convert-presets/CMakeLists.txt b/convert-presets/CMakeLists.txt new file mode 100644 index 0000000..c6643ea --- /dev/null +++ b/convert-presets/CMakeLists.txt @@ -0,0 +1,26 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### convert_presets (translations) + +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### convert_presets (executable) + +tde_add_executable( convert-presets AUTOMOC + SOURCES convert-presets.cpp + LINK tdecore-shared tdeui-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/convert-presets/po/CMakeLists.txt b/convert-presets/po/CMakeLists.txt new file mode 100644 index 0000000..24e3bd8 --- /dev/null +++ b/convert-presets/po/CMakeLists.txt @@ -0,0 +1 @@ +tde_add_project_translations() diff --git a/doc/man/convert-presets.1 b/doc/man/convert-presets.1 new file mode 100644 index 0000000..2b898ce --- /dev/null +++ b/doc/man/convert-presets.1 @@ -0,0 +1,150 @@ +.\" This file was generated by kdemangen.pl +.TH CONVERT\-PRESETS 1 "Dec 2005" "Trinity Desktop Environment" "convert-presets" +.SH NAME +convert\-presets +\- convert-presets +.SH SYNOPSIS +convert\-presets [Qt\-options] [TDE\-options] [options] [preset files] +.SH DESCRIPTION +convert-presets +.SH OPTIONS +.SS +.SS Arguments: +.TP +.B preset +files preset file to convert +.SS Options: +-q be quiet +.SS +.SS Generic options: +.TP +.B \-\-help +Show help about options +.TP +.B \-\-help\-qt +Show Qt specific options +.TP +.B \-\-help\-tde +Show TDE specific options +.TP +.B \-\-help\-all +Show all options +.TP +.B \-\-author +Show author information +.TP +.B \-v, \-\-version +Show version information +.TP +.B \-\-license +Show license information +.TP +.B \-\- +End of options +.SS +.SS TDE options: +.TP +.B \-\-caption +Use 'caption' as name in the titlebar +.TP +.B \-\-icon +Use 'icon' as the application icon +.TP +.B \-\-miniicon +Use 'icon' as the icon in the titlebar +.TP +.B \-\-config +Use alternative configuration file +.TP +.B \-\-dcopserver +Use the DCOP Server specified by 'server' +.TP +.B \-\-nocrashhandler +Disable crash handler, to get core dumps +.TP +.B \-\-waitforwm +Waits for a WM_NET compatible windowmanager +.TP +.B \-\-style