FreeDoko: update to 0.7.17

Closes: #10502 [via git-merge-pr]
This commit is contained in:
Michael Straube 2018-01-05 22:10:32 +01:00 committed by Jürgen Buchmüller
parent 189f78bcb2
commit aaac22746f
3 changed files with 131 additions and 86 deletions

View file

@ -0,0 +1,70 @@
From f65aa2b3f51b2e3e7fb17bc893af311b01b19eb9 Mon Sep 17 00:00:00 2001
From: "Dr. Diether Knof" <dknof@gmx.de>
Date: Fri, 5 Jan 2018 15:06:33 +0100
Subject: [PATCH] =?UTF-8?q?Kompilierfehler=20f=C3=BCr=2032-Bit-Systeme=20b?=
=?UTF-8?q?ehoben?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/misc/translation.cpp | 16 ----------------
src/misc/translation.h | 1 -
src/ui/gtkmm/icons.cpp | 2 +-
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/src/misc/translation.cpp b/src/misc/translation.cpp
index bccf7ab20..34e3a0374 100644
--- src/misc/translation.cpp
+++ src/misc/translation.cpp
@@ -218,22 +218,6 @@ replace_substring(string const& text, unsigned const param_unsigned)
return replace_substring(text, std::to_string(param_unsigned), 'u');
}
-#ifndef WINDOWS
-/**
- ** replace a substring
- **
- ** @param text text with string to replace
- ** @param param_size_t replacement to insert
- **
- ** @return text with replacements
- **/
-string
-replace_substring(string const& text, size_t const param_size_t)
-{
- return replace_substring(text, std::to_string(param_size_t), 'u');
-}
-#endif
-
/**
** replace a substring
**
diff --git a/src/misc/translation.h b/src/misc/translation.h
index ffdc7813e..ee537c734 100644
--- src/misc/translation.h
+++ src/misc/translation.h
@@ -46,7 +46,6 @@ inline string _(T const& t)
string replace_substring(string const& text, string const& s);
string replace_substring(string const& text, int i);
string replace_substring(string const& text, unsigned u);
-string replace_substring(string const& text, size_t s);
string replace_substring(string const& text, string const& replacement,
char c1, char c2 = '\0');
string replace_substrings(string const& text);
diff --git a/src/ui/gtkmm/icons.cpp b/src/ui/gtkmm/icons.cpp
index 19ae5021d..40f9138b0 100644
--- src/ui/gtkmm/icons.cpp
+++ src/ui/gtkmm/icons.cpp
@@ -722,7 +722,7 @@ Icons::load()
vector<Gdk::ScaledPixbufRotations> icon_new;
for (unsigned type = 0; type < NUMBER_OF_TYPES; type++) {
- sm.add(_("loading the icons (%u/%u)", type+1, NUMBER_OF_TYPES));
+ sm.add(_("loading the icons (%u/%u)", type+1, static_cast<unsigned>(NUMBER_OF_TYPES)));
icon_new.push_back(this->load(static_cast<Type>(type)));
if ( (::game_status == GameStatus::PROGRAMSTART)
|| (::game_status == GameStatus::PARTY_INITIAL_LOADED) )
--
2.15.1

View file

@ -1,37 +1,7 @@
--- Makefile 2017-09-19 14:31:03.514658296 +0200
+++ Makefile 2017-09-19 14:32:36.773662266 +0200
@@ -78,8 +78,13 @@
.PHONY: compile
compile:
# compile FreeDoko
- $(MAKE) Version
- $(MAKE) -C src/ FreeDoko
+# cannot build with network due to lacking gnet package
+ $(MAKE) \
+ "USE_UI_TEXT=false" \
+ "USE_UI_GTKMM=true" \
+ "USE_NETWORK=false" \
+ "CPPFLAGS+= -DRELEASE -DVERSION_DESCRIPTION='\"$(OPERATING_SYSTEM_NAME) binary\"' -DPUBLIC_DATA_DIRECTORY_VALUE='\"$(DATA_DIRECTORY)\"' -DMANUAL_DIRECTORY_VALUE='\"$(HELP_DIRECTORY)/manual\"'" \
+ -C src/ FreeDoko
@echo "---"
@echo "* Program 'FreeDoko' created"
@@ -289,22 +294,11 @@
ifeq ($(OPERATING_SYSTEM), Linux)
.PHONY: install
install :
- $(MAKE) \
- --always-make \
- "USE_UI_TEXT=false" \
- "USE_UI_GTKMM=true" \
- "USE_NETWORK=true" \
- "CXXFLAGS=-Wall -Werror -Wno-parentheses -pipe -Os -std=c++14" \
- "CPPFLAGS=-DRELEASE -DVERSION_DESCRIPTION='\"$(OPERATING_SYSTEM_NAME) binary\"' -DPUBLIC_DATA_DIRECTORY_VALUE='\"$(DATA_DIRECTORY)\"' -DMANUAL_DIRECTORY_VALUE='\"$(HELP_DIRECTORY)/manual\"'" \
- -C src \
- $(PROGRAM)
- $(MAKE) -C src strip
# Copying the program
echo "Copying the program"
--- Makefile 2018-01-04 07:11:48.000000000 +0100
+++ Makefile 2018-01-05 09:47:57.905760414 +0100
@@ -316,8 +316,7 @@
echo "Kopiere das Programm"
mkdir -p $(DESTDIR)$(BIN_DIRECTORY)
cp src/FreeDoko $(DESTDIR)$(BIN_DIRECTORY)
- -chgrp games $(DESTDIR)$(BIN_DIRECTORY)/FreeDoko
@ -39,17 +9,18 @@
+ chmod 755 $(DESTDIR)$(BIN_DIRECTORY)/FreeDoko
cd $(DESTDIR)$(BIN_DIRECTORY) && ln -sf FreeDoko freedoko
# Copying the data files
echo "Copying the data files"
@@ -315,21 +309,20 @@
echo "Copying the documentation"
echo "Kopiere die Daten"
@@ -330,22 +329,21 @@
echo "Kopiere die Dokumentation"
mkdir -p $(DESTDIR)$(HELP_DIRECTORY)
cp AUTHORS COPYING ChangeLog $(DESTDIR)$(HELP_DIRECTORY)/
- $(MAKE) -C doc install
+# cannot build docs due to lacking latex packages
+# $(MAKE) -C doc install
$(MAKE) -C manual install
# update the manual page
echo "update the manual page"
a2x -f manpage doc/freedoko.asciidoc
echo "Aktualisiere die man-Page"
a2x -f manpage doc/freedoko.adoc
mkdir -p $(DESTDIR)$(MAN_DIRECTORY)
cp doc/freedoko.6 $(DESTDIR)$(MAN_DIRECTORY)/
- -chgrp games $(DESTDIR)$(MAN_DIRECTORY)/freedoko.6
@ -57,18 +28,38 @@
+ chmod 644 $(DESTDIR)$(MAN_DIRECTORY)/freedoko.6
cd $(DESTDIR)$(MAN_DIRECTORY)/ && ln -sf freedoko.6 FreeDoko.6
# copy the icon
echo "copy the icon"
echo "Kopiere das Icon"
mkdir -p $(DESTDIR)$(ICON_DIRECTORY)
cp src/FreeDoko.png $(DESTDIR)$(ICON_DIRECTORY)/
- -chgrp games $(DESTDIR)$(ICON_DIRECTORY)/FreeDoko.png
- chmod 640 $(DESTDIR)$(ICON_DIRECTORY)/FreeDoko.png
+ chmod 644 $(DESTDIR)$(ICON_DIRECTORY)/FreeDoko.png
# copy the desktop file
echo "Kopiere den Desktop-Starter"
mkdir -p "$(DESTDIR)$(DESKTOP_FILE_DIRECTORY)"
@@ -362,15 +360,15 @@
|| echo "Programm a2x nicht gefunden."
@(which flip || which unix2dos) >/dev/null \
|| echo "Weder Programm flip noch unix2dos gefunden."
- @which pdflatex >/dev/null \
- || echo "Programm pdflatex nicht gefunden."
+# @which pdflatex >/dev/null \
+# || echo "Programm pdflatex nicht gefunden."
@which rsync >/dev/null \
|| echo "Programm rsync nicht gefunden."
@test -f src/FreeDoko
@which asciidoc >/dev/null
@which a2x >/dev/null
@(which flip || which unix2dos) >/dev/null
- @which pdflatex >/dev/null
+# @which pdflatex >/dev/null
@which rsync >/dev/null
.PHONY: uninstall
uninstall :
--- Makefile.install.directories 2017-09-19 14:31:03.514658296 +0200
+++ Makefile.install.directories 2017-09-19 14:32:36.774662266 +0200
@@ -4,13 +4,13 @@
--- Makefile.install.directories 2018-01-04 07:11:48.000000000 +0100
+++ Makefile.install.directories 2018-01-05 09:49:04.236760414 +0100
@@ -4,14 +4,14 @@
# the different directories for the files
# installing in /usr/local
@ -78,6 +69,7 @@
-HELP_DIRECTORY = $(MAIN_DIRECTORY)/share/doc/FreeDoko
-MAN_DIRECTORY = $(MAIN_DIRECTORY)/share/man/man6
-ICON_DIRECTORY = $(MAIN_DIRECTORY)/share/pixmaps
-LOCALE_DIRECTORY = $(MAIN_DIRECTORY)/share/locale
-DESKTOP_FILE_DIRECTORY = $(MAIN_DIRECTORY)/share/applications
+#MAIN_DIRECTORY = /usr/local
+#BIN_DIRECTORY = $(MAIN_DIRECTORY)/games
@ -85,12 +77,13 @@
+#HELP_DIRECTORY = $(MAIN_DIRECTORY)/share/doc/FreeDoko
+#MAN_DIRECTORY = $(MAIN_DIRECTORY)/share/man/man6
+#ICON_DIRECTORY = $(MAIN_DIRECTORY)/share/pixmaps
+#LOCALE_DIRECTORY = $(MAIN_DIRECTORY)/share/locale
+#DESKTOP_FILE_DIRECTORY = $(MAIN_DIRECTORY)/share/applications
# debian
#MAIN_DIRECTORY = /usr
@@ -57,6 +57,15 @@
#ICON_DIRECTORY = $(MAIN_DIRECTORY)/share/pixmaps
@@ -63,6 +63,16 @@
#LOCALE_DIRECTORY = $(MAIN_DIRECTORY)/share/locale
#DESKTOP_FILE_DIRECTORY = $(MAIN_DIRECTORY)/share/applications
+# Void Linux
@ -100,25 +93,16 @@
+HELP_DIRECTORY = $(MAIN_DIRECTORY)/share/doc/FreeDoko
+MAN_DIRECTORY = $(MAIN_DIRECTORY)/share/man/man6
+ICON_DIRECTORY = $(MAIN_DIRECTORY)/share/pixmaps
+LOCALE_DIRECTORY = $(MAIN_DIRECTORY)/share/locale
+DESKTOP_FILE_DIRECTORY = $(MAIN_DIRECTORY)/share/applications
+
# release
# where the temporary release files are saved
--- bin/FreeDoko.desktop 2017-09-19 14:31:03.515658296 +0200
+++ bin/FreeDoko.desktop 2017-09-19 14:32:36.775662266 +0200
@@ -6,7 +6,7 @@
Comment=game of Doppelkopf
Comment[de]=Doppelkopf-Spiel
Comment[fr]=un jeu de Doppelkopf
-Exec=/usr/games/freedoko
+Exec=/usr/bin/freedoko
Path=
Icon=FreeDoko
Categories=Application;Game;CardGame;
--- data/Makefile 2017-09-19 14:31:03.618658300 +0200
+++ data/Makefile 2017-09-19 14:32:36.775662266 +0200
@@ -40,8 +40,7 @@
--- data/Makefile 2018-01-04 07:11:48.000000000 +0100
+++ data/Makefile 2018-01-05 09:49:28.201760414 +0100
@@ -32,8 +32,7 @@
for d in cardsets iconsets backgrounds sounds; do \
$(MAKE) -C $$d install; \
done
@ -128,9 +112,10 @@
endif
ifeq ($(SHELLTYPE), sh)
--- doc/Makefile 2017-09-19 14:31:03.684658303 +0200
+++ doc/Makefile 2017-09-19 14:32:36.776662266 +0200
@@ -36,8 +36,7 @@
--- doc/Makefile 2018-01-04 07:11:48.000000000 +0100
+++ doc/Makefile 2018-01-05 09:49:46.401760414 +0100
@@ -34,8 +34,7 @@
fi
cp -a Bugs GPL Roadmap hpux.required_libs-ia64.txt $(DESTDIR)$(HELP_DIRECTORY)/
for d in de en; do $(MAKE) -C $$d install; done
@ -140,13 +125,14 @@
cd $(DESTDIR)$(DATA_DIRECTORY) && ln -sf $(HELP_DIRECTORY)/ doc
endif
--- src/Makefile 2017-09-19 14:31:03.383658290 +0200
+++ src/Makefile 2017-09-19 14:32:36.777662266 +0200
@@ -252,6 +252,7 @@
$(INCLUDE_ALL) \
$(LIBS_ALL) \
$(CXXFLAGS) \
+ $(LDFLAGS) \
-o $@
@echo "$(PROGRAM) compiled successfully"
--- src/Makefile 2018-01-04 07:11:48.000000000 +0100
+++ src/Makefile 2018-01-05 09:50:07.057760414 +0100
@@ -282,7 +282,6 @@
-DMANUAL_DIRECTORY_VALUE='\"$(HELP_DIRECTORY)/manual\"' \
-DLOCALE_DIRECTORY='\"$(LOCALE_DIRECTORY)\"'" \
$(PROGRAM)
- $(MAKE) strip
# strip the program from all symbols
.PHONY: strip

View file

@ -1,26 +1,15 @@
# Template file for 'FreeDoko'
pkgname=FreeDoko
version=0.7.16
version=0.7.17
revision=1
wrksrc="FreeDoko_${version}"
build_style=gnu-makefile
make_build_target="compile"
hostmakedepends="unzip pkg-config asciidoc"
hostmakedepends="unzip pkg-config asciidoc dos2unix rsync"
makedepends="gtkmm-devel freealut-devel"
short_desc="Free implementation of the card game Doppelkopf"
maintainer="Michael Straube <straubem@gmx.de>"
homepage="http://free-doko.sourceforge.net/en/FreeDoko.html"
license="GPL-2"
distfiles="${SOURCEFORGE_SITE}/free-doko/FreeDoko_${version}.src.zip"
checksum=6fdcee22b3e9a76d44d8c3a582d068452290ec4c24f8f2f9e4498adf4daf40af
post_extract() {
rm manual/{de/Makefile,en/Makefile,Makefile}
rm manual/de/operation/pictures/Regeln/create_screenshots.sh
find manual -type f -exec chmod 644 {} \;
}
post_install() {
vinstall bin/FreeDoko.desktop 644 usr/share/applications
vcopy manual usr/share/doc/FreeDoko
}
checksum=db686536e479d3a3349dc7db1754f369d14cee02a60c9afddd004e017cf022e6