aboutsummaryrefslogtreecommitdiff
path: root/games/vegastrike
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-21 14:45:18 -0500
committerRobby Workman <rworkman@slackbuilds.org>2022-02-21 14:34:28 -0600
commitd2dce5f7d1eeef225f6f4060a81bf06fda93ebde (patch)
tree2eae7864664a95858be380585377f3a759ffa3af /games/vegastrike
parente2b71b13f36dedb85e0fbfd96951b63d364321a9 (diff)
games/vegastrike: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/vegastrike')
-rw-r--r--games/vegastrike/README_SBo (renamed from games/vegastrike/README.SlackBuild)0
-rw-r--r--games/vegastrike/patches/ordered_pointer_comparison.diff129
-rw-r--r--games/vegastrike/vegastrike.SlackBuild3
3 files changed, 132 insertions, 0 deletions
diff --git a/games/vegastrike/README.SlackBuild b/games/vegastrike/README_SBo
index 6ed1a58ad308..6ed1a58ad308 100644
--- a/games/vegastrike/README.SlackBuild
+++ b/games/vegastrike/README_SBo
diff --git a/games/vegastrike/patches/ordered_pointer_comparison.diff b/games/vegastrike/patches/ordered_pointer_comparison.diff
new file mode 100644
index 000000000000..e152fa867130
--- /dev/null
+++ b/games/vegastrike/patches/ordered_pointer_comparison.diff
@@ -0,0 +1,129 @@
+diff -Naur vegastrike-src-0.5.1.r1/setup/src/include/central.cpp vegastrike-src-0.5.1.r1.patched/setup/src/include/central.cpp
+--- vegastrike-src-0.5.1.r1/setup/src/include/central.cpp 2022-02-21 14:24:38.199104715 -0500
++++ vegastrike-src-0.5.1.r1.patched/setup/src/include/central.cpp 2022-02-21 14:24:10.357643227 -0500
+@@ -36,7 +36,7 @@
+ do {
+ if (CURRENT->name == NULL) { continue; }
+ if (strcmp(group, CURRENT->name) == 0) { CURRENT->setting = NewString(setting); return; }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ }
+ void SetInfo(char *catagory, char *info) {
+ struct catagory *CURRENT;
+@@ -44,7 +44,7 @@
+ do {
+ if (CURRENT->name == NULL) { continue; }
+ if (strcmp(catagory, CURRENT->name) == 0) { CURRENT->info = NewString(info); return; }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ }
+
+ char *GetInfo(char *catagory) {
+@@ -56,7 +56,7 @@
+ if (CURRENT->info) { return CURRENT->info; }
+ else { return catagory; }
+ }
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ return catagory;
+ }
+
+@@ -66,7 +66,7 @@
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, group) == 0) { return CUR->setting; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return EMPTY_STR;
+ }
+
+@@ -76,7 +76,7 @@
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, name) == 0) { return CUR; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return 0;
+ }
+
+@@ -86,7 +86,7 @@
+ do {
+ if (CUR->name == NULL) { continue; }
+ if (strcmp(CUR->name, name) == 0) { return CUR; }
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ return 0;
+ }
+
+diff -Naur vegastrike-src-0.5.1.r1/setup/src/include/display_gtk.cpp vegastrike-src-0.5.1.r1.patched/setup/src/include/display_gtk.cpp
+--- vegastrike-src-0.5.1.r1/setup/src/include/display_gtk.cpp 2008-04-23 07:05:43.000000000 -0400
++++ vegastrike-src-0.5.1.r1.patched/setup/src/include/display_gtk.cpp 2022-02-21 14:39:31.905918365 -0500
+@@ -109,7 +109,7 @@
+ break;
+ }
+ i++;
+- } while ((NEWCUR = NEWCUR->next) > 0);
++ } while ((NEWCUR = NEWCUR->next));
+ // printf("\n\n");
+ gtk_widget_show (menu);
+ gtk_container_add(GTK_CONTAINER(vbox), menu);
+@@ -124,7 +124,7 @@
+ gtk_widget_show(hbox);
+ }
+ column++;
+- } while ((CURRENT = CURRENT->next) > 0);
++ } while ((CURRENT = CURRENT->next));
+ if (column != 1) {
+ gtk_container_add(GTK_CONTAINER(main_vbox), hbox);
+ gtk_widget_show(hbox);
+@@ -180,7 +180,7 @@
+ // gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ClickButton), CUR);
+ #endif
+ CUR->button = button;
+- } while ((CUR = CUR->next) > 0);
++ } while ((CUR = CUR->next));
+ }
+
+ void ClickButton(GtkWidget *w, struct catagory *CUR) {
+diff -Naur vegastrike-src-0.5.1.r1/setup/src/include/file.cpp vegastrike-src-0.5.1.r1.patched/setup/src/include/file.cpp
+--- vegastrike-src-0.5.1.r1/setup/src/include/file.cpp 2010-02-25 10:22:25.000000000 -0500
++++ vegastrike-src-0.5.1.r1.patched/setup/src/include/file.cpp 2022-02-21 14:38:36.387998128 -0500
+@@ -167,7 +167,7 @@
+ n_parm = next_parm( parm ); //next_parm is a line splitter included with general.c
+ if (strcmp( "groups", parm ) == 0) {
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ G_CURRENT->name = NewString( parm );
+ G_NEXT = (struct group*) malloc( sizeof (struct group) );
+ if (G_NEXT == 0) {
+@@ -188,7 +188,7 @@
+ n_parm = next_parm( parm );
+ group = NewString( parm );
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ C_CURRENT->name = NewString( parm );
+ C_NEXT = (struct catagory*) malloc( sizeof (struct catagory) );
+ if (C_NEXT == 0) {
+@@ -318,7 +318,7 @@
+ parm++;
+ if (strcmp( name, parm ) == 0) {commenting = setting; } else {
+ parm = n_parm;
+- while ( ( n_parm = next_parm( parm ) ) > 0 ) {
++ while ( ( n_parm = next_parm( parm ) ) ) {
+ if (parm[0] == '<') break;
+ if (strcmp( name, parm ) == 0) {
+ commenting = setting;
+diff -Naur vegastrike-src-0.5.1.r1/setup/src/include/general.cpp vegastrike-src-0.5.1.r1.patched/setup/src/include/general.cpp
+--- vegastrike-src-0.5.1.r1/setup/src/include/general.cpp 2010-01-03 15:36:49.000000000 -0500
++++ vegastrike-src-0.5.1.r1.patched/setup/src/include/general.cpp 2022-02-21 14:39:02.669433757 -0500
+@@ -121,7 +121,7 @@
+ if (calc > LENGTH) { return line; }
+ length = strlen(line);
+ strcpy(current, line);
+- while ((location = strstr(current, search)) > 0) {
++ while ((location = strstr(current, search))) {
+ chr_new[0] = '\0';
+ calc = strlen(current) - strlen(search) + strlen(replace);
+ if (calc > LENGTH) { strcpy(line, current); free(current); free(chr_new); return line; }
diff --git a/games/vegastrike/vegastrike.SlackBuild b/games/vegastrike/vegastrike.SlackBuild
index f70910b13092..3e46300e893d 100644
--- a/games/vegastrike/vegastrike.SlackBuild
+++ b/games/vegastrike/vegastrike.SlackBuild
@@ -22,6 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220221 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=vegastrike
@@ -99,6 +101,7 @@ cp "$CWD/cmake"/*.cmake .
declare patchdir="$CWD/patches"
patch -p0 < "$patchdir/patch-${VERSION}_$BUILD"
+patch -p1 < "$patchdir/ordered_pointer_comparison.diff"
BUILDDIR=build
mkdir -p $BUILDDIR