diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-11-09 02:53:09 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-11-09 02:53:59 +0100 |
commit | 142089b01723fd10364178f18703ba702afceb17 (patch) | |
tree | 8985f60a14207af8a887e02056ac5764c2823654 /media-sound/hydrogen | |
parent | media-sound/qsynth: version bump to 0.5.3, fix QA, EAPI 7 (diff) | |
download | gentoo-142089b01723fd10364178f18703ba702afceb17.tar.gz gentoo-142089b01723fd10364178f18703ba702afceb17.tar.bz2 gentoo-142089b01723fd10364178f18703ba702afceb17.zip |
media-sound/hydrogen: Rebase 9999 gnuinstalldirs patch, add USE doc
Pending upstream: https://github.com/hydrogen-music/hydrogen/pull/668
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound/hydrogen')
-rw-r--r-- | media-sound/hydrogen/files/hydrogen-9999-gnuinstalldirs.patch | 120 | ||||
-rw-r--r-- | media-sound/hydrogen/hydrogen-9999.ebuild | 15 |
2 files changed, 130 insertions, 5 deletions
diff --git a/media-sound/hydrogen/files/hydrogen-9999-gnuinstalldirs.patch b/media-sound/hydrogen/files/hydrogen-9999-gnuinstalldirs.patch new file mode 100644 index 000000000000..14babedefa5c --- /dev/null +++ b/media-sound/hydrogen/files/hydrogen-9999-gnuinstalldirs.patch @@ -0,0 +1,120 @@ +From 64e251765e58b6948953f0bbc2aac05042daaa55 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com> +Date: Mon, 1 Jan 2018 11:52:18 +0100 +Subject: [PATCH] Use GNUInstallDirs + +Fixes multiarch and deprecated man dir location. +--- + CMakeLists.txt | 19 ++++++++----------- + src/cli/CMakeLists.txt | 2 +- + src/core/CMakeLists.txt | 6 +++--- + src/gui/CMakeLists.txt | 2 +- + src/player/CMakeLists.txt | 2 +- + 5 files changed, 14 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b18508a8..76305ea7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,6 +30,8 @@ ELSE() + SET(DISPLAY_VERSION "${VERSION}-${GIT_REVISION}") + ENDIF(VERSION_SUFFIX) + ++include(GNUInstallDirs) ++ + SET(LIBSNDFILE_VERSION_PREV "1.0.17") + + # +@@ -144,21 +146,16 @@ IF(APPLE) + #Without setting this, installation would go into /usr/local, which does not exist per default + SET(CMAKE_INSTALL_PREFIX "/usr" ) + ELSE(APPLE) +- SET(OSS_LIB_PATHS "/usr/lib${LIB_SUFFIX}/oss/lib" "/usr/local/lib${LIB_SUFFIX}/oss/lib" ) ++ SET(OSS_LIB_PATHS "${CMAKE_INSTALL_FULL_LIBDIR}/oss/lib" "/usr/local/lib${LIB_SUFFIX}/oss/lib" ) + ENDIF(APPLE) + + + #Installation paths + # TODO remove data from path +-SET(H2_SYS_PATH "${CMAKE_INSTALL_PREFIX}/share/hydrogen") ++SET(H2_SYS_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/hydrogen") + # TODO remove data from path, could be .config/hydrogen + SET(H2_USR_PATH ".hydrogen") + +-#Changing this to user writable location will allow successful, non-root, deployment (e.g: make install). +-IF(NOT MINGW AND NOT APPLE) +- SET(H2_UNIX_ICON_PATH "/usr/share/pixmaps" CACHE STRING "Freedesktop default icon path.") +-ENDIF() +- + SET(MAX_INSTRUMENTS 1000 CACHE STRING "Maximum number of instruments") + SET(MAX_COMPONENTS 32 CACHE STRING "Maximum number of components") + SET(MAX_NOTES 192 CACHE STRING "Maximum number of notes") +@@ -366,10 +363,10 @@ ELSE() + INSTALL(DIRECTORY data DESTINATION ${H2_SYS_PATH} PATTERN ".git" EXCLUDE PATTERN "i18n" EXCLUDE PATTERN doc EXCLUDE) + ENDIF() + IF(NOT MINGW AND NOT APPLE) +- INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.appdata.xml DESTINATION "${CMAKE_INSTALL_PREFIX}/share/appdata") +- INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") +- INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/img/gray/h2-icon.svg DESTINATION "${H2_UNIX_ICON_PATH}") +- INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.1 DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man1") ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.appdata.xml DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/appdata") ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.desktop DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/img/gray/h2-icon.svg DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps") ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/linux/hydrogen.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") + ENDIF() + + # +diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt +index f6cd04eb..7725dc83 100644 +--- a/src/cli/CMakeLists.txt ++++ b/src/cli/CMakeLists.txt +@@ -20,4 +20,4 @@ TARGET_LINK_LIBRARIES(h2cli + + ADD_DEPENDENCIES(h2cli hydrogen-core-${VERSION}) + +-INSTALL(TARGETS h2cli RUNTIME DESTINATION bin BUNDLE DESTINATION bin ) ++INSTALL(TARGETS h2cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index db1333da..0ab61d96 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -57,13 +57,13 @@ TARGET_LINK_LIBRARIES(hydrogen-core-${VERSION} + #SET_TARGET_PROPERTIES(hydrogen-core-${VERSION} PROPERTIES PUBLIC_HEADER "${hydrogen_INCLUDES}" ) + + INSTALL(TARGETS hydrogen-core-${VERSION} +- LIBRARY DESTINATION "lib${LIB_SUFFIX}" +- ARCHIVE DESTINATION "lib${LIB_SUFFIX}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + # do not copy directory hierarchy + #PUBLIC_HEADER DESTINATION include/hydrogen + ) + + IF(NOT APPLE AND NOT WIN32) + INSTALL(DIRECTORY include DESTINATION "${CMAKE_INSTALL_PREFIX}" FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) +- INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/hydrogen/config.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/hydrogen" ) ++ INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/hydrogen/config.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/hydrogen" ) + ENDIF() +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 4030dc9a..2aeb17c2 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -51,4 +51,4 @@ TARGET_LINK_LIBRARIES(hydrogen + ) + ADD_DEPENDENCIES(hydrogen hydrogen-core-${VERSION}) + +-INSTALL(TARGETS hydrogen RUNTIME DESTINATION bin BUNDLE DESTINATION bin ) ++INSTALL(TARGETS hydrogen RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/src/player/CMakeLists.txt b/src/player/CMakeLists.txt +index 72c270f3..836fc5b4 100644 +--- a/src/player/CMakeLists.txt ++++ b/src/player/CMakeLists.txt +@@ -16,4 +16,4 @@ TARGET_LINK_LIBRARIES(h2player + + ADD_DEPENDENCIES(h2player hydrogen-core-${VERSION}) + +-INSTALL(TARGETS h2player RUNTIME DESTINATION bin BUNDLE DESTINATION bin ) ++INSTALL(TARGETS h2player RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) +-- +2.19.1 + diff --git a/media-sound/hydrogen/hydrogen-9999.ebuild b/media-sound/hydrogen/hydrogen-9999.ebuild index c5712d4665c7..2d92d83a64cb 100644 --- a/media-sound/hydrogen/hydrogen-9999.ebuild +++ b/media-sound/hydrogen/hydrogen-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -12,12 +12,11 @@ EGIT_REPO_URI="https://github.com/${PN}-music/${PN}" LICENSE="GPL-2 ZLIB" SLOT="0" KEYWORDS="" -IUSE="alsa +archive jack ladspa lash osc oss portaudio portmidi pulseaudio" +IUSE="alsa +archive doc jack ladspa lash osc oss portaudio portmidi pulseaudio" REQUIRED_USE="lash? ( alsa )" RDEPEND=" - dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 @@ -37,11 +36,12 @@ RDEPEND=" " DEPEND="${RDEPEND} virtual/pkgconfig + doc? ( app-doc/doxygen ) " DOCS=( AUTHORS ChangeLog DEVELOPERS README.txt ) -PATCHES=( "${FILESDIR}/${PN}-1.0.0_pre20180301-gnuinstalldirs.patch" ) +PATCHES=( "${FILESDIR}/${P}-gnuinstalldirs.patch" ) src_configure() { local mycmakeargs=( @@ -65,9 +65,14 @@ src_configure() { cmake-utils_src_configure } +src_compile() { + cmake-utils_src_compile + use doc && cmake-utils_src_compile doc +} + src_install() { + use doc && local HTML_DOCS=( ${BUILD_DIR}/docs/html/. ) cmake-utils_src_install - dosym ../../${PN}/data/doc /usr/share/doc/${PF}/html } pkg_postinst() { |