[simutrans] 01/01: Rewrite source handling

Jörg Frings-Fürst jff-guest at moszumanska.debian.org
Sun Oct 4 15:23:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

jff-guest pushed a commit to branch master
in repository simutrans.

commit f918023c34732e201d21929af55f0abf7299d647
Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
Date:   Sun Oct 4 17:23:09 2015 +0200

    Rewrite source handling
---
 .pc/.quilt_patches               |  1 +
 .pc/.quilt_series                |  1 +
 .pc/.version                     |  1 +
 .pc/applied-patches              |  6 +++++
 Makefile                         | 23 +++++++++--------
 debian/README.source             |  9 +------
 debian/changelog                 | 11 +++++---
 debian/repack.sh                 | 33 ++++++++++++++++++++++++
 debian/rules                     | 16 ------------
 debian/translations/be.tab       |  2 +-
 debian/translations/bg.tab       |  2 +-
 debian/translations/ca.tab       |  2 +-
 debian/translations/ce.tab       |  2 +-
 debian/translations/cn.tab       |  4 ++-
 debian/translations/cz.tab       |  2 +-
 debian/translations/de.tab       |  2 +-
 debian/translations/dk.tab       |  2 +-
 debian/translations/en.tab       |  2 +-
 debian/translations/es.tab       |  2 +-
 debian/translations/et.tab       |  2 +-
 debian/translations/fi.tab       |  2 +-
 debian/translations/fr.tab       |  2 +-
 debian/translations/gr.tab       |  2 +-
 debian/translations/hr.tab       |  2 +-
 debian/translations/hu.tab       |  2 +-
 debian/translations/id.tab       |  4 ++-
 debian/translations/it.tab       |  2 +-
 debian/translations/ja.tab       |  2 +-
 debian/translations/ko.tab       |  2 +-
 debian/translations/lt.tab       |  2 +-
 debian/translations/nl.tab       |  2 +-
 debian/translations/no.tab       |  2 +-
 debian/translations/pl.tab       |  2 +-
 debian/translations/pt.tab       |  2 +-
 debian/translations/ro.tab       |  2 +-
 debian/translations/ru.tab       |  4 +--
 debian/translations/sk.tab       |  2 +-
 debian/translations/sq.tab       |  2 +-
 debian/translations/sv.tab       |  2 +-
 debian/translations/th.tab       |  2 +-
 debian/translations/tr.tab       |  2 +-
 debian/translations/uk.tab       |  2 +-
 debian/translations/zh.tab       |  4 ++-
 debian/watch                     |  2 +-
 makeobj/Makefile                 | 27 ++++++++++----------
 simmain.cc                       |  5 ++--
 simsys.cc                        |  2 +-
 simtypes.h                       |  7 ++++++
 squirrel/sqstdlib/sqstdstring.cc |  2 +-
 utils/sha1.cc                    | 54 ++++++++++++++++++++++++++++++++++++++++
 utils/sha1.h                     | 28 +++++++++++++++++++++
 51 files changed, 214 insertions(+), 90 deletions(-)

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/.pc/.version b/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/.pc/applied-patches b/.pc/applied-patches
new file mode 100644
index 0000000..c3d4641
--- /dev/null
+++ b/.pc/applied-patches
@@ -0,0 +1,6 @@
+0005-typo.patch
+0105-revert-svn-1937.diff
+0100-path_for_game-data.patch
+0500-config.diff
+0505-link-less-libraries.diff
+0110-sha1-replacement.diff
diff --git a/Makefile b/Makefile
index aa0d57b..7c69589 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,9 @@ ifeq ($(findstring $(OSTYPE), $(OSTYPES)),)
   $(error Unkown OSTYPE "$(OSTYPE)", must be one of "$(OSTYPES)")
 endif
 
+# for utils/sha1.*
+LIBS += -lcrypto
+
 ifeq ($(OSTYPE),amiga)
   STD_LIBS ?= -lunix -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg
   CFLAGS += -mcrt=newlib -DUSE_C -DSIM_BIG_ENDIAN -gstabs+
@@ -72,14 +75,14 @@ ALLEGRO_CONFIG ?= allegro-config
 SDL_CONFIG     ?= sdl-config
 SDL2_CONFIG    ?= sdl2-config
 
