Commit 007d20f7 authored by Ricardo Mones's avatar Ricardo Mones

Import Debian changes 0.7.0+0-1

epiphany (0.7.0+0-1) unstable; urgency=medium

  * Repackaged upstream version 0.7.0 to remove embedded library
    and unsafe symlinks, see README.source (thanks lintian!)
  * debian/control, debian/patches/use-shared-tinyxml.diff
  - Add patch to be able to build against shared tinyxml library
  * debian/rules, debian/compat, debian/control
  - Switch to debhelper sequencer, set compat level to 9 and
    enable all hardening options except PIE
  * debian/copyright
  - Update year range
  * debian/control
  - Updated Standards-Version to 3.9.6 (no other changes)
  - Remove Conflicts/Replaces with version beneath oldstable
  - Moved from private svn to git at collab-maint, set Vcs-* URLs
  * debian/epiphany-game.desktop
  - Add some relevant Keywords
parents 4a27be27 621f1e41
README for epiphany
-------------------
Original source package contains an embedded copy of an old tinyxml
library, and also symlinks to automake-10 tools. All of this cruft has
been removed by repackaging. This of course means that supplied orig
tarball cannot be built standalone.
To make it buildable again:
a) (as intended by upstream) the tinyxml files can be copied back
to the removed src/tinyxml subdirectory. Checked to work with
Debian version 2.6.2-2 (but older ones may also work).
b) (the Debian way) just apply the patch “use-shared-tinyxml.diff”
to build it against the tinyxml shared library. This needs
libtinyxml-dev installed and also to run “autoreconf -i” before
configure to recover the removed autotools scripts.
Happy hacking!
--
Ricardo Mones <mones@debian.org>
epiphany (0.7.0+0-1) unstable; urgency=medium
* Repackaged upstream version 0.7.0 to remove embedded library
and unsafe symlinks, see README.source (thanks lintian!)
* debian/control, debian/patches/use-shared-tinyxml.diff
- Add patch to be able to build against shared tinyxml library
* debian/rules, debian/compat, debian/control
- Switch to debhelper sequencer, set compat level to 9 and
enable all hardening options except PIE
* debian/copyright
- Update year range
* debian/control
- Updated Standards-Version to 3.9.6 (no other changes)
- Remove Conflicts/Replaces with version beneath oldstable
- Moved from private svn to git at collab-maint, set Vcs-* URLs
* debian/epiphany-game.desktop
- Add some relevant Keywords
-- Ricardo Mones <mones@debian.org> Thu, 09 Oct 2014 01:35:54 +0200
epiphany (0.7.0-6) unstable; urgency=low
* debian/epiphany-game.6
......
......@@ -3,10 +3,12 @@ Section: games
Priority: optional
Maintainer: Joerg Jaspert <joerg@debian.org>
Uploaders: Ricardo Mones <mones@debian.org>
Build-Depends: debhelper (>> 5), automake, libsdl1.2-dev (>= 1.2.13-4),
libsdl-mixer1.2-dev
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 9), automake, libsdl1.2-dev (>= 1.2.13-4),
libsdl-mixer1.2-dev, libtinyxml-dev, dh-autoreconf
Standards-Version: 3.9.6
Homepage: http://epiphany.sourceforge.net/site/
Vcs-Git: git://anonscm.debian.org/collab-maint/epiphany.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/epiphany.git
Package: epiphany
Architecture: any
......@@ -24,8 +26,6 @@ Description: clone of Boulder Dash game
Package: epiphany-data
Architecture: all
Depends: ${misc:Depends}
Conflicts: epiphany (<< 0.5.1-2)
Replaces: epiphany (<< 0.5.1-2)
Recommends: epiphany (>= ${binary:Version})
Description: required data files for epiphany game
This package provides all architecture-independent data files
......
......@@ -12,8 +12,8 @@ Copyright: 2002-2003 by Giuseppe "denever" Martino <rdmartin@infinito.it>
License: GPL-2+
Files: debian/*
Copyright: 2002-2012 by Joerg Jaspert <joerg@debian.org>
2006-2012 by Ricardo Mones <mones@debian.org>
Copyright: 2002-2014 by Joerg Jaspert <joerg@debian.org>
2006-2014 by Ricardo Mones <mones@debian.org>
License: GPL-2+
License: GPL-2
......
......@@ -7,6 +7,7 @@ GenericName[de]=Spiel
Comment=Collect valuable minerals, while avoiding being hit by a falling boulder or a bomb
Comment[es]=Recolecta valiosos minerales mientras evitas que te alcancen los bloques de roca que caen o las bombas
Comment[de]=Wertvolle Mineralien sammeln und vermeiden, von einem fallenden Stein oder einer Bombe getroffen zu werden
Keywords=collect;mineral;gravity;puzzle;mining;
Type=Application
Exec=epiphany-game
Icon=epiphany-game
......
use-shared-tinyxml.diff
Subject: build epiphany against shared tinyxml library
From: Ricardo Mones <mones@debian.org>
Forwarded: no
Last-Update: 2014-10-09
diff --git a/configure.in b/configure.in
index bec2e67..8387087 100644
--- a/configure.in
+++ b/configure.in
@@ -6,8 +6,8 @@ AC_PROG_CXX
AC_PROG_INSTALL
AC_CHECK_HEADER(SDL/SDL.h,, [echo "Please install SDL from http://www.libsdl.org";exit])
AC_CHECK_HEADER(SDL/SDL_mixer.h,, [echo "Please install SDL_mixer from http://www.libsdl.org/projects/SDL_mixer/";exit])
-
-
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADER(tinyxml.h,, [echo "Please install tinyxml library from http://www.grinninglizard.com/tinyxml/";exit])
AC_CHECK_LIB( SDL, main,, [
@@ -24,6 +24,13 @@ AC_CHECK_LIB( SDL, main,, [
exit
])
+AC_CHECK_LIB( tinyxml, main,, [
+ echo "tinyxml installed, but -ltinyxml not found, run 'ldconfig' and try again,"
+ echo "if that doesn't help have a look at the file config.log and look into"
+ echo "the FAQ."
+ exit
+ ])
+
AH_TEMPLATE(DEBUG_MODE)
[CXXFLAGS=""]
diff --git a/src/Makefile.am b/src/Makefile.am
index cfc2687..9ee1bc1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,11 +14,10 @@ epiphany_game_SOURCES = sfx.cpp main.cpp level.cpp sample.cpp entity.cpp \
screen.cpp sprite.cpp menu.cpp game.cpp surface_manager.cpp input.cpp fonts/font.cpp \
fonts/font_factory.cpp fonts/font_manager.cpp surface.cpp resource_factory.cpp \
menu_entry_ranged.cpp menu_list_epiphany.cpp menu_list_options.cpp \
- tinyxml/tinystr.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinyxmlparser.cpp \
- tinyxml/tinyxml.cpp menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
+ menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
commandline_configuration.cpp
-epiphany_game_LDADD = -lSDL -lSDL_mixer
+epiphany_game_LDADD = -lSDL -lSDL_mixer -ltinyxml
noinst_HEADERS = entity_type.h emdlparser.h levelmap.h \
@@ -35,6 +34,6 @@ noinst_HEADERS = entity_type.h emdlparser.h levelmap.h \
entities/entity_gem.h entities/entity_emerald.h entities/entity_tomato.h \
resource_factory.h sprite.h epimap.h entity.h \
menu_entry.h menu_entry_simple.h menu_entry_ranged.h menu_list.h \
- menu_list_epiphany.h menu_list_options.h tinyxml/tinystr.h \
- tinyxml/tinyxml.h menu_entry_bool.h music_manager.h abstract_configuration.h \
- xml_configuration.h commandline_configuration.h
\ No newline at end of file
+ menu_list_epiphany.h menu_list_options.h \
+ menu_entry_bool.h music_manager.h abstract_configuration.h \
+ xml_configuration.h commandline_configuration.h
diff --git a/src/epiconfig.cpp b/src/epiconfig.cpp
index aa62bed..db3e60d 100644
--- a/src/epiconfig.cpp
+++ b/src/epiconfig.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
#include "epiconfig.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include <cstdlib>
#include "sprite.h"
diff --git a/src/xml_configuration.cpp b/src/xml_configuration.cpp
index 7e36af5..03d5a17 100644
--- a/src/xml_configuration.cpp
+++ b/src/xml_configuration.cpp
@@ -3,7 +3,7 @@
#include <string>
#include <cstring>
#include <cassert>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#!/usr/bin/make -f
#export DH_VERBOSE=1
PACKAGE := epiphany
pwd=$(shell pwd)
TOPDIR := $(shell pwd)
t = ${TOPDIR}/debian/epiphany
d = ${TOPDIR}/debian/epiphany-data
UPSTREAM_VERSION = $(shell /bin/bash ${TOPDIR}/debian/get-ups-ver.sh ${TOPDIR})
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure-stamp: configure
for a in depcomp missing install-sh ; \
do ln -sf /usr/share/automake-*/$$a ; \
done
dh_testdir
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
build-indep: build-stamp
%:
dh $@ --with autoreconf
build-stamp: configure-stamp
dh_testdir
$(MAKE) # DEBUGFLAGS="" OPTFLAGS='$(CFLAGS)'
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) clean
dh_clean
install:
override_dh_install:
dh_testdir
dh_testroot
dh_clean -k
dh_prep
dh_installdirs
cp src/epiphany-game $(t)/usr/games/epiphany-game
rm -f data/maps/.cvsignore data/gfx/.cvsignore data/sfx/.cvsignore
......@@ -62,24 +23,6 @@ install:
cp debian/epiphany-game.xpm $(t)/usr/share/pixmaps
cp debian/epiphany-game.desktop $(t)/usr/share/applications
binary-indep:
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_installman
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
override_dh_gencontrol:
dh_gencontrol -- -VUpstream-Version=$(UPSTREAM_VERSION)
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
/usr/share/automake-1.10/depcomp
\ No newline at end of file
/usr/share/automake-1.10/install-sh
\ No newline at end of file
/usr/share/automake-1.10/missing
\ No newline at end of file
/*
www.sourceforge.net/projects/tinyxml
Original file by Yves Berquin.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#include "tinyxml.h"
#ifndef TIXML_USE_STL
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "tinystr.h"
// TiXmlString constructor, based on a C string
TiXmlString::TiXmlString (const char* instring)
{
size_t newlen;
char * newstring;
if (!instring)
{
allocated = 0;
cstring = NULL;
current_length = 0;
return;
}
newlen = strlen (instring) + 1;
newstring = new char [newlen];
memcpy (newstring, instring, newlen);
// strcpy (newstring, instring);
allocated = newlen;
cstring = newstring;
current_length = newlen - 1;
}
// TiXmlString copy constructor
TiXmlString::TiXmlString (const TiXmlString& copy)
{
size_t newlen;
char * newstring;
// Prevent copy to self!
if ( &copy == this )
return;
if (! copy . allocated)
{
allocated = 0;
cstring = NULL;
current_length = 0;
return;
}
newlen = copy . length () + 1;
newstring = new char [newlen];
// strcpy (newstring, copy . cstring);
memcpy (newstring, copy . cstring, newlen);
allocated = newlen;
cstring = newstring;
current_length = newlen - 1;
}
// TiXmlString = operator. Safe when assign own content
void TiXmlString ::operator = (const char * content)
{
size_t newlen;
char * newstring;
if (! content)
{
empty_it ();
return;
}
newlen = strlen (content) + 1;
newstring = new char [newlen];
// strcpy (newstring, content);
memcpy (newstring, content, newlen);
empty_it ();
allocated = newlen;
cstring = newstring;
current_length = newlen - 1;
}
// = operator. Safe when assign own content
void TiXmlString ::operator = (const TiXmlString & copy)
{
size_t newlen;
char * newstring;
if (! copy . length ())
{
empty_it ();
return;
}
newlen = copy . length () + 1;
newstring = new char [newlen];
// strcpy (newstring, copy . c_str ());
memcpy (newstring, copy . c_str (), newlen);
empty_it ();
allocated = newlen;
cstring = newstring;
current_length = newlen - 1;
}
// append a const char * to an existing TiXmlString
void TiXmlString::append( const char* str, size_t len )
{
char * new_string;
size_t new_alloc, new_size, size_suffix;
// don't use strlen - it can overrun the len passed in!
const char* p = str;
size_suffix = 0;
while ( *p && size_suffix < (unsigned)len )
{
++p;
++size_suffix;
}
if ( !size_suffix)
return;
new_size = length () + size_suffix + 1;
// check if we need to expand
if (new_size > allocated)
{
// compute new size
new_alloc = assign_new_size (new_size);
// allocate new buffer
new_string = new char [new_alloc];
new_string [0] = 0;
// copy the previous allocated buffer into this one
if (allocated && cstring)
// strcpy (new_string, cstring);
memcpy (new_string, cstring, length ());
// append the suffix. It does exist, otherwize we wouldn't be expanding
// strncat (new_string, str, len);
memcpy (new_string + length (),
str,
size_suffix);
// return previsously allocated buffer if any
if (allocated && cstring)
delete [] cstring;
// update member variables
cstring = new_string;
allocated = new_alloc;
}
else
{
// we know we can safely append the new string
// strncat (cstring, str, len);
memcpy (cstring + length (),
str,
size_suffix);
}
current_length = new_size - 1;
cstring [current_length] = 0;
}
// append a const char * to an existing TiXmlString
void TiXmlString::append( const char * suffix )
{
char * new_string;
size_t new_alloc, new_size;
new_size = length () + strlen (suffix) + 1;
// check if we need to expand
if (new_size > allocated)
{
// compute new size
new_alloc = assign_new_size (new_size);
// allocate new buffer
new_string = new char [new_alloc];
new_string [0] = 0;
// copy the previous allocated buffer into this one
if (allocated && cstring)
memcpy (new_string, cstring, 1 + length ());
// strcpy (new_string, cstring);
// append the suffix. It does exist, otherwize we wouldn't be expanding
// strcat (new_string, suffix);
memcpy (new_string + length (),
suffix,
strlen (suffix) + 1);
// return previsously allocated buffer if any
if (allocated && cstring)
delete [] cstring;
// update member variables
cstring = new_string;
allocated = new_alloc;
}
else
{
// we know we can safely append the new string
// strcat (cstring, suffix);
memcpy (cstring + length (),
suffix,
strlen (suffix) + 1);
}
current_length = new_size - 1;
}
// Check for TiXmlString equuivalence
//bool TiXmlString::operator == (const TiXmlString & compare) const
//{
// return (! strcmp (c_str (), compare . c_str ()));
//}
//unsigned TiXmlString::length () const
//{
// if (allocated)
// // return strlen (cstring);
// return current_length;
// return 0;
//}
unsigned TiXmlString::find (char tofind, unsigned offset) const
{
char * lookup;
if (offset >= length ())
return (unsigned) notfound;
for (lookup = cstring + offset; * lookup; lookup++)
if (* lookup == tofind)
return (unsigned)(lookup - cstring);
return (unsigned) notfound;
}
bool TiXmlString::operator == (const TiXmlString & compare) const
{
if ( allocated && compare.allocated )
{
assert( cstring );
assert( compare.cstring );
return ( strcmp( cstring, compare.cstring ) == 0 );
}
else if ( length() == 0 && compare.length() == 0 )
{
return true;
}
return false;
}
bool TiXmlString::operator == (const char* compare) const
{
if ( allocated && compare && *compare )
{
assert( cstring );
return ( strcmp( cstring, compare ) == 0 );
}
else if ( length() == 0 && (!compare || !*compare ) ) // this is a little dubious, but try to duplicate behavior in other operator==
{
return true;
}
return false;
}
bool TiXmlString::operator < (const TiXmlString & compare) const
{
if ( allocated && compare.allocated )
{
assert( cstring );
assert( compare.cstring );
return ( strcmp( cstring, compare.cstring ) > 0 );
}
return false;
}
bool TiXmlString::operator > (const TiXmlString & compare) const
{
if ( allocated && compare.allocated )
{
assert( cstring );
assert( compare.cstring );
return ( strcmp( cstring, compare.cstring ) < 0 );
}
return false;
}
#endif // TIXML_USE_STL
/*
www.sourceforge.net/projects/tinyxml
Original file by Yves Berquin.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#include "tinyxml.h"
#ifndef TIXML_USE_STL
#ifndef TIXML_STRING_INCLUDED
#define TIXML_STRING_INCLUDED
#ifdef _MSC_VER
#pragma warning( disable : 4530 )
#pragma warning( disable : 4786 )
#endif
#include <assert.h>
/*
TiXmlString is an emulation of the std::string template.
Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
Only the member functions relevant to the TinyXML project have been implemented.
The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
a string and there's no more room, we allocate a buffer twice as big as we need.
*/
class TiXmlString
{
public :
// TiXmlString constructor, based on a string, mark explicit to force
// us to find unnecessary casting.
explicit TiXmlString (const char * instring);
// TiXmlString empty constructor
TiXmlString ()
{
allocated = 0;
cstring = NULL;
current_length = 0;
}
// TiXmlString copy constructor
explicit TiXmlString (const TiXmlString& copy);
// TiXmlString destructor
~ TiXmlString ()
{
empty_it ();
}
// Convert a TiXmlString into a classical char *
const char * c_str () const
{
if (allocated)
return cstring;
return "";
}
// Return the length of a TiXmlString
size_t length () const
{
return ( allocated ) ? current_length : 0;
}
// TiXmlString = operator
void operator = (const char * content);
// = operator
void operator = (const TiXmlString & copy);
// += operator. Maps to append
TiXmlString& operator += (const char * suffix)
{
append (suffix);
return *this;
}
// += operator. Maps to append
TiXmlString& operator += (char single)
{
append (single);
return *this;
}
// += operator. Maps to append
TiXmlString& operator += (TiXmlString & suffix)
{
append (suffix);
return *this;
}
bool operator == (const TiXmlString & compare) const;
bool operator == (const char* compare) const;
bool operator < (const TiXmlString & compare) const;
bool operator > (const TiXmlString & compare) const;
// Checks if a TiXmlString is empty
bool empty () const
{
return length () ? false : true;
}
// single char extraction
const char& at (unsigned index) const
{
assert( index < length ());
return cstring [index];
}
// find a char in a string. Return TiXmlString::notfound if not found
unsigned find (char lookup) const
{
return find (lookup, 0);
}
// find a char in a string from an offset. Return TiXmlString::notfound if not found
unsigned find (char tofind, unsigned offset) const;
/* Function to reserve a big amount of data when we know we'll need it. Be aware that this
function clears the content of the TiXmlString if any exists.
*/
void reserve (unsigned size)
{
empty_it ();
if (size)
{
allocated = size;
cstring = new char [size];
cstring [0] = 0;
current_length = 0;
}
}
// [] operator
char& operator [] (unsigned index) const
{
assert( index < length ());
return cstring [index];
<