commit: b22db36af30264f2cde7c55e627cae4a125c0af9 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> AuthorDate: Wed May 19 21:04:23 2021 +0000 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> CommitDate: Wed May 19 21:13:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b22db36a
media-libs/libafterimage: fix multiple bugs - Update to EAPI 7 - Use $(AR) if any, fallback to direct ar, bug 731044 - Drop non-standard 'l' from ar args, bug 784182 - Properly detect freetype: use pkg-config, bug 783375 Bug: https://bugs.gentoo.org/784182 Bug: https://bugs.gentoo.org/731044 Bug: https://bugs.gentoo.org/783375 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> .../libafterimage/files/libafterimage-ar.patch | 39 ++++++++ .../files/libafterimage-freetype.patch | 23 +++++ .../libafterimage/libafterimage-1.20-r4.ebuild | 110 +++++++++++++++++++++ 3 files changed, 172 insertions(+) diff --git a/media-libs/libafterimage/files/libafterimage-ar.patch b/media-libs/libafterimage/files/libafterimage-ar.patch new file mode 100644 index 00000000000..6e8d0bb8cd4 --- /dev/null +++ b/media-libs/libafterimage/files/libafterimage-ar.patch @@ -0,0 +1,39 @@ +diff '--color=auto' -Naurd libAfterImage-1.20.orig/Makefile.in libAfterImage-1.20/Makefile.in +--- libAfterImage-1.20.orig/Makefile.in 2011-01-15 08:52:22.000000000 +0300 ++++ libAfterImage-1.20/Makefile.in 2021-05-19 23:32:32.793826120 +0300 +@@ -78,7 +78,8 @@ + EXTRA_DEFINES = @DEFINE_XLOCALE@ + + RANLIB = @RANLIB@ +-AR = ar clq ++AR ?= ar ++AR += cq + CP = @CP@ + MV = @MV@ + RM = @RM@ +diff '--color=auto' -Naurd libAfterImage-1.20.orig/aftershow/Makefile.in libAfterImage-1.20/aftershow/Makefile.in +--- libAfterImage-1.20.orig/aftershow/Makefile.in 2011-01-15 08:52:22.000000000 +0300 ++++ libAfterImage-1.20/aftershow/Makefile.in 2021-05-19 23:32:53.158905472 +0300 +@@ -11,7 +11,8 @@ + EXTRA_DEFINES = @DEFINE_XLOCALE@ + + RANLIB = @RANLIB@ +-AR = ar clq ++AR ?= ar ++AR += cq + CP = @CP@ + MV = @MV@ + RM = @RM@ +diff '--color=auto' -Naurd libAfterImage-1.20.orig/apps/Makefile.in libAfterImage-1.20/apps/Makefile.in +--- libAfterImage-1.20.orig/apps/Makefile.in 2011-01-15 08:52:22.000000000 +0300 ++++ libAfterImage-1.20/apps/Makefile.in 2021-05-19 23:33:15.769993568 +0300 +@@ -8,7 +8,8 @@ + EXTRA_DEFINES = @DEFINE_XLOCALE@ + + RANLIB = @RANLIB@ +-AR = ar clq ++AR ?= ar ++AR += cq + CP = @CP@ + MV = @MV@ + RM = @RM@ diff --git a/media-libs/libafterimage/files/libafterimage-freetype.patch b/media-libs/libafterimage/files/libafterimage-freetype.patch new file mode 100644 index 00000000000..575a68fd7ca --- /dev/null +++ b/media-libs/libafterimage/files/libafterimage-freetype.patch @@ -0,0 +1,23 @@ +--- libAfterImage-1.20.orig/configure.in 2011-01-15 08:52:22.000000000 +0300 ++++ libAfterImage-1.20/configure.in 2021-05-19 23:40:50.359764859 +0300 +@@ -561,9 +561,9 @@ + else + if test "x$ttf_includes" = "xno"; then + AC_MSG_CHECKING(headers required by TTF support) +- if freetype-config --cflags >/dev/null ;then ++ if pkg-config freetype2 --cflags >/dev/null ;then + present_incs="$CCFLAGS $x_includes"; +- for l in `freetype-config --cflags` ; do ++ for l in `pkg-config freetype2 --cflags` ; do + inc_found=no + for p in `echo "$present_incs"` ; do + if test "x$l" = "x$p" ; then +@@ -636,7 +636,7 @@ + have_ttf=yes + fi + if test "$have_ttf" = yes; then +- AFTERIMAGE_LIBS="`freetype-config --libs` $AFTERIMAGE_LIBS" ++ AFTERIMAGE_LIBS="`pkg-config freetype2 --libs` $AFTERIMAGE_LIBS" + fi + fi; + AC_SUBST(TTF_INCLUDES) diff --git a/media-libs/libafterimage/libafterimage-1.20-r4.ebuild b/media-libs/libafterimage/libafterimage-1.20-r4.ebuild new file mode 100644 index 00000000000..33cb313ecb7 --- /dev/null +++ b/media-libs/libafterimage/libafterimage-1.20-r4.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +MY_PN=libAfterImage + +DESCRIPTION="Afterstep's standalone generic image manipulation library" +HOMEPAGE="http://www.afterstep.org/afterimage/index.php" +SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+X cpu_flags_x86_mmx examples gif jpeg nls png static-libs shm +shaping svg tiff truetype" + +RDEPEND=" + X? ( x11-libs/libSM + x11-libs/libXext + x11-libs/libXrender ) + gif? ( media-libs/giflib:0= ) + jpeg? ( virtual/jpeg:0 ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( gnome-base/librsvg:2 ) + tiff? ( media-libs/tiff:0 ) + truetype? ( media-libs/freetype )" +DEPEND="${RDEPEND} + X? ( x11-base/xorg-proto ) + !!x11-wm/afterstep" +BDEPEND=" + virtual/pkgconfig" +REQUIRED_USE=" + shaping? ( X ) + shm? ( X )" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + default + + # fix some ldconfig problem in makefile.in + eapply -p0 "${FILESDIR}"/${PN}-makefile.in.patch + # fix lib paths in afterimage-config + eapply -p0 "${FILESDIR}"/${PN}-config.patch + # fix gif unbundle + eapply -p0 "${FILESDIR}"/${PN}-gif.patch + # fix for libpng15 compability + eapply -p0 "${FILESDIR}"/${PN}-libpng15.patch + # add giflib-5 API support, bug 571654 + eapply "${FILESDIR}"/${PN}-giflib5-v2.patch + # fix ar: respect $(AR), bug 731044 and drop 'l' flag, bug 784182 + eapply "${FILESDIR}"/${PN}-ar.patch + # detect freetype properly, bug 783375 + eapply "${FILESDIR}"/${PN}-freetype.patch + # do not build examples + use examples || sed -i \ + -e '/^all:/s/apps//' \ + -e '/^install:/s/install.apps//' \ + Makefile.in || die "sed failed" + # remove forced flags + sed -i \ + -e 's/CFLAGS="-O3"//' \ + -e 's/ -rdynamic//' \ + configure.in || die "sed failed" + + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + econf \ + $(use_enable cpu_flags_x86_mmx mmx-optimization) \ + $(use_enable nls i18n) \ + $(use_enable shaping) \ + $(use_enable shm shmimage ) \ + $(use_enable static-libs staticlibs) \ + $(use_with X x) \ + $(use_with gif) \ + $(use_with jpeg) \ + $(use_with png) \ + $(use_with svg) \ + $(use_with tiff) \ + $(use_with truetype ttf) \ + --disable-glx \ + --enable-sharedlibs \ + --with-xpm \ + --without-builtin-gif \ + --without-builtin-jpeg \ + --without-builtin-png \ + --without-builtin-zlib \ + --without-afterbase +} + +src_install() { + emake \ + DESTDIR="${D}" \ + AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \ + install + dodoc ChangeLog README + if use examples; then + cd apps || die + mv ascompose.man ascompose.1 || die + doman ascompose.1 + emake clean + rm Makefile* ascompose.1 || die + insinto /usr/share/doc/${PF}/examples + doins * + fi +}