summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/zip
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-11-08 19:55:52 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-11-08 19:55:52 (GMT)
commit62a85af977dfdaa2c5650611e92d165ff96c39af (patch)
tree988016870332e5339954b085cc679e085f0f6057 /abs/extra-testing/zip
parent562074d2036106b5cd46505fe9823c939c1e7ff1 (diff)
downloadlinhes_pkgbuild-62a85af977dfdaa2c5650611e92d165ff96c39af.zip
linhes_pkgbuild-62a85af977dfdaa2c5650611e92d165ff96c39af.tar.gz
linhes_pkgbuild-62a85af977dfdaa2c5650611e92d165ff96c39af.tar.bz2
fixes for zip.
These were taken from gentoo.
Diffstat (limited to 'abs/extra-testing/zip')
-rw-r--r--abs/extra-testing/zip/PKGBUILD13
-rw-r--r--abs/extra-testing/zip/zip-3.0-build.patch34
-rw-r--r--abs/extra-testing/zip/zip-3.0-exec-stack.patch20
-rw-r--r--abs/extra-testing/zip/zip-3.0-no-crypt.patch51
-rw-r--r--abs/extra-testing/zip/zip-3.0-pic.patch12
5 files changed, 128 insertions, 2 deletions
diff --git a/abs/extra-testing/zip/PKGBUILD b/abs/extra-testing/zip/PKGBUILD
index 54eae73..30cec8b 100644
--- a/abs/extra-testing/zip/PKGBUILD
+++ b/abs/extra-testing/zip/PKGBUILD
@@ -10,14 +10,23 @@ url="http://www.info-zip.org/pub/infozip/Zip.html"
depends=('glibc')
makedepends=('unzip')
source=(ftp://ftp.info-zip.org/pub/infozip/src/zip30.zip
- ftp://ftp.info-zip.org/pub/infozip/src/zcrypt.zip)
+ ftp://ftp.info-zip.org/pub/infozip/src/zcrypt.zip
+ zip-3.0-build.patch zip-3.0-no-crypt.patch
+ zip-3.0-exec-stack.patch zip-3.0-pic.patch
+ )
+
md5sums=('e88492c8abd68fa9cfba72bc08757dba'
'0c969ba1661183b041a142945ed2710e')
build() {
cd $startdir/src/${pkgname}30
- echo "A"| unzip ../zcrypt.zip
+# echo "A"| unzip ../zcrypt.zip
+ patch -p1 < $startdir/src/zip-3.0-build.patch
+ patch -p0 < $startdir/src/zip-3.0-no-crypt.patch || return 1
+ patch -p1 < $startdir/src/zip-3.0-exec-stack.patch
+ patch -p0 < $startdir/src/zip-3.0-pic.patch
+
make -f unix/Makefile LOCAL_ZIP="$CFLAGS" prefix=/usr generic_gcc || return 1
make -f unix/Makefile INSTALL=`which install` prefix=$startdir/pkg/usr install
}
diff --git a/abs/extra-testing/zip/zip-3.0-build.patch b/abs/extra-testing/zip/zip-3.0-build.patch
new file mode 100644
index 0000000..880b49e
--- /dev/null
+++ b/abs/extra-testing/zip/zip-3.0-build.patch
@@ -0,0 +1,34 @@
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -18,7 +18,7 @@
+
+ CC=${1-cc}
+ CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=''
++LFLAGS1="${LDFLAGS}"
+ LFLAGS2=''
+ LN="ln -s"
+
+@@ -118,7 +118,7 @@ _EOF_
+ fi
+
+ # optimization flags
+-if test -n "${CFLAGS_OPT}"; then
++if false; then
+ CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
+ CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
+ fi
+@@ -220,13 +220,6 @@ fi
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+-# solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/abs/extra-testing/zip/zip-3.0-exec-stack.patch b/abs/extra-testing/zip/zip-3.0-exec-stack.patch
new file mode 100644
index 0000000..2eb1acf
--- /dev/null
+++ b/abs/extra-testing/zip/zip-3.0-exec-stack.patch
@@ -0,0 +1,20 @@
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/abs/extra-testing/zip/zip-3.0-no-crypt.patch b/abs/extra-testing/zip/zip-3.0-no-crypt.patch
new file mode 100644
index 0000000..301c289
--- /dev/null
+++ b/abs/extra-testing/zip/zip-3.0-no-crypt.patch
@@ -0,0 +1,51 @@
+--- zip.c
++++ zip.c
+@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */
+
+ /* Key not yet specified. If needed, get/verify it now. */
+ if (key_needed) {
++#if !CRYPT
++ ZIPERR(ZE_PARMS, "encryption not supported");
++#else /* CRYPT */
+ if ((key = malloc(IZ_PWLEN+1)) == NULL) {
+ ZIPERR(ZE_MEM, "was getting encryption password");
+ }
+@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */
+ if (r) {
+ ZIPERR(ZE_PARMS, "password verification failed");
+ }
++#endif
+ }
+ if (key) {
+ /* if -P "" could get here */
+--- zipcloak.c
++++ zipcloak.c
+@@ -744,6 +744,28 @@ struct option_struct far options[] = {
+
+ int main OF((void));
+
++void zipmessage_nl(a, nl)
++ZCONST char *a;
++int nl;
++{
++}
++
++void zipmessage(a, b)
++ZCONST char *a, *b;
++{
++}
++
++int set_filetype(out_path)
++ char *out_path;
++{
++}
++
++int rename_split(temp_name, out_path)
++ char *temp_name;
++ char *out_path;
++{
++}
++
+ void zipwarn(msg1, msg2)
+ ZCONST char *msg1, *msg2;
+ {
diff --git a/abs/extra-testing/zip/zip-3.0-pic.patch b/abs/extra-testing/zip/zip-3.0-pic.patch
new file mode 100644
index 0000000..d37e5ed
--- /dev/null
+++ b/abs/extra-testing/zip/zip-3.0-pic.patch
@@ -0,0 +1,12 @@
+--- unix/configure
++++ unix/configure
+@@ -29,6 +29,9 @@
+ echo Check if we can use asm code
+ OBJA=""
+ OCRCU8=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :