[simutrans] 01/01: quilt pop -a
Jörg Frings-Fürst
jff-guest at moszumanska.debian.org
Sun Oct 4 15:24:42 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 eabcd3ee40f5913954eda8ad8bc013354872f718
Author: Jörg Frings-Fürst <debian at jff-webhosting.net>
Date: Sun Oct 4 17:24:27 2015 +0200
quilt pop -a
---
.pc/applied-patches | 6 -----
Makefile | 23 ++++++++---------
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 ---------------------
9 files changed, 27 insertions(+), 127 deletions(-)
diff --git a/.pc/applied-patches b/.pc/applied-patches
deleted file mode 100644
index c3d4641..0000000
--- a/.pc/applied-patches
+++ /dev/null
@@ -1,6 +0,0 @@
-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 7c69589..aa0d57b 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,6 @@ 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+
@@ -75,14 +72,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)
@@ -135,8 +132,8 @@ ifneq ($(WITH_REVISION),)
endif
endif
-CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -D_FORTIFY_SOURCE=2 $(FLAGS)
-CCFLAGS += -Wstrict-prototypes -D_FORTIFY_SOURCE=2
+CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
+CCFLAGS += -Wstrict-prototypes
SOURCES += bauer/brueckenbauer.cc
diff --git a/makeobj/Makefile b/makeobj/Makefile
index 91b7e1e..10dd957 100644
--- a/makeobj/Makefile
+++ b/makeobj/Makefile
@@ -21,7 +21,7 @@ LDFLAGS += $(PNG_LDFLAGS)
CFLAGS += -DMAKEOBJ
CXXFLAGS += -DMAKEOBJ
-STD_LIBS += -lpng
+STD_LIBS += -lz -lbz2 -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 -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)
+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)
# SOLO_SOURCES contains files which are unique to makeobj;
# SHARED_SOURCES contains those with the exact same object code in makeobj and simutrans;
@@ -126,7 +126,6 @@ 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 0722034..b249961 100644
--- a/simmain.cc
+++ b/simmain.cc
@@ -486,9 +486,8 @@ 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, "/usr/share/games/simutrans/");
+ strcpy( env_t::program_dir, argv[0] );
+ *(strrchr( env_t::program_dir, path_sep[0] )+1) = 0;
#ifdef __APPLE__
// change working directory from binary dir to bundle dir
diff --git a/simsys.cc b/simsys.cc
index d5cb53e..e4dc228 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 dfa641f..cedbbec 100644
--- a/simtypes.h
+++ b/simtypes.h
@@ -8,13 +8,6 @@
#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 84c61c6..b2efa41 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 parameters for the given format string"));
+ return sq_throwerror(v,_SC("not enough paramters 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
deleted file mode 100644
index aaf9c06..0000000
--- a/utils/sha1.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 6ea1f7d..0000000
--- a/utils/sha1.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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