View | Details | Raw Unified | Return to bug 176785
Collapse All | Expand All

(-)nlarn/Makefile (-18 / +3 lines)
Lines 1-12 Link Here
1
# Ports collection makefile for:  games/nlarn
1
# Created by: Martin Tournoij <martin@arp242.net>
2
# Date created:			  2011-11-08
3
# Whom:				  Martin Tournoij <martin@arp242.net>
4
#
5
# $FreeBSD: games/nlarn/Makefile 313633 2013-03-08 10:51:34Z kwm $
2
# $FreeBSD: games/nlarn/Makefile 313633 2013-03-08 10:51:34Z kwm $
6
#
7
3
8
PORTNAME=	nlarn
4
PORTNAME=	nlarn
9
PORTVERSION=	0.7
5
PORTVERSION=	0.7.2
10
CATEGORIES=	games
6
CATEGORIES=	games
11
MASTER_SITES=	SF
7
MASTER_SITES=	SF
12
8
Lines 15-38 Link Here
15
11
16
LICENSE=	GPLv3
12
LICENSE=	GPLv3
17
13
18
BUILD_DEPENDS=	premake4:${PORTSDIR}/devel/premake4
19
20
WRKSRC=		${WRKDIR}/jaydg-nlarn-NLarn-${PORTVERSION}.0
21
USE_LUA=	5.1
14
USE_LUA=	5.1
22
USE_GNOME=	glib20
15
USE_GNOME=	glib20
23
USE_PKGCONFIG=	build
16
USE_PKGCONFIG=	build
24
USE_GMAKE=	yes
17
USE_GMAKE=	yes
25
18
26
do-configure:
27
	cd ${WRKSRC} && ${LOCALBASE}/bin/premake4 --os=bsd gmake
28
29
post-configure:
19
post-configure:
30
	@${REINPLACE_CMD} 's|$$(ARCH)||g; \
20
	@${REINPLACE_CMD} 's|/usr/share/nlarn|${DATADIR}|' \
31
		s|-I${LOCALBASE}|-I${LUA_INCDIR} -I${LOCALBASE}|g; \
32
		s|-lz|-lz -llua-5.1 -lncurses -lpanel|g;' \
33
	${WRKSRC}/nlarn.make
34
35
	@${REINPLACE_CMD} 's|/usr/share/games/nlarn|${DATADIR}|' \
36
		${WRKSRC}/src/game.c
21
		${WRKSRC}/src/game.c
37
22
38
do-install:
23
do-install:
(-)nlarn/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (nlarn-0.7.tar.gz) = 21818bbc1691a8a79d3d6ce71934076895c2708725e5a0b431d46dba39e2795a
1
SHA256 (nlarn-0.7.2.tar.gz) = 291fed77cb80261c5dfd375c702482f4d38415e3ce769b237ac22957d42dfbc8
2
SIZE (nlarn-0.7.tar.gz) = 244698
2
SIZE (nlarn-0.7.2.tar.gz) = 813829
(-)nlarn/files/patch-Makefile (+27 lines)
Line 0 Link Here
1
--- Makefile.orig	2012-07-06 20:29:35.000000000 +0300
2
+++ Makefile	2013-03-09 11:15:05.000000000 +0200
3
@@ -102,13 +102,13 @@
4
   LDFLAGS += $(shell pkg-config --libs glib-2.0)
5
 
6
   # Configuration for ncurses
7
-  ifeq ($(filter Darwin DragonFly OpenBSD,$(OS)),)
8
+  ifeq ($(filter Darwin DragonFly FreeBSD OpenBSD,$(OS)),)
9
     CFLAGS  += $(shell ncurses5-config --cflags)
10
     LDFLAGS += $(shell ncurses5-config --libs) -lpanel
11
   else
12
     # OS X is handled separately
13
     ifneq ($(OS), Darwin)
14
-      # DragonFly and OpenBSD have ncurses in base (and no config tool)
15
+      # DragonFly, FreeBSD and OpenBSD have ncurses in base (and no config tool)
16
       LDFLAGS += -lncurses -lpanel
17
     endif
18
   endif
19
@@ -117,6 +117,8 @@
20
   # Debian and derivates use lua5.1, the rest of the world lua
21
   ifneq ($(wildcard /etc/debian_version),)
22
     lua = lua5.1
23
+  else ifeq ($(OS), FreeBSD)
24
+    lua = lua-5.1
25
   else
26
     lua = lua
27
   endif
(-)nlarn/files/patch-premake4.lua (-19 lines)
Lines 1-19 Link Here
1
--- premake4.lua.orig	2011-11-08 23:01:23.000000000 +0100
2
+++ premake4.lua	2011-11-08 23:01:44.000000000 +0100
3
@@ -75,12 +75,11 @@
4
       -- Add configuration for Lua
5
       -- Debian and Ubuntu have a specific naming convention for the lua
6
       -- package; fortunately it can be configured with pkg-config
7
-      if os.is("linux") and (get_linux_distribution() == "Debian"
8
-          or get_linux_distribution() == "Ubuntu")
9
+      if os.is("bsd")
10
       then
11
-        includedirs { get_dirs("include", "lua5.1") }
12
-        links { "lua5.1" }
13
-        libdirs { get_dirs("lib", "lua5.1") }
14
+        includedirs { get_dirs("include", "lua-5.1") }
15
+        links { "lua-5.1" }
16
+        libdirs { get_dirs("lib", "lua-5.1") }
17
       else
18
         includedirs { get_dirs("include", "lua") }
19
         links { "lua" }
(-)nlarn/files/patch-src-game.c (+11 lines)
Line 0 Link Here
1
--- src/game.c.orig	2012-07-06 20:29:35.000000000 +0300
2
+++ src/game.c	2013-03-09 12:23:13.000000000 +0200
3
@@ -1353,7 +1354,7 @@
4
     if (sb == NULL)
5
     {
6
         /* opening the file failed */
7
-        log_add_entry(g->log, "Error opening scoreboard file \"%s\".");
8
+        log_add_entry(g->log, "Error opening scoreboard file.");
9
         free(uscores);
10
         return;
11
     }
(-)nlarn/pkg-plist (+1 lines)
Lines 4-9 Link Here
4
%%DATADIR%%/maze
4
%%DATADIR%%/maze
5
%%DATADIR%%/maze_doc.txt
5
%%DATADIR%%/maze_doc.txt
6
%%DATADIR%%/monsters.lua
6
%%DATADIR%%/monsters.lua
7
%%DATADIR%%/nlarn-128.bmp
7
%%DATADIR%%/nlarn.hlp
8
%%DATADIR%%/nlarn.hlp
8
%%DATADIR%%/nlarn.ini-sample
9
%%DATADIR%%/nlarn.ini-sample
9
%%DATADIR%%/nlarn.msg
10
%%DATADIR%%/nlarn.msg

Return to bug 176785