diff options
Diffstat (limited to 'audio/kid3')
-rw-r--r-- | audio/kid3/Makefile | 118 | ||||
-rw-r--r-- | audio/kid3/distinfo | 3 | ||||
-rw-r--r-- | audio/kid3/files/patch-CMakeLists.txt | 13 | ||||
-rw-r--r-- | audio/kid3/files/patch-src_app_kde_kdemainwindow.cpp | 45 | ||||
-rw-r--r-- | audio/kid3/files/patch-src_plugins_mp4v2metadata_m4afile.cpp | 53 | ||||
-rw-r--r-- | audio/kid3/files/patch-src_plugins_oggflacmetadata_CMakeLists.txt | 35 | ||||
-rw-r--r-- | audio/kid3/pkg-descr | 16 | ||||
-rw-r--r-- | audio/kid3/pkg-plist | 107 |
8 files changed, 390 insertions, 0 deletions
diff --git a/audio/kid3/Makefile b/audio/kid3/Makefile new file mode 100644 index 000000000000..ba5bd4dc2983 --- /dev/null +++ b/audio/kid3/Makefile @@ -0,0 +1,118 @@ +PORTNAME= kid3 +PORTVERSION= 3.9.5 +CATEGORIES= audio kde +MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION} +PKGNAMESUFFIX= -${FLAVOR} + +MAINTAINER= jhale@FreeBSD.org +COMMENT= Audio file tag editor +WWW= https://kid3.kde.org/ + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl +LIB_DEPENDS= libtag.so:audio/taglib + +FLAVORS= qt6 kf5 kf6 +FLAVOR?= ${FLAVORS:[1]} + +USES= cmake compiler:c++17-lang desktop-file-utils gnome pkgconfig \ + tar:xz +USE_GNOME= libxslt:build +USE_LDCONFIG= yes + +CMAKE_ARGS= -DWITH_DOCBOOKDIR="${LOCALBASE}/share/xsl/docbook" \ + -DWITH_LIBDIR=lib \ + -DWITH_MANDIR=share/man \ + -DWITH_PLUGINSDIR=lib/kid3 \ + -DFFMPEG_ROOT="${LOCALBASE}" \ + -DWITH_APPS="${KID3_APPS:S/ /;/gW}" +CMAKE_OFF= WITH_ID3LIB \ + WITH_MP4V2 \ + WITH_QML +CMAKE_ON= WITH_TAGLIB +PLIST_SUB+= KF_SUFX=${FLAVOR:S/kf//:S/qt//} \ + SHLIB_VER=${PORTVERSION} + +.if ${FLAVOR} == qt6 +USES+= gl qt:6 +USE_GL= opengl +USE_QT= base multimedia tools:build +CMAKE_ON+= BUILD_WITH_QT6 +PLIST_SUB+= KF="@comment " \ + QT="" \ + QT_SUFX="-qt" +KID3_APPS+= QT +.elif ${FLAVOR} == kf5 +USES+= kde:5 qt:5 +USE_KDE= auth codecs config configwidgets coreaddons kio \ + service widgetsaddons xmlgui doctools:build ecm:build +USE_QT= concurrent core dbus gui multimedia network xml widgets \ + buildtools:build linguisttools:build qmake:build +CMAKE_OFF+= BUILD_WITH_QT6 +PLIST_SUB+= KF="" \ + QT="@comment " \ + QT_SUFX="" +KID3_APPS+= KDE +.elif ${FLAVOR} == kf6 +USES+= gl kde:6 qt:6 +USE_GL= opengl +USE_KDE= colorscheme config configwidgets coreaddons kio \ + widgetsaddons xmlgui doctools:build ecm:build +USE_QT= base multimedia tools:build +CMAKE_ON+= BUILD_WITH_QT6 +PLIST_SUB+= KF="" \ + QT="@comment " \ + QT_SUFX="" +KID3_APPS+= KDE +.endif + +.for f in ${FLAVORS} +. if ${FLAVOR} != ${f} +CONFLICTS_INSTALL+= kid3-${f} +. endif +.endfor + +OPTIONS_DEFINE= CLI ACOUSTID FLAC VORBIS TEST +OPTIONS_DEFAULT= CLI ACOUSTID FLAC VORBIS +OPTIONS_SUB= yes +NO_OPTIONS_SORT= yes + +ACOUSTID_LIB_DEPENDS= libchromaprint.so:audio/chromaprint \ + libavcodec.so:multimedia/ffmpeg +ACOUSTID_CMAKE_BOOL= WITH_CHROMAPRINT WITH_FFMPEG + +CLI_DESC= Build and install command line utility +CLI_USES= python:test readline +CLI_VARS= KID3_APPS+=CLI + +FLAC_LIB_DEPENDS= libFLAC.so:audio/flac +FLAC_CMAKE_BOOL= WITH_FLAC +FLAC_IMPLIES= VORBIS + +TEST_USE= LOCALE=en_US.UTF-8 +.if ${FLAVOR} == kf5 +TEST_USE+= QT=testlib:build +.endif +TEST_CMAKE_BOOL= BUILD_TESTING +TEST_TARGET= # define to override CMAKE_ARGS from Uses/kde.mk +TEST_WRKSRC= ${BUILD_WRKSRC}/src/test +TEST_VARS= KID3_APPS+=TEST + +VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \ + libogg.so:audio/libogg +VORBIS_CMAKE_BOOL= WITH_VORBIS + +.include <bsd.port.options.mk> + +pre-test: + @${CP} ${WRKSRC}/src/test/*.py ${TEST_WRKSRC} + +do-test: + -@(cd ${TEST_WRKSRC}; ${SETENV} ${TEST_ENV} ./kid3-test) + +do-test-CLI-on: + -@(cd ${TEST_WRKSRC}; ${SETENV} ${TEST_ENV} ${PYTHON_CMD} test_cli_functions.py) + +.include <bsd.port.mk> diff --git a/audio/kid3/distinfo b/audio/kid3/distinfo new file mode 100644 index 000000000000..f77a763e5704 --- /dev/null +++ b/audio/kid3/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1708887915 +SHA256 (kid3-3.9.5.tar.xz) = a424fedde35c176e3b44334422aad43848418772da020751d00d0874e5ce8145 +SIZE (kid3-3.9.5.tar.xz) = 1843528 diff --git a/audio/kid3/files/patch-CMakeLists.txt b/audio/kid3/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..55c0b58940c8 --- /dev/null +++ b/audio/kid3/files/patch-CMakeLists.txt @@ -0,0 +1,13 @@ +Fix detection of Qt5 if both Qt5 and Qt6 are installed. + +--- CMakeLists.txt.orig 2023-07-10 19:51:30 UTC ++++ CMakeLists.txt +@@ -273,7 +273,7 @@ else() + if(BUILD_WITH_QT6) + find_package(QT NAMES Qt6 COMPONENTS Core REQUIRED) + else() +- find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED) ++ find_package(QT NAMES Qt5 COMPONENTS Core REQUIRED) + endif() + if(QT_VERSION_MAJOR EQUAL 6 AND QT_VERSION_MINOR LESS 2) + set(WITH_MULTIMEDIA OFF) diff --git a/audio/kid3/files/patch-src_app_kde_kdemainwindow.cpp b/audio/kid3/files/patch-src_app_kde_kdemainwindow.cpp new file mode 100644 index 000000000000..cd0eaad45f70 --- /dev/null +++ b/audio/kid3/files/patch-src_app_kde_kdemainwindow.cpp @@ -0,0 +1,45 @@ +Squash startup warnings for KF5 app. + +Shortcut for action "open_directory" "O&pen Directory..." set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead. +Shortcut for action "reload" "Re&load" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead. +Shortcut for action "filelist_rename" "&Rename" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead. +Shortcut for action "filelist_delete" "&Move to Trash" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead. + +--- src/app/kde/kdemainwindow.cpp.orig 2022-08-05 16:27:08 UTC ++++ src/app/kde/kdemainwindow.cpp +@@ -190,7 +190,7 @@ void KdeMainWindow::initActions() + action = new QAction(QIcon::fromTheme(QLatin1String("document-open")), + tr("O&pen Folder..."), this); + action->setStatusTip(tr("Opens a folder")); +- action->setShortcut(QKeySequence(QLatin1String("Ctrl+D"))); ++ collection->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_D)); + collection->addAction(QLatin1String("open_directory"), action); + connect(action, &QAction::triggered, + impl(), &BaseMainWindowImpl::slotFileOpenDirectory); +@@ -203,7 +203,7 @@ void KdeMainWindow::initActions() + // Avoid this by assigning Qt::Key_F5 instead of QKeySequence::Refresh. + // The section "Standard Shortcuts" in the QKeySequence documentation lists + // F5 as a key for "Refresh" on all platforms. +- action->setShortcut(Qt::Key_F5); ++ collection->setDefaultShortcut(action, QKeySequence(Qt::Key_F5)); + collection->addAction(QLatin1String("reload"), action); + connect(action, &QAction::triggered, + impl(), &BaseMainWindowImpl::slotFileReload); +@@ -426,7 +426,7 @@ void KdeMainWindow::initActions() + collection->addAction(QLatin1String("filelist_focus"), action); + connect(action, &QAction::triggered, form(), &Kid3Form::setFocusFileList); + action = new QAction(tr("&Rename"), this); +- action->setShortcut(QKeySequence(Qt::Key_F2)); ++ collection->setDefaultShortcut(action, QKeySequence(Qt::Key_F2)); + action->setShortcutContext(Qt::WidgetShortcut); + connect(action, &QAction::triggered, impl(), &BaseMainWindowImpl::renameFile); + // This action is not made configurable because its shortcut F2 conflicts +@@ -435,7 +435,7 @@ void KdeMainWindow::initActions() + // collection->addAction(QLatin1String("filelist_rename"), action); + form()->getFileList()->setRenameAction(action); + action = new QAction(tr("&Move to Trash"), this); +- action->setShortcut(QKeySequence::Delete); ++ collection->setDefaultShortcut(action, QKeySequence::Delete); + action->setShortcutContext(Qt::WidgetShortcut); + connect(action, &QAction::triggered, impl(), &BaseMainWindowImpl::deleteFile); + // collection->addAction(QLatin1String("filelist_delete"), action); diff --git a/audio/kid3/files/patch-src_plugins_mp4v2metadata_m4afile.cpp b/audio/kid3/files/patch-src_plugins_mp4v2metadata_m4afile.cpp new file mode 100644 index 000000000000..3b1504aa77ec --- /dev/null +++ b/audio/kid3/files/patch-src_plugins_mp4v2metadata_m4afile.cpp @@ -0,0 +1,53 @@ +cmID and xid atoms only supported in mp4v2 >= 2.0.0 + +--- src/plugins/mp4v2metadata/m4afile.cpp.orig 2022-08-05 16:27:08 UTC ++++ src/plugins/mp4v2metadata/m4afile.cpp +@@ -124,6 +124,8 @@ const struct { + { "geID", Frame::FT_Other }, + { "purl", Frame::FT_Other }, + { "egid", Frame::FT_Other }, ++#endif ++#if MPEG4IP_MAJOR_MINOR_VERSION >= 0x0200 + { "cmID", Frame::FT_Other }, + { "xid ", Frame::FT_Other }, + #endif +@@ -343,8 +345,11 @@ QByteArray getValueByteArray(const char* name, + #if MPEG4IP_MAJOR_MINOR_VERSION >= 0x0109 + } else if (std::strcmp(name, "tvsn") == 0 || std::strcmp(name, "tves") == 0 || + std::strcmp(name, "sfID") == 0 || std::strcmp(name, "cnID") == 0 || +- std::strcmp(name, "atID") == 0 || std::strcmp(name, "geID") == 0 || +- std::strcmp(name, "cmID") == 0) { ++ std::strcmp(name, "atID") == 0 || std::strcmp(name, "geID") == 0 ++#if MPEG4IP_MAJOR_MINOR_VERSION >= 0x0200 ++ || std::strcmp(name, "cmID") == 0 ++#endif ++ ) { + if (size >= 4) { + uint val = value[3] + (value[2] << 8) + + (value[1] << 16) + (value[0] << 24); +@@ -889,11 +894,13 @@ bool M4aFile::writeTags(bool force, bool* renamed, boo + } else if (name == QLatin1String("geID")) { + uint32_t val = str.toULong(); + MP4TagsSetGenreID(tags, &val); ++#if MPEG4IP_MAJOR_MINOR_VERSION >= 0x0200 + } else if (name == QLatin1String("cmID")) { + uint32_t val = str.toULong(); + MP4TagsSetComposerID(tags, &val); + } else if (name == QLatin1String("xid ")) { + MP4TagsSetXID(tags, str); ++#endif + } else { + MP4ItmfItem* item; + if (name.length() == 4 && +@@ -1579,7 +1586,10 @@ QStringList M4aFile::getFrameIds(Frame::TagNumber tagN + QLatin1String("plID") << QLatin1String("purd") << QLatin1String("rtng") << QLatin1String("sfID") << + QLatin1String("sosn") << QLatin1String("stik") << QLatin1String("tven") << + QLatin1String("tves") << QLatin1String("tvnn") << QLatin1String("tvsh") << QLatin1String("tvsn") << +- QLatin1String("purl") << QLatin1String("egid") << QLatin1String("cmID") << QLatin1String("xid "); ++ QLatin1String("purl") << QLatin1String("egid"); ++#endif ++#if MPEG4IP_MAJOR_MINOR_VERSION >= 0x0200 ++ lst << QLatin1String("cmID") << QLatin1String("xid "); + #endif + lst << QLatin1String("Chapters"); + return lst; diff --git a/audio/kid3/files/patch-src_plugins_oggflacmetadata_CMakeLists.txt b/audio/kid3/files/patch-src_plugins_oggflacmetadata_CMakeLists.txt new file mode 100644 index 000000000000..6878afda2d2b --- /dev/null +++ b/audio/kid3/files/patch-src_plugins_oggflacmetadata_CMakeLists.txt @@ -0,0 +1,35 @@ +Make FLAC support optional + +--- src/plugins/oggflacmetadata/CMakeLists.txt.orig 2019-08-23 09:52:05 UTC ++++ src/plugins/oggflacmetadata/CMakeLists.txt +@@ -1,8 +1,12 @@ +-if(WITH_VORBIS) ++if(WITH_VORBIS OR WITH_FLAC) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) + +- find_package(Vorbis REQUIRED) +- find_package(FLAC) ++ if(WITH_VORBIS) ++ find_package(Vorbis REQUIRED) ++ endif() ++ if(WITH_FLAC) ++ find_package(FLAC REQUIRED) ++ endif() + + configure_file(oggflacconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/oggflacconfig.h) + +@@ -28,7 +32,13 @@ if(WITH_VORBIS) + + target_include_directories(${plugin_TARGET} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + +- target_link_libraries(${plugin_TARGET} kid3-core VorbisFile::VorbisFile FLACPP::FLACPP Kid3Plugin) ++ target_link_libraries(${plugin_TARGET} kid3-core Kid3Plugin) ++ if(HAVE_VORBIS) ++ target_link_libraries(${plugin_TARGET} VorbisFile::VorbisFile) ++ endif() ++ if(HAVE_FLAC) ++ target_link_libraries(${plugin_TARGET} FLACPP::FLACPP) ++ endif() + + target_compile_definitions(${plugin_TARGET} PRIVATE HAVE_CONFIG_H) + diff --git a/audio/kid3/pkg-descr b/audio/kid3/pkg-descr new file mode 100644 index 000000000000..b7e485ed0163 --- /dev/null +++ b/audio/kid3/pkg-descr @@ -0,0 +1,16 @@ +Kid3 is an efficient audio file tag editor that allows you to easily +edit the tags of multiple different types of audio files without having +to type the same information repeatedly. + + * Edit and convert ID3v1.1 tags and all ID3v2.3 and ID3v2.4 frames + * Edit tags in MP3, Ogg/Vorbis, DSF, FLAC, MPC, MP4/AAC, MP2, Opus, + Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and tracker + modules (MOD, S3M, IT, XM) + * Edit tags of multiple files, e.g. the artist, album, year and genre of all + files of an album typically have the same values and can be set together + * Generate tags from filenames or the contents of tag fields + * Generate filenames and rename and create directories from tags + * Import from gnudb.org, TrackType.org, MusicBrainz, Discogs, and Amazon + * Export tags as CSV, HTML, playlists, Kover XML and other formats + * Edit synchronized lyrics and event timing codes, import/export LRC files + * Automate tasks using QML/JavaScript, D-Bus or the command-line interface diff --git a/audio/kid3/pkg-plist b/audio/kid3/pkg-plist new file mode 100644 index 000000000000..333e8c9d9062 --- /dev/null +++ b/audio/kid3/pkg-plist @@ -0,0 +1,107 @@ +bin/kid3%%QT_SUFX%% +%%CLI%%bin/kid3-cli +lib/libkid3-core.so +lib/libkid3-gui.so +%%ACOUSTID%%lib/kid3/libacoustidimport.so +lib/kid3/libamazonimport.so +lib/kid3/libdiscogsimport.so +lib/kid3/libfreedbimport.so +lib/kid3/libmusicbrainzimport.so +%%VORBIS%%lib/kid3/liboggflacmetadata.so +lib/kid3/libtaglibmetadata.so +share/applications/org.kde.kid3%%QT_SUFX%%.desktop +%%KF%%share/dbus-1/interfaces/org.kde.Kid3.xml +%%KF%%share/doc/HTML/ca/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/ca/kid3/index.docbook +%%KF%%share/doc/HTML/de/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/de/kid3/index.docbook +%%KF%%share/doc/HTML/en/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/en/kid3/index.docbook +%%KF%%share/doc/HTML/it/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/it/kid3/index.docbook +%%KF%%share/doc/HTML/nl/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/nl/kid3/index.docbook +%%KF%%share/doc/HTML/pt/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/pt/kid3/index.docbook +%%KF%%share/doc/HTML/ru/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/ru/kid3/index.docbook +%%KF%%share/doc/HTML/sv/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/sv/kid3/index.docbook +%%KF%%share/doc/HTML/uk/kid3/index.cache.bz2 +%%KF%%share/doc/HTML/uk/kid3/index.docbook +%%QT%%share/doc/kid3-qt/kid3_ca.html +%%QT%%share/doc/kid3-qt/kid3_de.html +%%QT%%share/doc/kid3-qt/kid3_en.html +%%QT%%share/doc/kid3-qt/kid3_it.html +%%QT%%share/doc/kid3-qt/kid3_nl.html +%%QT%%share/doc/kid3-qt/kid3_pt.html +%%QT%%share/doc/kid3-qt/kid3_sv.html +%%QT%%share/doc/kid3-qt/kid3_uk.html +share/icons/hicolor/128x128/apps/kid3%%QT_SUFX%%.png +share/icons/hicolor/16x16/apps/kid3%%QT_SUFX%%.png +share/icons/hicolor/32x32/apps/kid3%%QT_SUFX%%.png +share/icons/hicolor/48x48/apps/kid3%%QT_SUFX%%.png +share/icons/hicolor/64x64/apps/kid3%%QT_SUFX%%.png +%%QT%%share/icons/hicolor/scalable/apps/kid3-qt.svg +%%KF%%share/icons/hicolor/scalable/apps/kid3.svgz +%%KF%%share/kxmlgui%%KF_SUFX%%/kid3/kid3ui.rc +%%CLI%%share/man/ca/man1/kid3-cli.1.gz +%%QT%%share/man/ca/man1/kid3-qt.1.gz +share/man/ca/man1/kid3.1.gz +%%CLI%%share/man/de/man1/kid3-cli.1.gz +%%QT%%share/man/de/man1/kid3-qt.1.gz +share/man/de/man1/kid3.1.gz +%%CLI%%share/man/it/man1/kid3-cli.1.gz +%%QT%%share/man/it/man1/kid3-qt.1.gz +share/man/it/man1/kid3.1.gz +%%CLI%%share/man/man1/kid3-cli.1.gz +%%QT%%share/man/man1/kid3-qt.1.gz +share/man/man1/kid3.1.gz +%%CLI%%share/man/nl/man1/kid3-cli.1.gz +%%QT%%share/man/nl/man1/kid3-qt.1.gz +share/man/nl/man1/kid3.1.gz +%%CLI%%share/man/pt/man1/kid3-cli.1.gz +%%QT%%share/man/pt/man1/kid3-qt.1.gz +share/man/pt/man1/kid3.1.gz +%%CLI%%share/man/ru/man1/kid3-cli.1.gz +%%QT%%share/man/ru/man1/kid3-qt.1.gz +share/man/ru/man1/kid3.1.gz +%%CLI%%share/man/sv/man1/kid3-cli.1.gz +%%QT%%share/man/sv/man1/kid3-qt.1.gz +share/man/sv/man1/kid3.1.gz +%%CLI%%share/man/uk/man1/kid3-cli.1.gz +%%QT%%share/man/uk/man1/kid3-qt.1.gz +share/man/uk/man1/kid3.1.gz +%%DATADIR%%/translations/kid3_ca.qm +%%DATADIR%%/translations/kid3_ca@valencia.qm +%%DATADIR%%/translations/kid3_cs.qm +%%DATADIR%%/translations/kid3_da.qm +%%DATADIR%%/translations/kid3_de.qm +%%DATADIR%%/translations/kid3_el.qm +%%DATADIR%%/translations/kid3_en.qm +%%DATADIR%%/translations/kid3_en_GB.qm +%%DATADIR%%/translations/kid3_es.qm +%%DATADIR%%/translations/kid3_et.qm +%%DATADIR%%/translations/kid3_eu.qm +%%DATADIR%%/translations/kid3_fi.qm +%%DATADIR%%/translations/kid3_fr.qm +%%DATADIR%%/translations/kid3_is.qm +%%DATADIR%%/translations/kid3_it.qm +%%DATADIR%%/translations/kid3_ko.qm +%%DATADIR%%/translations/kid3_nl.qm +%%DATADIR%%/translations/kid3_nn.qm +%%DATADIR%%/translations/kid3_pl.qm +%%DATADIR%%/translations/kid3_pt.qm +%%DATADIR%%/translations/kid3_pt_BR.qm +%%DATADIR%%/translations/kid3_ru.qm +%%DATADIR%%/translations/kid3_sl.qm +%%DATADIR%%/translations/kid3_sr.qm +%%DATADIR%%/translations/kid3_sr@ijekavian.qm +%%DATADIR%%/translations/kid3_sr@ijekavianlatin.qm +%%DATADIR%%/translations/kid3_sr@latin.qm +%%DATADIR%%/translations/kid3_sv.qm +%%DATADIR%%/translations/kid3_tr.qm +%%DATADIR%%/translations/kid3_uk.qm +%%DATADIR%%/translations/kid3_zh_CN.qm +%%DATADIR%%/translations/kid3_zh_TW.qm +share/metainfo/org.kde.kid3%%QT_SUFX%%.appdata.xml |