diff options
author | Pouria Rezaei <Pouria.rz@outlook.com> | 2024-08-09 15:19:25 +0330 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-09 20:34:40 +0700 |
commit | 6aed6dfbf248d9f625df9e927618f20263aae774 (patch) | |
tree | 8ffe7e03c3b2834e2e94016a026f43590303355b /libraries/gcab | |
parent | 2e763aee1b4addde376aec9958a4ffa1c0e60e9d (diff) |
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>
Diffstat (limited to 'libraries/gcab')
-rw-r--r-- | libraries/gcab/fix-gcab-options.patch | 28 | ||||
-rw-r--r-- | libraries/gcab/gcab.SlackBuild | 25 | ||||
-rw-r--r-- | libraries/gcab/gcab.info | 10 |
3 files changed, 47 insertions, 16 deletions
diff --git a/libraries/gcab/fix-gcab-options.patch b/libraries/gcab/fix-gcab-options.patch new file mode 100644 index 0000000000000..cbc92048ca00e --- /dev/null +++ b/libraries/gcab/fix-gcab-options.patch @@ -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 diff --git a/libraries/gcab/gcab.SlackBuild b/libraries/gcab/gcab.SlackBuild index 5bcdae7954ea2..23b4e719ebe15 100644 --- a/libraries/gcab/gcab.SlackBuild +++ b/libraries/gcab/gcab.SlackBuild @@ -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 + +meson compile -C build +meson install -C build --destdir $PKG -make -make install-strip 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 diff --git a/libraries/gcab/gcab.info b/libraries/gcab/gcab.info index aa752ab5e81d6..8ba75d13ffc2d 100644 --- a/libraries/gcab/gcab.info +++ b/libraries/gcab/gcab.info @@ -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" |