aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2018-03-28 07:29:00 +0800
committerDanilo G. Baio <dbaio@FreeBSD.org>2018-03-28 07:29:00 +0800
commita89dc1bac99add0409c589c34d5d5235150b4f19 (patch)
treecc3681c4618e586dfbd7af4997ae8111f49159bc
parent9c8f68ff1686373dc83564d8fcec2143cda2ec2a (diff)
downloadfreebsd-ports-a89dc1bac99add0409c589c34d5d5235150b4f19.tar.gz
freebsd-ports-a89dc1bac99add0409c589c34d5d5235150b4f19.tar.zst
freebsd-ports-a89dc1bac99add0409c589c34d5d5235150b4f19.zip
games/sdlpop: Update to 1.18.1
Changes: https://github.com/NagyD/SDLPoP/blob/v1.18.1/doc/ChangeLog.txt#L464 PR: 226910 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
Notes
Notes: svn path=/head/; revision=465771
-rw-r--r--games/sdlpop/Makefile2
-rw-r--r--games/sdlpop/distinfo6
-rw-r--r--games/sdlpop/files/patch-seg009.c56
-rw-r--r--games/sdlpop/pkg-plist26
4 files changed, 36 insertions, 54 deletions
diff --git a/games/sdlpop/Makefile b/games/sdlpop/Makefile
index 05525ed8166e..84a51a148ba9 100644
--- a/games/sdlpop/Makefile
+++ b/games/sdlpop/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sdlpop
DISTVERSIONPREFIX= v
-DISTVERSION= 1.17
+DISTVERSION= 1.18.1
CATEGORIES= games
MAINTAINER= pkubaj@anongoth.pl
diff --git a/games/sdlpop/distinfo b/games/sdlpop/distinfo
index c54ad8307fd1..c5f2e716dc8d 100644
--- a/games/sdlpop/distinfo
+++ b/games/sdlpop/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1509967343
-SHA256 (NagyD-SDLPoP-v1.17_GH0.tar.gz) = aa4b254ab80b889a6db491b41c4f83467124d932cc0836e5979fa73b6c49a94d
-SIZE (NagyD-SDLPoP-v1.17_GH0.tar.gz) = 3713129
+TIMESTAMP = 1521967106
+SHA256 (NagyD-SDLPoP-v1.18.1_GH0.tar.gz) = 8032c47fad4b73021d636ead510bbc1ab5106cff77103e331ad0f32a49a13946
+SIZE (NagyD-SDLPoP-v1.18.1_GH0.tar.gz) = 614791
diff --git a/games/sdlpop/files/patch-seg009.c b/games/sdlpop/files/patch-seg009.c
index bc7253735f10..71c8b427648c 100644
--- a/games/sdlpop/files/patch-seg009.c
+++ b/games/sdlpop/files/patch-seg009.c
@@ -1,51 +1,51 @@
---- seg009.c.orig 2017-02-05 07:38:56 UTC
+--- seg009.c.orig 2018-03-17 16:33:14 UTC
+++ seg009.c
-@@ -152,7 +152,7 @@ static FILE* open_dat_from_root_or_data_dir(const char
+@@ -192,7 +192,7 @@ static FILE* open_dat_from_root_or_data_
// if failed, try if the DAT file can be opened in the data/ directory, instead of the main folder
if (fp == NULL) {
char data_path[POP_MAX_PATH];
- snprintf(data_path, sizeof(data_path), "data/%s", filename);
+ snprintf(data_path, sizeof(data_path), "%%DATADIR%%/%s", filename);
- // verify that this is a regular file and not a directory (otherwise, don't open)
- struct stat path_stat;
-@@ -1644,7 +1644,7 @@ const int max_sound_id = 58;
+ if (!file_exists(data_path)) {
+ find_exe_dir();
+@@ -1755,7 +1755,7 @@ const int max_sound_id = 58;
char** sound_names = NULL;
void load_sound_names() {
-- const char* names_path = "data/music/names.txt";
-+ const char* names_path = "%%DATADIR%%/music/names.txt";
+- const char* names_path = locate_file("data/music/names.txt");
++ const char* names_path = locate_file("%%DATADIR%%/music/names.txt");
if (sound_names != NULL) return;
FILE* fp = fopen(names_path,"rt");
if (fp==NULL) return;
-@@ -1692,7 +1692,7 @@ sound_buffer_type* load_sound(int index) {
- const char* ext=exts[i];
- struct stat info;
-
-- snprintf(filename, sizeof(filename), "data/music/%s.%s", sound_name(index), ext);
-+ snprintf(filename, sizeof(filename), "%%DATADIR%%/music/%s.%s", sound_name(index), ext);
- // Skip nonexistent files:
- if (stat(filename, &info))
- continue;
-@@ -1933,7 +1933,7 @@ int __pascal far check_sound_playing() {
- // seg009:38ED
- void __pascal far set_gr_mode(byte grmode) {
+@@ -1805,7 +1805,7 @@ sound_buffer_type* load_sound(int index)
+ fp = fopen(filename, "rb");
+ }
+ if (fp == NULL && !skip_normal_data_files) {
+- snprintf(filename, sizeof(filename), "data/music/%s.ogg", sound_name(index));
++ snprintf(filename, sizeof(filename), "%%DATADIR%%/music/%s.ogg", sound_name(index));
+ fp = fopen(locate_file(filename), "rb");
+ }
+ if (fp == NULL) {
+@@ -2108,7 +2108,7 @@ void __pascal far set_gr_mode(byte grmod
+ SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1");
+ #endif
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE |
-- SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) {
-+ SDL_INIT_GAMECONTROLLER) != 0) {
+- SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) {
++ SDL_INIT_GAMECONTROLLER) != 0) {
sdlperror("SDL_Init");
quit(1);
}
-@@ -1957,7 +1957,7 @@ void __pascal far set_gr_mode(byte grmode) {
- pop_window_width, pop_window_height, flags);
- renderer_ = SDL_CreateRenderer(window_, -1 , SDL_RENDERER_ACCELERATED );
+@@ -2147,7 +2147,7 @@ void __pascal far set_gr_mode(byte grmod
+ #endif
+ }
-- SDL_Surface* icon = IMG_Load("data/icon.png");
-+ SDL_Surface* icon = IMG_Load("%%DATADIR%%/icon.png");
+- SDL_Surface* icon = IMG_Load(locate_file("data/icon.png"));
++ SDL_Surface* icon = IMG_Load(locate_file("%%DATADIR%%/icon.png"));
if (icon == NULL) {
sdlperror("Could not load icon");
} else {
-@@ -2109,7 +2109,7 @@ void load_from_opendats_metadata(int resource_id, cons
+@@ -2364,7 +2364,7 @@ void load_from_opendats_metadata(int res
if (len >= 5 && filename_no_ext[len-4] == '.') {
filename_no_ext[len-4] = '\0'; // terminate, so ".DAT" is deleted from the filename
}
@@ -53,4 +53,4 @@
+ snprintf(image_filename,sizeof(image_filename),"%%DATADIR%%/%s/res%d.%s",filename_no_ext, resource_id, extension);
if (!use_custom_levelset) {
//printf("loading (binary) %s",image_filename);
- fp = fopen(image_filename, "rb");
+ fp = fopen(locate_file(image_filename), "rb");
diff --git a/games/sdlpop/pkg-plist b/games/sdlpop/pkg-plist
index 46e1f77624ca..e62ab6def348 100644
--- a/games/sdlpop/pkg-plist
+++ b/games/sdlpop/pkg-plist
@@ -369,6 +369,9 @@ bin/prince
%%DATADIR%%/LEVELS/res2013.bin
%%DATADIR%%/LEVELS/res2014.bin
%%DATADIR%%/LEVELS/res2015.bin
+%%DATADIR%%/MIDISND1.DAT
+%%DATADIR%%/MIDISND2.DAT
+%%DATADIR%%/PRINCE/res1.bin
%%DATADIR%%/PRINCE/res10.bin
%%DATADIR%%/PRINCE/res150.pal
%%DATADIR%%/PRINCE/res151.png
@@ -1046,26 +1049,5 @@ bin/prince
%%DATADIR%%/levels-test/05-stacked-gates
%%DATADIR%%/levels-test/07-jump
%%DATADIR%%/levels-test/12-shadow
-%%DATADIR%%/music/cutscene_before_2_4_6_12.ogg
-%%DATADIR%%/music/cutscene_before_8_9.ogg
-%%DATADIR%%/music/cutscene_not_much_time_left.ogg
-%%DATADIR%%/music/embrace.ogg
-%%DATADIR%%/music/end_level_4_and_killed_by_shadow.ogg
-%%DATADIR%%/music/fight_death.ogg
-%%DATADIR%%/music/find_mirror_and_find_shadow.ogg
-%%DATADIR%%/music/floating.ogg
-%%DATADIR%%/music/guard_death_and_obtaining_the_sword.ogg
-%%DATADIR%%/music/intro_theme.ogg
-%%DATADIR%%/music/killed_Jaffar.ogg
-%%DATADIR%%/music/life_potion.ogg
-%%DATADIR%%/music/meet_Jaffar.ogg
+%%DATADIR%%/light.png
%%DATADIR%%/music/names.txt
-%%DATADIR%%/music/out_of_time.ogg
-%%DATADIR%%/music/potion.ogg
-%%DATADIR%%/music/regular_death.ogg
-%%DATADIR%%/music/story_1_absence.ogg
-%%DATADIR%%/music/story_2_princess.ogg
-%%DATADIR%%/music/story_3_Jaffar_enters.ogg
-%%DATADIR%%/music/story_4_Jaffar_leaves.ogg
-%%DATADIR%%/music/story_5_level_end_and_merge_with_shadow.ogg
-%%DATADIR%%/music/won.ogg