libraries/gcab: Updated to 1.5 + new maintainer

Signed-off-by: Pouria Rezaei <Pouria.rz@outlook.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Pouria Rezaei 2024-08-09 15:19:25 +03:30 committed by Willy Sudiarto Raharjo
parent 2e763aee1b
commit 6aed6dfbf2
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 47 additions and 16 deletions

View file

@ -0,0 +1,28 @@
diff --git a/libgcab/cabinet.c b/libgcab/cabinet.c
index 6241904..275d5f5 100644
--- a/libgcab/cabinet.c
+++ b/libgcab/cabinet.c
@@ -26,7 +26,7 @@
static voidpf
zalloc (voidpf opaque, uInt items, uInt size)
{
- return g_malloc (items *size);
+ return g_malloc_n (items, size);
}
static void
zfree (voidpf opaque, voidpf address)
diff --git a/meson.build b/meson.build
index 15fd5cd..05e162c 100644
--- a/meson.build
+++ b/meson.build
@@ -6,10 +6,6 @@ project('gcab', 'c',
)
git_version = []
-git = find_program('git', required: false)
-if git.found()
- git_version = run_command(git, 'describe', '--abbrev=4', '--dirty', check: true).stdout().strip().split('-')
-endif
# libtool versioning
lt_current = 2

View file

@ -2,6 +2,7 @@
# Slackware build script for "gcab".
# Copyright 2019-2024 Pouria Rezaei <Pouria.rz@outlook.com>
# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
# All rights reserved.
#
@ -27,8 +28,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gcab
VERSION=${VERSION:-0.6}
BUILD=${BUILD:-2}
VERSION=${VERSION:-1.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -40,9 +41,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -74,6 +72,10 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
# - Avoid integer overflow in zalloc
# - Avoid needing git to build.
patch -p1 < "$CWD/fix-gcab-options.patch"
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@ -83,18 +85,19 @@ find -L . \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
meson setup build \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
--build=$ARCH-slackware-linux
-Ddefault_library=shared
make
make install-strip DESTDIR=$PKG
meson compile -C build
meson install -C build --destdir $PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

View file

@ -1,10 +1,10 @@
PRGNAM="gcab"
VERSION="0.6"
VERSION="1.5"
HOMEPAGE="https://wiki.gnome.org/msitools/"
DOWNLOAD="http://ftp.gnome.org/pub/GNOME/sources/gcab/0.6/gcab-0.6.tar.xz"
MD5SUM="dd7333644cb88995693f043da9bf55d3"
DOWNLOAD="https://download.gnome.org/sources/gcab/1.5/gcab-1.5.tar.xz"
MD5SUM="eb1fec63d35aaa82d4154818072c1b0c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Marcel Saegebarth"
EMAIL="marc@mos6581.de"
MAINTAINER="Pouria Rezaei"
EMAIL="Pouria.rz@outlook.com"