diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-04-23 21:16:18 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-04-23 21:17:23 +0200 |
commit | 5e094e1e0766d9e17a0a7a2c5903ab6e33851e2e (patch) | |
tree | 93fa4a10e3b79c0afb66a4da7be2f9bd2c653406 | |
parent | games-arcade/ri-li: Drop old (diff) | |
download | gentoo-5e094e1e0766d9e17a0a7a2c5903ab6e33851e2e.tar.gz gentoo-5e094e1e0766d9e17a0a7a2c5903ab6e33851e2e.tar.bz2 gentoo-5e094e1e0766d9e17a0a7a2c5903ab6e33851e2e.zip |
games-arcade/rocksndiamonds: Version bump
Package-Manager: Portage-2.3.31, Repoman-2.3.9
5 files changed, 203 insertions, 0 deletions
diff --git a/games-arcade/rocksndiamonds/Manifest b/games-arcade/rocksndiamonds/Manifest index cf01b38f31cd..4b7ae7392b84 100644 --- a/games-arcade/rocksndiamonds/Manifest +++ b/games-arcade/rocksndiamonds/Manifest @@ -9,3 +9,4 @@ DIST rockslevels-dx-1.0.tar.gz 211151 BLAKE2B 637a600f9197925d82e7ef344c90f04e85 DIST rockslevels-emc-1.0.tar.gz 3824268 BLAKE2B 0feadd5d9c6225c8574576281d07e14ff98fc9a33c67d3fa5083219ce39daaa1902a5ed652b5379fa4e58ee2428a8a452d66520571206143fd0fcd54f71b977a SHA512 9abad888fa00bc305444367c5ab8ffdad95eaca22613573e44d5ecd93b1a9a1cbc931497c064002d90fd3174c4661d0b009ede7746b2fe8da0a00072303a1301 DIST rockslevels-sp-1.0.tar.gz 373564 BLAKE2B 3f724ea55bbdaae80a35d6a9f5d8751a9228862fbe1ba45419343b1968510e10d3c82cc01844e35bc35561e65df3bc7e5ec2a0b807e1f56359dc7dccc16e3cb0 SHA512 2d44e9238a72846b9d4fbab90288aa3b23af4957ffe0d42d95c523fd22f3587572864b3fc0b277894d2f3f56d6eff52ea009e5b2d59aebc34163a1067662d729 DIST rocksndiamonds-3.3.1.2.tar.gz 2614904 BLAKE2B a231a4a1beb35c29466f58c680cd86ddffbff48974d59d32c6e2a030b24fb3e6e99b825a254963a77830e62a6e1030f86350b1b9091d08b94dbbe577a2dbf2c2 SHA512 b627e4a8e2f03dc380b5a111cc42f296b283e63b20e019f522a8a1431fe9c138eb0dc7aa0fa03dd843c3a93bcd0a90704e651f5a590cb7d4c3e3b46976125755 +DIST rocksndiamonds-4.1.0.0.tar.gz 3850621 BLAKE2B 9c85aced223b855eec0300634d2fb30513d8b2d1856d8e134594f7de1669cf64f487a87335e28f7b8abb0c13492573ac5bd3261cfc5274287e75d0ace258ab93 SHA512 4949c2e9a601c8e005b006b13b82e36f7f001321051d392bc34aa4c234c6cddfa9fae16e58d83070072cac1429e13f1fb96d2c4b2ecd35a309065ca3c1c869c2 diff --git a/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-CVE-2011-4606.patch b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-CVE-2011-4606.patch new file mode 100644 index 000000000000..1aaa9e43dcc3 --- /dev/null +++ b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-CVE-2011-4606.patch @@ -0,0 +1,18 @@ +diff -up rocksndiamonds-4.0.0.1/src/libgame/setup.c.CVE-2011-4606 rocksndiamonds-4.0.0.1/src/libgame/setup.c +--- rocksndiamonds-4.0.0.1/src/libgame/setup.c.CVE-2011-4606 2017-01-12 07:53:09.497075662 -0500 ++++ rocksndiamonds-4.0.0.1/src/libgame/setup.c 2017-01-12 07:58:19.319076661 -0500 +@@ -1311,11 +1311,13 @@ void sortTreeInfo(TreeInfo **node_first) + #define MODE_W_ALL (S_IWUSR | S_IWGRP | S_IWOTH) + #define MODE_X_ALL (S_IXUSR | S_IXGRP | S_IXOTH) + ++#define MODE_R_PRIVATE (S_IRUSR) + #define MODE_W_PRIVATE (S_IWUSR) ++#define MODE_X_PRIVATE (S_IXUSR) + #define MODE_W_PUBLIC_FILE (S_IWUSR | S_IWGRP) + #define MODE_W_PUBLIC_DIR (S_IWUSR | S_IWGRP | S_ISGID) + +-#define DIR_PERMS_PRIVATE (MODE_R_ALL | MODE_X_ALL | MODE_W_PRIVATE) ++#define DIR_PERMS_PRIVATE (MODE_R_PRIVATE | MODE_X_PRIVATE | MODE_W_PRIVATE) + #define DIR_PERMS_PUBLIC (MODE_R_ALL | MODE_X_ALL | MODE_W_PUBLIC_DIR) + #define DIR_PERMS_PUBLIC_ALL (MODE_R_ALL | MODE_X_ALL | MODE_W_ALL) + diff --git a/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-YN.patch b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-YN.patch new file mode 100644 index 000000000000..70c95bd076dc --- /dev/null +++ b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-YN.patch @@ -0,0 +1,22 @@ +diff -up rocksndiamonds-4.0.0.1/src/tools.c.yesno rocksndiamonds-4.0.0.1/src/tools.c +--- rocksndiamonds-4.0.0.1/src/tools.c.yesno 2017-01-12 07:47:09.921343574 -0500 ++++ rocksndiamonds-4.0.0.1/src/tools.c 2017-01-12 07:51:45.059649653 -0500 +@@ -3901,6 +3901,18 @@ static int RequestHandleEvents(unsigned + result = 0; + break; + ++ case KSYM_y: ++ case KSYM_Y: ++ if (req_state & REQ_ASK) ++ result = TRUE; ++ break; ++ ++ case KSYM_n: ++ case KSYM_N: ++ if (req_state & REQ_ASK) ++ result = FALSE; ++ break; ++ + default: + HandleKeysDebug(key); + break; diff --git a/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-music-info-url.patch b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-music-info-url.patch new file mode 100644 index 000000000000..f913be382e94 --- /dev/null +++ b/games-arcade/rocksndiamonds/files/rocksndiamonds-4.1.0.0-music-info-url.patch @@ -0,0 +1,71 @@ +diff -up rocksndiamonds-4.1.0.0/src/files.c.url rocksndiamonds-4.1.0.0/src/files.c +--- rocksndiamonds-4.1.0.0/src/files.c.url 2018-04-10 15:44:08.000000000 -0400 ++++ rocksndiamonds-4.1.0.0/src/files.c 2018-04-17 16:30:19.726734512 -0400 +@@ -10127,11 +10127,13 @@ static struct MusicFileInfo *get_music_f + { "artist_header", &tmp_music_file_info.artist_header }, + { "album_header", &tmp_music_file_info.album_header }, + { "year_header", &tmp_music_file_info.year_header }, ++ { "url_header", &tmp_music_file_info.url_header }, + + { "title", &tmp_music_file_info.title }, + { "artist", &tmp_music_file_info.artist }, + { "album", &tmp_music_file_info.album }, + { "year", &tmp_music_file_info.year }, ++ { "url", &tmp_music_file_info.url }, + + { NULL, NULL }, + }; +@@ -10247,11 +10249,13 @@ void LoadMusicInfo() + checked_free(music_file_info->artist_header); + checked_free(music_file_info->album_header); + checked_free(music_file_info->year_header); ++ checked_free(music_file_info->url_header); + + checked_free(music_file_info->title); + checked_free(music_file_info->artist); + checked_free(music_file_info->album); + checked_free(music_file_info->year); ++ checked_free(music_file_info->url); + + free(music_file_info); + +diff -up rocksndiamonds-4.1.0.0/src/main.h.url rocksndiamonds-4.1.0.0/src/main.h +--- rocksndiamonds-4.1.0.0/src/main.h.url 2018-04-10 15:44:08.000000000 -0400 ++++ rocksndiamonds-4.1.0.0/src/main.h 2018-04-17 16:30:19.727734490 -0400 +@@ -3463,11 +3463,13 @@ struct MusicFileInfo + char *artist_header; + char *album_header; + char *year_header; ++ char *url_header; + + char *title; + char *artist; + char *album; + char *year; ++ char *url; + + int music; + +diff -up rocksndiamonds-4.1.0.0/src/screens.c.url rocksndiamonds-4.1.0.0/src/screens.c +--- rocksndiamonds-4.1.0.0/src/screens.c.url 2018-04-17 16:30:19.728734467 -0400 ++++ rocksndiamonds-4.1.0.0/src/screens.c 2018-04-17 16:34:00.653803869 -0400 +@@ -3060,6 +3060,19 @@ void HandleInfoScreen_Music(int button) + ystart += ystep_head; + } + ++ if (!strEqual(list->url, UNKNOWN_NAME)) ++ { ++ if (!strEqual(list->url_header, UNKNOWN_NAME)) ++ DrawTextSCentered(ystart, font_head, list->url_header); ++ else ++ DrawTextSCentered(ystart, font_head, "from the website"); ++ ++ ystart += ystep_head; ++ ++ DrawTextFCentered(ystart, font_text, "%s", list->url); ++ ystart += ystep_head; ++ } ++ + DrawTextSCentered(ybottom, FONT_TEXT_4, + "Press any key or button for next page"); + diff --git a/games-arcade/rocksndiamonds/rocksndiamonds-4.1.0.0.ebuild b/games-arcade/rocksndiamonds/rocksndiamonds-4.1.0.0.ebuild new file mode 100644 index 000000000000..f6f2cdcddcf4 --- /dev/null +++ b/games-arcade/rocksndiamonds/rocksndiamonds-4.1.0.0.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit desktop flag-o-matic + +DESCRIPTION="A Boulderdash clone" +HOMEPAGE="http://www.artsoft.org/rocksndiamonds/" +SRC_URI="http://www.artsoft.org/RELEASES/unix/rocksndiamonds/${P}.tar.gz + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Contributions-1.2.0.zip + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/BD2K3-1.0.0.zip + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Boulder_Dash_Dream-1.0.0.zip + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/rnd-contrib-1.0.0.tar.gz + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Snake_Bite-1.0.0.zip + http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Sokoban-1.0.0.zip + http://www.artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-emc-1.0.tar.gz + http://www.artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-sp-1.0.tar.gz + http://www.artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-dx-1.0.tar.gz + mirror://gentoo/rnd_jue-v8.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + media-libs/libsdl2[joystick,video] + media-libs/sdl2-mixer[mod,mp3,timidity] + media-libs/sdl2-net + media-libs/sdl2-image[gif] + media-libs/smpeg +" +DEPEND="${RDEPEND} + app-arch/unzip +" + +PATCHES=( + # From Fedora: + "${FILESDIR}"/${PN}-4.1.0.0-YN.patch + "${FILESDIR}"/${PN}-4.1.0.0-music-info-url.patch + "${FILESDIR}"/${PN}-4.1.0.0-CVE-2011-4606.patch +) + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + unpack \ + rockslevels-emc-1.0.tar.gz \ + rockslevels-sp-1.0.tar.gz \ + rockslevels-dx-1.0.tar.gz + cd levels + unpack \ + rnd_jue-v8.tar.bz2 \ + BD2K3-1.0.0.zip \ + rnd-contrib-1.0.0.tar.gz \ + Snake_Bite-1.0.0.zip \ + Contributions-1.2.0.zip \ + Boulder_Dash_Dream-1.0.0.zip \ + Sokoban-1.0.0.zip +} + +src_prepare() { + default + sed -i \ + -e 's:\$(MAKE_CMD):$(MAKE) -C $(SRC_DIR):' \ + -e '/^MAKE/d' \ + -e '/^CC/d' \ + Makefile || die + + sed -i \ + -e '/^LDFLAGS/s/=/+=/' \ + src/Makefile || die +} + +src_compile() { + replace-cpu-flags k6 k6-1 k6-2 i586 + + local makeopts="RO_GAME_DIR=/usr/share/${PN} RW_GAME_DIR=/usr/share/${PN}" + emake -j1 clean + emake ${makeopts} OPTIONS="${CFLAGS}" sdl2 +} + +src_install() { + dobin rocksndiamonds + insinto "/usr/share/${PN}" + doins -r docs graphics levels music sounds + + einstalldocs + newicon graphics/gfx_classic/RocksIcon32x32.png ${PN}.png + make_desktop_entry rocksndiamonds "Rocks 'N' Diamonds" /usr/share/pixmaps/${PN}.png +} |