/[gentoo-x86]/app-arch/p7zip/p7zip-9.20.1-r1.ebuild
Gentoo

Contents of /app-arch/p7zip/p7zip-9.20.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jun 7 16:29:50 2012 UTC (2 years, 1 month ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
fix QA issues wrt bug #420011 and drop old

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-arch/p7zip/p7zip-9.20.1-r1.ebuild,v 1.2 2012/05/30 19:46:18 jlec Exp $
4
5 EAPI=4
6
7 WX_GTK_VER="2.8"
8
9 inherit eutils multilib toolchain-funcs wxwidgets
10
11 DESCRIPTION="Port of 7-Zip archiver for Unix"
12 HOMEPAGE="http://p7zip.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src_all.tar.bz2"
14
15 LICENSE="LGPL-2.1 rar? ( unRAR )"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
18 IUSE="doc kde rar +pch static wxwidgets"
19
20 REQUIRED_USE="kde? ( wxwidgets )"
21
22 RDEPEND="
23 kde? ( x11-libs/wxGTK:2.8[X,-odbc] kde-base/kdelibs )
24 wxwidgets? ( x11-libs/wxGTK:2.8[X,-odbc] )"
25 DEPEND="${RDEPEND}
26 amd64? ( dev-lang/yasm )
27 x86? ( dev-lang/nasm )"
28
29 S=${WORKDIR}/${PN}_${PV}
30
31 pkg_setup() {
32 use wxwidgets && wxwidgets_pkg_setup
33 }
34
35 src_prepare() {
36 if ! use pch; then
37 sed "s:PRE_COMPILED_HEADER=StdAfx.h.gch:PRE_COMPILED_HEADER=:g" -i makefile.* || die
38 fi
39
40 sed \
41 -e 's:-m32 ::g' \
42 -e 's:-m64 ::g' \
43 -e "/^CC/s:\$(ALLFLAGS):${CFLAGS} \$(ALLFLAGS):g" \
44 -e "/^CXX/s:\$(ALLFLAGS):${CXXFLAGS} \$(ALLFLAGS):g" \
45 -i makefile* || die
46
47 # remove non-free RAR codec
48 if use rar; then
49 ewarn "Enabling nonfree RAR decompressor"
50 else
51 sed -e '/Rar/d' -i makefile* || die
52 rm -rf CPP/7zip/Compress/Rar || die
53 epatch "${FILESDIR}"/9.04-makefile.patch
54 fi
55
56 sed -i \
57 -e "/^CXX=/s:g++:$(tc-getCXX):" \
58 -e "/^CC=/s:gcc:$(tc-getCC):" \
59 -e '/ALLFLAGS/s:-s ::' \
60 makefile* || die "changing makefiles"
61
62 if use amd64; then
63 cp -f makefile.linux_amd64_asm makefile.machine || die
64 elif use x86; then
65 cp -f makefile.linux_x86_asm_gcc_4.X makefile.machine || die
66 elif [[ ${CHOST} == *-darwin* ]] ; then
67 # Mac OS X needs this special makefile, because it has a non-GNU linker
68 [[ ${CHOST} == *64-* ]] \
69 && cp -f makefile.macosx_64bits makefile.machine \
70 || cp -f makefile.macosx_32bits makefile.machine
71 # bundles have extension .bundle but don't die because USE=-rar
72 # removes the Rar directory
73 sed -i -e '/strcpy(name/s/\.so/.bundle/' \
74 CPP/Windows/DLL.cpp || die
75 sed -i -e '/^PROG=/s/\.so/.bundle/' \
76 CPP/7zip/Bundles/Format7zFree/makefile \
77 $(use rar && echo CPP/7zip/Compress/Rar/makefile) || die
78 elif use x86-fbsd; then
79 # FreeBSD needs this special makefile, because it hasn't -ldl
80 sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
81 fi
82
83 use static && sed -i -e '/^LOCAL_LIBS=/s/LOCAL_LIBS=/&-static /' makefile.machine
84
85 if use kde || use wxwidgets; then
86 einfo "Preparing dependency list"
87 emake depend
88 fi
89 }
90
91 src_compile() {
92 emake all3
93 if use kde || use wxwidgets; then
94 emake 7zG
95 emake 7zFM
96 fi
97 }
98
99 src_test() {
100 emake test test_7z test_7zr
101 }
102
103 src_install() {
104 # this wrappers can not be symlinks, p7zip should be called with full path
105 make_wrapper 7zr "/usr/$(get_libdir)/${PN}/7zr"
106 make_wrapper 7za "/usr/$(get_libdir)/${PN}/7za"
107 make_wrapper 7z "/usr/$(get_libdir)/${PN}/7z"
108
109 if use kde || use wxwidgets; then
110 make_wrapper 7zG "/usr/$(get_libdir)/${PN}/7zG"
111 make_wrapper 7zFM "/usr/$(get_libdir)/${PN}/7zFM"
112
113 make_desktop_entry 7zFM ${PN} "GTK;Utility;Archiving;Compression"
114 make_desktop_entry 7zG ${PN} "GTK;Utility;Archiving;Compression"
115
116 dobin GUI/p7zipForFilemanager
117 exeinto /usr/$(get_libdir)/${PN}
118 doexe bin/7z{G,FM}
119
120 insinto /usr/$(get_libdir)/${PN}
121 doins -r GUI/{Lang,help}
122
123 insinto /usr/share/icons/hicolor/16x16/apps/
124 newins GUI/p7zip_16_ok.png p7zip.png
125
126 if use kde; then
127
128 rm GUI/kde4/p7zip_compress.desktop
129 insinto /usr/share/kde4/services/ServiceMenus
130 doins GUI/kde4/*.desktop
131 fi
132 fi
133
134 dobin contrib/gzip-like_CLI_wrapper_for_7z/p7zip
135 doman contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1
136
137 exeinto /usr/$(get_libdir)/${PN}
138 doexe bin/7z bin/7za bin/7zr bin/7zCon.sfx
139 doexe bin/*$(get_modname)
140 if use rar; then
141 exeinto /usr/$(get_libdir)/${PN}/Codecs/
142 doexe bin/Codecs/*$(get_modname)
143 fi
144
145 doman man1/7z.1 man1/7za.1 man1/7zr.1
146 dodoc ChangeLog README TODO
147
148 if use doc; then
149 dodoc DOCS/*.txt
150 dohtml -r DOCS/MANUAL/*
151 fi
152 }

  ViewVC Help
Powered by ViewVC 1.1.20