-ifneq ($(OPTIMISE),)
-  CFLAGS += -O3
-  ifeq ($(findstring $(OSTYPE), amiga),)
-    CFLAGS += -minline-all-stringops
-  endif
-else
-  CFLAGS += -O
-endif
+#ifneq ($(OPTIMISE),)
+# CFLAGS += -O3
+#  ifeq ($(findstring $(OSTYPE), amiga),)
+#    CFLAGS += -minline-all-stringops
+# endif
+#else
+#  CFLAGS += -O
+#endif
 
 ifdef DEBUG
   ifeq ($(shell expr $(DEBUG) \>= 1), 1)
@@ -132,8 +135,8 @@ ifneq ($(WITH_REVISION),)
   endif
 endif
 
-CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
-CCFLAGS  += -Wstrict-prototypes
+CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -D_FORTIFY_SOURCE=2 $(FLAGS)
+CCFLAGS  += -Wstrict-prototypes -D_FORTIFY_SOURCE=2
 
 
 SOURCES += bauer/brueckenbauer.cc
diff --git a/debian/README.source b/debian/README.source
index 77266d4..45e958d 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,12 +1,5 @@
-To generate a tarball for a new upstream release, change the variables SVNREV
-and VERSION in debian/rules and then run
-
- $ make -f debian/rules get-orig-source
-
-This will generate an upstream tarball in the current directory.
-
 It is a good idea to update the translations in debian/translations after
-this.  Just run
+download the source tarball.  Just run
 
  $ make -f debian/rules update-translations
 
