summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/netpbm/netpbm-10.76.00.ebuild')
-rw-r--r--media-libs/netpbm/netpbm-10.76.00.ebuild48
1 files changed, 30 insertions, 18 deletions
diff --git a/media-libs/netpbm/netpbm-10.76.00.ebuild b/media-libs/netpbm/netpbm-10.76.00.ebuild
index 77c99fa54c2..32f9f2ae5d2 100644
--- a/media-libs/netpbm/netpbm-10.76.00.ebuild
+++ b/media-libs/netpbm/netpbm-10.76.00.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI=7
-inherit toolchain-funcs eutils multilib
+inherit toolchain-funcs
DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
HOMEPAGE="http://netpbm.sourceforge.net/"
@@ -14,6 +14,8 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+BDEPEND="app-arch/xz-utils
+ sys-devel/flex"
RDEPEND="jbig? ( media-libs/jbigkit )
jpeg? ( virtual/jpeg:0 )
png? ( >=media-libs/libpng-1.4:0 )
@@ -24,24 +26,31 @@ RDEPEND="jbig? ( media-libs/jbigkit )
xml? ( dev-libs/libxml2 )
zlib? ( sys-libs/zlib )
X? ( x11-libs/libX11 )"
-DEPEND="${RDEPEND}
- app-arch/xz-utils
- sys-devel/flex"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/netpbm-10.76.00-build.patch
+ "${FILESDIR}"/netpbm-10.76.00-test.patch #450530
+ "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch
+ "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012
+)
netpbm_libtype() {
case ${CHOST} in
- *-darwin*) echo dylib;;
- *) echo unixshared;;
+ *-darwin*) echo dylib;;
+ *) echo unixshared;;
esac
}
+
netpbm_libsuffix() {
local suffix=$(get_libname)
echo ${suffix//\.}
}
+
netpbm_ldshlib() {
case ${CHOST} in
- *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
- *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
+ *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';;
+ *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';;
esac
}
netpbm_config() {
@@ -53,10 +62,7 @@ netpbm_config() {
}
src_prepare() {
- epatch "${FILESDIR}"/netpbm-10.76.00-build.patch
- epatch "${FILESDIR}"/netpbm-10.76.00-test.patch #450530
- epatch "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch
- epatch "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012
+ default
# make sure we use system libs
sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
@@ -145,7 +151,7 @@ src_configure() {
EOF
# cannot chain the die with the heredoc above as bash-3
# has a parser bug in that setup #282902
- [ $? -eq 0 ] || die "writing config.mk failed"
+ [[ $? -eq 0 ]] || die "writing config.mk failed"
}
src_compile() {
@@ -164,21 +170,27 @@ src_install() {
# without any actual dependencies, thus the -j1.
emake -j1 package pkgdir="${ED}"/usr
- [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+ if [[ $(get_libdir) != "lib" ]] ; then
+ mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die
+ fi
# Remove cruft that we don't need, and move around stuff we want
rm "${ED}"/usr/bin/{doc.url,manweb} || die
rm -r "${ED}"/usr/man/web || die
rm -r "${ED}"/usr/link || die
rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+
dodir /usr/share
mv "${ED}"/usr/man "${ED}"/usr/share/ || die
mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
doman userguide/*.[0-9]
- use doc && dohtml -r userguide
dodoc README
- cd doc
+
+ cd doc || die
dodoc HISTORY Netpbm.programming USERDOC
- dohtml -r .
+ docinto html
+ dodoc -r *.html
+
+ use doc && dodoc -r ../userguide/*.html
}