commit:     f4c276075ea102834dbe7946552089ae300c97f3
Author:     Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com>
AuthorDate: Mon Jun 26 17:30:44 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 17:39:09 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=f4c27607

net-misc/cernbox-client: add 3.2.0.10193

Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com>
Closes: https://github.com/gentoo/sci/pull/1196
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../cernbox-client-3.2.0.10193.ebuild              | 92 ++++++++++++++++++++++
 ...owncloud-client-3.1.0.9872-no_cmake_fetch.patch | 17 ++++
 .../owncloud-client-3.2.0.10193-fix-mirall.patch   | 73 +++++++++++++++++
 ...ud-client-3.2.0.10193-no_fortify_override.patch | 16 ++++
 net-misc/cernbox-client/metadata.xml               |  4 +-
 5 files changed, 201 insertions(+), 1 deletion(-)

diff --git a/net-misc/cernbox-client/cernbox-client-3.2.0.10193.ebuild 
b/net-misc/cernbox-client/cernbox-client-3.2.0.10193.ebuild
new file mode 100644
index 000000000..476c2838e
--- /dev/null
+++ b/net-misc/cernbox-client/cernbox-client-3.2.0.10193.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake rpm xdg
+
+DESCRIPTION="Synchronize files from CERNBox EOS with your computer"
+
+# Origin is classic owncloud-client, branded for CERN during compilation.
+ORIGIN_PN="ownCloud"
+BRANDED_P="cernbox"
+BRANDED_PV="3.2.1"
+BRANDED_REL="10562"
+REGRAPHAPI_PV="1.0.1"
+HOMEPAGE="https://cernbox.cern.ch/";
+SRC_URI="https://download.owncloud.com/desktop/${ORIGIN_PN}/stable/${PV}/source/${ORIGIN_PN}-${PV}.tar.xz
+       
https://cernboxdistr.web.cern.ch/cernboxdistr/Linux/repo.future/Fedora_37/src/${PN}-${BRANDED_PV}-${BRANDED_REL}.src.rpm
+       
https://cern.ch/ofreyerm/gentoo/cernbox/${PN}-${BRANDED_PV}-${BRANDED_REL}.src.rpm
+       
https://github.com/owncloud/libre-graph-api-cpp-qt-client/archive/refs/tags/v${REGRAPHAPI_PV}.tar.gz
+               -> libregraphapi-${REGRAPHAPI_PV}.tar.gz"
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dolphin keyring nautilus test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+       dev-libs/qtkeychain[keyring?,qt5(+)]
+       dev-qt/qtconcurrent:5
+       dev-qt/qtcore:5
+       dev-qt/qtdbus:5
+       dev-qt/qtgui:5
+       dev-qt/qtnetwork:5[ssl]
+       dev-qt/qtsql:5
+       dev-qt/qtwidgets:5
+       dev-qt/qtxml:5
+       sys-fs/inotify-tools
+       dolphin? (
+               kde-frameworks/kcoreaddons:5
+               kde-frameworks/kio:5
+       )
+       nautilus? ( dev-python/nautilus-python )"
+
+DEPEND="${RDEPEND}
+       test? (
+               dev-util/cmocka
+               dev-qt/qttest:5
+       )"
+
+BDEPEND="
+       dev-qt/linguist-tools:5
+       kde-frameworks/extra-cmake-modules"
+
+S=${WORKDIR}/${ORIGIN_PN}-${PV}
+
+src_unpack() {
+       rpm_src_unpack ${PN}-${BRANDED_PV}-${BRANDED_REL}.src.rpm || die 
"failed to extract branding RPM"
+       mv ${PN%-*}-${BRANDED_PV}.${BRANDED_REL}/branding "${S}" || die "failed 
to extract branding"
+}
+
+PATCHES=(
+       "${FILESDIR}"/owncloud-client-3.1.0.9872-no_cmake_fetch.patch
+       "${FILESDIR}"/owncloud-client-3.2.0.10193-no_fortify_override.patch
+       "${FILESDIR}"/owncloud-client-3.2.0.10193-fix-mirall.patch
+)
+
+src_prepare() {
+       mv ../libre-graph-api-cpp-qt-client-${REGRAPHAPI_PV} \
+               src/libsync/libregraphapisrc-src || die
+
+       # Keep tests in ${T}
+       sed -i -e "s#\"/tmp#\"${T}#g" test/test*.cpp || die
+
+       if ! use nautilus; then
+               pushd shell_integration > /dev/null || die
+               cmake_comment_add_subdirectory nautilus
+               popd > /dev/null || die
+       fi
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+               -DBUILD_SHELL_INTEGRATION_DOLPHIN=$(usex dolphin)
+               -DBUILD_TESTING=$(usex test)
+       )
+
+       cmake_src_configure
+}

