Contents of /trunk/core/unzip/unzip-6.0-r3.smage2
Parent Directory | Revision Log
Revision 10172 -
(show annotations)
(download)
Thu Jan 19 10:16:20 2012 UTC (12 years, 5 months ago) by niro
File size: 1403 byte(s)
Thu Jan 19 10:16:20 2012 UTC (12 years, 5 months ago) by niro
File size: 1403 byte(s)
-import from magellan-next
1 | # $Id$ |
2 | |
3 | PNAME="unzip" |
4 | PVER="6.0" |
5 | PBUILD="r3" |
6 | |
7 | PCAT="app-arch" |
8 | |
9 | DESCRIPTION="Unzipper for pkzip-compressed files." |
10 | HOMEPAGE="http://www.info-zip.org/UnZip.html" |
11 | |
12 | DEPEND=">= virtual/glibc" |
13 | SDPEND=">= sys-apps/sed-4" |
14 | |
15 | SRCFILE="${PNAME}${PVER/.}.tar.gz" |
16 | SRCDIR="${BUILDDIR}/${PNAME}${PVER/./}" |
17 | |
18 | sminclude mtools |
19 | |
20 | SRC_URI=( |
21 | sourceforge://infozip/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-5.52-fix_Makefile.patch |
24 | mirror://${PNAME}/${PNAME}-5.52-fix_libz.patch |
25 | ) |
26 | |
27 | UP2DATE="updatecmd_sourceforge infozip ${PNAME}" |
28 | |
29 | src_prepare() |
30 | { |
31 | munpack ${SRCFILE} || die |
32 | cd ${SRCDIR} |
33 | |
34 | # fix a missing symlink |
35 | mpatch ${PNAME}-5.52-fix_Makefile.patch || die |
36 | |
37 | # fix compile against zlib |
38 | mpatch ${PNAME}-5.52-fix_libz.patch || die |
39 | |
40 | # force use of our CFLAGS |
41 | sed -i -e "s:-O3:${CFLAGS}:" \ |
42 | -e "s:CC=gcc LD=gcc:CC=${CC:-gcc} LD=${CC:-gcc}:" \ |
43 | -e "s:-O :${CFLAGS} :" unix/Makefile \ |
44 | || die |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | |
51 | # disable asm on all arches but x86 |
52 | local my_opts=linux_noasm |
53 | [[ ${ARCH} = i*86 ]] && my_opts=linux |
54 | |
55 | mmake -f unix/Makefile ${my_opts} || die |
56 | } |
57 | |
58 | src_install() |
59 | { |
60 | cd ${SRCDIR} |
61 | |
62 | # bins |
63 | minstallexec unzip || die |
64 | minstallexec funzip || die |
65 | minstallexec unzipsfx || die |
66 | minstallexec unix/zipgrep || die |
67 | |
68 | mlink unzip /usr/bin/zipinfo || die |
69 | |
70 | # man |
71 | minstallman man/*.1 || die |
72 | |
73 | # docs |
74 | minstalldocs BUGS COPYING.OLD History* LICENSE README ToDo WHERE || die |
75 | } |