ports/58540: textproc/opensp: fix libintl and libiconv depedencies => avoid conflicts with other ports

Simon Barner barner at in.tum.de
Sat Oct 25 21:00:41 UTC 2003


>Number:         58540
>Category:       ports
>Synopsis:       textproc/opensp: fix libintl and libiconv depedencies => avoid conflicts with other ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 14:00:35 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Simon Barner
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD zi025.glhnet.mhn.de 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Thu Sep 4 20:49:53 CEST 2003 simon at zi025.glhnet.mhn.de:/usr/src/sys/compile/KISTE i386

>Description:

This port did not pick up the two libraries mentioned. In order to get
libintl working, I used the patch I found at

ports/audio/gqmpeg/files/patch-aclocal.m4

(somebody in an archived mail suggested to look for existing patches that
solve that gettext problem).

One possitive side effect of getting the libintl dependency right, is
that the port does not build its included version of the gettext library and
does not install those two .alias that were conflicting with other ports
(have a look at the pkg-plist diff and you'll see what I mean)
        
http://freebsd.rambler.ru/bsdmail/freebsd-ports_2003/msg08919.html

Additionally, I modified the port to respect NOPORTDOCS.

>How-To-Repeat:
>Fix:

diff -ruN opensp/Makefile opensp.patched/Makefile
--- opensp/Makefile	Wed Aug  6 08:46:28 2003
+++ opensp.patched/Makefile	Sat Oct 25 22:51:05 2003
@@ -15,14 +15,32 @@
 MAINTAINER=	kuriyama at FreeBSD.org
 COMMENT=	This package is a collection of SGML/XML tools called OpenSP
 
+LIB_DEPENDS=	intl.5:${PORTSDIR}/devel/gettext \
+		iconv.3:${PORTSDIR}/converters/libiconv
+
 USE_GMAKE=	YES
+USE_REINPLACE=	YES
 USE_LIBTOOL=	YES
 USE_PERL5=	yes
+USE_AUTOCONF_VER=253
 CONFIGURE_ARGS=	--enable-default-catalog=${PREFIX}/share/sgml/catalog \
 		--datadir=${PREFIX}/share/sgml/openjade
+CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
+
 INSTALLS_SHLIB=	yes
 
-MAN1=	onsgmls.1 osgmlnorm.1 ospam.1 ospent.1 osx.1
+MAN1=		onsgmls.1 osgmlnorm.1 ospam.1 ospent.1 osx.1
+DOC_FILES=	archform.htm autoconf.htm build.htm catalog.htm charset.htm \
+		features.htm generic.htm ideas.htm index.htm new.htm \
+		nsgmls.htm sgmldecl.htm sgmlnorm.htm sgmlsout.htm spam.htm \
+		spcat.htm spent.htm sx.htm sysdecl.htm sysid.htm xml.htm \
+		xmlwarn.htm
+DOC_FILES2=	NEWS AUTHORS README \
+		releasenotes.html releasenotes.pdf releasenotes.ps
+
+# Perhaps this better should be somewhere under ${PREFIX}/share/doc ?
+DOCSDIR2=	${PREFIX}/share/sgml/openjade/doc/OpenSP
 
 .include <bsd.port.pre.mk>
 
@@ -31,5 +49,25 @@
 # Therefore, we'd better remove all machine optimizations and any -O
 # other than -O{0,1,}. Idea taken from palm/prc-tools-gcc.
 CPPFLAGS:=	-O ${CFLAGS:N-O*:N-m*}
+
+pre-install:
+	@${REINPLACE_CMD} -e \
+		's|install-man install-pkgdocDATA|install-man|g' \
+		${WRKSRC}/Makefile
+
+post-install:
+
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+.for doc in ${DOC_FILES}
+	@${INSTALL_DATA} ${WRKSRC}/doc/${doc} ${DOCSDIR}
+.endfor
+
+	@${MKDIR} ${DOCSDIR2}
+.for doc in ${DOC_FILES2}
+	@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR2}
+.endfor
+
+.endif
 
 .include <bsd.port.post.mk>
