summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-10-02 17:43:29 +0000
committerPeter Volkov <pva@gentoo.org>2011-10-02 17:43:29 +0000
commitd099c95729de7235639e1832b78f0723147581d8 (patch)
treec02539a7fcfd569cb834fad8fe1d79b264d1307e /media-gfx
parentia64/sparc stable wrt #369573 (diff)
downloadgentoo-2-d099c95729de7235639e1832b78f0723147581d8.tar.gz
gentoo-2-d099c95729de7235639e1832b78f0723147581d8.tar.bz2
gentoo-2-d099c95729de7235639e1832b78f0723147581d8.zip
Fix zlib linkage, bug #367425 thank Siim Ainsaar for the patch.
(Portage version: 2.1.10.20/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/fontforge/ChangeLog8
-rw-r--r--media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch66
-rw-r--r--media-gfx/fontforge/fontforge-20110222-r1.ebuild126
3 files changed, 199 insertions, 1 deletions
diff --git a/media-gfx/fontforge/ChangeLog b/media-gfx/fontforge/ChangeLog
index d7fdbe7663da..e7408ec379a2 100644
--- a/media-gfx/fontforge/ChangeLog
+++ b/media-gfx/fontforge/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/fontforge
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/ChangeLog,v 1.141 2011/09/09 12:14:51 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/ChangeLog,v 1.142 2011/10/02 17:43:29 pva Exp $
+
+*fontforge-20110222-r1 (02 Oct 2011)
+
+ 02 Oct 2011; Peter Volkov <pva@gentoo.org> +fontforge-20110222-r1.ebuild,
+ +files/fontforge-20110222-libz.so-linkage.patch:
+ Fix zlib linkage, bug #367425 thank Siim Ainsaar for the patch.
09 Sep 2011; Tomáš Chvátal <scarabeus@gentoo.org>
fontforge-20110222.ebuild:
diff --git a/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch b/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch
new file mode 100644
index 000000000000..7e01e8a3a76f
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/show_bug.cgi?id=367425
+
+diff -ruN fontforge-20110222~/fontforge/parsepdf.c fontforge-20110222/fontforge/parsepdf.c
+--- fontforge-20110222~/fontforge/parsepdf.c 2011-02-15 05:37:39.000000000 +0200
++++ fontforge-20110222/fontforge/parsepdf.c 2011-05-17 22:19:56.000000000 +0300
+@@ -759,7 +759,11 @@
+ if ( zlib!=NULL )
+ return( true );
+
+- if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL ) {
++ if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL
++#ifdef SO_1_EXT
++ && (zlib = dlopen("libz" SO_1_EXT,RTLD_LAZY))==NULL
++#endif
++ ) {
+ LogError( "%s", dlerror());
+ return( false );
+ }
+diff -ruN fontforge-20110222~/fontforge/svg.c fontforge-20110222/fontforge/svg.c
+--- fontforge-20110222~/fontforge/svg.c 2011-02-18 23:33:27.000000000 +0200
++++ fontforge-20110222/fontforge/svg.c 2011-05-17 22:19:56.000000000 +0300
+@@ -1153,7 +1153,11 @@
+ if ( xmltested )
+ return( libxml!=NULL );
+
+- dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY);
++ dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY)
++#ifdef SO_1_EXT
++ || dlopen("libz" SO_1_EXT,RTLD_LAZY)
++#endif
++ ;
+
+ libxml = dlopen( "libxml2" SO_EXT,RTLD_LAZY);
+ # ifdef SO_2_EXT
+diff -ruN fontforge-20110222~/fontforge/ufo.c fontforge-20110222/fontforge/ufo.c
+--- fontforge-20110222~/fontforge/ufo.c 2011-02-17 02:20:37.000000000 +0200
++++ fontforge-20110222/fontforge/ufo.c 2011-05-17 22:19:56.000000000 +0300
+@@ -929,7 +929,11 @@
+ if ( xmltested )
+ return( libxml!=NULL );
+
+- dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY);
++ dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY)
++#ifdef SO_1_EXT
++ || dlopen("libz" SO_1_EXT,RTLD_LAZY)
++#endif
++ ;
+
+ libxml = dlopen( "libxml2" SO_EXT,RTLD_LAZY);
+ # ifdef SO_2_EXT
+diff -ruN fontforge-20110222~/fontforge/woff.c fontforge-20110222/fontforge/woff.c
+--- fontforge-20110222~/fontforge/woff.c 2011-02-15 05:37:40.000000000 +0200
++++ fontforge-20110222/fontforge/woff.c 2011-05-17 22:19:56.000000000 +0300
+@@ -76,7 +76,11 @@
+ if ( zlib!=NULL )
+ return( true );
+
+- if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL ) {
++ if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL
++#ifdef SO_1_EXT
++ && (zlib = dlopen("libz" SO_1_EXT,RTLD_LAZY))==NULL
++#endif
++ ) {
+ LogError( "%s", dlerror());
+ return( false );
+ }
diff --git a/media-gfx/fontforge/fontforge-20110222-r1.ebuild b/media-gfx/fontforge/fontforge-20110222-r1.ebuild
new file mode 100644
index 000000000000..64de1daa5f9b
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20110222-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/fontforge/fontforge-20110222-r1.ebuild,v 1.1 2011/10/02 17:43:29 pva Exp $
+
+# Some notes for maintainers this package:
+# 1. README-unix: freetype headers are required to make use of truetype debugger
+# in fontforge.
+# 2. --enable-{double,longdouble} these just make ff use more storage space. In
+# normal fonts neither is useful. Leave off.
+# 3. FontForge autodetects libraries but does not link with them. They are
+# dynamically loaded at run time if fontforge found them at build time.
+# --with-regular-link disables this behaviour. No reason to make it optional for
+# users. http://fontforge.sourceforge.net/faq.html#libraries. To see what
+# libraries fontforge thinks with use $ fontforge --library-status
+
+EAPI=3
+
+PYTHON_DEPEND="python? 2"
+inherit eutils fdo-mime python autotools
+
+HTDOCSV="20110221"
+CIDMAPV="20090121"
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fontforge/${PN}_full-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/fontforge/fontforge_htdocs-${HTDOCSV}.tar.bz2 )
+ cjk? ( mirror://gentoo/cidmaps-${CIDMAPV}.tgz )" # http://fontforge.sf.net/cidmaps.tgz
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cjk cairo doc gif debug jpeg nls pasteafter png +python tiff tilepath truetype truetype-debugger pango type3 svg unicode +X"
+
+RDEPEND="gif? ( >=media-libs/giflib-4.1.0-r1 )
+ jpeg? ( virtual/jpeg )
+ png? ( >=media-libs/libpng-1.2.4 )
+ tiff? ( >=media-libs/tiff-3.5.7-r1 )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8[fontforge,-bindist] )
+ svg? ( >=dev-libs/libxml2-2.6.7 )
+ unicode? ( >=media-libs/libuninameslist-030713 )
+ cairo? ( >=x11-libs/cairo-1.6.4[X] )
+ pango? ( >=x11-libs/pango-1.20.3 )
+ x11-libs/libXi
+ x11-proto/inputproto
+ !media-gfx/pfaedit"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${PN}_full-${PV}.tar.bz2
+ use cjk && unpack cidmaps-${CIDMAPV}.tgz
+ if use doc; then
+ mkdir html
+ cd html
+ unpack fontforge_htdocs-${HTDOCSV}.tar.bz2
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-lxkbui.patch"
+ epatch "${FILESDIR}/${P}-libz.so-linkage.patch"
+ if use doc; then
+ chmod -x "${WORKDIR}"/html/*.html || die
+ fi
+ eautoconf
+}
+
+src_configure() {
+ # no real way of disabling gettext/nls ...
+ use nls || export ac_cv_header_libintl_h=no
+ econf \
+ --disable-static \
+ $(use_with truetype-debugger freetype-src "/usr/include/freetype2/internal4fontforge/") \
+ $(use_enable type3) \
+ $(use_with python) \
+ $(use_enable python pyextension) \
+ $(use_enable pasteafter) \
+ $(use_with X x) \
+ $(use_enable cjk gb12345) \
+ $(use_enable tilepath) \
+ $(use_enable debug debug-raw-points) \
+ $(use_with pango) \
+ $(use_with cairo)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS README* || die
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ if use cjk; then #129518
+ insinto /usr/share/fontforge
+ doins "${WORKDIR}"/*.cidmap || die
+ fi
+
+ doicon Packaging/fontforge.png || die
+ insinto /usr/share/applications
+ doins Packaging/fontforge.desktop || die
+ insinto /usr/share/mime/application
+ doins Packaging/fontforge.xml || die
+
+ if use doc; then
+ insinto /usr/share/doc/${PN}
+ cd "${WORKDIR}/html/"
+ doins -r * || die
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}