summaryrefslogtreecommitdiff
path: root/games/pingus
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-11-23 12:35:01 +0000
committerjoerg <joerg@pkgsrc.org>2012-11-23 12:35:01 +0000
commit543f88ae7f51cff0877fce26fbdc7fbf8ca5f0c6 (patch)
treeb2c753ef122408402d0727d145c887aa0754becb /games/pingus
parentbc61b56c599dafa0d6bae6024fd00eade2f95d68 (diff)
downloadpkgsrc-543f88ae7f51cff0877fce26fbdc7fbf8ca5f0c6.tar.gz
Honour buildlink. Request C++11 with clang. Fix C++ usage.
Diffstat (limited to 'games/pingus')
-rw-r--r--games/pingus/Makefile20
-rw-r--r--games/pingus/distinfo8
-rw-r--r--games/pingus/patches/patch-aa5
-rw-r--r--games/pingus/patches/patch-src_font.cpp13
-rw-r--r--games/pingus/patches/patch-src_lisp_getters.hpp13
-rw-r--r--games/pingus/patches/patch-src_pingus__main.cpp13
-rw-r--r--games/pingus/patches/patch-src_pingus__menu.cpp13
7 files changed, 78 insertions, 7 deletions
diff --git a/games/pingus/Makefile b/games/pingus/Makefile
index 45e8511c31b..ac6d1b18240 100644
--- a/games/pingus/Makefile
+++ b/games/pingus/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2012/10/06 11:54:49 asau Exp $
+# $NetBSD: Makefile,v 1.9 2012/11/23 12:35:01 joerg Exp $
DISTNAME= pingus-0.7.3
PKGREVISION= 6
@@ -11,7 +11,7 @@ HOMEPAGE= http://pingus.seul.org/
COMMENT= Lemmings(TM) Clone
BUILD_DEPENDS+= scons>=0.96:../../devel/scons
-USE_LANGUAGES+= c++
+USE_LANGUAGES+= c c++
SUBST_CLASSES+= fix-prefix
SUBST_STAGE.fix-prefix= post-patch
@@ -21,9 +21,23 @@ SUBST_SED.fix-prefix= -e 's,BUILDLINK_DIR,${BUILDLINK_DIR},'
MAKE_JOBS?= 1
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+SCONS_CXX= ${CXX} -std=c++11
+.else
+SCONS_CXX= ${CXX}
+.endif
+
+MAKE_ENV+= CPPPATH=${BUILDLINK_DIR}/include \
+ LIBPATH=${BUILDLINK_DIR}/lib
+
+do-configure:
+ cd ${WRKSRC} && \
+ ${PKGSRC_SETENV} ${MAKE_ENV} scons configure CXX=${SCONS_CXX:Q}
+
do-build:
cd ${WRKSRC} && \
- CPPPATH=${BUILDLINK_DIR}/include LIBPATH=${BUILDLINK_DIR}/lib scons -j ${MAKE_JOBS}
+ ${PKGSRC_SETENV} ${MAKE_ENV} scons -j ${MAKE_JOBS}
do-install:
cd ${WRKSRC} && ./install.sh ${DESTDIR}${PREFIX}
diff --git a/games/pingus/distinfo b/games/pingus/distinfo
index 82e3f6f78d1..2f7c368f002 100644
--- a/games/pingus/distinfo
+++ b/games/pingus/distinfo
@@ -1,11 +1,15 @@
-$NetBSD: distinfo,v 1.4 2011/08/14 19:13:03 wiz Exp $
+$NetBSD: distinfo,v 1.5 2012/11/23 12:35:01 joerg Exp $
SHA1 (pingus-0.7.3.tar.bz2) = ca7fe5cea65fb3392d1e81056a879831925502f2
RMD160 (pingus-0.7.3.tar.bz2) = 664d259a98a172d10480be9aa4ec87a424ecd6f1
Size (pingus-0.7.3.tar.bz2) = 11127278 bytes
-SHA1 (patch-aa) = 7df701ca791e01d7c6fbff558bca906f56fbb643
+SHA1 (patch-aa) = 4b5a7c5dcebcb68e6d9e0661c5880f8b4a7ac49e
SHA1 (patch-ab) = 2f897472e0c006e6fa325c17eda34b05d0ba6a01
SHA1 (patch-ac) = f0c357e4b5d5b71eacac243c15792b3a78a146ec
+SHA1 (patch-src_font.cpp) = 2bf0b3c31e18aae94269c09c92fa632cbf1c8070
+SHA1 (patch-src_lisp_getters.hpp) = e8671571418a172b71dde2ef7ab092ffd03563f7
+SHA1 (patch-src_pingus__main.cpp) = a93a83341a221210684bac93e23816d73a64ec84
+SHA1 (patch-src_pingus__menu.cpp) = 0482ebf068cde7820a6cb78d22a5e603ba71c03f
SHA1 (patch-src_system.cpp) = 20d4522096aa537f60a03e43027b745ecf10b6f3
SHA1 (patch-src_tinygettext_po__file__reader.cpp) = ab2fe607e943f72ad4cdfa0d0117886119d8593d
SHA1 (patch-src_tinygettext_po__file__reader.hpp) = a378319caa8a4e2269893c698c2732a4aea1b7a2
diff --git a/games/pingus/patches/patch-aa b/games/pingus/patches/patch-aa
index a3bef4eea4d..35224c0f8aa 100644
--- a/games/pingus/patches/patch-aa
+++ b/games/pingus/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2011/01/20 23:41:02 wiz Exp $
+$NetBSD: patch-aa,v 1.3 2012/11/23 12:35:01 joerg Exp $
NetBSD config & path fixes
@@ -48,13 +48,14 @@ NetBSD config & path fixes
if config.CheckMyProgram('sdl-config'):
env.ParseConfig('sdl-config --cflags --libs')
-@@ -539,7 +545,8 @@
+@@ -539,7 +545,9 @@
Help(opts.GenerateHelpText(env))
opts.Update(env)
- env['CPPPATH'] += ['.', 'src/']
+ env['CPPPATH'] += ['.', 'src/', 'BUILDLINK_DIR/include']
+ env['LIBPATH'] += ['BUILDLINK_DIR/lib', '/usr/lib/i18n']
++ env['ENV']['PATH'] = os.environ['PATH']
Default(env.Program('pingus', pingus_sources + env['optional_sources']))
Clean('pingus', ['config.py', 'config.h'])
diff --git a/games/pingus/patches/patch-src_font.cpp b/games/pingus/patches/patch-src_font.cpp
new file mode 100644
index 00000000000..e68172d51af
--- /dev/null
+++ b/games/pingus/patches/patch-src_font.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_font.cpp,v 1.1 2012/11/23 12:35:01 joerg Exp $
+
+--- src/font.cpp.orig 2012-11-22 20:41:19.000000000 +0000
++++ src/font.cpp
+@@ -198,7 +198,7 @@ public:
+ SDL_Rect& srcrect = chrs[static_cast<unsigned char>(text[i])];
+ if (srcrect.w != 0 && srcrect.h != 0)
+ {
+- SDL_Rect dstrect = { int(dstx), int(dsty), 0, 0 };
++ SDL_Rect dstrect = { static_cast<Sint16>(dstx), static_cast<Sint16>(dsty), 0, 0 };
+ SDL_BlitSurface(surface, &srcrect, target, &dstrect);
+ dstx += srcrect.w + char_spacing;
+ }
diff --git a/games/pingus/patches/patch-src_lisp_getters.hpp b/games/pingus/patches/patch-src_lisp_getters.hpp
new file mode 100644
index 00000000000..d298758c5f7
--- /dev/null
+++ b/games/pingus/patches/patch-src_lisp_getters.hpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lisp_getters.hpp,v 1.1 2012/11/23 12:35:01 joerg Exp $
+
+--- src/lisp/getters.hpp.orig 2012-11-22 20:43:25.000000000 +0000
++++ src/lisp/getters.hpp
+@@ -30,7 +30,7 @@ static inline bool property_get(const Li
+ if(lisp->get_list_size() != 2)
+ return false;
+
+- const Lisp* el = lisp->get_list_elem(1);
++ const Lisp* el = lisp->get_list_elem(1).get();
+ return get(el, val);
+ }
+
diff --git a/games/pingus/patches/patch-src_pingus__main.cpp b/games/pingus/patches/patch-src_pingus__main.cpp
new file mode 100644
index 00000000000..bc843695882
--- /dev/null
+++ b/games/pingus/patches/patch-src_pingus__main.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_pingus__main.cpp,v 1.1 2012/11/23 12:35:01 joerg Exp $
+
+--- src/pingus_main.cpp.orig 2012-11-22 20:46:56.000000000 +0000
++++ src/pingus_main.cpp
+@@ -626,7 +626,7 @@ PingusMain::init_path_finder()
+ void
+ PingusMain::print_greeting_message()
+ {
+- std::string greeting = "Welcome to Pingus "VERSION;
++ std::string greeting = "Welcome to Pingus " VERSION;
+ greeting += "!";
+ std::cout << greeting << std::endl;
+ for (unsigned int i = 0; i < greeting.length(); ++i)
diff --git a/games/pingus/patches/patch-src_pingus__menu.cpp b/games/pingus/patches/patch-src_pingus__menu.cpp
new file mode 100644
index 00000000000..20fad955fcd
--- /dev/null
+++ b/games/pingus/patches/patch-src_pingus__menu.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_pingus__menu.cpp,v 1.1 2012/11/23 12:35:01 joerg Exp $
+
+--- src/pingus_menu.cpp.orig 2012-11-22 20:47:42.000000000 +0000
++++ src/pingus_menu.cpp
+@@ -234,7 +234,7 @@ PingusMenu::draw_foreground(DrawingConte
+
+ gc.print_left(Fonts::pingus_small, 25,
+ Display::get_height()-130,
+- "Pingus "VERSION", Copyright (C) 1998-2007 Ingo Ruhnke <grumbel@gmx.de>\n"
++ "Pingus " VERSION ", Copyright (C) 1998-2007 Ingo Ruhnke <grumbel@gmx.de>\n"
+ "See the file AUTHORS for a complete list of contributors.\n");
+ gc.print_left(Fonts::pingus_small, 25,
+ Display::get_height()-80,