diff options
author | Michael Weber <xmw@gentoo.org> | 2013-06-13 08:56:10 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2013-06-13 08:56:10 +0000 |
commit | 219ff5c403fc188917a3f5629c5da5f11fb18629 (patch) | |
tree | 955d92fe59db649639e4bdb1e4e7993bda0dfa4b /app-text/llpp | |
parent | Add ~ppc keyword as dep of llpp (diff) | |
download | gentoo-2-219ff5c403fc188917a3f5629c5da5f11fb18629.tar.gz gentoo-2-219ff5c403fc188917a3f5629c5da5f11fb18629.tar.bz2 gentoo-2-219ff5c403fc188917a3f5629c5da5f11fb18629.zip |
Improve static build
(Portage version: 2.2.0_alpha179/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'app-text/llpp')
-rw-r--r-- | app-text/llpp/ChangeLog | 5 | ||||
-rw-r--r-- | app-text/llpp/llpp-15.ebuild | 26 | ||||
-rw-r--r-- | app-text/llpp/llpp-9999.ebuild | 26 |
3 files changed, 48 insertions, 9 deletions
diff --git a/app-text/llpp/ChangeLog b/app-text/llpp/ChangeLog index 830144148b12..0cfcf0d717bb 100644 --- a/app-text/llpp/ChangeLog +++ b/app-text/llpp/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-text/llpp # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/ChangeLog,v 1.43 2013/06/11 09:00:27 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/ChangeLog,v 1.44 2013/06/13 08:56:10 xmw Exp $ + + 13 Jun 2013; Michael Weber <xmw@gentoo.org> llpp-15.ebuild, llpp-9999.ebuild: + Improve static build 11 Jun 2013; Michael Weber <xmw@gentoo.org> llpp-15.ebuild, llpp-9999.ebuild: deps handled by updated mupdf pkg-config files diff --git a/app-text/llpp/llpp-15.ebuild b/app-text/llpp/llpp-15.ebuild index 8751f3eef362..b001c4f3817e 100644 --- a/app-text/llpp/llpp-15.ebuild +++ b/app-text/llpp/llpp-15.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/llpp-15.ebuild,v 1.5 2013/06/11 09:00:27 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/llpp-15.ebuild,v 1.6 2013/06/13 08:56:10 xmw Exp $ EAPI=5 -inherit eutils toolchain-funcs vcs-snapshot +inherit eutils multilib toolchain-funcs vcs-snapshot DESCRIPTION="a graphical PDF viewer which aims to superficially resemble less(1)" HOMEPAGE="http://repo.or.cz/w/llpp.git" @@ -26,7 +26,12 @@ LIB_DEPEND=">=app-text/mupdf-1.2:=[static-libs] RDEPEND="x11-misc/xsel !static? ( ${LIB_DEPEND//\[static-libs]} )" DEPEND="${RDEPEND} - static? ( ${LIB_DEPEND} ) + 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[ocamlopt?] dev-ml/lablgl[glut,ocamlopt?]" @@ -42,7 +47,20 @@ src_compile() { local cma=$(usex ocamlopt cmxa cma) local ccopt="$(freetype-config --cflags ) -O -include ft2build.h -D_GNU_SOURCE" if use static ; then - local cclib="-Wl,-Bstatic $($(tc-getPKG_CONFIG) --libs --static mupdf x11 | sed 's: -l\(m\|pthread\) : :g') -Wl,-Bdynamic -lm -lpthread" + local cclib="" + local slib="" + local spath=( ${EROOT}usr/$(get_libdir) $($(tc-getPKG_CONFIG) --libs-only-L --static mupdf x11 | sed 's:-L::g') ) + for slib in $($(tc-getPKG_CONFIG) --libs-only-l --static mupdf x11) -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)" fi diff --git a/app-text/llpp/llpp-9999.ebuild b/app-text/llpp/llpp-9999.ebuild index d99dc3af016c..5e8724a7d800 100644 --- a/app-text/llpp/llpp-9999.ebuild +++ b/app-text/llpp/llpp-9999.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/llpp-9999.ebuild,v 1.20 2013/06/11 09:00:27 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/llpp/llpp-9999.ebuild,v 1.21 2013/06/13 08:56:10 xmw Exp $ EAPI=5 -inherit eutils git-2 toolchain-funcs +inherit eutils git-2 multilib toolchain-funcs DESCRIPTION="a graphical PDF viewer which aims to superficially resemble less(1)" HOMEPAGE="http://repo.or.cz/w/llpp.git" @@ -25,7 +25,12 @@ LIB_DEPEND=">=app-text/mupdf-9999:=[static-libs] RDEPEND="x11-misc/xsel !static? ( ${LIB_DEPEND//\[static-libs]} )" DEPEND="${RDEPEND} - static? ( ${LIB_DEPEND} ) + 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[ocamlopt?] dev-ml/lablgl[glut,ocamlopt?]" @@ -42,7 +47,20 @@ src_compile() { local cma=$(usex ocamlopt cmxa cma) local ccopt="$(freetype-config --cflags ) -O -include ft2build.h -D_GNU_SOURCE" if use static ; then - local cclib="-Wl,-Bstatic $($(tc-getPKG_CONFIG) --libs --static mupdf x11 | sed 's: -l\(m\|pthread\) : :g') -Wl,-Bdynamic -lm -lpthread" + local cclib="" + local slib="" + local spath=( ${EROOT}usr/$(get_libdir) $($(tc-getPKG_CONFIG) --libs-only-L --static mupdf x11 | sed 's:-L::g') ) + for slib in $($(tc-getPKG_CONFIG) --libs-only-l --static mupdf x11) -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)" fi |