diff options
Diffstat (limited to 'dev-games')
-rw-r--r-- | dev-games/tiled/Manifest | 1 | ||||
-rw-r--r-- | dev-games/tiled/files/tiled-1.11.0-python.patch | 55 | ||||
-rw-r--r-- | dev-games/tiled/metadata.xml | 15 | ||||
-rw-r--r-- | dev-games/tiled/tiled-1.11.0.ebuild | 90 |
4 files changed, 159 insertions, 2 deletions
diff --git a/dev-games/tiled/Manifest b/dev-games/tiled/Manifest index e42c7439c30b..99a75380d3c3 100644 --- a/dev-games/tiled/Manifest +++ b/dev-games/tiled/Manifest @@ -1 +1,2 @@ +DIST tiled-1.11.0.tar.gz 17458724 BLAKE2B 3e7ea2ce4a61aa31d60487bf4cd68efb9307be0a753ee1571b9d2a90dff5299fdbbfd432c38eddafbea98cd6a1c59aa338c9ab5337e923e3178456a720e24ed4 SHA512 59e7ff38bedb0b897b40b2d3f6231004970de843e3700ef8adfaf78ab9b15c57e291ec27d409ba61094871b84f27238defb33bef5b23e838736f515ec1addf5d DIST tiled-1.8.6.tar.gz 17053221 BLAKE2B a226ff9861ebfa3980176fac2b23c7fff8ac6db585444c5d5c21afff2301298e1eaa74179970bfaeb07c62074c706378040c520d5f0155b030f9e2025c51abb0 SHA512 f77ff46fbb707d8c02499f168e5748f39081fa780fb9a5b1ea04603b09cd71280d76034cab28b23fc30280bd856121e473c992c9c39d7c46fc97d5fbfbe4191d diff --git a/dev-games/tiled/files/tiled-1.11.0-python.patch b/dev-games/tiled/files/tiled-1.11.0-python.patch new file mode 100644 index 000000000000..f5407045e019 --- /dev/null +++ b/dev-games/tiled/files/tiled-1.11.0-python.patch @@ -0,0 +1,55 @@ +diff --git a/qbs/imports/PythonProbe.qbs b/qbs/imports/PythonProbe.qbs +index 52eae7fc..93b4270c 100644 +--- a/qbs/imports/PythonProbe.qbs ++++ b/qbs/imports/PythonProbe.qbs +@@ -7,7 +7,6 @@ import qbs.Utilities + Probe { + id: pythonDllProbe + +- property string pythonDir: pythonInstallDir // Input + property string buildVariant: qbs.buildVariant // Input + property string minVersion: "3.5" // Input + property string fileNamePrefix // Output +@@ -17,18 +16,9 @@ Probe { + console.warn(msg + " The Python plugin will not be available."); + } + +- if (!pythonDir) { +- printWarning("PYTHONHOME not set."); +- return; +- } +- if (!File.exists(pythonDir)) { +- printWarning("The provided Python installation directory '" + pythonDir +- + "' does not exist."); +- return; +- } + var p = new Process(); + try { +- var pythonFilePath = FileInfo.joinPaths(pythonDir, "python.exe"); ++ var pythonFilePath = "python"; + p.exec(pythonFilePath, ["--version"], true); + var output = p.readStdOut().trim(); + var magicPrefix = "Python "; +@@ -45,9 +35,7 @@ Probe { + return; + } + if (Utilities.versionCompare(versionNumberString, minVersion) < 0) { +- printWarning("The Python installation at '" + pythonDir +- + "' has version " + versionNumberString + ", but " + minVersion + " or higher " +- + "is required."); ++ printWarning("The Python installation has version " + versionNumberString + ", but " + minVersion + " or higher " + "is required."); + return; + } + found = true; +diff --git a/src/plugins/python/python.qbs b/src/plugins/python/python.qbs +index f1c959d3..8c43af9c 100644 +--- a/src/plugins/python/python.qbs ++++ b/src/plugins/python/python.qbs +@@ -28,7 +28,6 @@ TiledPlugin { + + PythonProbe { + id: pythonDllProbe +- pythonDir: Environment.getEnv("PYTHONHOME") + minVersion: "3.8" + } + diff --git a/dev-games/tiled/metadata.xml b/dev-games/tiled/metadata.xml index 13233bbdb862..d6abd76eacce 100644 --- a/dev-games/tiled/metadata.xml +++ b/dev-games/tiled/metadata.xml @@ -1,8 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person" proxied="yes"> + <email>mechakotik@gmail.com</email> + <name>Andrei Sabalenka</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <upstream> - <remote-id type="github">bjorn/tiled</remote-id> + <remote-id type="github">mapeditor/tiled</remote-id> </upstream> + <use> + <flag name="minimal">Exclude optional plugins and development headers</flag> + </use> </pkgmetadata> + diff --git a/dev-games/tiled/tiled-1.11.0.ebuild b/dev-games/tiled/tiled-1.11.0.ebuild new file mode 100644 index 000000000000..33d1cc5458c0 --- /dev/null +++ b/dev-games/tiled/tiled-1.11.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) +inherit edo flag-o-matic multiprocessing python-single-r1 toolchain-funcs xdg + +DESCRIPTION="A general purpose tile map editor" +HOMEPAGE="https://www.mapeditor.org/ https://github.com/mapeditor/tiled" +SRC_URI="https://github.com/mapeditor/tiled/archive/v${PV}/${P}.tar.gz" + +LICENSE="BSD BSD-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="examples minimal python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + app-arch/zstd:= + dev-qt/qtbase:6[X,dbus,gui,network,opengl,widgets] + dev-qt/qtdeclarative:6 + dev-qt/qtsvg:6 + sys-libs/zlib + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/qbs + dev-qt/qtbase:6 + dev-qt/qttools:6[linguist] +" + +QBS_PRODUCTS="tiled,csv,json" + +pkg_setup() { + if use python; then + python-single-r1_pkg_setup + fi +} + +qbs_format_flags() { + local -a array + for flag in ${@}; do + array+=( "\"${flag}\"" ) + done + echo "[$(IFS=","; echo "${array[*]}")]" +} + +src_configure() { + if use python; then + eapply "${FILESDIR}"/${P}-python.patch + QBS_PRODUCTS="${QBS_PRODUCTS},python" + fi + if ! use minimal; then + QBS_PRODUCTS="${QBS_PRODUCTS},defold,defoldcollection,droidcraft,flare,gmx,json1,lua,replicaisland,rpmap,tbin,tengine,terraingenerator,tmxrasterizer,tmxviewer,tscn,yy" + fi + + edo qbs setup-qt /usr/bin/qmake6 qt6 + edo qbs config defaultProfile qt6 + + local toolchain=$(tc-get-compiler-type) + edo qbs setup-toolchains ${toolchain} ${toolchain} + edo qbs config profiles.qt6.baseProfile ${toolchain} + + edo qbs resolve \ + --force-probe-execution \ + qbs.installPrefix:"/usr" \ + projects.Tiled.useRPaths:false \ + projects.Tiled.installHeaders:$(usex minimal false true) \ + project.libDir:$(get_libdir) \ + modules.cpp.cFlags:$(qbs_format_flags ${CFLAGS}) \ + modules.cpp.cxxFlags:$(qbs_format_flags ${CXXFLAGS}) \ + modules.cpp.linkerFlags:$(qbs_format_flags $(raw-ldflags ${LDFLAGS})) +} + +src_compile() { + edo qbs build \ + -p ${QBS_PRODUCTS} \ + -j $(get_makeopts_jobs) +} + +src_install() { + edo qbs install -p ${QBS_PRODUCTS} --install-root "${D}" + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + dodoc -r examples + fi +} |