You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.0 KiB
91 lines
2.0 KiB
4 months ago
|
# Copyright 1999-2024 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
13 years ago
|
|
||
2 years ago
|
inherit autotools desktop strip-linguas toolchain-funcs
|
||
3 years ago
|
|
||
|
DESCRIPTION="Graphical scanning frontend"
|
||
13 years ago
|
HOMEPAGE="http://www.xsane.org/"
|
||
10 years ago
|
SRC_URI="
|
||
|
http://www.xsane.org/download/${P}.tar.gz
|
||
2 years ago
|
https://dev.gentoo.org/~soap/distfiles/${PN}-0.998-patches-3.tar.xz
|
||
7 years ago
|
https://dev.gentoo.org/~pacho/${PN}/${PN}-256x256.png
|
||
10 years ago
|
"
|
||
13 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
|
||
4 months ago
|
IUSE="nls jpeg png tiff gimp lcms"
|
||
13 years ago
|
|
||
1 year ago
|
DEPEND="
|
||
|
dev-libs/glib:2
|
||
10 years ago
|
media-gfx/sane-backends
|
||
1 year ago
|
sys-libs/zlib
|
||
13 years ago
|
x11-libs/gtk+:2
|
||
12 years ago
|
x11-misc/xdg-utils
|
||
2 years ago
|
jpeg? ( media-libs/libjpeg-turbo:= )
|
||
|
png? ( media-libs/libpng:= )
|
||
|
tiff? ( media-libs/tiff:= )
|
||
4 years ago
|
gimp? ( media-gfx/gimp:0/2 )
|
||
10 years ago
|
lcms? ( media-libs/lcms:2 )
|
||
|
"
|
||
1 year ago
|
RDEPEND="${DEPEND}"
|
||
2 years ago
|
BDEPEND="virtual/pkgconfig"
|
||
13 years ago
|
|
||
1 year ago
|
PATCHES=(
|
||
|
# Apply multiple fixes from different distributions
|
||
|
"${WORKDIR}"/${PN}-0.998-patches-3
|
||
|
# Add support for lcms-2 (from Fedora)
|
||
|
"${FILESDIR}"/${PN}-0.999-lcms2.patch
|
||
|
# See bug #885311 and bug #899806
|
||
|
"${FILESDIR}"/${PN}-0.999-configure-clang16.patch
|
||
|
)
|
||
|
|
||
12 years ago
|
src_prepare() {
|
||
7 years ago
|
default
|
||
|
|
||
1 year ago
|
# bug #609672
|
||
|
strip-linguas -i po/
|
||
7 years ago
|
|
||
1 year ago
|
# Fix compability with libpng15 (bug #377363)
|
||
12 years ago
|
sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c || die
|
||
12 years ago
|
|
||
|
# Fix AR calling directly (bug #442606)
|
||
|
sed -i -e 's:ar r:$(AR) r:' lib/Makefile.in || die
|
||
10 years ago
|
|
||
|
AT_M4DIR="m4" eautoreconf
|
||
13 years ago
|
}
|
||
|
|
||
12 years ago
|
src_configure() {
|
||
2 years ago
|
tc-export AR
|
||
|
|
||
10 years ago
|
econf \
|
||
|
--enable-gtk2 \
|
||
13 years ago
|
$(use_enable nls) \
|
||
|
$(use_enable jpeg) \
|
||
|
$(use_enable png) \
|
||
|
$(use_enable tiff) \
|
||
|
$(use_enable gimp) \
|
||
12 years ago
|
$(use_enable lcms)
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
10 years ago
|
default
|
||
|
|
||
13 years ago
|
dodoc xsane.*
|
||
12 years ago
|
|
||
13 years ago
|
# link xsane so it is seen as a plugin in gimp
|
||
|
if use gimp; then
|
||
2 years ago
|
local plugindir gimptool=( "${ESYSROOT}"/usr/bin/gimptool* )
|
||
4 years ago
|
if [[ ${#gimptool[@]} -gt 0 ]]; then
|
||
|
plugindir="$("${gimptool[0]}" --gimpplugindir)/plug-ins"
|
||
13 years ago
|
else
|
||
|
die "Can't find GIMP plugin directory."
|
||
|
fi
|
||
2 years ago
|
dosym -r /usr/bin/xsane "${plugindir}"/xsane
|
||
13 years ago
|
fi
|
||
12 years ago
|
|
||
7 years ago
|
newicon "${DISTDIR}/${PN}-256x256.png" "${PN}".png
|
||
13 years ago
|
}
|