Upgraded the ghostscript-gpl, jpeg, jpeg, poppler-data, urw-fonts Portage packages

Upgraded app-text/poppler-data to version 0.4.4 on amd64
Upgraded media-libs/jpeg to version 8b on amd64
Upgraded media-fonts/urw-fonts to version 2.4.9 on amd64
Upgraded app-text/ghostscript-gpl to version 9.04-r3 on amd64
Upgraded virtual/jpeg to version 0 on amd64

BUG=None
TEST=trybot chromiumos-sdk
All of these packages are currently only installed on the host.

Change-Id: Ib93c328d30fcd9840dab468ac610e7928f180a74
Reviewed-on: http://gerrit.chromium.org/gerrit/10004
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
This commit is contained in:
Matt Tennant 2011-10-12 21:40:01 -07:00
parent e6b7d215cf
commit 453fa155ce
8 changed files with 793 additions and 0 deletions

View File

@ -0,0 +1,207 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.04-r3.ebuild,v 1.5 2011/10/06 17:41:08 jer Exp $
EAPI=3
inherit autotools eutils versionator flag-o-matic
DESCRIPTION="Ghostscript is an interpreter for the PostScript language and for PDF"
HOMEPAGE="http://ghostscript.com/"
MY_P=${P/-gpl}
GSDJVU_PV=1.5
PVM=$(get_version_component_range 1-2)
SRC_URI="!bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
mirror://gentoo/${P}-patchset-3.tar.bz2"
LICENSE="GPL-3 CPL-1.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="bindist cups dbus djvu gtk idn jpeg2k static-libs X"
COMMON_DEPEND="app-text/libpaper
media-libs/fontconfig
media-libs/freetype:2
media-libs/lcms:0
>=media-libs/libpng-1.2.42
>=media-libs/tiff-3.9.2
>=sys-libs/zlib-1.2.3
virtual/jpeg
!bindist? ( djvu? ( app-text/djvu ) )
cups? ( >=net-print/cups-1.3.8 )
dbus? ( sys-apps/dbus )
gtk? ( x11-libs/gtk+:2 )
idn? ( net-dns/libidn )
jpeg2k? ( media-libs/jasper )
X? ( x11-libs/libXt x11-libs/libXext )"
DEPEND="${COMMON_DEPEND}
dev-util/pkgconfig"
RDEPEND="${COMMON_DEPEND}
>=app-text/poppler-data-0.4.4
>=media-fonts/urw-fonts-2.4.9
linguas_ja? ( media-fonts/kochi-substitute )
linguas_ko? ( media-fonts/baekmuk-fonts )
linguas_zh_CN? ( media-fonts/arphicfonts )
linguas_zh_TW? ( media-fonts/arphicfonts )"
S="${WORKDIR}/${MY_P}"
LANGS="ja ko zh_CN zh_TW"
for X in ${LANGS} ; do
IUSE="${IUSE} linguas_${X}"
done
pkg_setup() {
if use bindist && use djvu; then
ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
fi
}
src_prepare() {
# remove internal copies of various libraries
rm -rf "${S}"/expat
rm -rf "${S}"/freetype
rm -rf "${S}"/jasper
rm -rf "${S}"/jpeg
rm -rf "${S}"/lcms{,2}
rm -rf "${S}"/libpng
rm -rf "${S}"/tiff
rm -rf "${S}"/zlib
# remove internal urw-fonts
rm -rf "${S}"/Resource/Font
# remove internal CMaps (CMaps from poppler-data are used instead)
rm -rf "${S}"/Resource/CMap
# apply various patches, many borrowed from Fedora
# http://pkgs.fedoraproject.org/gitweb/?p=ghostscript.git
EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
EPATCH_SOURCE="${WORKDIR}/patches/"
epatch
if ! use bindist && use djvu ; then
unpack gsdjvu-${GSDJVU_PV}.tar.gz
cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}/base"
epatch "${WORKDIR}/patches-gsdjvu/gsdjvu-1.3-${PN}-8.64.patch"
cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
cp "${S}/base/contrib.mak" "${S}/base/contrib.mak.gsdjvu"
grep -q djvusep "${S}/base/contrib.mak" || \
cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/base/contrib.mak"
# install ps2utf8.ps, bug #197818
sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/base/unixinst.mak" \
|| die "sed failed"
fi
if ! use gtk ; then
sed -i "s:\$(GSSOX)::" base/*.mak || die "gsx sed failed"
sed -i "s:.*\$(GSSOX_XENAME)$::" base/*.mak || die "gsxso sed failed"
fi
# search path fix
sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
-e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
-e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
-e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
-e 's:-L$(BINDIR):$(LDFLAGS) &:g' \
base/Makefile.in base/*.mak || die "sed failed"
cd "${S}"
eautoreconf
cd "${S}/jbig2dec"
eautoreconf
cd "${S}/ijs"
eautoreconf
}
src_configure() {
local FONTPATH
for path in \
/usr/share/fonts/urw-fonts \
/usr/share/fonts/Type1 \
/usr/share/fonts \
/usr/share/poppler/cMap/Adobe-CNS1 \
/usr/share/poppler/cMap/Adobe-GB1 \
/usr/share/poppler/cMap/Adobe-Japan1 \
/usr/share/poppler/cMap/Adobe-Japan2 \
/usr/share/poppler/cMap/Adobe-Korea1
do
FONTPATH="$FONTPATH${FONTPATH:+:}$path"
done
econf \
--enable-dynamic \
--enable-freetype \
--enable-fontconfig \
--disable-compile-inits \
--with-drivers=ALL \
--with-fontpath="$FONTPATH" \
--with-ijs \
--with-jbig2dec \
--with-libpaper \
--with-system-libtiff \
--without-luratech \
$(use_enable cups) \
$(use_enable dbus) \
$(use_enable gtk) \
$(use_with cups install-cups) \
$(use_with cups pdftoraster) \
$(use_with idn libidn) \
$(use_with jpeg2k jasper) \
$(use_with X x)
if ! use bindist && use djvu ; then
sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
fi
cd "${S}/ijs"
econf \
--enable-shared \
$(use_enable static-libs static)
}
src_compile() {
emake -j1 so all || die "emake failed"
cd "${S}/ijs"
emake || die "ijs emake failed"
}
src_install() {
# -j1 -> see bug #356303
emake -j1 DESTDIR="${D}" install-so install || die "emake install failed"
if ! use bindist && use djvu ; then
dobin gsdjvu || die "dobin gsdjvu install failed"
fi
# remove gsc in favor of gambit, bug #253064
rm -rf "${D}/usr/bin/gsc"
rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
dodoc doc/GS9_Color_Management.pdf || die "dodoc install failed"
cd "${S}/ijs"
emake DESTDIR="${D}" install || die "emake ijs install failed"
# rename the original cidfmap to cidfmap.GS
mv "${D}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die
# install our own cidfmap to handle CJK fonts
insinto "/usr/share/ghostscript/${PVM}/Resource/Init"
doins "${WORKDIR}/fontmaps/CIDFnmap" || die "doins CIDFnmap failed"
doins "${WORKDIR}/fontmaps/cidfmap" || die "doins cidfmap failed"
for X in ${LANGS} ; do
if use linguas_${X} ; then
doins "${WORKDIR}/fontmaps/cidfmap.${X}" || die "doins cidfmap.${X} failed"
fi
done
use static-libs || find "${D}" -name '*.la' -delete
}

View File

@ -0,0 +1,19 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-data/poppler-data-0.4.4.ebuild,v 1.6 2011/10/06 17:40:18 jer Exp $
EAPI="3"
DESCRIPTION="Data files for poppler to support uncommon encodings without xpdfrc"
HOMEPAGE="http://poppler.freedesktop.org/"
SRC_URI="http://poppler.freedesktop.org/${P}.tar.gz"
LICENSE="BSD GPL-2 MIT"
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
IUSE=""
src_install() {
emake prefix="${EPREFIX}"/usr DESTDIR="${D}" install || die
dodoc README
}

View File

@ -0,0 +1,362 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>
<!--
The intent of this standard configuration file is to be adequate for
most environments. If you have a reasonably normal environment and
have found problems with this configuration, they are probably
things that others will also want fixed. Please send any suggested
changes to fonts@xfree86.org so that future releases can include
such changes.
Note that the normal 'make install' procedure for XFree86 is to
replace any existing fonts.conf file with the new version. Place
any local customizations in local.conf which this file references.
Keith Packard
-->
<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/X11R6/lib/X11/fonts/OTF</dir>
<dir>~/.fonts</dir>
<!--
Enable sub-pixel rendering
<match target="font">
<test qual="all" name="rgba">
<const>unknown</const>
</test>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
-->
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
<match target="pattern">
<test qual="any" name="family">
<string>mono</string>
</test>
<edit name="family" mode="assign">
<string>monospace</string>
</edit>
</match>
<!--
Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans serif</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>
<!--
Mark common families with their generics so we'll get
something reasonable
-->
<!--
Serif faces
-->
<alias>
<family>Times</family>
<family>Times New Roman</family>
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Kochi Mincho</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>Baekmuk Batang</family>
<default><family>serif</family></default>
</alias>
<!--
Sans-serif faces
-->
<alias>
<family>Helvetica</family>
<family>Arial</family>
<family>Verdana</family>
<family>Nimbus Sans L</family>
<family>Luxi Sans</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>AR PL KaitiM Big5</family>
<family>Baekmuk Dotum</family>
<family>SimSun</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Monospace faces
-->
<alias>
<family>Courier</family>
<family>Courier New</family>
<family>Andale Mono</family>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<family>NSimSun</family>
<default><family>monospace</family></default>
</alias>
<!--
If the font still has no generic name, add sans-serif
-->
<match target="pattern">
<test qual="all" name="family" compare="not_eq">
<string>sans-serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>sans-serif</string>
</edit>
</match>
<!--
Some Asian fonts misadvertise themselves as monospaced when
in fact they are dual-spaced (half and full). This makes
FreeType very confused as it forces all widths to match.
Undo this magic by disabling the width forcing code -->
<match target="font">
<test name="family"><string>GulimChe</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>
<match target="font">
<test name="family"><string>DotumChe</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>
<match target="font">
<test name="family"><string>BatangChe</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>
<match target="font">
<test name="family"><string>GungsuhChe</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>
<!--
Load per-user customization file
-->
<include ignore_missing="yes">~/.fonts.conf</include>
<!--
Load local system customization file
-->
<include ignore_missing="yes">local.conf</include>
<!--
Alias well known font names to available TrueType fonts
-->
<alias>
<family>Times</family>
<accept><family>Times New Roman</family></accept>
</alias>
<alias>
<family>Helvetica</family>
<accept><family>Verdana</family></accept>
</alias>
<alias>
<family>Arial</family>
<accept><family>Verdana</family></accept>
</alias>
<alias>
<family>Courier</family>
<accept><family>Courier New</family></accept>
</alias>
<!--
Provide required aliases for standard names
-->
<alias>
<family>serif</family>
<prefer>
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Kochi Mincho</family>
<family>ZYSong18030</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>Baekmuk Batang</family>
<family>Times New Roman</family>
<family>Times</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Luxi Sans</family>
<family>Nimbus Sans L</family>
<family>Helvetica</family>
<family>Kochi Gothic</family>
<family>ZYSong18030</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>Baekmuk Gulim</family>
<family>Verdana</family>
<family>Arial</family>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<family>Kochi Gothic</family>
<family>ZYSong18030</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>Baekmuk Gulim</family>
<family>Andale Mono</family>
<family>Courier New</family>
</prefer>
</alias>
<!--
We can't hint CJK fonts well, so turn off hinting for CJK fonts.
-->
<match target="font">
<test name="lang" compare="contains">
<string>ja</string>
</test>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="lang" compare="contains">
<string>ko</string>
</test>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="lang" compare="contains">
<string>zh</string>
</test>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
<!--
Artificial oblique for fonts without an italic or oblique version
-->
<match target="font">
<!-- check to see if the font is roman -->
<test name="slant">
<const>roman</const>
</test>
<!-- check to see if the pattern requested non-roman -->
<test target="pattern" name="slant" compare="not_eq">
<const>roman</const>
</test>
<!-- multiply the matrix to slant the font -->
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix><double>1</double><double>.2</double>
<double>0</double><double>1</double>
</matrix>
</times>
</edit>
<!-- pretend the font is oblique now -->
<edit name="slant" mode="assign">
<const>oblique</const>
</edit>
</match>
<config>
<!--
These are the default Unicode chars that are expected to be blank
in fonts. All other blank chars are assumed to be broken and
won't appear in the resulting charsets
-->
<blank>
<int>0x0020</int> <!-- SPACE -->
<int>0x00a0</int> <!-- NO-BREAK SPACE -->
<int>0x00ad</int> <!-- SOFT HYPHEN -->
<int>0x115f</int> <!-- HANGUL CHOSEONG FILLER -->
<int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
<int>0x1680</int> <!-- OGHAM SPACE MARK -->
<int>0x2000</int> <!-- EN QUAD -->
<int>0x2001</int> <!-- EM QUAD -->
<int>0x2002</int> <!-- EN SPACE -->
<int>0x2003</int> <!-- EM SPACE -->
<int>0x2004</int> <!-- THREE-PER-EM SPACE -->
<int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
<int>0x2006</int> <!-- SIX-PER-EM SPACE -->
<int>0x2007</int> <!-- FIGURE SPACE -->
<int>0x2008</int> <!-- PUNCTUATION SPACE -->
<int>0x2009</int> <!-- THIN SPACE -->
<int>0x200a</int> <!-- HAIR SPACE -->
<int>0x200b</int> <!-- ZERO WIDTH SPACE -->
<int>0x200c</int> <!-- ZERO WIDTH NON-JOINER -->
<int>0x200d</int> <!-- ZERO WIDTH JOINER -->
<int>0x200e</int> <!-- LEFT-TO-RIGHT MARK -->
<int>0x200f</int> <!-- RIGHT-TO-LEFT MARK -->
<int>0x2028</int> <!-- LINE SEPARATOR -->
<int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
<int>0x202a</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
<int>0x202b</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
<int>0x202c</int> <!-- POP DIRECTIONAL FORMATTING -->
<int>0x202d</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
<int>0x202e</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
<int>0x202f</int> <!-- NARROW NO-BREAK SPACE -->
<int>0x205f</int> <!-- MEDIUM MATHEMATICAL SPACE -->
<int>0x2060</int> <!-- WORD JOINER -->
<int>0x2061</int> <!-- FUNCTION APPLICATION -->
<int>0x2062</int> <!-- INVISIBLE TIMES -->
<int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
<int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
<int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
<int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
<int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
<int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
<int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
<int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
<int>0x3164</int> <!-- HANGUL FILLER -->
<int>0xfeff</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
<int>0xffa0</int> <!-- HALFWIDTH HANGUL FILLER -->
<int>0xfff9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
<int>0xfffa</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
<int>0xfffa</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
</blank>
<!--
Rescan configuration every 30 seconds when FcFontSetList is called
-->
<rescan>
<int>30</int>
</rescan>
</config>
</fontconfig>

View File

@ -0,0 +1,52 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-fonts/urw-fonts/urw-fonts-2.4.9.ebuild,v 1.18 2011/08/28 13:35:47 grobian Exp $
# At some point URW++ released fonts under GPL license. After that they were took
# and improved by Valek Filippov and this work was somehow related with AFPL...
# At least it can be found on their svn server:
# http://svn.ghostscript.com/ghostscript/trunk/urw-fonts/
# Also, some time ago, sources where published on sf.net:
# http://sourceforge.net/projects/gs-fonts/files/
# At this point this package was published on a nuber of other sites
# (gimp.org/cups.org) and media-fonts/gnu-gs-fonts-std was added to the tree.
# But nobody use that old releases any mover and everybody syncs with
# svn.ghostscript.com. The most recent tag there is:
# http://svn.ghostscript.com/ghostscript/tags/urw-fonts-1.0.7pre44/
# But note that version we have is different from upstream tag. This happened
# because we started to use redhat versions and followed their versioning. It's
# hard to say why they use such strange version since they also sync with
# svn.ghostscript.com. Redhat's ChangeLog states:
# Tue Jan 8 23:00:00 2008 Than Ngo 2.4-2
# - update to 1.0.7pre44
inherit eutils rpm font versionator
MY_PV=$(replace_version_separator 2 -)
DESCRIPTION="free good quality fonts gpl'd by URW++"
HOMEPAGE="http://www.urwpp.de/"
SRC_URI="mirror://gentoo/${PN}-${MY_PV}.fc13.src.rpm"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
RDEPEND="${DEPEND}
!media-fonts/gnu-gs-fonts-std
!media-fonts/gnu-gs-fonts-other"
S=${WORKDIR}
FONT_S=${S}
FONT_SUFFIX="afm pfb pfm"
DOCS="ChangeLog README*"
pkg_postinst() {
font_pkg_postinst
elog "If you upgraded from ${PN}-2.1-r2 some fonts will look a bit"
elog "different. Take a look at bug #208990 if interested."
}

View File

@ -0,0 +1,37 @@
CC = @CC@
EXEEXT = @EXEEXT@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datarootdir = @datarootdir@
mandir = @mandir@
man1dir = $(mandir)/man1
MKDIR_P = @MKDIR_P@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
SCRIPTS = exifautotran
PROGRAMS = jpegexiforient$(EXEEXT)
all: $(SCRIPTS) $(PROGRAMS)
jpegexiforient$(EXEEXT): jpegexiforient.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
clean:
rm -f $(PROGRAMS) *.o
install: all
$(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) $(SCRIPTS) $(DESTDIR)$(bindir)
$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
.PHONY: all clean install

View File

@ -0,0 +1,49 @@
# Make a reasonable guess about memory limits using sysconf().
# includes 5% slop factor as suggested in documentation.
--- jpeg-7/jmemansi.c
+++ jpeg-7/jmemansi.c
@@ -12,6 +12,15 @@
* is shoved onto the user.
*/
+#include <unistd.h>
+
+#ifdef __FreeBSD__
+# include <sys/types.h>
+# include <sys/sysctl.h>
+# include <sys/vmmeter.h>
+# include <vm/vm_param.h>
+#endif
+
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
@@ -157,7 +166,26 @@
GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
{
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+#ifdef _SC_AVPHYS_PAGES
+ long phys_size;
+
+ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
+ return DEFAULT_MAX_MEM;
+ return (long) (phys_size * 0.95);
+#elif defined(HAVE_SYSCTL) && defined(HW_PHYSMEM)
+ /* This works on *bsd and darwin. */
+ unsigned int physmem;
+ size_t len = sizeof physmem;
+ static int mib[2] = { CTL_HW, HW_PHYSMEM };
+
+ if (sysctl (mib, ARRAY_SIZE (mib), &physmem, &len, NULL, 0) == 0
+ && len == sizeof (physmem))
+ return (long) (physmem * 0.95);
+#endif
+
+ return DEFAULT_MAX_MEM;
}
GLOBAL(void)

