Wed Aug 8 13:11:49 2012 UTC ()
ham/tnt: Fix build on DragonFly

Problem 1: $la and $lo would not expand with the intl/makefile
           I couldn't get SUBST_SED to manually replace them either.
	   Use of MAKE_ENV also failed.
Problem 2: DragonFly doesn't have base libintl.  This package will
           not build without -lintl LDFLAG.

Solution was to convert existing SUBST_SED into a patch and expand
$la to "a" and $lo to "o" on the intl/Makefile.in file.
Tested on both DragonFly and NetBSD


(marino)
diff -r1.28 -r1.29 pkgsrc/ham/tnt/Makefile
diff -r1.9 -r1.10 pkgsrc/ham/tnt/distinfo
diff -r0 -r1.1 pkgsrc/ham/tnt/patches/patch-intl_Makefile.in

cvs diff -r1.28 -r1.29 pkgsrc/ham/tnt/Makefile (expand / switch to unified diff)

--- pkgsrc/ham/tnt/Makefile 2011/04/22 13:43:53 1.28
+++ pkgsrc/ham/tnt/Makefile 2012/08/08 13:11:48 1.29
@@ -1,31 +1,26 @@ @@ -1,31 +1,26 @@
1# $NetBSD: Makefile,v 1.28 2011/04/22 13:43:53 obache Exp $ 1# $NetBSD: Makefile,v 1.29 2012/08/08 13:11:48 marino Exp $
2# 2#
3 3
4DISTNAME= tnt-1.9.2 4DISTNAME= tnt-1.9.2
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= ham 6CATEGORIES= ham
7MASTER_SITES= ftp://ftp.wspse.de/pub/packet_radio/tnt/ 7MASTER_SITES= ftp://ftp.wspse.de/pub/packet_radio/tnt/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://wspse.de/WSPse/Packet.php3 10HOMEPAGE= http://wspse.de/WSPse/Packet.php3
11COMMENT= Amateur packet radio terminal program for TNC2, AEA PK232 and PK88 11COMMENT= Amateur packet radio terminal program for TNC2, AEA PK232 and PK88
12 12
13DEPENDS+= dialog>=0.6z:../../misc/dialog 13DEPENDS+= dialog>=0.6z:../../misc/dialog
14 14
15PKG_INSTALLATION_TYPES= overwrite pkgviews 15PKG_INSTALLATION_TYPES= overwrite pkgviews
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17 17
18USE_TOOLS+= gmake 18USE_TOOLS+= gmake
19USE_PKGLOCALEDIR= yes 19USE_PKGLOCALEDIR= yes
20GNU_CONFIGURE= yes 20GNU_CONFIGURE= yes
21INFO_FILES= yes 21INFO_FILES= yes
22 22
23SUBST_CLASSES+= missing 23LDFLAGS.DragonFly+= -lintl
24SUBST_MESSAGE.missing= Subst missing replacements with configure 
25SUBST_STAGE.missing= post-configure 
26SUBST_FILES.missing= intl/Makefile 
27SUBST_SED.missing= -e 's,@GT_YES@,\#,g' 
28SUBST_SED.missing+= -e 's,@GT_NO@,,g' 
29 24
30.include "../../devel/gettext-lib/buildlink3.mk" 25.include "../../devel/gettext-lib/buildlink3.mk"
31.include "../../mk/bsd.pkg.mk" 26.include "../../mk/bsd.pkg.mk"

cvs diff -r1.9 -r1.10 pkgsrc/ham/tnt/distinfo (expand / switch to unified diff)

