summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <alexey+gentoo@asokolov.org>2022-08-26 00:30:55 +0100
committerJason Zaman <perfinion@gentoo.org>2022-11-04 18:32:22 -0700
commit345537cf13b319747ab5b42fbec5831409721aed (patch)
treeca15a4f4a8237e84f5038397a0aa6a80b245c4bb /dev-libs/qxlsx
parentapp-i18n/ibus-m17n: drop old (diff)
downloadgentoo-345537cf13b319747ab5b42fbec5831409721aed.tar.gz
gentoo-345537cf13b319747ab5b42fbec5831409721aed.tar.bz2
gentoo-345537cf13b319747ab5b42fbec5831409721aed.zip
dev-libs/qxlsx: new package, add 1.4.4
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'dev-libs/qxlsx')
-rw-r--r--dev-libs/qxlsx/Manifest1
-rw-r--r--dev-libs/qxlsx/files/qxlsx-1.4.4-libdir.patch26
-rw-r--r--dev-libs/qxlsx/files/qxlsx-1.4.4-qtdefs.patch24
-rw-r--r--dev-libs/qxlsx/files/qxlsx-1.4.4-qtversion.patch92
-rw-r--r--dev-libs/qxlsx/files/qxlsx-1.4.4-soversion.patch23
-rw-r--r--dev-libs/qxlsx/metadata.xml15
-rw-r--r--dev-libs/qxlsx/qxlsx-1.4.4.ebuild62
7 files changed, 243 insertions, 0 deletions
diff --git a/dev-libs/qxlsx/Manifest b/dev-libs/qxlsx/Manifest
new file mode 100644
index 000000000000..5ff17575c7b0
--- /dev/null
+++ b/dev-libs/qxlsx/Manifest
@@ -0,0 +1 @@
+DIST qxlsx-1.4.4.tar.gz 4703732 BLAKE2B 0acf5e708f4dc981723a34b524c820a53a66cb13bf1ce5a1086106230e45dcac2ea6587b3c4ca039de491565ac886a2e5bd1225ee39437ee89a2ff7560da6fd7 SHA512 e6c3dd8822f2a8ab8bcd1a7434db7b202291e3d8de407e4629bdfc1afef507b57da4bc4a715d57b8d75915ce4b623189269083824c35d8e02d49d3e8909cceee
diff --git a/dev-libs/qxlsx/files/qxlsx-1.4.4-libdir.patch b/dev-libs/qxlsx/files/qxlsx-1.4.4-libdir.patch
new file mode 100644
index 000000000000..ffdf8483f41a
--- /dev/null
+++ b/dev-libs/qxlsx/files/qxlsx-1.4.4-libdir.patch
@@ -0,0 +1,26 @@
+From 5d1059941f85365019ed08254e79abdb4ba80ee5 Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <sokolov@google.com>
+Date: Sun, 4 Sep 2022 01:22:30 +0100
+Subject: [PATCH] Install library to the correct lib dir
+
+---
+ QXlsx/CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt
+index a6b1944..fc32918 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -181,9 +181,9 @@ set_target_properties(QXlsx PROPERTIES
+
+ install(TARGETS QXlsx
+ EXPORT QXlsxTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- RUNTIME DESTINATION bin COMPONENT runtime
+- ARCHIVE DESTINATION lib COMPONENT devel
+- PUBLIC_HEADER DESTINATION include/QXlsx COMPONENT devel
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QXlsx COMPONENT devel
+ )
+
+ install(EXPORT QXlsxTargets
diff --git a/dev-libs/qxlsx/files/qxlsx-1.4.4-qtdefs.patch b/dev-libs/qxlsx/files/qxlsx-1.4.4-qtdefs.patch
new file mode 100644
index 000000000000..15795c645d47
--- /dev/null
+++ b/dev-libs/qxlsx/files/qxlsx-1.4.4-qtdefs.patch
@@ -0,0 +1,24 @@
+From 8e83402db866ae7a67582da28aa68c83545f13c8 Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <sokolov@google.com>
+Date: Fri, 26 Aug 2022 01:36:53 +0100
+Subject: [PATCH] Don't force Qt definitions onto users
+
+It breaks users who use "signals" keyword and convert const char* to
+QString.
+---
+ QXlsx/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt
+index aa774b1..a6b1944 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -140,7 +140,7 @@ add_library(QXlsx
+
+ add_library(QXlsx::QXlsx ALIAS QXlsx)
+
+-target_compile_definitions(QXlsx PUBLIC
++target_compile_definitions(QXlsx PRIVATE
+ -DQT_NO_KEYWORDS
+ -DQT_NO_CAST_TO_ASCII
+ -DQT_NO_CAST_FROM_ASCII
diff --git a/dev-libs/qxlsx/files/qxlsx-1.4.4-qtversion.patch b/dev-libs/qxlsx/files/qxlsx-1.4.4-qtversion.patch
new file mode 100644
index 000000000000..f94aa6e46414
--- /dev/null
+++ b/dev-libs/qxlsx/files/qxlsx-1.4.4-qtversion.patch
@@ -0,0 +1,92 @@
+commit e3565f2b3999ead739066b33fa0fd346eb072d87
+Author: Alexey Sokolov <sokolov@google.com>
+Date: Sun Oct 2 22:46:03 2022 +0100
+
+ Support installing qt5 and qt6 versions in parallel
+
+diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt
+index 5640d8a..8d34020 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,8 +15,8 @@ include(GNUInstallDirs)
+
+-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED)
+ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED)
++set(EXPORT_NAME QXlsxQt${QT_VERSION_MAJOR})
+
+-if (QT_MAJOR_VERSION EQUAL 6)
++if (QT_VERSION_MAJOR EQUAL 6)
+ set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
+ else()
+ set(CMAKE_CXX_STANDARD 11 CACHE STRING "")
+@@ -166,7 +167,7 @@ if (BUILD_SHARED_LIBS)
+ target_compile_definitions(QXlsx PUBLIC QXlsx_SHAREDLIB)
+ endif()
+
+-target_link_libraries(${PROJECT_NAME}
++target_link_libraries(QXlsx
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::GuiPrivate
+ )
+@@ -180,39 +181,38 @@ PUBLIC
+ )
+
+ set_target_properties(QXlsx PROPERTIES
+- EXPORT_NAME QXlsx
++ OUTPUT_NAME ${EXPORT_NAME}
+ VERSION ${PROJECT_VERSION}
+ SOVERSION 0.${PROJECT_VERSION}
+ PUBLIC_HEADER "${QXLSX_PUBLIC_HEADERS}"
+ )
+
+ install(TARGETS QXlsx
+- EXPORT QXlsxTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ EXPORT ${EXPORT_NAME}Targets DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/QXlsx COMPONENT devel
+ )
+
+-install(EXPORT QXlsxTargets
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QXlsx/
+- FILE QXlsxTargets.cmake
++install(EXPORT ${EXPORT_NAME}Targets
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}/
++ FILE ${EXPORT_NAME}Targets.cmake
+ NAMESPACE QXlsx::
+ COMPONENT devel
+ )
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/qxlsx-config.cmake.in
+- ${CMAKE_CURRENT_BINARY_DIR}/QXlsxConfig.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}Config.cmake
+ @ONLY
+ )
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/qxlsx-config-version.cmake.in
+- ${CMAKE_CURRENT_BINARY_DIR}/QXlsxConfigVersion.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}ConfigVersion.cmake
+ @ONLY
+ )
+ install(
+ FILES
+- ${CMAKE_CURRENT_BINARY_DIR}/QXlsxConfig.cmake
+- ${CMAKE_CURRENT_BINARY_DIR}/QXlsxConfigVersion.cmake
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QXlsx/
++ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}Config.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_NAME}ConfigVersion.cmake
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME}/
+ )
+-
+ include(CPackConfig)
+diff --git a/QXlsx/cmake/modules/qxlsx-config.cmake.in b/QXlsx/cmake/modules/qxlsx-config.cmake.in
+index 1aab813..d72276b 100644
+--- a/cmake/modules/qxlsx-config.cmake.in
++++ b/cmake/modules/qxlsx-config.cmake.in
+@@ -10,5 +10,5 @@
+ SET(prefix "@CMAKE_INSTALL_PREFIX@")
+ SET(exec_prefix "@CMAKE_INSTALL_PREFIX@")
+ SET(QXlsx_FOUND "TRUE")
+-
+-include("${CMAKE_CURRENT_LIST_DIR}/QXlsxTargets.cmake")
++
++include("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@Targets.cmake")
diff --git a/dev-libs/qxlsx/files/qxlsx-1.4.4-soversion.patch b/dev-libs/qxlsx/files/qxlsx-1.4.4-soversion.patch
new file mode 100644
index 000000000000..eff465497930
--- /dev/null
+++ b/dev-libs/qxlsx/files/qxlsx-1.4.4-soversion.patch
@@ -0,0 +1,23 @@
+From 647acc3c4d431278f3d2867a41a06d57f1978e63 Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <sokolov@google.com>
+Date: Sat, 8 Oct 2022 23:47:23 +0100
+Subject: [PATCH] Set soversion to version
+
+Since there's no ABI guarantees, as mentioned in #243
+---
+ QXlsx/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt
+index 8ddfd20..5640d8a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -182,7 +182,7 @@ PUBLIC
+ set_target_properties(QXlsx PROPERTIES
+ EXPORT_NAME QXlsx
+ VERSION ${PROJECT_VERSION}
+- SOVERSION 0
++ SOVERSION 0.${PROJECT_VERSION}
+ PUBLIC_HEADER "${QXLSX_PUBLIC_HEADERS}"
+ )
+
diff --git a/dev-libs/qxlsx/metadata.xml b/dev-libs/qxlsx/metadata.xml
new file mode 100644
index 000000000000..12de43e54308
--- /dev/null
+++ b/dev-libs/qxlsx/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexey+gentoo@asokolov.org</email>
+ <name>Alexey Sokolov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">QtExcel/QXlsx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/qxlsx/qxlsx-1.4.4.ebuild b/dev-libs/qxlsx/qxlsx-1.4.4.ebuild
new file mode 100644
index 000000000000..2abdd125d872
--- /dev/null
+++ b/dev-libs/qxlsx/qxlsx-1.4.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multibuild cmake
+
+DESCRIPTION="Excel file(*.xlsx) reader/writer library using Qt"
+
+HOMEPAGE="https://github.com/QtExcel/QXlsx"
+SRC_URI="https://github.com/QtExcel/QXlsx/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+# soversion
+SLOT="0/0.${PV}"
+KEYWORDS="~amd64"
+
+IUSE="qt5 qt6"
+REQUIRED_USE="|| ( qt5 qt6 )"
+
+RDEPEND="
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5=
+ )
+ qt6? (
+ dev-qt/qtbase:6=[gui]
+ )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/QXlsx-${PV}/QXlsx"
+PATCHES=(
+ "${FILESDIR}/${P}-libdir.patch"
+ "${FILESDIR}/${P}-qtdefs.patch"
+ "${FILESDIR}/${P}-soversion.patch"
+ "${FILESDIR}/${P}-qtversion.patch"
+)
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
+}
+
+src_configure() {
+ my_src_configure() {
+ local mycmakeargs=(
+ -DQT_VERSION_MAJOR="${MULTIBUILD_VARIANT/qt/}"
+ )
+
+ cmake_src_configure
+ }
+
+ multibuild_foreach_variant my_src_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake_src_compile
+}
+
+src_install() {
+ multibuild_foreach_variant cmake_src_install
+}