diff -ruN opensp/files/patch-Makefile.am opensp.patched/files/patch-Makefile.am
--- opensp/files/patch-Makefile.am	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-Makefile.am	Sat Oct 25 20:46:56 2003
@@ -0,0 +1,21 @@
+--- Makefile.am.orig	Sat Oct 25 20:46:21 2003
++++ Makefile.am	Sat Oct 25 20:46:43 2003
+@@ -2,7 +2,7 @@
+ 
+ AUTOMAKE_OPTIONS = check-news
+ 
+-SUBDIRS = pubtext unicode doc \
++SUBDIRS = pubtext unicode \
+ 	include generic \
+ 	lib nsgmls spent spam sgmlnorm sx spcat \
+ 	intl po
+@@ -15,8 +15,7 @@
+ 
+ man_MANS = onsgmls.1 osgmlnorm.1 ospent.1 ospam.1 osx.1
+ 
+-pkgdoc_DATA = README ABOUT-NLS NEWS COPYING AUTHORS ChangeLog \
+-	releasenotes.html releasenotes.pdf releasenotes.ps
++pkgdoc_DATA =
+ 
+ BUILT_SOURCES = config.h msggen.pl
+ 
diff -ruN opensp/files/patch-aclocal.m4 opensp.patched/files/patch-aclocal.m4
--- opensp/files/patch-aclocal.m4	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-aclocal.m4	Sat Oct 25 20:28:46 2003
@@ -0,0 +1,46 @@
+
+$FreeBSD: ports/audio/gqmpeg/files/patch-aclocal.m4,v 1.1 2002/07/19 14:10:42 naddy Exp $
+
+--- aclocal.m4.orig	Wed Jul 17 20:48:30 2002
++++ aclocal.m4	Thu Jul 18 16:38:49 2002
+@@ -545,7 +545,7 @@
+   rm -f conf.gdk_pixbuftest
+ ])
+ 
+-# gettext.m4 serial 13 (gettext-0.11.1)
++# gettext.m4 serial 14 (gettext-0.11.2)
+ dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License.  As a special exception to the GNU General
+@@ -689,14 +689,13 @@
+             dnl Now see whether libintl exists and does not depend on libiconv.
+             AC_TRY_LINK([#include <libintl.h>
+ extern int _nl_msg_cat_cntr;
+-extern int *_nl_domain_bindings;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias ();],
+               [bindtextdomain ("", "");
+-return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
++return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+               gt_cv_func_gnugettext_libintl=yes,
+               gt_cv_func_gnugettext_libintl=no)
+             dnl Now see whether libintl exists and depends on libiconv.
+@@ -704,14 +703,13 @@
+               LIBS="$LIBS $LIBICONV"
+               AC_TRY_LINK([#include <libintl.h>
+ extern int _nl_msg_cat_cntr;
+-extern int *_nl_domain_bindings;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias ();],
+                 [bindtextdomain ("", "");
+-return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)],
++return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 gt_cv_func_gnugettext_libintl=yes
diff -ruN opensp/files/patch-nsgmls::Makefile.in opensp.patched/files/patch-nsgmls::Makefile.in
--- opensp/files/patch-nsgmls::Makefile.in	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-nsgmls::Makefile.in	Sat Oct 25 21:23:54 2003
@@ -0,0 +1,11 @@
+--- nsgmls/Makefile.in.orig	Sat Oct 25 21:23:36 2003
++++ nsgmls/Makefile.in	Sat Oct 25 21:23:48 2003
+@@ -142,7 +142,7 @@
+ 	nsgmls_inst.$(OBJEXT)
+ onsgmls_OBJECTS = $(am_onsgmls_OBJECTS)
+ onsgmls_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-onsgmls_LDFLAGS =
++onsgmls_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/files/patch-sgmlnorm::Makefile opensp.patched/files/patch-sgmlnorm::Makefile
--- opensp/files/patch-sgmlnorm::Makefile	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-sgmlnorm::Makefile	Sat Oct 25 21:25:39 2003
@@ -0,0 +1,11 @@
+--- sgmlnorm/Makefile.in.orig	Sat Oct 25 21:24:54 2003
++++ sgmlnorm/Makefile.in	Sat Oct 25 21:25:06 2003
+@@ -136,7 +136,7 @@
+ am_osgmlnorm_OBJECTS = sgmlnorm.$(OBJEXT) SGMLGenerator.$(OBJEXT)
+ osgmlnorm_OBJECTS = $(am_osgmlnorm_OBJECTS)
+ osgmlnorm_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-osgmlnorm_LDFLAGS =
++osgmlnorm_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/files/patch-spam::Makefile.in opensp.patched/files/patch-spam::Makefile.in
--- opensp/files/patch-spam::Makefile.in	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-spam::Makefile.in	Sat Oct 25 21:11:37 2003
@@ -0,0 +1,11 @@
+--- spam/Makefile.in.orig	Sat Oct 25 21:11:02 2003
++++ spam/Makefile.in	Sat Oct 25 21:11:13 2003
+@@ -138,7 +138,7 @@
+ 	MarkupEventHandler.$(OBJEXT) spam_inst.$(OBJEXT)
+ ospam_OBJECTS = $(am_ospam_OBJECTS)
+ ospam_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-ospam_LDFLAGS =
++ospam_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/files/patch-spcat::Makefile.in opensp.patched/files/patch-spcat::Makefile.in
--- opensp/files/patch-spcat::Makefile.in	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-spcat::Makefile.in	Sat Oct 25 22:07:24 2003
@@ -0,0 +1,11 @@
+--- spcat/Makefile.in.orig	Sat Oct 25 22:06:38 2003
++++ spcat/Makefile.in	Sat Oct 25 22:06:54 2003
+@@ -134,7 +134,7 @@
+ am_ospcat_OBJECTS = spcat.$(OBJEXT) spcat_inst.$(OBJEXT)
+ ospcat_OBJECTS = $(am_ospcat_OBJECTS)
+ ospcat_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-ospcat_LDFLAGS =
++ospcat_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/files/patch-spent::Makefile.in opensp.patched/files/patch-spent::Makefile.in
--- opensp/files/patch-spent::Makefile.in	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-spent::Makefile.in	Sat Oct 25 21:10:26 2003
@@ -0,0 +1,11 @@
+--- spent/Makefile.in.orig	Sat Oct 25 21:09:41 2003
++++ spent/Makefile.in	Sat Oct 25 21:09:57 2003
+@@ -134,7 +134,7 @@
+ am_ospent_OBJECTS = spent.$(OBJEXT)
+ ospent_OBJECTS = $(am_ospent_OBJECTS)
+ ospent_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-ospent_LDFLAGS =
++ospent_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/files/patch-sx::Makefile.in opensp.patched/files/patch-sx::Makefile.in
--- opensp/files/patch-sx::Makefile.in	Thu Jan  1 01:00:00 1970
+++ opensp.patched/files/patch-sx::Makefile.in	Sat Oct 25 21:27:21 2003
@@ -0,0 +1,11 @@
+--- sx/Makefile.in.orig	Sat Oct 25 21:26:34 2003
++++ sx/Makefile.in	Sat Oct 25 21:27:03 2003
+@@ -140,7 +140,7 @@
+ 	sx_inst.$(OBJEXT)
+ osx_OBJECTS = $(am_osx_OBJECTS)
+ osx_DEPENDENCIES = $(top_builddir)/lib/libosp.la
+-osx_LDFLAGS =
++osx_LDFLAGS = -lintl
+ 
+ DEFS = @DEFS@
+ DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
diff -ruN opensp/pkg-plist opensp.patched/pkg-plist
--- opensp/pkg-plist	Sat Oct 25 20:30:51 2003
+++ opensp.patched/pkg-plist	Sat Oct 25 21:32:33 2003
@@ -145,28 +145,28 @@
 lib/libosp.la
 lib/libosp.so
 lib/libosp.so.3
-share/doc/OpenSP/archform.htm
-share/doc/OpenSP/autoconf.htm
-share/doc/OpenSP/build.htm
-share/doc/OpenSP/catalog.htm
-share/doc/OpenSP/charset.htm
-share/doc/OpenSP/features.htm
-share/doc/OpenSP/generic.htm
-share/doc/OpenSP/ideas.htm
-share/doc/OpenSP/index.htm
-share/doc/OpenSP/new.htm
-share/doc/OpenSP/nsgmls.htm
-share/doc/OpenSP/sgmldecl.htm
-share/doc/OpenSP/sgmlnorm.htm
-share/doc/OpenSP/sgmlsout.htm
-share/doc/OpenSP/spam.htm
-share/doc/OpenSP/spcat.htm
-share/doc/OpenSP/spent.htm
-share/doc/OpenSP/sx.htm
-share/doc/OpenSP/sysdecl.htm
-share/doc/OpenSP/sysid.htm
-share/doc/OpenSP/xml.htm
-share/doc/OpenSP/xmlwarn.htm
+%%PORTDOCS%%%%DOCSDIR%%/archform.htm
+%%PORTDOCS%%%%DOCSDIR%%/autoconf.htm
+%%PORTDOCS%%%%DOCSDIR%%/build.htm
+%%PORTDOCS%%%%DOCSDIR%%/catalog.htm
+%%PORTDOCS%%%%DOCSDIR%%/charset.htm
+%%PORTDOCS%%%%DOCSDIR%%/features.htm
+%%PORTDOCS%%%%DOCSDIR%%/generic.htm
+%%PORTDOCS%%%%DOCSDIR%%/ideas.htm
+%%PORTDOCS%%%%DOCSDIR%%/index.htm
+%%PORTDOCS%%%%DOCSDIR%%/new.htm
+%%PORTDOCS%%%%DOCSDIR%%/nsgmls.htm
+%%PORTDOCS%%%%DOCSDIR%%/sgmldecl.htm
+%%PORTDOCS%%%%DOCSDIR%%/sgmlnorm.htm
+%%PORTDOCS%%%%DOCSDIR%%/sgmlsout.htm
+%%PORTDOCS%%%%DOCSDIR%%/spam.htm
+%%PORTDOCS%%%%DOCSDIR%%/spcat.htm
+%%PORTDOCS%%%%DOCSDIR%%/spent.htm
+%%PORTDOCS%%%%DOCSDIR%%/sx.htm
+%%PORTDOCS%%%%DOCSDIR%%/sysdecl.htm
+%%PORTDOCS%%%%DOCSDIR%%/sysid.htm
+%%PORTDOCS%%%%DOCSDIR%%/xml.htm
+%%PORTDOCS%%%%DOCSDIR%%/xmlwarn.htm
 share/sgml/openjade/OpenSP/HTML32.dcl
 share/sgml/openjade/OpenSP/HTML32.dtd
 share/sgml/openjade/OpenSP/HTML32.soc
@@ -195,19 +195,15 @@
 share/sgml/openjade/OpenSP/unicode.syn
 share/sgml/openjade/OpenSP/xml.dcl
 share/sgml/openjade/OpenSP/xml.soc
-share/sgml/openjade/doc/OpenSP/ABOUT-NLS
-share/sgml/openjade/doc/OpenSP/AUTHORS
-share/sgml/openjade/doc/OpenSP/COPYING
-share/sgml/openjade/doc/OpenSP/ChangeLog
-share/sgml/openjade/doc/OpenSP/NEWS
-share/sgml/openjade/doc/OpenSP/README
-share/sgml/openjade/doc/OpenSP/releasenotes.html
-share/sgml/openjade/doc/OpenSP/releasenotes.pdf
-share/sgml/openjade/doc/OpenSP/releasenotes.ps
- at dirrm share/doc/OpenSP
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/AUTHORS
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/NEWS
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/README
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/releasenotes.html
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/releasenotes.pdf
+%%PORTDOCS%%share/sgml/openjade/doc/OpenSP/releasenotes.ps
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm include/OpenSP
 @dirrm share/sgml/openjade/OpenSP
- at dirrm share/sgml/openjade/doc/OpenSP
- at dirrm share/sgml/openjade/doc
- at dirrm share/sgml/openjade/locale
+%%PORTDOCS%%@dirrm share/sgml/openjade/doc/OpenSP
+%%PORTDOCS%%@dirrm share/sgml/openjade/doc
 @dirrm share/sgml/openjade
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list