diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-04-19 14:14:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-04-19 14:14:48 +0100 |
commit | 5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (patch) | |
tree | 8f255dfacbacb657e3ac3654d01c1e11e651c066 /games-arcade/frozen-bubble | |
parent | 8aebb228036d5e2863b7eaa6e319ab41c1669269 (diff) |
gentoo resync : 19.04.2018
Diffstat (limited to 'games-arcade/frozen-bubble')
-rw-r--r-- | games-arcade/frozen-bubble/Manifest | 5 | ||||
-rw-r--r-- | games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-Werror.patch | 4 | ||||
-rw-r--r-- | games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-fix-buffer-size.patch | 69 | ||||
-rw-r--r-- | games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1-r1.ebuild (renamed from games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1.ebuild) | 33 |
4 files changed, 89 insertions, 22 deletions
diff --git a/games-arcade/frozen-bubble/Manifest b/games-arcade/frozen-bubble/Manifest index e89ae885cbd5..7c1cff27837b 100644 --- a/games-arcade/frozen-bubble/Manifest +++ b/games-arcade/frozen-bubble/Manifest @@ -1,4 +1,5 @@ -AUX frozen-bubble-2.2.1_beta1-Werror.patch 730 BLAKE2B 8c7cca21dde03058a42fca345468cbbeceaff13d69ef976922c0ba04833682e069eeb1056475b8cd349da19eca9f71162c070313b593867ecd27687f1fefbc4a SHA512 f415e02ce8a048922e12172ad4e8ac7a36f0d9daed59b15f7781eba233a1e7de6cf5e0a23311ad10294cf1a481af6ea2f92fa039dc55e7c4d9d90b8772ee9a1b +AUX frozen-bubble-2.2.1_beta1-Werror.patch 734 BLAKE2B fae9324386d2b0a185dc201970a7157bd2effee029f220ec4d0fc3e502fc712182a4edef0c02cbe0a59809c359ba6ccb70ee235837f4cafecb5950f2583ee1d5 SHA512 37f9f3f6e070a1f7af818f36ab2f9fb542937bd8034a42d962f34c80011b5c9f7fbef94b4ff065ca8a732e5a78615968108637c09a63c775518d9b7ebeea1b2e +AUX frozen-bubble-2.2.1_beta1-fix-buffer-size.patch 2787 BLAKE2B fa2194d333263f3b521d971c95498d86838bf1188bf4d049a52a83d9afb6e42debd6736c021e35859b11a1283612eecd468ae81fddc4a3331b55a79e6bd47c90 SHA512 413012993a3f9cf16f4db1b66dec1b87c5a62c5b8e8fabb9d4bd689dea935e71ce9c12b213cd0687f2d6f106828d90486d84258385da778122ad6c8e6a61e23c DIST frozen-bubble-2.2.1-beta1.tar.bz2 22424798 BLAKE2B 70d23961c45e10cca38afcd7bdbf407dcefde1248af87df7768fe99fc0d926740096942007ba871d57db6095f3ca4bfa126f30ab60514ba3c6eb5fb7759d96aa SHA512 a5d1432195bc41b2823678986fe71223acf5c740636a871758e6337072c74a84bca7aa7088af7b299586e4e261521ae0b3341805692ab684d93e85f52174b1ac -EBUILD frozen-bubble-2.2.1_beta1.ebuild 1801 BLAKE2B f3993b4697a070d60db603b655a10611ce6c26b86f4d5ea25adad0556318a86a72dc7efb1ba9262419c31ce7099291a751affc58e645a16ed9bd2d43ed74c64f SHA512 52900945b02dc4f6ef550863f4ba519667beb99e9b46924eb1b1926062a540b73ed1c5f6c4b9a07657c7aecf8a1783f3ee40765db1c0a76666fe2c79f1fe62b2 +EBUILD frozen-bubble-2.2.1_beta1-r1.ebuild 1714 BLAKE2B 31329a6a2f4e350ca79f67b5ac1800318127a4a4b88bb84ec2775a141fbfa943cec9e8625a7b725227a4fbdb43d6e43c7f9595cf643724c5709d6f4d6f9f4066 SHA512 aaf0b5701a8a8a79bb306fa34cf24b2d665c604fbbb885940704618c38bbe449259f0f5a3529c7d26fab5816b795a473d9ec8c194e6cb4ba5e5c3036909f92cc MISC metadata.xml 540 BLAKE2B 63ce258abd43c328f0837722d96017f63013cf9135e33e0767a5bd2998d24133d3600ea8cd71d1a51bf5a6b80fa07073874d1f28b9168c36671f15ab72af56ae SHA512 71aabe570ce8682e1d3b9ee9fc2c8c9efd06eef8f33623310180e811fbf06b4a9d0456cf2ea78bda6cbd69a208f8abf1dac3855bcbf41aa121b7acbb4ba33ccc diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-Werror.patch b/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-Werror.patch index d891d8e71a63..0573e50fee94 100644 --- a/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-Werror.patch +++ b/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-Werror.patch @@ -2,8 +2,8 @@ From: Julian Ospald <hasufell@gentoo.org> Date: Sun Feb 10 14:48:58 UTC 2013 Subject: remove Werror compiler flag wrt #456654 ---- inc/My/Builder.pm -+++ inc/My/Builder.pm +--- a/inc/My/Builder.pm ++++ b/inc/My/Builder.pm @@ -123,7 +123,7 @@ push @ofiles, $cbuilder->compile( source => catfile($server_directory, $cfile), diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-fix-buffer-size.patch b/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-fix-buffer-size.patch new file mode 100644 index 000000000000..b1b3bfcb1edb --- /dev/null +++ b/games-arcade/frozen-bubble/files/frozen-bubble-2.2.1_beta1-fix-buffer-size.patch @@ -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 }; diff --git a/games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1.ebuild b/games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1-r1.ebuild index e6a4b39557a4..9315ab5159ba 100644 --- a/games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1.ebuild +++ b/games-arcade/frozen-bubble/frozen-bubble-2.2.1_beta1-r1.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -MY_P=${P/_/-} -inherit eutils gnome2-utils perl-module toolchain-funcs games +EAPI=6 +MY_P="${P/_/-}" + +inherit desktop gnome2-utils perl-module toolchain-funcs DESCRIPTION="A Puzzle Bubble clone written in perl (now with network support)" HOMEPAGE="http://www.frozen-bubble.org/" @@ -14,8 +15,9 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" -RDEPEND=">=dev-lang/perl-5.12 - >=dev-libs/glib-2 +RDEPEND=" + >=dev-lang/perl-5.12 + dev-libs/glib:2 >=dev-perl/Alien-SDL-1.413 dev-perl/Compress-Bzip2 dev-perl/File-ShareDir @@ -29,19 +31,22 @@ RDEPEND=">=dev-lang/perl-5.12 media-libs/sdl-ttf virtual/libiconv virtual/perl-Getopt-Long - virtual/perl-IO" + virtual/perl-IO +" DEPEND="${RDEPEND} virtual/pkgconfig dev-perl/Locale-Maketext-Lexicon virtual/perl-ExtUtils-CBuilder virtual/perl-ExtUtils-ParseXS - dev-perl/Module-Build" + dev-perl/Module-Build +" -S=${WORKDIR}/${MY_P} +S="${WORKDIR}/${MY_P}" src_prepare() { perl-module_src_prepare - epatch "${FILESDIR}"/${P}-Werror.patch + eapply "${FILESDIR}"/${P}-Werror.patch + eapply "${FILESDIR}"/${P}-fix-buffer-size.patch } src_configure() { @@ -54,10 +59,6 @@ src_compile() { src_install() { mydoc="AUTHORS Changes HISTORY README" perl-module_src_install - - dodir "${GAMES_BINDIR}" - mv -vf "${D}"/usr/bin/f* "${D}/${GAMES_BINDIR}" || die - newdoc server/README README.server newdoc server/init/README README.server.init @@ -67,17 +68,13 @@ src_install() { done make_desktop_entry ${PN} Frozen-Bubble - - prepgamesdirs } pkg_preinst() { - games_pkg_preinst gnome2_icon_savelist } pkg_postinst() { - games_pkg_postinst gnome2_icon_cache_update } |