diff --git a/debian/changelog b/debian/changelog
index 8ee65e5..94db1e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,12 @@
-simutrans (120.0.1-1) unstable; urgency=medium
+simutrans (120.0.1+repack-1) unstable; urgency=medium
 
   [Jörg Frings-Fürst]
   * New upstream release (Closes: #708837).
   * debian/control:
-    - Add myselself as new uploader (Closes: #783887).
+    - Add myself as new uploader (Closes: #783887).
     - Bump Standards-Version to 3.9.6 (No changes required).
     - Rewrite Depends.
-    - Rewrite Vcc-* to canonical URI.
+    - Rewrite Vcs* to canonical URI.
   * debian/source/options:
     - Removed because xz is now standard compression.
   * debian/rules:
@@ -19,6 +19,11 @@ simutrans (120.0.1-1) unstable; urgency=medium
   * Remove debian/patches/sha1-replacement.diff.
   * Update translations.
   * Refresh debian/patches/*.
+  * Rewrite source handling:
+    - New debian/repack.sh.
+    - debian/watch: add parmeter "debian debian/repack.sh".
+    - debian/rules: remove get-orig-source.
+    - Rewrite debian/README.souce.
 
  -- Jörg Frings-Fürst <debian at jff-webhosting.net>  Sat, 16 May 2015 21:49:56 +0200
 
diff --git a/debian/repack.sh b/debian/repack.sh
new file mode 100755
index 0000000..5ea391f
--- /dev/null
+++ b/debian/repack.sh
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+# Repackaging script to be called by Uscan
+
+echo "Repackaging ..."
+TMP="../simutrans-$2/"
+PKG="`dpkg-parsechangelog|sed 's/^Source: //p;d'`_$2+repack.orig"
+
+
+echo "Extracting tarball ..."
+mkdir "$TMP"
+tar xzf "$3" -C "$TMP"
+
+echo "Removing unwanted stuff ..."
+# source is skins.src/*, only removed to make sure we rebuild it.
+rm -rf ${TMP}simutrans/skin/menu.WindowSkin.pak
+
+# freeware, cf. http://www.packetizer.com/security/sha1/ [2011-02-15]
+rm -rf ${TMP}utils/sha1.cc ${TMP}utils/sha1.h
+
+
+echo "Creating repack tarball ..."
+tar -caf "../simutrans_$2+repack.orig.tar.xz" ${TMP}*
+
+
+echo "Clean tmp dir ..."
+rm -rf ${TMP}
+#rmdir --ignore-fail-on-non-empty $TMP
+
+echo "Clean uscan files ..."
+rm -rf ../simutrans-src-$2.zip
+rm -rf ../simutrans_$2.orig.tar.gz
+
+echo "Repackaged tarball created"
diff --git a/debian/rules b/debian/rules
index 2c3ecf1..b1bd58e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -40,22 +40,6 @@ override_dh_install:
 override_dh_installchangelogs:
 	dh_installchangelogs simutrans/history.txt
 
-# SVN revision and package version to use when building .orig.tar.gz
-SVNREV  = 7542
-VERSION = 120.0.1
-SVNROOT = svn://tron.yamagi.org/simutrans/simutrans/trunk 
-
-get-orig-source:
-	svn export -r $(SVNREV) $(SVNROOT) simutrans-$(VERSION)
-
-	# source is skins.src/*, only removed to make sure we rebuild it.
-	$(RM) simutrans-$(VERSION)/simutrans/skin/menu.WindowSkin.pak
-
-	# freeware, cf. http://www.packetizer.com/security/sha1/ [2011-02-15]
-	$(RM) simutrans-$(VERSION)/utils/sha1.cc simutrans-$(VERSION)/utils/sha1.h
-	tar c simutrans-$(VERSION) | xz >simutrans_$(VERSION).orig.tar.xz
-	$(RM) -r simutrans-$(VERSION)
-
 update-translations:
 	dh_testdir
 	wget --post-data "version=0&choice=all&submit=Export!" --delete-after "http://simutrans-germany.com/translator/script/main.php?page=wrap"
diff --git a/debian/translations/be.tab b/debian/translations/be.tab
index 962f5be..18bd0fa 100644
--- a/debian/translations/be.tab
+++ b/debian/translations/be.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                           Language: be Belaruskaja                           #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/bg.tab b/debian/translations/bg.tab
index 26c123f..dc765ee 100644
--- a/debian/translations/bg.tab
+++ b/debian/translations/bg.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                            Language: bg Bulgarian                            #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/ca.tab b/debian/translations/ca.tab
index 1b1aff3..bcba8e1 100644
--- a/debian/translations/ca.tab
+++ b/debian/translations/ca.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                              Language: ca Catala                             #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/ce.tab b/debian/translations/ce.tab
index 4c52107..2008135 100644
--- a/debian/translations/ce.tab
+++ b/debian/translations/ce.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                            Language: ce C-English                            #
 #                                Encoding: ASCII                               #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/cn.tab b/debian/translations/cn.tab
index 98b6ae6..6c8cfa3 100644
--- a/debian/translations/cn.tab
+++ b/debian/translations/cn.tab
@@ -8,13 +8,15 @@ wenquanyi_9pt.bdf
 #                           Language: cn Sim. Chinese                          #
 #                                Encoding: UTF-8                               #
 #                           Font : wenquanyi_9pt.bdf                           #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
 #                   note: Verified where all texts are shown                   #
 #                                    - Dwachs                                  #
 #                                    note:                                     #
+#                                     - E24                                    #
+#                                    note:                                     #
 #                                  - Flemmbrav                                 #
 #                                    note:                                     #
 #                                    - FrankP                                  #
diff --git a/debian/translations/cz.tab b/debian/translations/cz.tab
index 254d2d8..82c7ce7 100644
--- a/debian/translations/cz.tab
+++ b/debian/translations/cz.tab
@@ -8,7 +8,7 @@ prop-latin2.fnt
 #                             Language: cz Cestina                             #
 #                             Encoding: ISO-8859-2                             #
 #                            Font : prop-latin2.fnt                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/de.tab b/debian/translations/de.tab
index 3273306..0a49199 100644
--- a/debian/translations/de.tab
+++ b/debian/translations/de.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: de Deutsch                             #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                            Alexander Brose - AlexB                           #
diff --git a/debian/translations/dk.tab b/debian/translations/dk.tab
index 90dd509..7ab2c74 100644
--- a/debian/translations/dk.tab
+++ b/debian/translations/dk.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                              Language: dk Dansk                              #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/en.tab b/debian/translations/en.tab
index 689fa3c..e87b01a 100644
--- a/debian/translations/en.tab
+++ b/debian/translations/en.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: en English                             #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                            Alexander Brose - AlexB                           #
diff --git a/debian/translations/es.tab b/debian/translations/es.tab
index 2e99311..10b7201 100644
--- a/debian/translations/es.tab
+++ b/debian/translations/es.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: es Espanol                             #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/et.tab b/debian/translations/et.tab
index 2905e51..4441a92 100644
--- a/debian/translations/et.tab
+++ b/debian/translations/et.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                              Language: et Eesti                              #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/fi.tab b/debian/translations/fi.tab
index 3f7d5dd..b3349d4 100644
--- a/debian/translations/fi.tab
+++ b/debian/translations/fi.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                              Language: fi Suomi                              #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/fr.tab b/debian/translations/fr.tab
index 2901aa9..20614cc 100644
--- a/debian/translations/fr.tab
+++ b/debian/translations/fr.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: fr Francais                            #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/gr.tab b/debian/translations/gr.tab
index 9c5372e..8b53b53 100644
--- a/debian/translations/gr.tab
+++ b/debian/translations/gr.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                             Language: gr Ellinika                            #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/hr.tab b/debian/translations/hr.tab
index 9b2ccc2..b705e97 100644
--- a/debian/translations/hr.tab
+++ b/debian/translations/hr.tab
@@ -8,7 +8,7 @@ prop-latin2.fnt
 #                             Language: hr Hrvatski                            #
 #                             Encoding: ISO-8859-2                             #
 #                            Font : prop-latin2.fnt                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/hu.tab b/debian/translations/hu.tab
index 07bc32f..7e8b816 100644
--- a/debian/translations/hu.tab
+++ b/debian/translations/hu.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                              Language: hu Magyar                             #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/id.tab b/debian/translations/id.tab
index 1751e54..b0ef5f9 100644
--- a/debian/translations/id.tab
+++ b/debian/translations/id.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                            Language: id Indonesia                            #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
@@ -35,6 +35,8 @@ Prop-Latin1.bdf
 #                                    note:                                     #
 #                                    - vonjo                                   #
 #                                    note:                                     #
+#                     Rengga Prakoso Nugroho - vzrenggamani                    #
+#                              note: I Smart Boy                               #
 #                                                                              #
 ################################################################################
 #__________________________________button_text__________________________________
diff --git a/debian/translations/it.tab b/debian/translations/it.tab
index 6e61f94..39b3035 100644
--- a/debian/translations/it.tab
+++ b/debian/translations/it.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: it Italiano                            #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/ja.tab b/debian/translations/ja.tab
index 396afac..88d9699 100644
--- a/debian/translations/ja.tab
+++ b/debian/translations/ja.tab
@@ -8,7 +8,7 @@ m+10r.bdf
 #                             Language: ja Japanese                            #
 #                                Encoding: UTF-8                               #
 #                               Font : m+10r.bdf                               #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/ko.tab b/debian/translations/ko.tab
index e9117b5..a455504 100644
--- a/debian/translations/ko.tab
+++ b/debian/translations/ko.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                              Language: ko Korean                             #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/lt.tab b/debian/translations/lt.tab
index f48f63e..fac0710 100644
--- a/debian/translations/lt.tab
+++ b/debian/translations/lt.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                            Language: lt Lithuanian                           #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/nl.tab b/debian/translations/nl.tab
index 9157530..2153348 100644
--- a/debian/translations/nl.tab
+++ b/debian/translations/nl.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                            Language: nl Nederlands                           #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/no.tab b/debian/translations/no.tab
index e1e1b80..8b37b75 100644
--- a/debian/translations/no.tab
+++ b/debian/translations/no.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                              Language: no Norsk                              #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/pl.tab b/debian/translations/pl.tab
index 7d1fa0a..b960567 100644
--- a/debian/translations/pl.tab
+++ b/debian/translations/pl.tab
@@ -8,7 +8,7 @@ prop-latin2.fnt
 #                              Language: pl Polski                             #
 #                             Encoding: ISO-8859-2                             #
 #                            Font : prop-latin2.fnt                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/pt.tab b/debian/translations/pt.tab
index c48ae8d..f27f7de 100644
--- a/debian/translations/pt.tab
+++ b/debian/translations/pt.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                            Language: pt Portugues                            #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                               Adilson - Adilson                              #
diff --git a/debian/translations/ro.tab b/debian/translations/ro.tab
index ab6fc26..5b3341a 100644
--- a/debian/translations/ro.tab
+++ b/debian/translations/ro.tab
@@ -8,7 +8,7 @@ prop-latin2.fnt
 #                              Language: ro Romana                             #
 #                             Encoding: ISO-8859-2                             #
 #                            Font : prop-latin2.fnt                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/ru.tab b/debian/translations/ru.tab
index 08cf14b..ce58c08 100644
--- a/debian/translations/ru.tab
+++ b/debian/translations/ru.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                             Language: ru Russian                             #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 15.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                       Semichenkov Alexander - AleksRevo                      #
@@ -2022,7 +2022,7 @@ New world record for monorails: %.1f km/h by %s.
 New world record for motorcars: %.1f km/h by %s.
 Установлен новый мировой \nрекорд скорости для \nавтомобилей %.1f км/ч -\n%s
 New world record for narrowgauges: %.1f km/h by %s.
-Новый мировой рекорд скорости для узкоколеных т/с: %.1f км/ч, %s.
+Новый мировой рекорд скорости для узкоколейных т/с: %.1f км/ч, %s.
 New world record for planes: %.1f km/h by %s.
 Установлен новый мировой \nрекорд скорости для \nавиации %.1f км/ч -\n%s
 New world record for railways: %.1f km/h by %s.
diff --git a/debian/translations/sk.tab b/debian/translations/sk.tab
index d1d0427..8a7d1aa 100644
--- a/debian/translations/sk.tab
+++ b/debian/translations/sk.tab
@@ -8,7 +8,7 @@ prop-latin2.fnt
 #                            Language: sk Slovencina                           #
 #                             Encoding: ISO-8859-2                             #
 #                            Font : prop-latin2.fnt                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/sq.tab b/debian/translations/sq.tab
index ba36af7..c5b286b 100644
--- a/debian/translations/sq.tab
+++ b/debian/translations/sq.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                             Language: sq Albanian                            #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/sv.tab b/debian/translations/sv.tab
index 51bafcf..73aeb2f 100644
--- a/debian/translations/sv.tab
+++ b/debian/translations/sv.tab
@@ -8,7 +8,7 @@ Prop-Latin1.bdf
 #                             Language: sv Svenska                             #
 #                             Encoding: ISO-8859-1                             #
 #                            Font : Prop-Latin1.bdf                            #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/th.tab b/debian/translations/th.tab
index bc186e5..ee1f789 100644
--- a/debian/translations/th.tab
+++ b/debian/translations/th.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                               Language: th Thai                              #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/tr.tab b/debian/translations/tr.tab
index d896977..9b1614e 100644
--- a/debian/translations/tr.tab
+++ b/debian/translations/tr.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                             Language: tr Turkish                             #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/uk.tab b/debian/translations/uk.tab
index 0f2b1a3..8a0f96f 100644
--- a/debian/translations/uk.tab
+++ b/debian/translations/uk.tab
@@ -8,7 +8,7 @@ cyr.bdf
 #                            Language: uk Ukrainian                            #
 #                                Encoding: UTF-8                               #
 #                                Font : cyr.bdf                                #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
diff --git a/debian/translations/zh.tab b/debian/translations/zh.tab
index e75ccc6..f52408a 100644
--- a/debian/translations/zh.tab
+++ b/debian/translations/zh.tab
@@ -8,13 +8,15 @@ wenquanyi_9pt.bdf
 #                            Language: zh T. Chinese                           #
 #                                Encoding: UTF-8                               #
 #                           Font : wenquanyi_9pt.bdf                           #
-#                           Date Created: 13.05 2015                           #
+#                            Date Created: 3.10 2015                           #
 #                                                                              #
 #                                   authors:                                   #
 #                                    - An_dz                                   #
 #                   note: Verified where all texts are shown                   #
 #                                    - Dwachs                                  #
 #                                    note:                                     #
+#                                     - E24                                    #
+#                                    note:                                     #
 #                                  - Flemmbrav                                 #
 #                                    note:                                     #
 #                                    - FrankP                                  #
diff --git a/debian/watch b/debian/watch
index cd4df5d..0158740 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 opts="uversionmangle=s/-/./g,dversionmangle=s/[~+]ds\d+$//" \
-    http://sf.net/simutrans/simutrans-src-(.*)\.zip
+    http://sf.net/simutrans/simutrans-src-(.*)\.zip debian debian/repack.sh
 
diff --git a/makeobj/Makefile b/makeobj/Makefile
index 10dd957..91b7e1e 100644
--- a/makeobj/Makefile
+++ b/makeobj/Makefile
@@ -21,7 +21,7 @@ LDFLAGS += $(PNG_LDFLAGS)
 CFLAGS += -DMAKEOBJ
 CXXFLAGS += -DMAKEOBJ
 
-STD_LIBS += -lz -lbz2 -lpng
+STD_LIBS += -lpng
 
 ifeq ($(OSTYPE),cygwin)
   OS_INC   ?= -I/usr/include/mingw
@@ -42,16 +42,16 @@ ifeq ($(OSTYPE),mac)
   CXXFLAGS   += -DUSE_HW -DUSE_C
 endif
 
-ifneq ($(OPTIMISE),)
-  CFLAGS   += -O3 -fno-schedule-insns
-  CXXFLAGS += -O3 -fno-schedule-insns
-  ifneq ($(OSTYPE),mac)
-    CFLAGS  += -minline-all-stringops
-  endif
-else
-  CFLAGS   += -O
-  CXXFLAGS += -O
-endif
+#ifneq ($(OPTIMISE),)
+#  CFLAGS   += -O3 -fno-schedule-insns
+#  CXXFLAGS += -O3 -fno-schedule-insns
+#  ifneq ($(OSTYPE),mac)
+#    CFLAGS  += -minline-all-stringops
+#  endif
+#else
+#  CFLAGS   += -O
+#  CXXFLAGS += -O
+#endif
 
 ifdef DEBUG
   ifeq ($(shell expr $(DEBUG) \>= 1), 1)
@@ -77,8 +77,8 @@ ifneq ($(PROFILE),)
   LDFLAGS += -pg
 endif
 
-CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wstrict-prototypes $(OS_INC) $(OS_OPT) $(FLAGS)
-CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(OS_INC) $(OS_OPT) $(FLAGS)
+CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wstrict-prototypes -D_FORTIFY_SOURCE=2 $(OS_INC) $(OS_OPT) $(FLAGS)
+CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -D_FORTIFY_SOURCE=2 $(OS_INC) $(OS_OPT) $(FLAGS)
 
 # SOLO_SOURCES contains files which are unique to makeobj;
 # SHARED_SOURCES contains those with the exact same object code in makeobj and simutrans;
@@ -126,6 +126,7 @@ VARIANT_SOURCES += ../utils/log.cc
 SOURCES ?= $(SOLO_SOURCES) $(SHARED_SOURCES) $(VARIANT_SOURCES)
 
 BUILDDIR ?= build/$(CFG)
+
 TOOL  = makeobj
 PROG ?= makeobj
 
diff --git a/simmain.cc b/simmain.cc
index b249961..0722034 100644
--- a/simmain.cc
+++ b/simmain.cc
@@ -486,8 +486,9 @@ int simu_main(int argc, char** argv)
 		strcat( env_t::program_dir, path_sep );
 	}
 	else {
-		strcpy( env_t::program_dir, argv[0] );
-		*(strrchr( env_t::program_dir, path_sep[0] )+1) = 0;
+		// strcpy( env_t::program_dir, argv[0] );
+		// *(strrchr( env_t::program_dir, path_sep[0] )+1) = 0;
+		strcpy(env_t::program_dir, "/usr/share/games/simutrans/");
 
 #ifdef __APPLE__
 		// change working directory from binary dir to bundle dir
diff --git a/simsys.cc b/simsys.cc
index e4dc228..d5cb53e 100644
--- a/simsys.cc
+++ b/simsys.cc
@@ -93,7 +93,7 @@ char const* dr_query_homedir()
 #elif defined __APPLE__
 	sprintf(buffer, "%s/Library/Simutrans", getenv("HOME"));
 #else
-	sprintf(buffer, "%s/simutrans", getenv("HOME"));
+	sprintf(buffer, "%s/.simutrans", getenv("HOME"));
 #endif
 
 	dr_mkdir(buffer);
diff --git a/simtypes.h b/simtypes.h
index cedbbec..dfa641f 100644
--- a/simtypes.h
+++ b/simtypes.h
@@ -8,6 +8,13 @@
 
 #include "utils/for.h"
 
+#include <endian.h>
+#undef LITTLE_ENDIAN //endian.h gives these definitions we don't want
+#undef BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
+	#define SIM_BIG_ENDIAN
+#endif
+
 #if defined _MSC_VER
 #	if _MSC_VER <= 1200
 #		error "Simutrans cannot be compiled with Visual C++ 6.0 or earlier."
diff --git a/squirrel/sqstdlib/sqstdstring.cc b/squirrel/sqstdlib/sqstdstring.cc
index b2efa41..84c61c6 100644
--- a/squirrel/sqstdlib/sqstdstring.cc
+++ b/squirrel/sqstdlib/sqstdstring.cc
@@ -87,7 +87,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
 		else {
 			n++;
 			if( nparam > sq_gettop(v) )
-				return sq_throwerror(v,_SC("not enough paramters for the given format string"));
+				return sq_throwerror(v,_SC("not enough parameters for the given format string"));
 			n = validate_format(v,fmt,format,n,w);
 			if(n < 0) return -1;
 			SQInteger addlen = 0;
diff --git a/utils/sha1.cc b/utils/sha1.cc
new file mode 100644
index 0000000..aaf9c06
--- /dev/null
+++ b/utils/sha1.cc
@@ -0,0 +1,54 @@
+/*
+ * sha1.cc
+ *
+ * (C) 2011, Ansgar Burchardt <ansgar at debian.org>
+ *
+ * This file may be used under the Artistic license.
+ */
+
+#include "sha1.h"
+#include "../simtypes.h"
+#include <stdexcept>
+
+SHA1::SHA1()
+{
+  EVP_MD_CTX_init(&m_md_ctx);
+  Reset();
+}
+
+SHA1::~SHA1()
+{
+  EVP_MD_CTX_cleanup(&m_md_ctx);
+}
+
+void SHA1::Reset()
+{
+  if (!EVP_DigestInit_ex(&m_md_ctx, EVP_sha1(), 0))
+    throw std::runtime_error("EVP_DigestInit_ex failed.");
+}
+
+bool SHA1::Result(unsigned char *md_value)
+{
+  bool ret = EVP_DigestFinal_ex(&m_md_ctx, md_value, 0);
+
+#ifndef SIM_BIG_ENDIAN
+  uint32 *hash = reinterpret_cast<uint32*>(md_value);
+  for (size_t o = 0; o < 5; ++o) {
+    hash[o] = hash[o] << 16 | hash[o] >> 16;
+    hash[o] = (hash[o] << 8 & 0xff00ff00) | (hash[o] >> 8 & 0x00ff00ff);
+  }
+#endif
+
+  return ret;
+}
+
+void SHA1::Input(const char *mess, unsigned int length)
+{
+  if (!EVP_DigestUpdate(&m_md_ctx, mess, length))
+    throw std::runtime_error("EVP_DigestUpdate failed.");
+}
+
+void SHA1::Input(char mess)
+{
+  Input(&mess, 1);
+}
diff --git a/utils/sha1.h b/utils/sha1.h
new file mode 100644
index 0000000..6ea1f7d
--- /dev/null
+++ b/utils/sha1.h
@@ -0,0 +1,28 @@
+/*
+ * sha1.h
+ *
+ * (C) 2011, Ansgar Burchardt <ansgar at debian.org>
+ *
+ * This file may be used under the Artistic license.
+ */
+
+#ifndef _SHA1_H_
+#define _SHA1_H_
+
+#include "../simtypes.h"
+#include <openssl/evp.h>
+
+class SHA1
+{
+  public:
+    SHA1();
+    ~SHA1();
+    void Reset();
+    bool Result(unsigned char *md_value);
+    void Input(const char *mess, unsigned int length);
+    void Input(char mess);
+  private:
+    EVP_MD_CTX m_md_ctx;
+};
+
+#endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/simutrans.git



More information about the Pkg-games-commits mailing list