diff options
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/xloadimage/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/xloadimage/xloadimage-4.1-r15.ebuild | 92 |
2 files changed, 93 insertions, 0 deletions
diff --git a/media-gfx/xloadimage/Manifest b/media-gfx/xloadimage/Manifest index 5117253eca97..32fe79df1f93 100644 --- a/media-gfx/xloadimage/Manifest +++ b/media-gfx/xloadimage/Manifest @@ -1,2 +1,3 @@ +DIST xloadimage-4.1-fix-build-for-clang16.patch.xz 23800 BLAKE2B 8417465020f06483c397dd86124297feb320530bd013d6f94b091ac2166da9dc45017b43a21e2ce7a6f03493188e2535294e9b79e7ebbe0062bf0f22166f13d7 SHA512 a8f40fe4a5e8750b2c2b98b1f7488275c1f0763d2814359ec8dce48d1201e78d87f189abf6fcb8fa4753828921fd0c593696ad1958345f954f740687502a896f DIST xloadimage-4.1-gentoo-r1.diff.bz2 41535 BLAKE2B 77cdbb2e6d5dda6084aae2831bcb8750a027f59a673f5a1f8eeb61385bd21243d640bd13a3be7fb24d2ce2cb475a05cb04c91c2b53977c61fb3aa4416e67e112 SHA512 a1a52d576eb68c44e5ff3b68a6bd87cd9b8f21f6fa8edee2d7df2329002d40f6513df6c04ecd57f66018583d0251019bd02e15756dac705b8c9cb8470cb386e3 DIST xloadimage.4.1.tar.gz 596021 BLAKE2B 3c22facf05167d1836c21243799d8f66c211e44d659b4397668ed604cdd82b3bd8f11ab7b3be5e87c59a9b3aa8569d0d3d2e474b572c3bca07b6437b293014bf SHA512 2c91699c8ef07c101ff9b458708ace01cab2979a5e88cf8a4e47ec971f7b4cb5571108afa3e53271ade4e8ccfdcf72ef9e2e09edfc0be6b8afaba50847aa0586 diff --git a/media-gfx/xloadimage/xloadimage-4.1-r15.ebuild b/media-gfx/xloadimage/xloadimage-4.1-r15.ebuild new file mode 100644 index 000000000000..e2159ce3b14b --- /dev/null +++ b/media-gfx/xloadimage/xloadimage-4.1-r15.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Utility to view many different types of images under X11" +HOMEPAGE="https://sioseis.ucsd.edu/xloadimage.html https://tracker.debian.org/pkg/xloadimage" +SRC_URI=" + ftp://ftp.x.org/R5contrib/${P/-/.}.tar.gz + mirror://gentoo/${P}-gentoo-r1.diff.bz2 + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-fix-build-for-clang16.patch.xz +" +S="${WORKDIR}"/${P/-/.} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="tiff jpeg png" + +RDEPEND="x11-libs/libX11 + tiff? ( media-libs/tiff:= ) + png? ( media-libs/libpng:= ) + jpeg? ( media-libs/libjpeg-turbo:= ) + !media-gfx/xli" +DEPEND="${RDEPEND}" + +PATCHES=( + "${WORKDIR}"/${P}-gentoo-r1.diff + "${FILESDIR}"/${P}-zio-shell-meta-char.diff + "${FILESDIR}"/${P}-endif.patch + # Do not define errno extern, but rather include errno.h + # <azarah@gentoo.org> (1 Jan 2003) + "${FILESDIR}"/${P}-include-errno_h.patch + "${FILESDIR}"/xloadimage-gentoo.patch + "${FILESDIR}"/${P}-unaligned-access.patch + "${FILESDIR}"/${P}-ldflags_and_exit.patch + "${FILESDIR}"/${P}-libpng15.patch + "${WORKDIR}"/${P}-fix-build-for-clang16.patch + # One of the previous patches screws up a bracket... + "${FILESDIR}"/${P}-bracket.patch +) + +src_prepare() { + default + + sed -i -e "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf || die + sed -i -e "s:^#include <varargs.h>:#include <stdarg.h>:" rlelib.c || die + # qa-sed sees no-op on the next sed on non-gentoo-prefix systems, + # but that is alright + sed -i -e "/^DEFS = /s:/etc:${EPREFIX}/etc:" Makefile.in || die + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + png.c || die + + eautoreconf +} + +src_configure() { + # Set TIFFHeader to TIFFHeaderCommon wrt #319383 + has_version '>=media-libs/tiff-4.0.0_pre' && \ + append-flags -DTIFFHeader=TIFFHeaderCommon + + tc-export CC + econf $(use_with jpeg) \ + $(use_with png) \ + $(use_with tiff) +} + +src_compile() { + emake SYSPATHFILE="${EPREFIX}"/etc/X11/Xloadimage +} + +src_install() { + dobin xloadimage uufilter + + dosym xloadimage /usr/bin/xsetbg + dosym xloadimage /usr/bin/xview + + insinto /etc/X11 + doins xloadimagerc + + newman xloadimage.man xloadimage.1 + newman uufilter.man uufilter.1 + + echo ".so man1/xloadimage.1" > "${T}"/xsetbg.1 || die + doman "${T}"/xsetbg.1 + newman "${T}"/xsetbg.1 xview.1 + + dodoc README +} |