diff options
-rw-r--r-- | dev-games/tiled/files/tiled-1.9.2-set-plugin-path.patch | 13 | ||||
-rw-r--r-- | dev-games/tiled/tiled-1.9.2.ebuild | 50 |
2 files changed, 42 insertions, 21 deletions
diff --git a/dev-games/tiled/files/tiled-1.9.2-set-plugin-path.patch b/dev-games/tiled/files/tiled-1.9.2-set-plugin-path.patch new file mode 100644 index 0000000..e3d6526 --- /dev/null +++ b/dev-games/tiled/files/tiled-1.9.2-set-plugin-path.patch @@ -0,0 +1,13 @@ +--- tiled-1.9.2/src/libtiled/libtiled.qbs 2022-11-01 12:31:35.874637416 +0100 ++++ tiled-1.9.2/src/libtiled/libtiled--patched.qbs 2022-11-01 12:59:46.515088320 +0100 +@@ -36,8 +36,10 @@ + + if (project.staticZstd || pkgConfigZstd.found) + defs.push("TILED_ZSTD_SUPPORT"); + ++ defs.push('TILED_PLUGIN_DIR="__EBUILD_TILED_PLUGIN_DIR__"'); ++ + return defs; + } + cpp.dynamicLibraries: { + var libs = base; diff --git a/dev-games/tiled/tiled-1.9.2.ebuild b/dev-games/tiled/tiled-1.9.2.ebuild index 4c2cfd5..e32de30 100644 --- a/dev-games/tiled/tiled-1.9.2.ebuild +++ b/dev-games/tiled/tiled-1.9.2.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/bjorn/tiled/archive/v${PV}/${P}.tar.gz" LICENSE="BSD BSD-2 GPL-2+" SLOT="0" KEYWORDS="~amd64" -IUSE="examples python" +IUSE="examples qt5 python" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -38,34 +38,42 @@ BDEPEND=" DOCS=( AUTHORS COPYING NEWS.md README.md ) pkg_setup() { - use python && python-single-r1_pkg_setup - # Create a Qt5 profile for Qbs - qbs setup-qt "$(qt5_get_bindir)/qmake" qt5 + use qt5 && python && python-single-r1_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}"/${PN}-1.9.2-set-plugin-path.patch + eapply_user + + sed -e "s|__EBUILD_TILED_PLUGIN_DIR__|$(get_libdir)/tiled/plugins|g" -i src/libtiled/libtiled.qbs } src_configure() { # Setup toolchains qbs setup-toolchains --detect - # The installdir is appended to installPrefix - qbs build profile:qt5 \ - qbs.installPrefix:"/usr" \ - qbs.installDir:"$(get_libdir)" \ - qbs.install:true - #SYSTEM_ZSTD="yes" \ - #DISABLE_PYTHON_PLUGIN="$(usex !python)" \ - #USE_FHS_PLUGIN_PATH="true" + # Create a Qt5 profile for Qbs + qbs setup-qt "$(qt5_get_bindir)/qmake" qt5 } -src_install() { - #emake INSTALL_ROOT="${D}" install - qbs install --install-root="${D}" profile:qt5 - - einstalldocs +src_compile() { + # The installDir is appended to installPrefix + qbs build --no-install \ + config:release \ + profile:qt5 \ + qbs.installDir:$(get_libdir) \ + qbs.installPrefix:/usr +} - if use examples ; then - docompress -x /usr/share/doc/${PF}/examples - dodoc -r examples - fi +src_install() { + LIBDIR=$(get_libdir) + PREFIX="/usr" + qbs install -v --no-build \ + config:release \ + --install-root ${D} \ + qbs.installDir:${LIBDIR} \ + qbs.installPrefix:${PREFIX} + mkdir -p "${ED}${PREFIX}/${LIBDIR}" + mv -v "${ED}${PREFIX}"/lib/* "${ED}${PREFIX}"/"${LIBDIR}"/ } pkg_postinst() { |