diff options
author | Michael Weber <xmw@gentoo.org> | 2016-01-09 01:09:45 +0100 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2016-01-09 01:09:45 +0100 |
commit | 46950238707e951af8fc5592d16401d9510d002e (patch) | |
tree | 364a858867aeb00512ab2cf8a51dfb04d98d1924 /app-text/llpp/llpp-22.ebuild | |
parent | profiles: mask app-text/mupdf[opengl] on arches w/o keyworded media-libs/glfw (diff) | |
download | gentoo-46950238707e951af8fc5592d16401d9510d002e.tar.gz gentoo-46950238707e951af8fc5592d16401d9510d002e.tar.bz2 gentoo-46950238707e951af8fc5592d16401d9510d002e.zip |
app-text/llpp: Version bump.
Package-Manager: portage-2.2.26
Diffstat (limited to 'app-text/llpp/llpp-22.ebuild')
-rw-r--r-- | app-text/llpp/llpp-22.ebuild | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/app-text/llpp/llpp-22.ebuild b/app-text/llpp/llpp-22.ebuild new file mode 100644 index 000000000000..5043975096f7 --- /dev/null +++ b/app-text/llpp/llpp-22.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib toolchain-funcs vcs-snapshot + +DESCRIPTION="graphical PDF viewer which aims to superficially resemble less(1)" +HOMEPAGE="http://repo.or.cz/w/llpp.git" +SRC_URI="http://repo.or.cz/w/llpp.git/snapshot/561dc5673cea431e930668b0d87b0c4b31a36b39.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+ocamlopt static" +#IUSE="egl +ocamlopt static" + +LIB_DEPEND=">=app-text/mupdf-1.7a:0=[static-libs] + media-libs/openjpeg:2[static-libs] + media-libs/fontconfig:1.0[static-libs] + media-libs/freetype:2[static-libs] + media-libs/jbig2dec[static-libs] + sys-libs/zlib[static-libs] + virtual/jpeg:0[static-libs] + x11-libs/libX11[static-libs]" +# egl? ( media-libs/mesa[static-libs] ) +RDEPEND="x11-misc/xsel + !static? ( ${LIB_DEPEND//\[static-libs]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} + app-arch/bzip2[static-libs] + media-libs/libXcm[static-libs] + x11-libs/libXau[static-libs] + x11-libs/libXdmcp[static-libs] + x11-libs/libXmu[static-libs] ) + >=dev-lang/ocaml-4.02[ocamlopt?] + dev-ml/lablgl[glut,ocamlopt?]" + +RESTRICT="!ocamlopt? ( strip )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-20-WM_CLASS.patch +} + +src_compile() { + local ocaml=$(usex ocamlopt ocamlopt.opt ocamlc.opt) + local cmo=$(usex ocamlopt cmx cmo) + local cma=$(usex ocamlopt cmxa cma) + local ccopt="$(freetype-config --cflags ) -O -include ft2build.h -D_GNU_SOURCE -DUSE_FONTCONFIG" + #if use egl ; then + # ccopt+=" -DUSE_EGL $(pkg-config --cflags egl)" + # local egl="egl" + #fi + if use static ; then + local cclib="" + local slib="" + local spath=( ${EROOT}usr/$(get_libdir) $($(tc-getPKG_CONFIG) --libs-only-L --static mupdf x11 ${egl} | sed 's:-L::g') ) + for slib in $($(tc-getPKG_CONFIG) --libs-only-l --static mupdf x11 ${egl} fontconfig) -ljpeg -ljbig2dec ; do + case ${slib} in + -lm|-ldl|-lpthread) + einfo "${slib}: shared" + cclib+="${slib} " ;; + *) + local ccnew=$(find ${spath} -name "lib${slib/-l}.a") + einfo "${slib}: use ${ccnew}" + cclib+="${ccnew} " ;; + esac + done + else + local cclib="$($(tc-getPKG_CONFIG) --libs mupdf x11 ${egl} fontconfig) -lpthread" + fi + + verbose() { echo "$@" >&2 ; "$@" || die ; } + verbose sh mkhelp.sh KEYS ${PV} > help.ml + verbose printf 'let version ="%s";;\n' ${PV} >> help.ml + verbose ${ocaml} -c -o link.o -ccopt "${ccopt}" link.c + verbose ${ocaml} -c -o help.${cmo} help.ml + verbose ${ocaml} -c -o utils.${cmo} utils.ml + verbose ${ocaml} -c -o wsi.cmi wsi.mli + verbose ${ocaml} -c -o wsi.${cmo} wsi.ml + verbose ${ocaml} -c -o parser.${cmo} parser.ml + verbose ${ocaml} -c -o config.${cmo} -I +lablGL config.ml + verbose ${ocaml} -c -pp "sed -f pp.sed" -o main.${cmo} -I +lablGL main.ml + verbose ${ocaml} $(usex ocamlopt "" -custom) -o llpp -I +lablGL\ + str.${cma} unix.${cma} lablgl.${cma} link.o \ + -cclib "${cclib}" \ + help.${cmo} utils.${cmo} parser.${cmo} wsi.${cmo} config.${cmo} main.${cmo} +} + +src_install() { + dobin ${PN} misc/${PN}ac + dodoc KEYS README Thanks fixme +} |