View File

@ -0,0 +1,50 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg/jpeg-8b.ebuild,v 1.10 2011/01/06 00:03:56 ssuominen Exp $
EAPI="3"
DEB_PV="7-1"
DEB_PN="libjpeg7"
DEB="${DEB_PN}_${DEB_PV}"
inherit eutils libtool multilib
DESCRIPTION="Library to load, handle and manipulate images in the JPEG format"
HOMEPAGE="http://jpegclub.org/ http://www.ijg.org/"
SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz
mirror://debian/pool/main/libj/${DEB_PN}/${DEB}.diff.gz"
LICENSE="as-is"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${WORKDIR}"/${DEB}.diff
cp "${FILESDIR}"/Makefile.in.extra debian/extra/Makefile.in
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-7-maxmem_sysconf.patch
elibtoolize
# hook the Debian extra dir into the normal jpeg build env
sed -i '/all:/s:$:\n\t./config.status --file debian/extra/Makefile\n\t$(MAKE) -C debian/extra $@:' Makefile.in
}
src_configure() {
econf \
--disable-dependency-tracking \
--enable-shared \
$(use_enable static-libs static) \
--enable-maxmem=64
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc change.log example.c README *.txt
find "${ED}" -name '*.la' -exec rm -f '{}' +
}

View File

@ -0,0 +1,17 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/virtual/jpeg/jpeg-0.ebuild,v 1.5 2011/04/27 18:03:05 grobian Exp $
EAPI=2
DESCRIPTION="Virtual for jpeg library"
HOMEPAGE=""
SRC_URI=""
LICENSE=""
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs"
RDEPEND="|| ( media-libs/libjpeg-turbo:0[static-libs?] media-libs/jpeg:0[static-libs?] )"
DEPEND=""