[new-package] cabextract 1.11
This commit is contained in:
parent
3d2198a89d
commit
76fd238163
18
mingw-w64-cabextract/001-fix-build-on-mingw.patch
Normal file
18
mingw-w64-cabextract/001-fix-build-on-mingw.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/src/cabextract.c
|
||||
+++ b/src/cabextract.c
|
||||
@@ -1221,6 +1221,7 @@
|
||||
* merely check if this path element is a directory */
|
||||
ok = (stat(path, &st_buf) == 0) && S_ISDIR(st_buf.st_mode);
|
||||
}
|
||||
+#ifndef _WIN32
|
||||
else {
|
||||
/* in the archive-determined part of the path and not keeping symlinks:
|
||||
* use lstat() and delete symlinks if found */
|
||||
@@ -1230,6 +1231,7 @@
|
||||
ok = S_ISDIR(st_buf.st_mode);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
if (!ok) ok = (mkdir(path, 0777 & ~user_umask) == 0);
|
||||
*p = '/';
|
||||
if (!ok) return 0;
|
||||
50
mingw-w64-cabextract/PKGBUILD
Normal file
50
mingw-w64-cabextract/PKGBUILD
Normal file
@ -0,0 +1,50 @@
|
||||
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
||||
|
||||
_realname=cabextract
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.11
|
||||
pkgrel=1
|
||||
pkgdesc="Free Software for extracting Microsoft cabinet files. (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://www.cabextract.org.uk'
|
||||
msys2_repository_url="https://github.com/kyz/libmspack"
|
||||
license=('spdx:GPL-2.0-or-later')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-libiconv"
|
||||
"${MINGW_PACKAGE_PREFIX}-libmspack")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-autotools")
|
||||
source=("https://github.com/kyz/libmspack/archive/v${pkgver}/libmspack-${pkgver}.tar.gz"
|
||||
"001-fix-build-on-mingw.patch")
|
||||
sha256sums=('284e0e51fee991c40e8cbbc0f5e635f99722796a3642a14397989fc00b862f72'
|
||||
'8c00c104d7b2be03c85c7c7e66ea7c0973c354695b3f877e199d7e9468e004d6')
|
||||
noextract=("libmspack-${pkgver}.tar.gz")
|
||||
|
||||
prepare() {
|
||||
echo "Extracting libmspack-${pkgver}.tar.gz..."
|
||||
tar -xzf libmspack-${pkgver}.tar.gz || true
|
||||
|
||||
cd libmspack-${pkgver}/cabextract
|
||||
|
||||
patch -p1 -i "${srcdir}"/001-fix-build-on-mingw.patch
|
||||
|
||||
autoreconf -fiv
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
|
||||
|
||||
CFLAGS+=" -Wno-int-conversion -Wno-implicit-function-declaration -Wno-incompatible-pointer-types" \
|
||||
../libmspack-${pkgver}/cabextract/configure \
|
||||
--prefix="${MINGW_PREFIX}" \
|
||||
--with-external-libmspack
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user