mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
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:
parent
2e763aee1b
commit
6aed6dfbf2
3 changed files with 47 additions and 16 deletions
28
libraries/gcab/fix-gcab-options.patch
Normal file
28
libraries/gcab/fix-gcab-options.patch
Normal 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
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue