debian/0000755000000000000000000000000012265055141007167 5ustar debian/openlayer-config.10000644000000000000000000000543012264332567012525 0ustar '\" t .\" Title: OPENLAYER-CONFIG .\" Author: Georges Khaznadar .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 01/11/2014 .\" Manual: openlayer-config User Manual .\" Source: openlayer-config .\" Language: English .\" .TH "OPENLAYER\-CONFIG" "1" "01/11/2014" "openlayer-config" "openlayer-config User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" openlayer-config \- \- script to get information about the installed version of libopenlayer\&. .SH "SYNOPSIS" .HP \w'\fBopenlayer\-config\fR\ 'u \fBopenlayer\-config\fR [\fB\-\-example=\fR\fBthat\fR] [{\fB\-\-libs\fR}] [{\fB\-\-cflags\fR}] [{\fB\-\-version\fR}] .SH "DESCRIPTION" .PP \fBopenlayer\-config\fR is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use the openlayer library\&. It is intended to be used on Unix systems instead of the simple "\-lopenlayer" call\&. .SH "OPTIONS" .PP \fB\-\-libs\fR .RS 4 Print the linker flags that are necessary to link an openlayer program\&. .RE .PP \fB\-\-cflags\fR .RS 4 Print the compiler flags that are necessary to compile an openlayer program\&. .RE .PP \fB\-\-version\fR .RS 4 Print version information\&. .RE .SH "EXAMPLE" .PP \fBgcc \-o myprogram myprogram\&.o `openlayer\-config \-\-libs` \fR .SH "AUTHOR" .PP \fBGeorges Khaznadar\fR <\&georgesk@debian\&.org\&> .RS 4 Wrote this manpage for the Debian system\&. .RE .SH "COPYRIGHT" .br Copyright \(co 2014 Georges Khaznadar .br .PP This manual page was written for the Debian system (and may be used by others)\&. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation\&. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common\-licenses/GPL\&. .sp debian/patches/0000755000000000000000000000000012264344404010620 5ustar debian/patches/series0000644000000000000000000000006312264343521012033 0ustar changes-2014-01-06.patch harden.patch shared.patch debian/patches/shared.patch0000644000000000000000000000322412264344404013110 0ustar --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,12 @@ # ------------------------------------------------------- # User setable options # ------------------------------------------------------- -option(CREATE_STATIC_LIB "Make the library static?" on) +## libraries should be shared by default for Debian +if(UNIX AND NOT CYGWIN) + option(CREATE_STATIC_LIB "Make the library static?" off) +else(UNIX AND NOT CYGWIN) + option(CREATE_STATIC_LIB "Make the library static?" on) +endif(UNIX AND NOT CYGWIN) dependent_option(DISABLE_TTF "Disable TTF Support" off "FREETYPE_FOUND" on) if(NOT DISABLE_TTF) set(TTF_OK 1) @@ -158,6 +163,7 @@ add_subdirectory(utils/glyphkeeper) set(GLYPHKEEPER_LIB glyph-agl) endif(NOT ENABLE_INTERNAL_FONT) + endif(UNIX AND NOT CYGWIN) # ------------------------------------------------------- @@ -299,12 +305,24 @@ # ------------------------------------------------------- # Include directory # ------------------------------------------------------- +if(UNIX AND NOT CYGWIN) + set(FREETYPE_INCLUDE "/usr/include/freetype2") +endif(UNIX AND NOT CYGWIN) + include_directories(include ${CMAKE_BINARY_DIR}/include include/OpenLayer ${FREETYPE_INCLUDE}) # ------------------------------------------------------- # OpenLayer Library # ------------------------------------------------------- add_library (openlayer ${CREATE_STATIC_LIB} ${SOURCES}) +if(UNIX AND NOT CYGWIN) + SET_TARGET_PROPERTIES( + openlayer + PROPERTIES + SOVERSION 2 + VERSION 2.1.0 + ) +endif(UNIX AND NOT CYGWIN) # ------------------------------------------------------- # Create the library debian/patches/harden.patch0000644000000000000000000000072112264265521013104 0ustar Description: modifications made to harden the source files See: https://wiki.debian.org/Hardening --- a/src/Bitmap.cpp +++ b/src/Bitmap.cpp @@ -808,7 +808,7 @@ collisionPoly = 0; if( !Setup::IsScreenSetUp() ) { - allegro_message(( string( "Loading queued for bitmap: " ) + filename + "\n" ).c_str()); + allegro_message("Loading queued for bitmap: %s\n", filename); pendingLoad = new PendingFileLoad( filename ); return true; debian/patches/changes-2014-01-06.patch0000644000000000000000000001045412262531444014302 0ustar --- a/build/FindALLEGRO.cmake +++ b/build/FindALLEGRO.cmake @@ -14,6 +14,7 @@ FIND_PATH(ALLEGRO_INCLUDE_DIR allegro.h /usr/local/include /usr/include + /usr/include/allegro4 $ENV{MINGDIR}/include ) --- a/include/OpenLayer/Collisions.hpp +++ b/include/OpenLayer/Collisions.hpp @@ -20,6 +20,9 @@ }; +typedef std::pair< const Line&, const Line& > LinePair; + + class OL_LIB_DECLSPEC Collision { public: Collision( bool isCollision = false ) @@ -30,7 +33,14 @@ Collision( const Line &aSegment, const Line &bSegment ); - Collision( const std::vector< std::pair< Line, Line > *> &segmentLists ); +// GRRRRR erreur ! +// les occurences de std::vector< std::pair< Line, Line > *> posent de gros +// problèmes ilfaut changer ça ! + +// On pourrait essayer des std::vector< std::pair< const Line&, const Line& > *> +// à la place. + + Collision( const std::vector< LinePair * > &segmentLists ); Collision( const Vec2D &aNormal, const Vec2D &bNormal, const Vec2D &collisionPoint ) @@ -77,7 +87,7 @@ const Line GetSegment( CollidingObject objectID ); // Returns all colliding segments // - inline const std::vector< std::pair< Line, Line > *> &GetAllSegments() { + inline const std::vector< LinePair * > &GetAllSegments() { return segmentLists; } @@ -93,7 +103,7 @@ std::vector< Vec2D > points; - std::vector< std::pair< Line, Line > *> segmentLists; + std::vector< LinePair * > segmentLists; Vec2D *normals[(int) NUM_OBJS]; const static Line DEFAULT_SEGMENT; --- a/include/OpenLayer/VertexListCollision.hpp +++ b/include/OpenLayer/VertexListCollision.hpp @@ -31,7 +31,7 @@ thisIter++; - std::vector< std::pair< Line, Line > *> segmentLists; + std::vector< LinePair * > segmentLists; // Loop through each vertex // while( true ) { @@ -86,7 +86,7 @@ Line thisLine( thisVertex, thisPrev ); Line otherLine( otherVertex, otherPrev ); - segmentLists.push_back( new std::pair< Line, Line >( thisLine, otherLine )); + segmentLists.push_back( new LinePair( thisLine, otherLine )); /* return Collision( thisLine, otherLine );*/ --- a/src/Collisions.cpp +++ b/src/Collisions.cpp @@ -13,7 +13,7 @@ Collision:: Collision( const Line &aSegment, const Line &bSegment ) : isCollision( true ) { - segmentLists.push_back( new std::pair< Line, Line >( aSegment, bSegment )); + segmentLists.push_back( new LinePair(aSegment, bSegment)); normals[(int) OBJ_A] = 0; normals[(int) OBJ_B] = 0; @@ -22,13 +22,13 @@ Collision:: -Collision( const std::vector< std::pair< Line, Line > *> &segmentLists ) +Collision( const std::vector< LinePair * > &segmentLists ) : isCollision( true ), segmentLists( segmentLists ) { normals[(int) OBJ_A] = 0; normals[(int) OBJ_B] = 0; - for( std::vector< std::pair< Line, Line > *> ::const_iterator iter = segmentLists.begin(); + for( std::vector< LinePair * > ::const_iterator iter = segmentLists.begin(); iter != segmentLists.end(); iter++ ) { points.push_back((*iter)->first.GetIntersectionPoint((*iter)->second )); } @@ -106,7 +106,7 @@ } } - for( std::vector< std::pair< Line, Line > *> ::const_iterator iter = segmentLists.begin(); + for( std::vector< LinePair * > ::const_iterator iter = segmentLists.begin(); iter != segmentLists.end(); iter++ ) { delete *iter; } @@ -121,9 +121,9 @@ points.push_back( *iter ); } - for( std::vector< std::pair< Line, Line > *> ::const_iterator iter = c.segmentLists.begin(); + for( std::vector< LinePair * > ::const_iterator iter = c.segmentLists.begin(); iter != c.segmentLists.end(); iter++ ) { - segmentLists.push_back( new std::pair< Line, Line > (*(*iter))); + segmentLists.push_back( new std::pair< const Line&, const Line& > (*(*iter))); } normals[(int)OBJ_A] = ( c.normals[(int)OBJ_A] )? new Vec2D( *c.normals[(int)OBJ_A] ) : 0; --- a/src/Glyph.cpp +++ b/src/Glyph.cpp @@ -261,8 +261,8 @@ #ifdef USE_NEW_TTF if(faceLoaded) { - double rend_x=0; - double rend_y=0; + // double rend_x=0; // unused variable + // double rend_y=0; // unused variable std::ostringstream str; // Get extra arguments debian/libopenlayer2.dirs0000644000000000000000000000001012264272772012622 0ustar usr/lib debian/control0000644000000000000000000000233112264340643010574 0ustar Source: openlayer Section: devel Priority: extra Maintainer: Georges Khaznadar Build-Depends: debhelper (>= 8.0.0), cmake, hardening-wrapper, zlib1g-dev, libpng12-dev, liballegro4-dev, libxext-dev, libx11-dev, liballeggl4-dev, libgl1-mesa-dev, libglu1-mesa-dev, libfreetype6-dev Standards-Version: 3.9.5 Homepage: http://openlayer.berlios.de/ Package: libopenlayer2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: hardware accelerated 2D Graphics library OpenLayer is a hardware accelerated 2D Graphics library. It specifies a new api to be used alongside of Allegro and takes control of how the contents of the screen are rendered and uses OpenGL functions through AllegroGL to allow hardware acceleration. Package: libopenlayer-dev Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libopenlayer2 (= ${binary:Version}) Description: hardware accelerated 2D Graphics library : development files OpenLayer is a hardware accelerated 2D Graphics library. It specifies a new api to be used alongside of Allegro and takes control of how the contents of the screen are rendered and uses OpenGL functions through AllegroGL to allow hardware acceleration. debian/compat0000644000000000000000000000000212262530271010364 0ustar 8 debian/libopenlayer-dev.install0000644000000000000000000000005412264315377014030 0ustar usr/bin usr/include usr/lib/libopenlayer.so debian/libopenlayer2.install0000644000000000000000000000003112264325526013326 0ustar usr/lib/libopenlayer.so.*debian/libopenlayer-dev.manpages0000644000000000000000000000003112264332720014137 0ustar debian/openlayer-config.1debian/copyright0000644000000000000000000000440512265055010011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: openlayer Source: svn://svn.berlios.de/openlayer/trunk Files: * Copyright: 2007 Esa Tanskanen 2007 Miguel Gavidia 2007 Brady Eidson 2005 Peter Hull License: GPL-2.0+ Files: src/*png.c Copyright: 200x Peter Wang License: Public domain This file is hereby placed in the public domain. Files: utils/glyphkeeper/* Copyright: 2003-2007 Kirill Kryukov License: 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. Files: debian/* Copyright: 2014 Georges Khaznadar License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/source/0000755000000000000000000000000012262530271010466 5ustar debian/source/format0000644000000000000000000000001412262530271011674 0ustar 3.0 (quilt) debian/openlayer-config-man.xml0000644000000000000000000001375112264332562013736 0ustar .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname; Wrote this manpage for the Debian system.
&dhemail;
2014 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; - script to get information about the installed version of libopenlayer. &dhpackage; DESCRIPTION &dhpackage; is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use the openlayer library. It is intended to be used on Unix systems instead of the simple "-lopenlayer" call. OPTIONS Print the linker flags that are necessary to link an openlayer program. Print the compiler flags that are necessary to compile an openlayer program. Print version information. EXAMPLE gcc -o myprogram myprogram.o `openlayer-config --libs`
debian/changelog0000644000000000000000000000110012265055122011030 0ustar openlayer (2.1-1) unstable; urgency=low * Initial release (Closes: #735016) * modified files related to src/Collisions.cpp, in order to prevent a compilation error for recent versions of g++ (mainly made more explicit a typedef based on templates). * modified CMakefile.txt to follow the Debian Policy for shared libraries * fixed an error to make possible the hardening options * improved the file d/copyright, thanks to Thorsten Alteholz -- Georges Khaznadar Mon, 06 Jan 2014 14:33:43 +0100 debian/rules0000755000000000000000000000077412264315212010254 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 DESTDIR = $(CURDIR)/debian/cdcover %: dh $@ debian/libopenlayer-dev.dirs0000644000000000000000000000004612264261637013323 0ustar usr/bin usr/include/OpenLayer usr/lib