[simutrans] 01/01: Remove *.patch & *.diff from .gitignore; refresh patches

Jörg Frings-Fürst jff-guest at moszumanska.debian.org
Mon Nov 9 15:08:26 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 1c163065252c29337e4523e7081939072cb65231
Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
Date:   Mon Nov 9 16:08:05 2015 +0100

    Remove *.patch & *.diff from .gitignore; refresh patches
---
 .gitignore                                    |   2 -
 debian/changelog                              |   2 +-
 debian/patches/0005-typo.patch                |  18 +++
 debian/patches/0100-path_for_game-data.patch  |  22 ++++
 debian/patches/0105-revert-svn-1937.diff      |  20 +++
 debian/patches/0110-sha1-replacement.diff     | 109 ++++++++++++++++
 debian/patches/0500-config.diff               | 181 ++++++++++++++++++++++++++
 debian/patches/0505-link-less-libraries.diff  |  19 +++
 debian/patches/0510-missing_uncommon_mk.patch |  66 ++++++++++
 9 files changed, 436 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1c0f60b..930dae5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,7 +23,5 @@
 *.vcxproj.*
 /ipch/*
 *.*sdf
-*.diff
-*.patch
 *.log
 /doxygen
diff --git a/debian/changelog b/debian/changelog
index 5fdf1a5..bd13888 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-simutrans (120.0.1+repack-1) unstable; urgency=medium
+simutrans (120.1.1+repack-1) unstable; urgency=medium
 
   [ Jörg Frings-Fürst ]
   * New upstream release (Closes: #708837).
diff --git a/debian/patches/0005-typo.patch b/debian/patches/0005-typo.patch
new file mode 100644
index 0000000..7d75bbc
--- /dev/null
+++ b/debian/patches/0005-typo.patch
@@ -0,0 +1,18 @@
+Description: Correct typos
+Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
+Last-Update: 2015-05-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/squirrel/sqstdlib/sqstdstring.cc
+===================================================================
+--- trunk.orig/squirrel/sqstdlib/sqstdstring.cc
++++ trunk/squirrel/sqstdlib/sqstdstring.cc
+@@ -87,7 +87,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQIn
+ 		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/debian/patches/0100-path_for_game-data.patch b/debian/patches/0100-path_for_game-data.patch
new file mode 100644
index 0000000..e8efff7
--- /dev/null
+++ b/debian/patches/0100-path_for_game-data.patch
@@ -0,0 +1,22 @@
+Description: Set path for game data
+ based on path_for_game-data.diff
+Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
+Last-Update: 2015-05-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/simmain.cc
+===================================================================
+--- trunk.orig/simmain.cc
++++ trunk/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/debian/patches/0105-revert-svn-1937.diff b/debian/patches/0105-revert-svn-1937.diff
new file mode 100644
index 0000000..495b3ef
--- /dev/null
+++ b/debian/patches/0105-revert-svn-1937.diff
@@ -0,0 +1,20 @@
+From: Ansgar Burchardt
+Date: Sat, 17 Jan 2009 18:34:59 +0100
+Subject: Use ~/.simutrans for savegames
+
+This patch reverts SVN commit 1937 to make simutrans use ~/.simutrans for
+savegames instead of ~/simutrans.
+
+Index: trunk/simsys.cc
+===================================================================
+--- trunk.orig/simsys.cc
++++ trunk/simsys.cc
+@@ -168,7 +168,7 @@ char const* dr_query_homedir()
+ 	find_directory(B_USER_DIRECTORY, &userDir);
+ 	sprintf(buffer, "%s/simutrans", userDir.Path());
+ #else
+-	sprintf(buffer, "%s/simutrans", getenv("HOME"));
++	sprintf(buffer, "%s/.simutrans", getenv("HOME"));
+ #endif
+ 
+ 	dr_mkdir(buffer);
diff --git a/debian/patches/0110-sha1-replacement.diff b/debian/patches/0110-sha1-replacement.diff
new file mode 100644
index 0000000..18ff6f0
--- /dev/null
+++ b/debian/patches/0110-sha1-replacement.diff
@@ -0,0 +1,109 @@
+From: Ansgar Burchardt <ansgar at debian.org>
+Date: Wed, 16 Feb 2011 21:28:04 +0100
+Subject: Provide replacement for non-free SHA-1 implementation
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile
++++ trunk/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+
+Index: trunk/utils/sha1.cc
+===================================================================
+--- /dev/null
++++ trunk/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);
++}
+Index: trunk/utils/sha1.h
+===================================================================
+--- /dev/null
++++ trunk/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
diff --git a/debian/patches/0500-config.diff b/debian/patches/0500-config.diff
new file mode 100644
index 0000000..1baaf51
--- /dev/null
+++ b/debian/patches/0500-config.diff
@@ -0,0 +1,181 @@
+Build configuration for Debian
+
+ at DPATCH@
+
+Index: trunk/makeobj/Makefile
+===================================================================
+--- trunk.orig/makeobj/Makefile
++++ trunk/makeobj/Makefile
+@@ -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
+ 
+Index: trunk/config.default
+===================================================================
+--- /dev/null
++++ trunk/config.default
+@@ -0,0 +1,77 @@
++#
++# to compile:
++# copy this file to config.default and adjust the settings
++#
++
++#BACKEND = allegro
++#BACKEND = gdi
++#BACKEND = sdl
++BACKEND = mixer_sdl
++#BACKEND = x11
++#BACKEND = posix
++
++#COLOUR_DEPTH = 0
++#COLOUR_DEPTH = 8
++COLOUR_DEPTH = 16
++
++#OSTYPE = amiga
++#OSTYPE = beos
++#OSTYPE = cygwin
++#OSTYPE = freebsd
++#OSTYPE = haiku
++OSTYPE = linux
++#OSTYPE = mingw
++#OSTYPE = mac
++
++#DEBUG = 3    # Level 1-3, higher number means more debug-friendly, see Makefile
++#OPTIMISE = 1 # Add umpteen optimisation flags
++#PROFILE = 1
++ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
++  OPTIMISE=
++else
++  OPTIMISE=1
++endif
++ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
++  DEBUG=1
++endif
++
++#WITH_REVISION = 1 # adds the revision from svn; required for networkgames
++# if you do not use SVN, add -DREVISION="1234" to the FLAGS below
++
++# Define these as empty strings, if you don't have the respective config program
++#ALLEGRO_CONFIG = allegro-config
++#PNG_CONFIG     = pkg-config libpng
++SDL_CONFIG = sdl-config
++
++VERBOSE = 1
++
++# The following useful conditional compilation flags exist
++#
++# Needed to compile:
++# USE_C: no assembler for copying (required for not using GCC on x86)
++# SIM_BIG_ENDIAN: MUST be set for PPC/Motorola byte order! (old mac, amiga)
++#
++# Changing appearance:
++# USE_SOFTPOINTER: emulate mouse pointer (set automatically in Makefile)
++# HALF_HEIGHT: Enables half height tiles (8 pixel instead 16)
++#
++# Useful for debugging:
++# DEBUG_ROUTES: show routing calculation information in minimap
++# SHOW_FORE_GRUND: show which objects are drawn as foreground
++# DEBUG_FLUSH_BUFFER: show the dirty areas on the screen
++#
++# Following flags alter game engine (and are off for standard builds)
++# OTTD_LIKE: Enables half height tiles and crossconnects all industries
++# AUTOMATIC_BRIDGES and AUTOMATIC_TUNNELS: will be built also for player
++# AUTOJOIN_PUBLIC: stations next to a public stop will be joined to it
++# MAX_CHOOSE_BLOCK_TILES=xxx: maximum distance between choose signal and a
++#    target (undefined means no limit)
++# USE_DIFFERENT_WIND: different airplane approach directions over the map
++# DESTINATION_CITYCARS: Citycars can have a destination (not recommended)
++#
++# In order to use the flags, add a line like this: (-Dxxx)
++# FLAGS = -DUSE_C
++
++ifneq ($(shell dpkg-architecture -qDEB_BUILD_ARCH),i386)
++  FLAGS += -DUSE_C
++endif
+Index: trunk/simtypes.h
+===================================================================
+--- trunk.orig/simtypes.h
++++ trunk/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."
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile
++++ trunk/Makefile
+@@ -71,14 +71,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)
diff --git a/debian/patches/0505-link-less-libraries.diff b/debian/patches/0505-link-less-libraries.diff
new file mode 100644
index 0000000..4e1abb1
--- /dev/null
+++ b/debian/patches/0505-link-less-libraries.diff
@@ -0,0 +1,19 @@
+From: Ansgar Burchardt <ansgar at debian.org>
+Date: Wed, 16 Feb 2011 23:01:47 +0100
+Subject: Link less libraries into makeobj
+
+This fixes the following warnings from dpkg-shlibdeps:
+
+  dpkg-shlibdeps: warning: dependency on libz.so.1 could be avoided if "debian/simutrans-makeobj/usr/games/makeobj" were not uselessly linked against it (they use none of its symbols).
+  dpkg-shlibdeps: warning: dependency on libbz2.so.1.0 could be avoided if "debian/simutrans-makeobj/usr/games/makeobj" were not uselessly linked against it (they use none of its symbols).
+--- simutrans.orig/makeobj/Makefile
++++ simutrans/makeobj/Makefile
+@@ -21,7 +21,7 @@
+ CFLAGS += -DMAKEOBJ
+ CXXFLAGS += -DMAKEOBJ
+ 
+-STD_LIBS += -lz -lbz2 -lpng
++STD_LIBS += -lpng
+ 
+ ifeq ($(OSTYPE),cygwin)
+   OS_INC   ?= -I/usr/include/mingw
diff --git a/debian/patches/0510-missing_uncommon_mk.patch b/debian/patches/0510-missing_uncommon_mk.patch
new file mode 100644
index 0000000..1308bfa
--- /dev/null
+++ b/debian/patches/0510-missing_uncommon_mk.patch
@@ -0,0 +1,66 @@
+Description: Add missing uncommon.mk
+Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
+Last-Update: 2015-10-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/uncommon.mk
+===================================================================
+--- /dev/null
++++ trunk/uncommon.mk
+@@ -0,0 +1,56 @@
++# Source files located in ../
++OBJS := $(patsubst %, $(BUILDDIR)/%-$(TOOL).o, $(basename $(patsubst ../%, %,$(filter ../%,$(SOURCES)))))
++# Source files located in current directory
++OBJS += $(patsubst %, $(BUILDDIR)/$(TOOL)/%-$(TOOL).o, $(basename $(filter-out ../%,$(SOURCES))))
++DEPS := $(patsubst %.o, %.d, $(OBJS))
++DIRS := $(sort $(dir $(OBJS)))
++
++# Make build directories
++DUMMY := $(shell mkdir -p $(DIRS))
++
++.PHONY: clean clean-prog
++
++ifeq ($(VERBOSE),)
++  Q = @
++else
++  Q =
++endif
++
++all: $(TOOL_PROGDIR)/$(PROG)
++
++$(TOOL_PROGDIR)/$(PROG): $(OBJS)
++	@echo "===> LD  $@"
++	$(Q)$(CXX) $(OBJS) $(LDFLAGS) $(STD_LIBS) $(LIBS) -o $(TOOL_PROGDIR)/$(PROG)
++
++clean-prog:
++	$(Q)rm -f $(TOOL_PROGDIR)/$(PROG)
++
++clean:
++	@echo "===> Cleaning up"
++	$(Q)rm -f $(OBJS)
++	$(Q)rm -f $(DEPS)
++	$(Q)rm -f $(TOOL_PROGDIR)/$(PROG)
++
++-include $(DEPS)
++
++# Silence stale header dependency errors
++%.h:
++	@true
++
++# Source files located in ../
++$(BUILDDIR)/%-$(TOOL).o: ../%.c
++	@echo "===> CC  $<"
++	$(Q)$(CC) $(CCFLAGS) -c -MMD -o $@ $<
++
++$(BUILDDIR)/%-$(TOOL).o: ../%.cc
++	@echo "===> CXX $<"
++	$(Q)$(CXX) $(CXXFLAGS) -c -MMD -o $@ $<
++
++# Source files located in current directory
++$(BUILDDIR)/$(TOOL)/%-$(TOOL).o: %.c
++	@echo "===> CC  $<"
++	$(Q)$(CC) $(CCFLAGS) -c -MMD -o $@ $<
++
++$(BUILDDIR)/$(TOOL)/%-$(TOOL).o: %.cc
++	@echo "===> CXX $<"
++	$(Q)$(CXX) $(CXXFLAGS) -c -MMD -o $@ $<

-- 
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