--- pkgsrc/ham/tnt/distinfo 2009/02/16 19:20:16 1.9
+++ pkgsrc/ham/tnt/distinfo 2012/08/08 13:11:48 1.10
@@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
1$NetBSD: distinfo,v 1.9 2009/02/16 19:20:16 joerg Exp $ 1$NetBSD: distinfo,v 1.10 2012/08/08 13:11:48 marino Exp $
2 2
3SHA1 (tnt-1.9.2.tar.gz) = 8826e7e730c3440113bf723e18bb136e91cef8f8 3SHA1 (tnt-1.9.2.tar.gz) = 8826e7e730c3440113bf723e18bb136e91cef8f8
4RMD160 (tnt-1.9.2.tar.gz) = 10e5812715d564f25797ff3d83124ad2b86f2a62 4RMD160 (tnt-1.9.2.tar.gz) = 10e5812715d564f25797ff3d83124ad2b86f2a62
5Size (tnt-1.9.2.tar.gz) = 920883 bytes 5Size (tnt-1.9.2.tar.gz) = 920883 bytes
6SHA1 (patch-aa) = f2b6c9f22ffd4ef418f5aab6ca179d656e0a563c 6SHA1 (patch-aa) = f2b6c9f22ffd4ef418f5aab6ca179d656e0a563c
7SHA1 (patch-ac) = 86865198639da69469c2766ec638898553eb7662 7SHA1 (patch-ac) = 86865198639da69469c2766ec638898553eb7662
8SHA1 (patch-ad) = 1735028a7a52cc75f83a3f3c9fd29a06c9dd0153 8SHA1 (patch-ad) = 1735028a7a52cc75f83a3f3c9fd29a06c9dd0153
9SHA1 (patch-ae) = 0f952e74159cd2eed714b7f3ab62bf54c9fbd177 9SHA1 (patch-ae) = 0f952e74159cd2eed714b7f3ab62bf54c9fbd177
 10SHA1 (patch-intl_Makefile.in) = 57e58f81217d382bcb71d227e9184ae827f9ddd7

File Added: pkgsrc/ham/tnt/patches/patch-intl_Makefile.in
$NetBSD: patch-intl_Makefile.in,v 1.1 2012/08/08 13:11:48 marino Exp $

--- intl/Makefile.in.orig	2000-01-06 01:16:49.000000000 +0000
+++ intl/Makefile.in
@@ -62,11 +62,11 @@ SOURCES = $(COMSRCS) intl-compat.c cat-c
 COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
 finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
 explodename.c
-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
-explodename.$lo
-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
-GETTOBJS = intl-compat.$lo
+OBJECTS = @INTLOBJS@ bindtextdom.o dcgettext.o dgettext.o gettext.o \
+finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o \
+explodename.o
+CATOBJS = cat-compat.o ../po/cat-id-tbl.o
+GETTOBJS = intl-compat.o
 DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
 xopen-msg.sed $(HEADERS) $(SOURCES)
 DISTFILES.normal = VERSION
@@ -83,7 +83,7 @@ INCLUDES = -I.. -I. -I$(top_srcdir)/intl
 
 all: all-@USE_INCLUDED_LIBINTL@
 
-all-yes: libintl.$la intlh.inst
+all-yes: libintl.a intlh.inst
 all-no:
 
 libintl.a: $(OBJECTS)
@@ -95,8 +95,8 @@ libintl.la: $(OBJECTS)
 	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
 		   -version-info 1:0 -rpath $(libdir)
 
-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
-	cd ../po && $(MAKE) cat-id-tbl.$lo
+../po/cat-id-tbl.o: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
+	cd ../po && $(MAKE) cat-id-tbl.o
 
 check: all
 
@@ -151,8 +151,8 @@ uninstall:
 info dvi:
 
 $(OBJECTS): ../config.h libgettext.h
-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
+bindtextdom.o finddomain.o loadmsgcat.o: gettextP.h gettext.h loadinfo.h
+dcgettext.o: gettextP.h gettext.h hash-string.h loadinfo.h
 
 tags: TAGS
 
@@ -202,12 +202,8 @@ Makefile: Makefile.in ../config.status
 # The dependency for intlh.inst is different in gettext and all other
 # packages.  Because we cannot you GNU make features we have to solve
 # the problem while rewriting Makefile.in.
-@GT_YES@intlh.inst: intlh.inst.in ../config.status
-@GT_YES@	cd .. \
-@GT_YES@	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
-@GT_YES@	  $(SHELL) ./config.status
-@GT_NO@.PHONY: intlh.inst
-@GT_NO@intlh.inst:
+.PHONY: intlh.inst
+intlh.inst:
 
 # Tell versions [3.59,3.63) of GNU make not to export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.