diff --git 
a/net-misc/cernbox-client/files/owncloud-client-3.1.0.9872-no_cmake_fetch.patch 
b/net-misc/cernbox-client/files/owncloud-client-3.1.0.9872-no_cmake_fetch.patch
new file mode 100644
index 000000000..d9762292e
--- /dev/null
+++ 
b/net-misc/cernbox-client/files/owncloud-client-3.1.0.9872-no_cmake_fetch.patch
@@ -0,0 +1,17 @@
+Index: ownCloud-3.1.0.9872/src/libsync/CMakeLists.txt
+--- ownCloud-3.1.0.9872/src/libsync/CMakeLists.txt.orig
++++ ownCloud-3.1.0.9872/src/libsync/CMakeLists.txt
+@@ -3,12 +3,7 @@ set(LibreGraphAPIVersion v0.13.2)
+ find_package(LibreGraphAPI QUIET)
+ if (NOT TARGET OpenAPI::LibreGraphAPI)
+     message(WARNING "Failed to find system OpenAPI::LibreGraphAPI: fetching 
${LibreGraphAPIVersion}")
+-    include(FetchContent)
+-    FetchContent_Populate(LibreGraphAPISrc
+-                        QUIET
+-                        GIT_REPOSITORY 
https://github.com/owncloud/libre-graph-api-cpp-qt-client.git
+-                        GIT_TAG ${LibreGraphAPIVersion})
+-    add_subdirectory(${libregraphapisrc_SOURCE_DIR}/client 
${libregraphapisrc_BINARY_DIR}/client EXCLUDE_FROM_ALL)
++    add_subdirectory(libregraphapisrc-src/client libregraphapisrc-src/client 
EXCLUDE_FROM_ALL)
+ endif()
+ 
+ set(libsync_SRCS

diff --git 
a/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-fix-mirall.patch 
b/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-fix-mirall.patch
new file mode 100644
index 000000000..f276d232e
--- /dev/null
+++ b/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-fix-mirall.patch
@@ -0,0 +1,73 @@
+From: Fabian Müller <[email protected]>
+Bug: https://github.com/owncloud/client/pull/10969
+
+Fix installation of branded client in parallel to unbranded client.
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 9b33b555f..f6c8ddd5c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -52,10 +52,12 @@ endif(NOT BUILD_LIBRARIES_ONLY)
+ 
+ add_subdirectory(plugins)
+ 
+-install(EXPORT ownCloudConfig DESTINATION 
"${KDE_INSTALL_CMAKEPACKAGEDIR}/ownCloud"  NAMESPACE ownCloud::)
++install(EXPORT ${APPLICATION_SHORTNAME}Config DESTINATION 
"${KDE_INSTALL_CMAKEPACKAGEDIR}/${APPLICATION_SHORTNAME}" NAMESPACE ownCloud::)
+ 
+-ecm_setup_version(PROJECT VARIABLE_PREFIX ownCloud
+-                        PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/ownCloudConfigVersion.cmake"
+-                        SOVERSION ${MIRALL_SOVERSION})
++ecm_setup_version(PROJECT
++    VARIABLE_PREFIX ${APPLICATION_SHORTNAME}
++    PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}ConfigVersion.cmake"
++    SOVERSION ${MIRALL_SOVERSION}
++)
+ 
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ownCloudConfigVersion.cmake" 
DESTINATION "${KDE_INSTALL_CMAKEPACKAGEDIR}/ownCloud")
++install(FILES 
"${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}ConfigVersion.cmake" 
DESTINATION "${KDE_INSTALL_CMAKEPACKAGEDIR}/${APPLICATION_SHORTNAME}")
+diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt
+index 17bbec855..eec545c21 100644
+--- a/src/csync/CMakeLists.txt
++++ b/src/csync/CMakeLists.txt
+@@ -92,10 +92,10 @@ INSTALL(
+         ../common/filesystembase.h
+         ../common/utility.h
+     DESTINATION
+-        ${INCLUDE_INSTALL_DIR}/ownCloud/common
++        ${INCLUDE_INSTALL_DIR}/${APPLICATION_SHORTNAME}/common
+ )
+ 
+-INSTALL(TARGETS csync EXPORT ownCloudConfig 
${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
++INSTALL(TARGETS csync EXPORT ${APPLICATION_SHORTNAME}Config 
${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+ 
+ configure_file(config_csync.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
+ 
+diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
+index c709acc0b..bd285c46e 100644
+--- a/src/libsync/CMakeLists.txt
++++ b/src/libsync/CMakeLists.txt
+@@ -87,7 +87,7 @@ INSTALL(
+         ${CMAKE_CURRENT_BINARY_DIR}/owncloudlib.h
+         logger.h
+         accessmanager.h
+-    DESTINATION ${INCLUDE_INSTALL_DIR}/ownCloud/libsync
++    DESTINATION ${INCLUDE_INSTALL_DIR}/${APPLICATION_SHORTNAME}/libsync
+ )
+ 
+ add_library(libsync SHARED ${libsync_SRCS})
+@@ -138,4 +138,4 @@ set_target_properties(libsync PROPERTIES
+         VERSION ${MIRALL_VERSION}
+         SOVERSION ${MIRALL_SOVERSION}
+ )
+-install(TARGETS libsync EXPORT ownCloudConfig 
${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
++install(TARGETS libsync EXPORT ${APPLICATION_SHORTNAME}Config 
${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+diff --git a/src/resources/CMakeLists.txt b/src/resources/CMakeLists.txt
+index 4f6fe1b0e..2905f55e6 100644
+--- a/src/resources/CMakeLists.txt
++++ b/src/resources/CMakeLists.txt
+@@ -40,4 +40,4 @@ if(Qt5LinguistTools_FOUND)
+     )
+ endif()
+ 
+-install(TARGETS owncloudResources ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
++install(TARGETS owncloudResources EXPORT ${APPLICATION_SHORTNAME}Config 
${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

diff --git 
a/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-no_fortify_override.patch
 
b/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-no_fortify_override.patch
new file mode 100644
index 000000000..266596b7b
--- /dev/null
+++ 
b/net-misc/cernbox-client/files/owncloud-client-3.2.0.10193-no_fortify_override.patch
@@ -0,0 +1,16 @@
+diff -Naur ownCloud-3.2.0.10193.orig/src/CMakeLists.txt 
ownCloud-3.2.0.10193/src/CMakeLists.txt
+--- ownCloud-3.2.0.10193.orig/src/CMakeLists.txt       2023-02-15 
18:27:55.000000000 +0100
++++ ownCloud-3.2.0.10193/src/CMakeLists.txt    2023-02-22 22:55:29.352847663 
+0100
+@@ -16,12 +16,6 @@
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
+     endif()
+   endif()
+-
+-  string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+-  if(CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
+-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2")
+-  endif()
+ endif()
+ 
+ if(WIN32)

diff --git a/net-misc/cernbox-client/metadata.xml 
b/net-misc/cernbox-client/metadata.xml
index c67ea7b66..e8384eb02 100644
--- a/net-misc/cernbox-client/metadata.xml
+++ b/net-misc/cernbox-client/metadata.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
        <maintainer type="person">
                <email>[email protected]</email>
@@ -26,5 +26,7 @@
        </use>
        <upstream>
                <doc>https://cernbox.web.cern.ch/cernbox/</doc>
+               <remote-id type="github">owncloud/client</remote-id>
+               <remote-id 
type="github">owncloud/libre-graph-api-cpp-qt-client</remote-id>
        </upstream>
 </pkgmetadata>

Reply via email to