From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 16 02:40:02 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F08C106564A for ; Wed, 16 May 2012 02:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 69BE18FC0A for ; Wed, 16 May 2012 02:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4G2e2Bw016467 for ; Wed, 16 May 2012 02:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4G2e2Av016466; Wed, 16 May 2012 02:40:02 GMT (envelope-from gnats) Resent-Date: Wed, 16 May 2012 02:40:02 GMT Resent-Message-Id: <201205160240.q4G2e2Av016466@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Peter Jeremy Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FB8C1065679 for ; Wed, 16 May 2012 02:34:20 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id DC7E68FC17 for ; Wed, 16 May 2012 02:34:19 +0000 (UTC) Received: from server.rulingia.com (c220-239-254-65.belrs5.nsw.optusnet.com.au [220.239.254.65]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4G2YBip028011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 May 2012 12:34:12 +1000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q4G2YAT4049134; Wed, 16 May 2012 12:34:10 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q4G2YAok049133; Wed, 16 May 2012 12:34:10 +1000 (EST) (envelope-from peter) Message-Id: <201205160234.q4G2YAok049133@server.rulingia.com> Date: Wed, 16 May 2012 12:34:10 +1000 (EST) From: Peter Jeremy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/167945: [patch] textproc/libexttextcat - make it a replacement for textproc/libtextcat X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Jeremy List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 02:40:02 -0000 >Number: 167945 >Category: ports >Synopsis: [patch] textproc/libexttextcat - make it a replacement for textproc/libtextcat >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 16 02:40:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 8.3-STABLE amd64 >Organization: n/a >Environment: System: FreeBSD server.rulingia.com 8.3-STABLE FreeBSD 8.3-STABLE #16 r235229M: Fri May 11 12:02:41 EST 2012 root@server.rulingia.com:/var/obj/usr/src/sys/server amd64 >Description: libexttextcat is a fork of libtextcat that provides additional capabilities needed by LibreOffice. Whilst libexttextcat appears to provide a superset of libtextcat functionality, it mostly uses different file names so libexttextcat is not a drop-in replacement for libtextcat. Unfortunately, both ports install bin/createfp so they are marked conflicting. This makes it impossible to install both editors/libreoffice and ports depending on libtextcat (eg editors/openoffice-3). >How-To-Repeat: Try to install both editors/libreoffice and editors/openoffice-3 >Fix: The following patch optionally adds symlinks from the libexttextcat files to their equivalent libtextcat names. As a side-benefit, it also correctly installs the LICENSE file, misc documentation (as done by libtextcat) anhd adds support for the "make check" target (this latter needs a Makefile patch to remove a dependency on bash - mhich should be installed in the files directory). The approach of renaming the files was tested by compiling editors/openoffice-3. The resultant executable was able to open files, export files and print normally. Note that this patch is against libexttextcat-3.2.0_1 as I don't currently have access to libexttextcat-3.2.0_2. As far as I can see, the patches should still apply, though with some fuzz. Index: Makefile =================================================================== RCS file: /usr/ncvs/ports/textproc/libexttextcat/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 22 Jan 2012 10:16:02 -0000 1.2 +++ Makefile 16 May 2012 01:46:46 -0000 @@ -15,6 +15,7 @@ COMMENT= Language guessing by N-Gram-Based Text Categorization LICENSE= BSD +LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS_INSTALL= libtextcat* @@ -23,4 +24,46 @@ USE_GNOME= gnomehack USE_LDCONFIG= yes +PORTDOCS= README README.libtextcat TODO + +OPTIONS= COMPAT_TEXTCAT "Install libtextcat compatible files" Off \ + LM_FILES "Install language models" Off + +.include + +.if defined(WITH_COMPAT_TEXTCAT) +PLIST_SUB+= TEXTCAT='' +.else +PLIST_SUB+= TEXTCAT='@comment ' +.endif + +.if defined(WITH_LM_FILES) +PLIST_SUB+= LM='' +.else +PLIST_SUB+= LM='@comment ' +.endif + +post-install: +.if defined(WITH_COMPAT_TEXTCAT) + ${LN} -sf libexttextcat/textcat.h ${PREFIX}/include/ + ${LN} -sf libexttextcat ${PREFIX}/include/libtextcat + ${LN} -sf libexttextcat.a ${PREFIX}/lib/libtextcat.a + ${LN} -sf libexttextcat.la ${PREFIX}/lib/libtextcat.la + ${LN} -sf libexttextcat.so.0 ${PREFIX}/lib/libtextcat.so + ${LN} -sf libexttextcat.so.0 ${PREFIX}/lib/libtextcat.so.0 +.endif +.if defined(WITH_LM_FILES) + ${MKDIR} ${DATADIR}/LM + @${ECHO_MSG} "Installing language models provided in Gertjan van Noord's TextCat package" + (cd ${WRKSRC}/langclass/LM && \ + ${FIND} . -name "*.lm" -exec ${INSTALL_DATA} "{}" "${DATADIR}/LM/{}" \;) +.endif +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} +.endif + +check: + cd ${WRKSRC}/src && make check + .include Index: pkg-plist =================================================================== RCS file: /usr/ncvs/ports/textproc/libexttextcat/pkg-plist,v retrieving revision 1.3 diff -u -r1.3 pkg-plist --- pkg-plist 22 Jan 2012 10:16:02 -0000 1.3 +++ pkg-plist 16 May 2012 02:21:44 -0000 @@ -6,10 +6,16 @@ include/libexttextcat/fingerprint.h include/libexttextcat/textcat.h include/libexttextcat/utf8misc.h +%%TEXTCAT%%include/textcat.h +%%TEXTCAT%%include/libtextcat lib/libexttextcat.a lib/libexttextcat.la lib/libexttextcat.so lib/libexttextcat.so.0 +%%TEXTCAT%%lib/libtextcat.a +%%TEXTCAT%%lib/libtextcat.la +%%TEXTCAT%%lib/libtextcat.so +%%TEXTCAT%%lib/libtextcat.so.0 libdata/pkgconfig/libexttextcat.pc @dirrmtry include/libexttextcat @dirrmtry %%DATADIR%% --- src/Makefile.in.bak 2011-11-14 09:27:18.000000000 +1100 +++ src/Makefile.in 2012-05-16 11:43:38.628608090 +1000 @@ -711,7 +711,7 @@ st sv sw ta tet th tg ti tk tl tn tpi tr ts \ tt ty ug uk uz ve vi wa xh yi yo zh-Hans \ zh-Hant zu; do \ - bash ./test-primary.sh $$primarylanguage; \ + sh ./test-primary.sh $$primarylanguage; \ if test x$$? != x0; then \ echo FAIL: $$primarylanguage && exit 1; \ else \ @@ -720,7 +720,7 @@ done @echo secondary languages @for secondarylanguage in sco; do \ - bash ./test-secondary.sh $$secondarylanguage; \ + sh ./test-secondary.sh $$secondarylanguage; \ if test x$$? != x0; then \ echo FAIL: $$secondarylanguage && exit 1; \ else \ >Release-Note: >Audit-Trail: >Unformatted: