[gentoo-commits] repo/gentoo:master commit in: games-util/lgogdownloader/, games-util/lgogdownloader/files/

2024-03-15 Thread James Le Cuirot
commit: 937f03b7fe4af6130b4f338d6c7d317163ff6b1b
Author: James Le Cuirot  gentoo  org>
AuthorDate: Fri Mar 15 22:53:46 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Fri Mar 15 22:54:22 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937f03b7

games-util/lgogdownloader: Add Qt6 support with patch

Closes: https://bugs.gentoo.org/926661
Signed-off-by: James Le Cuirot  gentoo.org>

 .../lgogdownloader/files/lgogdownloader-qt6.patch  | 73 ++
 ...r-3.12.ebuild => lgogdownloader-3.12-r1.ebuild} | 31 ++---
 .../lgogdownloader/lgogdownloader-.ebuild  | 27 +---
 3 files changed, 117 insertions(+), 14 deletions(-)

diff --git a/games-util/lgogdownloader/files/lgogdownloader-qt6.patch 
b/games-util/lgogdownloader/files/lgogdownloader-qt6.patch
new file mode 100644
index ..5d1652bcbdd7
--- /dev/null
+++ b/games-util/lgogdownloader/files/lgogdownloader-qt6.patch
@@ -0,0 +1,73 @@
+From 3f223684cbe1367c68b2b68301eeaaf644a4c0be Mon Sep 17 00:00:00 2001
+From: James Le Cuirot 
+Date: Thu, 14 Mar 2024 22:12:02 +
+Subject: [PATCH] Add support for Qt6 (as well as Qt5)
+
+No actual code changes were necessary.
+
+I have partly followed
+https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html, but the
+versionless targets only work from Qt 5.15 onwards. The suggested
+workaround chooses 5 over 6 and does not appear to work properly when
+one of the required components is missing. Using the versionless
+approach with an additional variable for the targets seems to work best.
+
+If necessary, Qt 5 can be forced over 6 by passing
+`-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON`.
+
+I have tested this by tweaking the code to force the GUI to appear.
+---
+ CMakeLists.txt | 20 +++-
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0fe7568..9f489c1 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -45,8 +45,12 @@ file(GLOB SRC_FILES
+   )
+ 
+ if(USE_QT_GUI)
+-  find_package(Qt5Widgets CONFIG REQUIRED)
+-  find_package(Qt5WebEngineWidgets CONFIG REQUIRED)
++  set(QT Qt6)
++  find_package(Qt6 COMPONENTS Widgets WebEngineWidgets CONFIG)
++  if(NOT Qt6_FOUND)
++set(QT Qt5)
++find_package(Qt5 REQUIRED COMPONENTS Widgets WebEngineWidgets CONFIG)
++  endif()
+ 
+   file(GLOB QT_GUI_SRC_FILES
+ src/gui_login.cpp
+@@ -140,11 +144,17 @@ file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
+ 
+ if(USE_QT_GUI)
+   target_link_libraries(${PROJECT_NAME}
+-PRIVATE Qt5::Widgets
+-PRIVATE Qt5::WebEngineWidgets
++PRIVATE ${QT}::Widgets
++PRIVATE ${QT}::WebEngineWidgets
+   )
+ endif(USE_QT_GUI)
+ 
++if(Qt6_FOUND)
++  set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
++else()
++  set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
++endif(Qt6_FOUND)
++
+ if(MSVC)
+   # Force to always compile with W4
+   if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+@@ -154,7 +164,7 @@ if(MSVC)
+   endif()
+ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR 
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+   # Update if necessary
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra 
-Wno-long-long -fexceptions")
++  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-long-long 
-fexceptions")
+ endif()
+ 
+ set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
+-- 
+2.43.2
+

diff --git a/games-util/lgogdownloader/lgogdownloader-3.12.ebuild 
b/games-util/lgogdownloader/lgogdownloader-3.12-r1.ebuild
similarity index 60%
rename from games-util/lgogdownloader/lgogdownloader-3.12.ebuild
rename to games-util/lgogdownloader/lgogdownloader-3.12-r1.ebuild
index 17e3c906771f..e07404cb11a4 100644
--- a/games-util/lgogdownloader/lgogdownloader-3.12.ebuild
+++ b/games-util/lgogdownloader/lgogdownloader-3.12-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,25 +11,42 @@ 
SRC_URI="https://github.com/Sude-/${PN}/releases/download/v${PV}/${P}.tar.gz";
 LICENSE="WTFPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="gui"
+IUSE="gui qt5 qt6"
+REQUIRED_USE="gui? ( ^^ ( qt5 qt6 ) )"
 
-RDEPEND=">=app-crypt/rhash-1.3.3-r2:0=
+RDEPEND="
+   >=app-crypt/rhash-1.3.3-r2:0=
dev-cpp/htmlcxx:0=
dev-libs/boost:=[zlib]
>=dev-libs/jsoncpp-1.7:0=
dev-libs/tinyxml2:0=
>=net-misc/curl-7.55:0=[ssl]
-   gui? ( dev-qt/qtwebengine:5=[widgets] )"
+   gui? (
+   qt5? ( dev-qt/qtwebengine:5[widgets] )
+   qt6? ( dev-qt/qtwebengine:6[widgets] )
+   )
+"
+
+DEPEND="
+   ${RDEPEND}
+"
 
-DEPEND="${RDEPEND}"
+BDEPEND="
+   sys-apps/help2man
+   virtual/pkgconfig
+"
 
-BDEPEND="sys-apps/help2man
-   virtual/pkgconfig"
+PATCHES=(
+   "${FILESDIR}"/${PN}-qt6.patch
+)
 
 src_configure() {
local mycmakeargs=(
  

[gentoo-commits] repo/gentoo:master commit in: games-util/lgogdownloader/, games-util/lgogdownloader/files/

2020-03-19 Thread James Le Cuirot
commit: 91cd012fb9d0ea7172c4fa43409d978eca0cceb5
Author: James Le Cuirot  gentoo  org>
AuthorDate: Thu Mar 19 23:35:11 2020 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Thu Mar 19 23:35:11 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91cd012f

games-util/lgogdownloader: Drop old 3.5

Package-Manager: Portage-2.3.94, Repoman-2.3.20
Signed-off-by: James Le Cuirot  gentoo.org>

 games-util/lgogdownloader/Manifest |  1 -
 games-util/lgogdownloader/files/jsoncpp.patch  | 27 -
 .../lgogdownloader/lgogdownloader-3.5.ebuild   | 44 --
 3 files changed, 72 deletions(-)

diff --git a/games-util/lgogdownloader/Manifest 
b/games-util/lgogdownloader/Manifest
index eb930e0546c..358481bab89 100644
--- a/games-util/lgogdownloader/Manifest
+++ b/games-util/lgogdownloader/Manifest
@@ -1,2 +1 @@
-DIST lgogdownloader-3.5.tar.gz 87061 BLAKE2B 
bde2a8f2c229c9bf62fe83650e81c950806a6c6b9e4f591f08931082f59a961f39c16b5c18c8787edd46555e257354e71e0f1d009de1881f4d25257b28725996
 SHA512 
e3ce9d4932f9cda362b1472bd5eb605b01d1e9214b79e2d88fa4c2f02b0d54082df68b2f197d714e71a72d57be746dbf0afed68b3316888fdfa6e02c31611ee0
 DIST lgogdownloader-3.6.tar.gz 85470 BLAKE2B 
8dafbbbc0653629f5fda2a54f7f0609924d02e4266a018ebdc04abbdfa0ad97e9bdb1f33f5a1e8cb24695cf9c45c2abbbc4857f7eb8650dbc73feef9c6dd9f54
 SHA512 
e03b1f50a227aa9295071a309eaac4110592b1f50b8379298605d4995e83cde27039e3b3f074c6cd47f6e6971aafe756d619619b7e24f5960b8f271fa1081793

diff --git a/games-util/lgogdownloader/files/jsoncpp.patch 
b/games-util/lgogdownloader/files/jsoncpp.patch
deleted file mode 100644
index d865903129d..000
--- a/games-util/lgogdownloader/files/jsoncpp.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ff353126ecda61824cf866d3807c9ebada96282e Mon Sep 17 00:00:00 2001
-From: James Le Cuirot 
-Date: Wed, 20 Nov 2019 22:24:10 +
-Subject: [PATCH] Fix find_path for newer jsoncpp release
-
-features.h was renamed but allocator.h wasn't so the latter works with
-both old and new versions.

- cmake/FindJsoncpp.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake
-index 5731980..0c8e0fb 100644
 a/cmake/FindJsoncpp.cmake
-+++ b/cmake/FindJsoncpp.cmake
-@@ -10,7 +10,7 @@ pkg_check_modules(PC_JSONCPP REQUIRED jsoncpp)
- 
- find_path(JSONCPP_INCLUDE_DIR
-   NAMES
--json/features.h
-+json/allocator.h
-   HINTS
- ${PC_JSONCPP_INCLUDEDIR}
- ${PC_JSONCPP_INCLUDEDIRS}
--- 
-2.23.0
-

diff --git a/games-util/lgogdownloader/lgogdownloader-3.5.ebuild 
b/games-util/lgogdownloader/lgogdownloader-3.5.ebuild
deleted file mode 100644
index a9948879d36..000
--- a/games-util/lgogdownloader/lgogdownloader-3.5.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="Unofficial GOG.com downloader for Linux"
-HOMEPAGE="https://sites.google.com/site/gogdownloader/";
-SRC_URI="https://sites.google.com/site/gogdownloader/${P}.tar.gz";
-LICENSE="WTFPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="gui"
-
-RDEPEND=">=app-crypt/rhash-1.3.3-r2:0=
-   dev-cpp/htmlcxx:0=
-   dev-libs/boost:0=
-   >=dev-libs/jsoncpp-1.7:0=
-   dev-libs/tinyxml2:0=
-   net-libs/liboauth:0=
-   >=net-misc/curl-7.32:0=[ssl]
-   gui? ( dev-qt/qtwebengine:5=[widgets] )"
-
-DEPEND="${RDEPEND}"
-
-BDEPEND="sys-apps/help2man
-   virtual/pkgconfig"
-
-PATCHES=(
-   "${FILESDIR}"/jsoncpp.patch
-)
-
-src_configure() {
-   local mycmakeargs=(
-   -DUSE_QT_GUI=$(usex gui)
-   )
-   cmake_src_configure
-}
-
-src_install() {
-   cmake_src_install
-   gunzip "${ED}"/usr/share/man/man1/${PN}.1.gz || die
-}



[gentoo-commits] repo/gentoo:master commit in: games-util/lgogdownloader/, games-util/lgogdownloader/files/

2019-11-20 Thread James Le Cuirot
commit: c5ca07652ca09f4a7bce13c4b476d93b0f0b50ab
Author: James Le Cuirot  gentoo  org>
AuthorDate: Wed Nov 20 22:33:22 2019 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Wed Nov 20 22:33:22 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5ca0765

games-util/lgogdownloader: Patch 3.5 to fix build with newer jsoncpp

Patch has been sent upstream.

Closes: https://bugs.gentoo.org/700452
Package-Manager: Portage-2.3.79, Repoman-2.3.17
Signed-off-by: James Le Cuirot  gentoo.org>

 games-util/lgogdownloader/files/jsoncpp.patch  | 27 ++
 .../lgogdownloader/lgogdownloader-3.5.ebuild   |  4 
 2 files changed, 31 insertions(+)

diff --git a/games-util/lgogdownloader/files/jsoncpp.patch 
b/games-util/lgogdownloader/files/jsoncpp.patch
new file mode 100644
index 000..d865903129d
--- /dev/null
+++ b/games-util/lgogdownloader/files/jsoncpp.patch
@@ -0,0 +1,27 @@
+From ff353126ecda61824cf866d3807c9ebada96282e Mon Sep 17 00:00:00 2001
+From: James Le Cuirot 
+Date: Wed, 20 Nov 2019 22:24:10 +
+Subject: [PATCH] Fix find_path for newer jsoncpp release
+
+features.h was renamed but allocator.h wasn't so the latter works with
+both old and new versions.
+---
+ cmake/FindJsoncpp.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake
+index 5731980..0c8e0fb 100644
+--- a/cmake/FindJsoncpp.cmake
 b/cmake/FindJsoncpp.cmake
+@@ -10,7 +10,7 @@ pkg_check_modules(PC_JSONCPP REQUIRED jsoncpp)
+ 
+ find_path(JSONCPP_INCLUDE_DIR
+   NAMES
+-json/features.h
++json/allocator.h
+   HINTS
+ ${PC_JSONCPP_INCLUDEDIR}
+ ${PC_JSONCPP_INCLUDEDIRS}
+-- 
+2.23.0
+

diff --git a/games-util/lgogdownloader/lgogdownloader-3.5.ebuild 
b/games-util/lgogdownloader/lgogdownloader-3.5.ebuild
index 0f8ac4e4d85..9a73f51a45c 100644
--- a/games-util/lgogdownloader/lgogdownloader-3.5.ebuild
+++ b/games-util/lgogdownloader/lgogdownloader-3.5.ebuild
@@ -27,6 +27,10 @@ DEPEND="${RDEPEND}"
 BDEPEND="sys-apps/help2man
virtual/pkgconfig"
 
+PATCHES=(
+   "${FILESDIR}"/jsoncpp.patch
+)
+
 src_configure() {
local mycmakeargs=(
-DUSE_QT_GUI=$(usex gui)