Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 178353 - ebuild request for dev-java/offo-hyphenation (hyphenation patterns for dev-java/fop)
Summary: ebuild request for dev-java/offo-hyphenation (hyphenation patterns for dev-ja...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-13 15:04 UTC by David Tardon
Modified: 2007-05-16 23:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Tardon 2007-05-13 15:04:11 UTC
According to http://xmlgraphics.apache.org/fop/0.93/hyphenation.html, hyphenation patterns are now standalone project, named OFFO (http://offo.sourceforge.net/hyphenation/index.html). Below is listing of ebuild I'm using to build fop with hyphenation. It includes offo-hyphenation into SRC_URI for fop and links wanted hyphenation files into hyphen subdirectory. To create specialized ebuild for offo (installing hyph. files somewhere in /usr/share) may be better solution. Note that the hyph. files are needed for build only.

Reproducible: Always




fop-0.93.ebuild:

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils java-pkg-2 java-ant-2


DESCRIPTION="Formatting Objects Processor is a print formatter driven by XSL"

SRC_URI="
	mirror://apache/xmlgraphics/fop/${P}-src.tar.gz
	hyphen? ( mirror://sourceforge/offo/offo-hyphenation.zip )"
HOMEPAGE="http://xmlgraphics.apache.org/fop/"

LICENSE="
	Apache-2.0
	hyphen? (
		linguas_cs? ( GPL-1 )
		linguas_en? ( Knuth )
	)"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc examples hyphen jai jimi png svg tiff"

HYPHEN_LINGUAS="cs en"

CDEPEND="
	png? ( ~dev-java/batik-1.6 )
	svg? ( ~dev-java/batik-1.6 )
	=dev-java/avalon-framework-4.2*
	=dev-java/commons-io-1*
	dev-java/commons-logging
	=dev-java/servletapi-2.3*
	dev-java/xalan
	>=dev-java/xerces-2.7
	=dev-java/xml-commons-external-1.3*
	=dev-java/xmlgraphics-commons-1*"
LDEPEND=
RDEPEND=">=virtual/jre-1.4
	${CDEPEND}"
DEPEND=">=virtual/jdk-1.4
	${CDEPEND}
	>=dev-java/ant-1.5.4"


src_unpack() {
	unpack ${A}

	cd ${S}/lib
	rm -f *.jar
	java-pkg_jar-from --build-only ant-core ant.jar
	java-pkg_jar-from avalon-framework-4.2
	java-pkg_jar-from commons-io-1
	java-pkg_jar-from commons-logging
	java-pkg_jar-from servletapi-2.3 servlet.jar
	java-pkg_jar-from xalan
	java-pkg_jar-from xerces-2
	java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar
	java-pkg_jar-from xmlgraphics-commons-1
	if useq png || useq svg; then
		java-pkg_jar-from batik-1.6 batik-all.jar
	fi

	if useq hyphen; then
		local lang
		cd ${S}/hyph
		for lang in ${HYPHEN_LINGUAS}; do
			if hasq "${lang}" "${LINGUAS}"; then
				ln -s ../../offo-hyphenation/hyph/${lang}.xml
			fi
		done
	fi
}


src_compile() {
	java-pkg_filter-compiler jikes

	local jaip jimip

	useq jai && jaip="-Djai.present=true"
	useq jimi && jimip="-Djimi.present=true"

	eant ${jaip} ${jimip} package $(use_doc javadocs)
}


src_install() {
	java-pkg_dojar build/fop.jar build/fop-sandbox.jar build/fop-hyph.jar

	newenvd "${FILESDIR}"/${P}.env 22fop
	java-pkg_dolauncher ${PN} --main org.apache.fop.cli.Main

	if useq doc; then
		dodoc README
		java-pkg_dohtml -r build/javadocs/*
	fi

	if useq examples; then
		insinto /usr/share/doc/${PF}
		doins -r examples
	fi
}
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-05-13 15:28:48 UTC
(In reply to comment #0)
> According to http://xmlgraphics.apache.org/fop/0.93/hyphenation.html,
> hyphenation patterns are now standalone project, named OFFO
> (http://offo.sourceforge.net/hyphenation/index.html). Below is listing of
> ebuild I'm using to build fop with hyphenation.

Please attach ebuilds in the future instead of inlining them.

 It includes offo-hyphenation
> into SRC_URI for fop and links wanted hyphenation files into hyphen
> subdirectory. To create specialized ebuild for offo (installing hyph. files
> somewhere in /usr/share) may be better solution. Note that the hyph. files are
> needed for build only.
> 

Yeah one ebuild per upstream project so this should be a separate ebuild.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-13 21:51:04 UTC
Yeah should install it to /usr/share/offo-hyphenation and symlink it during fop build, based on useflag. In case of upgrade, add postinst elog that says to remerge fop to use them (or perhaps revbump fop and tie each fop revision to certain offo version?)

Alternatively they don't need to be compiled into fop to be used, according to docs (but we will compile them that's sure):
"Put the pattern source file(s) into a directory of your choice and configure FOP to look for custom patterns in this directory, by setting the <hyphenation-base> configuration option."

The LICENSE field will be a bit funny, see http://offo.sourceforge.net/hyphenation/licenses.html - and I don't even think about possible filtering by LINGUAS :P
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-16 23:22:31 UTC
Added dev-java/offo-hyphenation that installs the files in /usr/share/offo-hyphenation/hyph/ No filtering by LINGUAS, seems like overkill to me.
Revbumped fop to 0.93-r1, adding "hyphenation" USE flag that pulls offo-hyphenation and installs the fop-hyph.jar (not installed without the flag as it's manifest-only).
Should be fixed, thanks.