[notify] frozen-bubble: 2.2.0 -> 2.2.1-beta1 dependency change: removed: p5-sdl1-perl p5-locale-gettext Added: p5-compress-bzip2 p5-file-slurp p5-ipc-system-simple p5-locale-maketext-lexicon p5-sdl
This commit is contained in:
parent
76220582e5
commit
82dd44cec2
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,7 @@
|
|||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3xs4sM4fhacfCkmSqlA6rZ8F+fPM1ZO2A/YCDm6G862onD1XNBG3I9fTIWWZ04+4+tu8l6J7j0b4iL9jCi8d2A4=
|
||||
SHA256 (Pkgfile) = a0fb52023837933726a64fb5224647ffb8bd936a1040871f36dfb3df5c41fc56
|
||||
SHA256 (.footprint) = 1e95f9735cf6c8e794e3c55ba19b44579552bd90f67cd08b4b111e6806b48e85
|
||||
SHA256 (frozen-bubble-2.2.0.tar.bz2) = dada92322ef3adb75df7a4270b2e76c572c3f8e42006ed3a5aaeefa68fcaa5b7
|
||||
SHA256 (frozen-bubble.desktop) = 55bf81b76a01a21bd89e4ec571decce163630fed751befa4bc926954bca4dc49
|
||||
RWSagIOpLGJF3w41eaaUQHsjdh2NY0/HkLCxJGgLOat5MlN5H9mX9XHIeNPllzBLXm7fSuNWOyqAqeNvcsfbjTrTN95X8IJogQE=
|
||||
SHA256 (Pkgfile) = 4fa62f43e08728058994d4d08aef8ce4ec143e50fa81c969e2757ec715bb0c77
|
||||
SHA256 (.footprint) = 13db8805746292fba55f2200e63b752669b8edabd21cf45c0c64308c7fe0e549
|
||||
SHA256 (frozen-bubble-2.2.1-beta1.tar.bz2) = c5be403ccb71543dab1aeb7d5ae311e18693f79937fb9159469cdad0abf18ac4
|
||||
SHA256 (fix-buffer-size-when-formatting-current-date.patch) = 4156b783bbfbaffe44cb9f523ed9619aab333cdbe31455a050be9a2e727cb4bb
|
||||
SHA256 (frozen-bubble.desktop) = fe30912e3f87fa3cc6196e989e685ebe20a26a51d542495c133db79a2d47b28d
|
||||
|
|
|
@ -1,42 +1,34 @@
|
|||
# Description: Shoot balls and get 3 of the same colour in a group to make them drop.
|
||||
# URL: http://www.frozen-bubble.org/
|
||||
# Maintainer: Danny Rawlins, crux at romster dot me
|
||||
# Packager: Danny Rawlins, crux at romster dot me
|
||||
# Depends on: p5-sdl1-perl sdl_pango p5-locale-gettext
|
||||
# Depends on: p5-compress-bzip2 p5-file-slurp p5-ipc-system-simple p5-locale-maketext-lexicon p5-sdl
|
||||
|
||||
name=frozen-bubble
|
||||
version=2.2.0
|
||||
version=2.2.1-beta1
|
||||
release=1
|
||||
source=(http://www.frozen-bubble.org/data/$name-$version.tar.bz2
|
||||
fix-buffer-size-when-formatting-current-date.patch
|
||||
$name.desktop)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1541359
|
||||
patch -p1 -i $SRC/fix-buffer-size-when-formatting-current-date.patch
|
||||
|
||||
sed -e 's|-Werror||' -i inc/My/Builder.pm
|
||||
|
||||
perl Build.PL installdirs=vendor
|
||||
perl Build
|
||||
perl Build install destdir="$PKG"
|
||||
|
||||
chmod -R u+w $PKG
|
||||
|
||||
sed -i settings.mk \
|
||||
-e "s|PREFIX = .*|PREFIX = /usr|" \
|
||||
-e 's|MANDIR = .*|MANDIR = $(PREFIX)/man|'
|
||||
install -D -m 0644 share/icons/frozen-bubble-icon-64x64.png \
|
||||
$PKG/usr/share/pixmaps/frozen-bubble.png
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
rm -r $PKG/usr/share/locale
|
||||
install -D -m 0644 $SRC/frozen-bubble.desktop \
|
||||
$PKG/usr/share/applications/frozen-bubble.desktop
|
||||
|
||||
# install icons
|
||||
install -D -m 0644 icons/frozen-bubble-icon-16x16.png $PKG/usr/share/icons/hicolor/16x16/apps/frozen-bubble.png
|
||||
install -D -m 0644 icons/frozen-bubble-icon-32x32.png $PKG/usr/share/icons/hicolor/32x32/apps/frozen-bubble.png
|
||||
install -D -m 0644 icons/frozen-bubble-icon-48x48.png $PKG/usr/share/icons/hicolor/48x48/apps/frozen-bubble.png
|
||||
install -D -m 0644 icons/frozen-bubble-icon-64x64.png $PKG/usr/share/icons/hicolor/64x64/apps/frozen-bubble.png
|
||||
|
||||
# install menu entry
|
||||
install -D -m 0644 $SRC/frozen-bubble.desktop $PKG/usr/share/applications/frozen-bubble.desktop
|
||||
|
||||
# Remove perlcrap
|
||||
find $PKG \( \
|
||||
-name '.packlist' -o \
|
||||
-name '*.bs' -o \
|
||||
-name 'autosplit.ix' -o \
|
||||
-name 'perllocal.pod' \) -delete
|
||||
|
||||
# Remove empty directories
|
||||
find $PKG -depth -empty -delete
|
||||
find $PKG \( -name '.packlist' -o -name '*.bs' \) -delete
|
||||
}
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
From aa2ce32185b4477e659ed7c70d09c440610ef67b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Fri, 2 Feb 2018 12:44:15 +0100
|
||||
Subject: [PATCH] Fix buffer size when formatting current date
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
gcc-8 and glibc-2.26.9000 reports this error:
|
||||
|
||||
server/log.c:64:54: error: '%03d' directive output may be truncated writing between 3 and 11 bytes into a region of size between 0 and 49 [-Werror=format-truncation=]
|
||||
snprintf(current_date, sizeof(current_date), "%s.%03d", buf, (int)(1000 * (time-seconds)));
|
||||
^~~~
|
||||
|
||||
This patch fixes two mistakes in the get_current_date() function:
|
||||
|
||||
First strftime() can fail and then buf content is undefined. The patch
|
||||
makes sure the buf content is properly null-termited.
|
||||
|
||||
Second if strftime() uses up the the whole buf array, no space will be
|
||||
left for appending miliseconds to current_date value in the subsequent
|
||||
snprintf() call. The patch increases current_data size so that things
|
||||
will always fit.
|
||||
|
||||
In reality, all this should not matter because sane strftime() will
|
||||
return fixed-lenght string. But for all the cases and for sake of the
|
||||
compiler check this patch should be applied.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
server/log.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/log.c b/server/log.c
|
||||
index 2fe7b7c..f696752 100644
|
||||
--- a/server/log.c
|
||||
+++ b/server/log.c
|
||||
@@ -52,15 +52,17 @@ double get_current_time_exact(void)
|
||||
return (double) now.tv_sec + now.tv_usec / 1e6; // bad bad idea to use float as precision is not down to the seconds then
|
||||
}
|
||||
|
||||
-char current_date[50];
|
||||
+char current_date[70];
|
||||
char* get_current_date(void)
|
||||
{
|
||||
struct tm * lt;
|
||||
char buf[50];
|
||||
double time = get_current_time_exact();
|
||||
time_t seconds = (time_t)time;
|
||||
+ size_t length;
|
||||
lt = localtime(&seconds);
|
||||
- strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", lt);
|
||||
+ length = strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", lt);
|
||||
+ buf[length] = '\0';
|
||||
snprintf(current_date, sizeof(current_date), "%s.%03d", buf, (int)(1000 * (time-seconds)));
|
||||
return current_date;
|
||||
}
|
||||
diff -up frozen-bubble-2.2.1-beta1/server/log.h~ frozen-bubble-2.2.1-beta1/server/log.h
|
||||
--- frozen-bubble-2.2.1-beta1/server/log.h~ 2010-08-07 15:36:27.000000000 +0200
|
||||
+++ frozen-bubble-2.2.1-beta1/server/log.h 2018-02-08 14:09:52.472451694 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
time_t get_current_time(void);
|
||||
double get_current_time_exact(void);
|
||||
|
||||
-extern char current_date[50];
|
||||
+extern char current_date[70];
|
||||
char* get_current_date(void);
|
||||
|
||||
enum output_types { OUTPUT_TYPE_DEBUG, OUTPUT_TYPE_CONNECT, OUTPUT_TYPE_INFO, OUTPUT_TYPE_ERROR };
|
|
@ -1,12 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Exec=frozen-bubble
|
||||
Icon=frozen-bubble
|
||||
Type=Application
|
||||
Terminal=false
|
||||
MultipleArgs=false
|
||||
Version=1.0
|
||||
Encoding=UTF-8
|
||||
Name=Frozen Bubble
|
||||
GenericName=Arcade Puzzle Game
|
||||
MimeType=text/html
|
||||
StartupNotify=false
|
||||
Categories=Application;Game;Puzzle;Arcade;
|
||||
Icon=frozen-bubble.png
|
||||
Exec=/usr/bin/vendor_perl/frozen-bubble
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
|
|
Loading…
Reference in New Issue
Block a user