diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-22 00:41:53 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-22 00:41:53 -0500 |
commit | e5948b872087d4bd939ee52921146417967f3fd9 (patch) | |
tree | 5b991deef2a930da925d1932d4cef7cfcb2a7b1b /system | |
parent | 3a90a9469a33579c60320149a882aa8157814bfe (diff) | |
download | packages-e5948b872087d4bd939ee52921146417967f3fd9.tar.gz packages-e5948b872087d4bd939ee52921146417967f3fd9.tar.bz2 packages-e5948b872087d4bd939ee52921146417967f3fd9.tar.xz packages-e5948b872087d4bd939ee52921146417967f3fd9.zip |
system/zip: pull in for gcc
Diffstat (limited to 'system')
-rw-r--r-- | system/zip/10-zip-3.0-build.patch | 36 | ||||
-rw-r--r-- | system/zip/20-zip-3.0-exec-stack.patch | 22 | ||||
-rw-r--r-- | system/zip/30-zip-3.0-pic.patch | 15 | ||||
-rw-r--r-- | system/zip/APKBUILD | 35 |
4 files changed, 108 insertions, 0 deletions
diff --git a/system/zip/10-zip-3.0-build.patch b/system/zip/10-zip-3.0-build.patch new file mode 100644 index 000000000..1deab6a4c --- /dev/null +++ b/system/zip/10-zip-3.0-build.patch @@ -0,0 +1,36 @@ +respect build environment settings + +--- a/unix/configure Wed Jan 28 22:22:13 2009 ++++ b/unix/configure Wed Jan 28 22:23:54 2009 +@@ -18,7 +18,7 @@ + + CC=${1-cc} + CFLAGS=${2-"-I. -DUNIX"} +-LFLAGS1='' ++LFLAGS1="${LDFLAGS}" + LFLAGS2='' + LN="ln -s" + +@@ -118,7 +118,7 @@ + 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 @@ + 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/system/zip/20-zip-3.0-exec-stack.patch b/system/zip/20-zip-3.0-exec-stack.patch new file mode 100644 index 000000000..5bf78d7da --- /dev/null +++ b/system/zip/20-zip-3.0-exec-stack.patch @@ -0,0 +1,22 @@ +add proper GNU stack markings so we dont get the default: executable + +--- a/crc_i386.S Wed Jan 28 22:22:13 2009 ++++ b/crc_i386.S Wed Jan 28 22:27:04 2009 +@@ -302,3 +302,7 @@ + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++#if defined __ELF__ && defined __linux__ ++.section .note.GNU-stack,"",@progbits ++#endif +--- a/match.S Wed Jan 28 22:22:13 2009 ++++ b/match.S Wed Jan 28 22:27:04 2009 +@@ -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/system/zip/30-zip-3.0-pic.patch b/system/zip/30-zip-3.0-pic.patch new file mode 100644 index 000000000..23707f386 --- /dev/null +++ b/system/zip/30-zip-3.0-pic.patch @@ -0,0 +1,15 @@ +if our toolchain generates PIC by default, then do not use the hand written +assembly files as none of it is PIC friendly. + +--- a/unix/configure Wed Jan 28 22:23:54 2009 ++++ b/unix/configure Wed Jan 28 22:29:51 2009 +@@ -228,6 +228,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 + : diff --git a/system/zip/APKBUILD b/system/zip/APKBUILD new file mode 100644 index 000000000..401ce74e3 --- /dev/null +++ b/system/zip/APKBUILD @@ -0,0 +1,35 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Dan Theisen <djt@hxx.in> +pkgname=zip +pkgver=3.0 +pkgrel=5 +pkgdesc="Creates PKZIP-compatible .zip files" +url="http://www.info-zip.org/pub/infozip/Zip.html" +arch="all" +options="!check" # No test suite. +license="Info-ZIP" +depends="" +makedepends="" +subpackages="$pkgname-doc" +source="ftp://ftp.info-${pkgname}.org/pub/info${pkgname}/src/${pkgname}30.zip + 10-zip-3.0-build.patch + 20-zip-3.0-exec-stack.patch + 30-zip-3.0-pic.patch" + +builddir="$srcdir"/${pkgname}30 + +build() { + cd "$builddir" + make -f unix/Makefile LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" prefix=/usr generic +} + +package() { + cd "$builddir" + make -f unix/Makefile prefix=${pkgdir}/usr MANDIR=${pkgdir}/usr/share/man install + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +sha512sums="642ea6768d79adc1499251a3fb7bfc7ddc8d708699cbf9e0cfe849deda94165cb93e21dc2606bea1166ae5d8531e1e2cb056a7246bf2ab86ea7587bd4712d8d8 zip30.zip +e71f7c6f6dd6f8f576018581b155f324eaf6810a2f7c5c402843bdfc3ce6772f09be166b33ff34dcb703774694b18584c8de1763f29895c1d563661679f43d71 10-zip-3.0-build.patch +2a6824066543684e02731bd36930e0ffa6ab48162c61d5e7af08e8ea0795401271ef28bdd0f6ace865d91fdb1a05b643813cdd458a9fdf554f1ca298ea7f50e3 20-zip-3.0-exec-stack.patch +fcb2d728d79160128064af90eb17a9c03e980d9619c4d930c4dbf79cb13842c7bb694036dcbf5cd9b412efc6fc0b86bb94a88b3f110b6b63bf6bda2b97fe0568 30-zip-3.0-pic.patch" |