diff options
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/Manifest.gz | bin | 38336 -> 38349 bytes | |||
-rw-r--r-- | media-gfx/asymptote/Manifest | 2 | ||||
-rw-r--r-- | media-gfx/asymptote/asymptote-2.95.ebuild | 242 | ||||
-rw-r--r-- | media-gfx/gimp/Manifest | 2 | ||||
-rw-r--r-- | media-gfx/gimp/gimp-3.0.0_rc2.ebuild | 260 |
5 files changed, 506 insertions, 0 deletions
diff --git a/media-gfx/Manifest.gz b/media-gfx/Manifest.gz Binary files differindex e609144e0a18..bd81db9f640f 100644 --- a/media-gfx/Manifest.gz +++ b/media-gfx/Manifest.gz diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest index 460895c4361e..0a7639750b56 100644 --- a/media-gfx/asymptote/Manifest +++ b/media-gfx/asymptote/Manifest @@ -5,7 +5,9 @@ AUX asymptote-2.92-xdg-utils.patch 813 BLAKE2B 3a56ae5835a88b36603aa43238a821bd2 DIST asymptote-2.89.src.tgz 15133552 BLAKE2B bde5acd3e76543b3c936e785ccf081c38687d535f336ee0e3da62f5fe078bb040dc162b64f02e94f392129c120bdf497b86e3862059abdb1b4544bab3cce3218 SHA512 a9874f0dc6eb05b95ef551611d85f39222af2a0628d7904160b08bdaf797c2b9ec6d12af7ae26dee69dbc056a5bffad4e450d4846a517d80990d89759e0c47a0 DIST asymptote-2.90.src.tgz 15154576 BLAKE2B 57e3c4287f2e8a6b6f3d660cdd04bb753b435294d4769bbcf84d6c7bf80c813609528767af7d19853d9f72f4f1ce9e6a8dcc6a75731a2f3d16098d5da5b81b6c SHA512 2d050f7a2cfc34d2d6b5382a48e7bf09031d98a77e61b654b4af84b5e8e11553a9a713a6dea8d09291761427d7134742a3d266e57ac57ffda3587ec0487ecfca DIST asymptote-2.92.src.tgz 17075592 BLAKE2B 426fe3bb652f2f227d6f8cdd8e05c4b4bf0e2a0c47b3c252c5efb189ad3e7a0946664d714f161f70a9715f75dadf5510445e404d8c2e7b33f9e710200965caf0 SHA512 242a91357e7f0d2a4fc786fa881498d09d5b3b679cf1ee83e6af49f645935699a6e703eb8069446e11098028bc0cb0549f527695d3ea289066124d707c592559 +DIST asymptote-2.95.src.tgz 32055059 BLAKE2B 89d8c512599f4ff4f21d43287176541fc539793f1d467028a99f866f663b8b5093626b6d166ce48749534cfec998059dc5add5cef0d54b49afb636791643e1ba SHA512 e1e2401d5d1aef8f594dadcf7c49f775a816e15d9fbd43c52581e9f135942c20adcc78af134f46b101c32e2fc68aa9e9f4f5985d19eee9f6bfcb069813194d15 EBUILD asymptote-2.89.ebuild 5547 BLAKE2B 8314b3258329322d6be911bacd9c5137d47ecc4515a2817be74c3784fbfd96bcb7cf2fa7c69e4396c2f0e9b752a292da4fbe00ca6931eedab0e91979fdf4186b SHA512 76dcde2b5e188c61728a933d264c541a795f0f808bba8eb565bb9e575d64f05ac38e163ac83cd747e9d3556acb9572a4934a33ca8833e2ba83bd9d58de3aead6 EBUILD asymptote-2.90.ebuild 5547 BLAKE2B 8314b3258329322d6be911bacd9c5137d47ecc4515a2817be74c3784fbfd96bcb7cf2fa7c69e4396c2f0e9b752a292da4fbe00ca6931eedab0e91979fdf4186b SHA512 76dcde2b5e188c61728a933d264c541a795f0f808bba8eb565bb9e575d64f05ac38e163ac83cd747e9d3556acb9572a4934a33ca8833e2ba83bd9d58de3aead6 EBUILD asymptote-2.92.ebuild 5549 BLAKE2B af0982ef5ed10cc7c5e21a24ffba2cb36f50c9443e428611f4c5433475dd6ceb17daa5e292dfa584d8869131f5d7ad3eb1b598e50f06dc948c97efcb862e94ec SHA512 cd18f9dfa1c630474a3405aae76d90358d6b5f7a6e7bd60d563272bd22a5118a8776bb8ce8fa79306b137b47f2a7387e5f9448587975886e28e7f0125d544a94 +EBUILD asymptote-2.95.ebuild 5550 BLAKE2B 8279325802d8413c661b18c8a299a1920d362d6731849f377f4a32550c6de3714ab2da0af7b1ef764eaf57a8d148434ea22fea75b5797ac6acb03a8ff77560db SHA512 9877f5d8cede8c11ed2f1df43d7c5cfe2393134c6a12b3d19e4707850cc9e0de42d401120e6ac12ba9f2d220e781c17e73f9d3bb86e0edf771a9dbac4f44a598 MISC metadata.xml 1423 BLAKE2B 64dd5d6c928a11d4a47297362223164cb19d91f6a08a0582b66831e2e8e2d7594389c2244fa1527dfe945da0e67985f5c639e3dae2482f57b510bf828a4605ed SHA512 1561e416e56bca130a72f90886981f63224c21e2a077a7b93e6fdd877f38dd12dfa9e0b747840e7f459e2df16c5b08e0177d26c526eb21bebe00fa8c91326bc9 diff --git a/media-gfx/asymptote/asymptote-2.95.ebuild b/media-gfx/asymptote/asymptote-2.95.ebuild new file mode 100644 index 000000000000..d1589a23dad5 --- /dev/null +++ b/media-gfx/asymptote/asymptote-2.95.ebuild @@ -0,0 +1,242 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit autotools elisp-common latex-package python-r1 + +DESCRIPTION="A vector graphics language that provides a framework for technical drawing" +HOMEPAGE="https://asymptote.sourceforge.io/" +SRC_URI="https://downloads.sourceforge.net/asymptote/${P}.src.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="+boehm-gc context curl doc emacs examples fftw gsl +imagemagick latex lsp offscreen +opengl python sigsegv svg test vim-syntax X" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + offscreen? ( opengl ) + doc? ( boehm-gc )" + +RDEPEND=" + >=sys-libs/ncurses-5.4-r5:0= + >=sys-libs/readline-4.3-r5:0= + net-libs/libtirpc:= + imagemagick? ( media-gfx/imagemagick[png] ) + opengl? ( media-libs/mesa[X(+)] media-libs/freeglut media-libs/glew:0 media-libs/glm ) + offscreen? ( media-libs/mesa[osmesa] ) + svg? ( app-text/dvisvgm ) + sigsegv? ( dev-libs/libsigsegv ) + boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] ) + fftw? ( >=sci-libs/fftw-3.0.1:= ) + gsl? ( sci-libs/gsl:= ) + python? ( ${PYTHON_DEPS} ) + curl? ( net-misc/curl ) + lsp? ( + dev-libs/boost + dev-libs/rapidjson + dev-libs/utfcpp + ) + X? ( + ${PYTHON_DEPS} + dev-python/pyqt5[${PYTHON_USEDEP},gui,widgets,svg] + dev-python/cson + dev-python/numpy + >=gnome-base/librsvg-2.40 + ) + latex? ( + virtual/latex-base + dev-texlive/texlive-latexextra + ) + context? ( dev-texlive/texlive-context ) + emacs? ( >=app-editors/emacs-23.1:* ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" +DEPEND="${RDEPEND} + dev-lang/perl + doc? ( + media-gfx/imagemagick[png] + virtual/texi2dvi + virtual/latex-base + dev-texlive/texlive-latexextra + app-text/ghostscript-gpl ) + test? ( app-text/ghostscript-gpl )" + +TEXMF=/usr/share/texmf-site + +PATCHES=( + # Changing pdf, ps, image viewers to xdg-open + "${FILESDIR}/${PN}-2.92-xdg-utils.patch" + + # Bug #322473 + "${FILESDIR}/${PN}-2.70-info.patch" +) + +src_prepare() { + sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \ + -i configure.ac \ + || die "sed configure.ac failed" + + default + eautoreconf +} + +src_configure() { + # for the CPPFLAGS see + # https://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349 + econf \ + CPPFLAGS=-DHAVE_SYS_TYPES_H \ + CFLAGS="${CXXFLAGS}" \ + --disable-gc-debug \ + --disable-gc-full-debug \ + --with-latex=/usr/share/texmf-site/tex/latex \ + --with-context=/usr/share/texmf-site/tex/context \ + $(use_enable boehm-gc gc system) \ + $(use_enable curl) \ + $(use_enable lsp) \ + $(use_enable fftw) \ + $(use_enable gsl) \ + $(use_enable opengl gl) \ + $(use_enable offscreen) \ + $(use_enable sigsegv) +} + +src_compile() { + default + + emake doc/version.texi + cd doc || die + emake asy.1 + einfo "Making info" + emake ${PN}.info + if use doc; then + cd FAQ || die + emake + cd .. || die + # pdf + einfo "Making pdf docs" + export VARTEXFONTS="${T}"/fonts + # see bug #260606 + emake -j1 asymptote.pdf + emake CAD.pdf asy-latex.pdf asyRefCard.pdf + fi + cd .. || die + + if use emacs; then + einfo "Compiling emacs lisp files" + elisp-compile base/*.el + fi +} + +src_install() { + # the program + dobin asy + + # .asy files + insinto /usr/share/${PN} + doins -r base/*.asy base/*.js base/*.sh base/*.ps base/shaders base/webgl + chmod 755 "${D}"/usr/share/${PN}/shaders/* + + # documentation + dodoc README ReleaseNotes ChangeLog + cd doc || die + doman asy.1 + doinfo png/${PN}.info + if use doc; then + dodoc FAQ/asy-faq.ascii + dodoc CAD.pdf asy-latex.pdf asyRefCard.pdf asymptote.pdf + fi + cd .. || die + + # asymptote.py + if use python; then + python_moduleinto ${PN} + #python_foreach_impl python_domodule misc/aspy.py + python_foreach_impl python_domodule base/${PN}.py + fi + + # X GUI + if use X; then + cd GUI || die + python_setup + sed -e 1d -i xasy.py + echo "#!/usr/bin/env ${EPYTHON}" > xasy1 + cat xasy1 xasy.py > xasy + rm xasy1 xasy.py + mv xasy xasy.py + cd .. || die + python_domodule GUI + chmod 755 "${D}/$(python_get_sitedir)/${PN}/GUI/xasy.py" + dosym "$(python_get_sitedir)/${PN}/GUI/xasy.py" /usr/bin/xasy + doman doc/xasy.1x + fi + + # examples + if use examples; then + docinto examples + dodoc \ + examples/*.asy \ + examples/*.views \ + examples/*.dat \ + examples/*.bib \ + examples/*.png \ + examples/*.pdb1 \ + doc/*.asy \ + doc/*.csv \ + doc/*.dat \ + doc/pixel.pdf \ + doc/extra/*.asy + docinto examples/animations + dodoc examples/animations/*.asy + fi + + # LaTeX style + if use latex; then + cd doc || die + insinto "${TEXMF}"/tex/latex/${PN} + doins *.sty latexmkrc + if use examples; then + docinto examples + dodoc latexusage.tex externalprc.tex + docinto examples/animations + dodoc ../examples/animations/*.tex + fi + cd .. || die + fi + + # ConTeXt + if use context; then + insinto /usr/share/texmf-site/tex/context + doins doc/colo-asy.tex + fi + + # emacs mode + if use emacs; then + elisp-install ${PN} base/*.el base/*.elc asy-keywords.el + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el + fi + + # vim syntax + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins base/asy.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins base/asy_filetype.vim + fi +} + +pkg_postinst() { + use latex && latex-package_rehash + use emacs && elisp-site-regen + + elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer' + elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer' +} + +pkg_postrm() { + use latex && latex-package_rehash + use emacs && elisp-site-regen +} diff --git a/media-gfx/gimp/Manifest b/media-gfx/gimp/Manifest index 2475eaddce2f..14aafcfd8339 100644 --- a/media-gfx/gimp/Manifest +++ b/media-gfx/gimp/Manifest @@ -6,7 +6,9 @@ AUX gimp-2.10_fix_test-appdata.patch 902 BLAKE2B 2b1a131d874d65422d8bdd44732b984 AUX gimp-2.10_libheif-1.18_unconditional_compat.patch 820 BLAKE2B 4e75ebc639bc6f985776861de119b85dd7bde2be3a2e385cb6c61bd6e44b29d80c9ff84736a7e518b76f092c72295c1bb7e2ed58eccbd52a54b7bc4c769b12e6 SHA512 4233e2d8c50222b4700e9f7c6b2e5a41e1d5b685899f4cb0db61aa96b9eba4a0538fcc74fe9fe77265932062ea4dc94e13036d381a96338a470bf00b5a53b437 DIST gimp-2.10.38.tar.bz2 31698453 BLAKE2B 58c29e3e00d873e69a5e5f4e9c3ff4d868ccfb11914570306ef12c54ca7d3ef89a62d8c71fac1f2d1f426ac615dc4caf7a7260351c00301dce2b1aa4193bab6d SHA512 343bf1c3bd14bf8e7c7af79c05920faca213da68549127c1d8af53e2e872e55aeaf39a3cfcf578183a34fdc4f98e1c859be63956b0611067186eefd1fdee2aaa DIST gimp-3.0.0-RC1.tar.xz 28863948 BLAKE2B d9e1ae51809d1c8e5084a9e85b660cd0f3a763f8ee220075fe73f512940e9637d50675a06d0dca88c501571a26404cb6b53c9573348002586143c52736dfa196 SHA512 844896976b66b0498ba9149c7176f5442b2305fd3dc51fce7ff92eb05b7b0f86f16d0bd16e50a3c43ab2c6b9be4e610dbbfc50a99c84a62a4de80a6937d43985 +DIST gimp-3.0.0-RC2.tar.xz 26980968 BLAKE2B 56b98a7863df22cf81015a9da5d7535cfef5a154c47418b1b6c6212cc76423e0769a4aa8d76714d2eb22595b1f6e2c623e4444e35675db5fe7e40c8820fe71dd SHA512 c0a6e096d954f3048cb68fe4ff71dd2f49c802f800014ab8a3089a0e097e7d6f595e5716230c06e7edfddba948f0d01da14800935aa6ceb9dc2e12fb7f19d7e6 EBUILD gimp-2.10.38-r1.ebuild 6261 BLAKE2B 4256b91c88e2d677d894ab6ba90f387713320574cf404e3e794c0ff390e4d4feb16e27534530994f0083a051e5dba5e404b1ac357e78fcdcef3cb624d195890f SHA512 a86bea4cb6d8cabbf981d42a1ca220c0befffb1e0dd8785708087b1e2c62c3bea95386be2abbb22192d65ee90bfec60910f5279f734771742e5b955c4f643655 EBUILD gimp-3.0.0_rc1.ebuild 7043 BLAKE2B bec2a409e288e90a58214febedf99b113bfc0c77412a823aef85a683b129ddc11876e8a3457d27380be780dc97ddd193be0b7341ecfce96aafceb77997575b2a SHA512 91396c43aa2beb6304a56cc84f9c088da4416a7b34e1d70b00f8fcb3c25eac22b96bdaac0c1523ae929014a5be17cd221cec5d56bd9dcf43e0f854222e5620a6 +EBUILD gimp-3.0.0_rc2.ebuild 7043 BLAKE2B 1d0051787aae0af6ee02665af6a15a3226b62fd1b6b05215f0fd9b245edf0a3fbcaf105427538a47e76221228cc19fde010b3310d5360d0a3d45c09c86458e02 SHA512 7bc058940dfccaedaa0f9e98be2617b9eb709cac0cfc94a22a3134c0972b98ce61e0c647a770be96074a7d0f1cbbe95655e14509e24f4a92a688086f83c262cb EBUILD gimp-9999.ebuild 7259 BLAKE2B 1ccbd31727bac846d9bef5d3221a859cccc2069e98831bb8aeb03b6f9c52f6d7d13e8ce57db087a6082754acbdf4f3ae25f46d53232bcb7baa5303d8c2b17224 SHA512 149dbbb73e0116fc9694bbb5659033156f585fe9c8208939ab6d391c99332cafb5b2bdb59498df729b9024c05a14b1243aa90a07fb3192131262e7a425c10c7c MISC metadata.xml 655 BLAKE2B f6628a2c5edb90b16db0f59af05446a3f31316f5558ece238d30c9350632713cf2db3d315c90b31229596659ec20859c17fde6b051f9ab8f8fe34d64902dad57 SHA512 712a259ae41d9052bde0761087928685b9b66a132db3f3b49121241d87728f51bf31a00541aa385bd03b57a2e2a03a0176356045dd4752485a8dca2bd61c5886 diff --git a/media-gfx/gimp/gimp-3.0.0_rc2.ebuild b/media-gfx/gimp/gimp-3.0.0_rc2.ebuild new file mode 100644 index 000000000000..1f159711d6dd --- /dev/null +++ b/media-gfx/gimp/gimp-3.0.0_rc2.ebuild @@ -0,0 +1,260 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) +PYTHON_COMPAT=( python3_{10..13} ) +VALA_USE_DEPEND=vapigen + +inherit lua-single meson python-single-r1 toolchain-funcs vala xdg + +DESCRIPTION="GNU Image Manipulation Program" +HOMEPAGE="https://www.gimp.org/" +SRC_URI="mirror://gimp/v$(ver_cut 1-2)/${PN}-$(ver_cut 1-3)-RC2.tar.xz" + +S="${WORKDIR}/${PN}-$(ver_cut 1-3)-RC2" +LICENSE="GPL-3+ LGPL-3+" +SLOT="0/3" + +IUSE="X aalib alsa doc fits gnome heif javascript jpeg2k jpegxl lua mng openexr openmp postscript test udev unwind vala vector-icons webp wmf xpm" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + lua? ( ${LUA_REQUIRED_USE} ) + test? ( X ) + xpm? ( X ) +" + +RESTRICT="!test? ( test )" + +# media-libs/{babl,gegl} are required to be built with USE="introspection" +# to fix the compilation checking of /usr/share/gir-1.0/{Babl-0.1gir,Gegl-0.4.gir} +COMMON_DEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/pygobject-3.0:3[${PYTHON_USEDEP}] + ') + >=app-accessibility/at-spi2-core-2.46.0 + >=app-text/poppler-0.90.1[cairo] + >=app-text/poppler-data-0.4.9 + >=dev-libs/appstream-glib-0.7.16 + >=dev-libs/glib-2.70.0:2 + >=dev-libs/json-glib-1.4.4 + dev-libs/libxml2:2 + dev-libs/libxslt + >=gnome-base/librsvg-2.57.3:2 + >=media-gfx/mypaint-brushes-2.0.2:= + >=media-libs/babl-0.1.110[introspection,lcms,vala?] + >=media-libs/fontconfig-2.12.6 + >=media-libs/freetype-2.10.2 + >=media-libs/gegl-0.4.52:0.4[cairo,introspection,lcms,vala?] + >=media-libs/gexiv2-0.14.0 + >=media-libs/harfbuzz-2.6.5:= + >=media-libs/lcms-2.13.1:2 + media-libs/libjpeg-turbo:= + >=media-libs/libmypaint-1.6.1:= + >=media-libs/libpng-1.6.37:0= + >=media-libs/tiff-4.1.0:= + net-libs/glib-networking[ssl] + sys-libs/zlib + >=x11-libs/cairo-1.16.0[X=] + >=x11-libs/gdk-pixbuf-2.40.0:2[introspection] + >=x11-libs/gtk+-3.24.16:3[introspection,X=] + >=x11-libs/pango-1.50.0[X=] + aalib? ( media-libs/aalib ) + alsa? ( >=media-libs/alsa-lib-1.0.0 ) + fits? ( sci-libs/cfitsio ) + heif? ( >=media-libs/libheif-1.13.0:= ) + javascript? ( dev-libs/gjs ) + jpeg2k? ( >=media-libs/openjpeg-2.3.1:2= ) + jpegxl? ( >=media-libs/libjxl-0.6.1:= ) + lua? ( + ${LUA_DEPS} + $(lua_gen_cond_dep ' + dev-lua/lgi[${LUA_USEDEP}] + ') + ) + mng? ( media-libs/libmng:= ) + openexr? ( >=media-libs/openexr-2.3.0:= ) + postscript? ( app-text/ghostscript-gpl:= ) + udev? ( >=dev-libs/libgudev-167:= ) + unwind? ( >=sys-libs/libunwind-1.1.0:= ) + webp? ( >=media-libs/libwebp-0.6.0:= ) + wmf? ( >=media-libs/libwmf-0.2.8[X=] ) + X? ( + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + >=x11-libs/libXmu-1.1.4 + ) + xpm? ( x11-libs/libXpm ) +" + +RDEPEND=" + ${COMMON_DEPEND} + x11-themes/hicolor-icon-theme + gnome? ( gnome-base/gvfs ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( x11-misc/xvfb-run ) + vala? ( $(vala_depend) ) +" + +# TODO: there are probably more atoms in DEPEND which should be in BDEPEND now +BDEPEND=" + >=dev-lang/perl-5.30.3 + dev-util/gdbus-codegen + >=sys-devel/gettext-0.21 + doc? ( + app-text/yelp-tools + dev-libs/gobject-introspection[doctool] + dev-util/gi-docgen + ) + virtual/pkgconfig +" + +DOCS=( "AUTHORS" "NEWS" "README" "README.i18n" ) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + python-single-r1_pkg_setup + use lua && lua-single_pkg_setup +} + +src_prepare() { + default + + sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' meson.build || die #737794 + + # Fix Gimp and GimpUI devel doc installation paths + sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp/meson.build || die + sed -i -e "s/'doc'/'gtk-doc'/" devel-docs/reference/gimp-ui/meson.build || die + + # Fix pygimp.interp python implementation path. + # Meson @PYTHON_PATH@ use sandbox path e.g.: + # '/var/tmp/portage/media-gfx/gimp-2.99.12/temp/python3.10/bin/python3' + sed -i -e 's/@PYTHON_PATH@/'${EPYTHON}'/' plug-ins/python/pygimp.interp.in || die + + # Set proper intallation path of documentation logo + sed -i -e "s/'gimp-@0@'.format(gimp_app_version)/'gimp-${PVR}'/" gimp-data/images/logo/meson.build || die +} + +_adjust_sandbox() { + # Bugs #569738 and #591214 + local nv + for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do + # We do not check for existence as they may show up later + # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21 + addwrite "${nv}" + done + + addwrite /dev/dri/ # bugs #574038 and #684886 + addwrite /dev/ati/ # bug #589198 + addwrite /proc/mtrr # bug #589198 +} + +src_configure() { + _adjust_sandbox + + use vala && vala_setup + + local emesonargs=( + -Denable-default-bin=enabled + + -Dcheck-update=no + -Denable-multiproc=true + -Dappdata-test=disabled + -Dbug-report-url=https://bugs.gentoo.org/ + -Dilbm=disabled + -Dlibbacktrace=false + -Dwebkit-unmaintained=false + $(meson_feature aalib aa) + $(meson_feature alsa) + $(meson_feature doc gi-docgen) + $(meson_feature fits) + $(meson_feature heif) + $(meson_feature javascript) + $(meson_feature jpeg2k jpeg2000) + $(meson_feature jpegxl jpeg-xl) + $(meson_feature mng) + $(meson_feature openexr) + $(meson_feature openmp) + $(meson_feature postscript ghostscript) + $(meson_feature test headless-tests) + $(meson_feature udev gudev) + $(meson_feature vala) + $(meson_feature webp) + $(meson_feature wmf) + $(meson_feature X xcursor) + $(meson_feature xpm) + $(meson_use doc g-ir-doc) + $(meson_use lua) + $(meson_use unwind libunwind) + $(meson_use vector-icons) + ) + + meson_src_configure +} + +src_compile() { + export XDG_DATA_DIRS="${EPREFIX}"/usr/share # bug 587004 + meson_src_compile +} + +# for https://bugs.gentoo.org/664938 +_rename_plugins() { + einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout (bug #664938)...' + local prename=gimp-org- + ( + cd "${ED}"/usr/$(get_libdir)/gimp/3.0/plug-ins || exit 1 + for plugin_slash in $(ls -d1 */); do + plugin=${plugin_slash%/} + if [[ -f ${plugin}/${plugin} ]]; then + # NOTE: Folder and file name need to match for Gimp to load that plug-in + # so "file-svg/file-svg" becomes "${prename}file-svg/${prename}file-svg" + mv ${plugin}/{,${prename}}${plugin} || exit 1 + mv {,${prename}}${plugin} || exit 1 + fi + done + ) +} + +src_test() { + local -x LD_LIBRARY_PATH="${BUILD_DIR}/libgimp:${LD_LIBRARY_PATH}" + meson_src_test +} + +src_install() { + meson_src_install + + python_optimize + + # Workaround for bug #321111 to give GIMP the least + # precedence on PDF documents by default + mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die + + find "${D}" -name '*.la' -type f -delete || die + + # Create symlinks for Gimp exec in /usr/bin + dosym "${ESYSROOT}"/usr/bin/gimp-3.0 /usr/bin/gimp + dosym "${ESYSROOT}"/usr/bin/gimp-console-3.0 /usr/bin/gimp-console + dosym "${ESYSROOT}"/usr/bin/gimp-script-fu-interpreter-3.0 /usr/bin/gimp-script-fu-interpreter + dosym "${ESYSROOT}"/usr/bin/gimp-test-clipboard-3.0 /usr/bin/gimp-test-clipboard + dosym "${ESYSROOT}"/usr/bin/gimptool-3.0 /usr/bin/gimptool + + _rename_plugins || die +} + +pkg_postinst() { + xdg_pkg_postinst +} + +pkg_postrm() { + xdg_pkg_postrm +} |