blob: 630deedeb81add4d618f4e4d309ad9ac698fdc00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="Improved JPEG encoder based on libjpeg-turbo"
HOMEPAGE="https://github.com/mozilla/mozjpeg"
SRC_URI="https://github.com/mozilla/${PN}/releases/download/v${PV}/${P}-release-source.tar.gz"
LICENSE="BSD IJG"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="sys-libs/zlib"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${PN}
src_install() {
# wrapper to use renamed libjpeg.so (allows coexistence with libjpeg-turbo)
echo -e '#!/bin/sh\nLD_PRELOAD="libmozjpeg.so $LD_PRELOAD" .$(basename $0) "$@"' > wrapper
newbin wrapper mozcjpeg
newbin wrapper mozjpegtran
newbin .libs/cjpeg .mozcjpeg
newbin .libs/jpegtran .mozjpegtran
newlib.so .libs/libjpeg.so.62.2.0 libmozjpeg.so
dodoc README.md README-mozilla.txt usage.txt wizard.txt
}
|