Magellan Linux

Contents of /trunk/core/unzip/unzip-6.0-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33462 - (show annotations) (download)
Mon Jul 24 11:32:50 2023 UTC (9 months, 2 weeks ago) by niro
File size: 1592 byte(s)
-toolchain rebuild
1 # $Id$
2
3 PNAME="unzip"
4 PVER="6.0"
5 PBUILD="r5"
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=">= virtual/sed"
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 mirror://${PNAME}/${PNAME}-6.0-format-security.patch
26 )
27
28 UP2SEPERATOR="NULL"
29 UP2TARBALL="${PNAME}"
30 UP2PVER="${PVER//.}"
31 UP2DATE="updatecmd_sourceforge infozip UnZip gz"
32
33 src_prepare()
34 {
35 munpack ${SRCFILE} || die
36 cd ${SRCDIR}
37
38 # fix a missing symlink
39 mpatch ${PNAME}-5.52-fix_Makefile.patch || die
40
41 # fix compile against zlib
42 mpatch ${PNAME}-5.52-fix_libz.patch || die
43
44 # ftbfs with newer gcc
45 mpatch ${PNAME}-6.0-format-security.patch || die
46
47 # force use of our CFLAGS
48 sed -i -e "s:-O3:${CFLAGS}:" \
49 -e "s:CC=gcc LD=gcc:CC=${CC:-gcc} LD=${CC:-gcc}:" \
50 -e "s:-O :${CFLAGS} :" unix/Makefile \
51 || die
52 }
53
54 src_compile()
55 {
56 cd ${SRCDIR}
57
58 # disable asm on all arches but x86
59 local my_opts=linux_noasm
60 [[ ${ARCH} = i*86 ]] && my_opts=linux
61
62 mmake -f unix/Makefile ${my_opts} || die
63 }
64
65 src_install()
66 {
67 cd ${SRCDIR}
68
69 # bins
70 minstallexec unzip || die
71 minstallexec funzip || die
72 minstallexec unzipsfx || die
73 minstallexec unix/zipgrep || die
74
75 mlink unzip /usr/bin/zipinfo || die
76
77 # man
78 minstallman man/*.1 || die
79
80 # docs
81 minstalldocs BUGS COPYING.OLD History* LICENSE README ToDo WHERE || die
82 }