From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Nov 25 20:30:14 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org 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 66EDC16A417 for ; Sat, 25 Nov 2006 20:30:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id A317143D53 for ; Sat, 25 Nov 2006 20:29:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAPKUCmm050265 for ; Sat, 25 Nov 2006 20:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAPKUCKp050264; Sat, 25 Nov 2006 20:30:12 GMT (envelope-from gnats) Resent-Date: Sat, 25 Nov 2006 20:30:12 GMT Resent-Message-Id: <200611252030.kAPKUCKp050264@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, Alex Kozlov Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F25416A407 for ; Sat, 25 Nov 2006 20:27:41 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from istc.kiev.ua (wolf.istc.kiev.ua [193.108.236.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1065F43D45 for ; Sat, 25 Nov 2006 20:26:50 +0000 (GMT) (envelope-from kozlov@ravenloft.kiev.ua) Received: from localhost ([127.0.0.1] helo=ravenloft.kiev.ua) by istc.kiev.ua with esmtp (Exim 4.52) id 1Go47d-0007vO-2J for FreeBSD-gnats-submit@freebsd.org; Sat, 25 Nov 2006 22:27:39 +0200 Received: from kozlov by ravenloft.kiev.ua with local (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Go47E-000C4e-2f; Sat, 25 Nov 2006 22:27:12 +0200 Message-Id: Date: Sat, 25 Nov 2006 22:27:12 +0200 From: Alex Kozlov Sender: Alex Kozlov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: spam@rm-rf.kiev.ua Subject: ports/105849: [devel/gettext] [patch] Add MINIMAL option X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Kozlov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2006 20:30:14 -0000 >Number: 105849 >Category: ports >Synopsis: [devel/gettext] [patch] Add MINIMAL option >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 25 20:30:12 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Alex Kozlov >Release: FreeBSD 6.1 >Organization: private >Environment: >Description: Vast majority of ports use only libintl(and msgfmt) from gettext. Add a new MINIMAL option for install only them. >How-To-Repeat: >Fix: --- Makefile.orig Thu Feb 23 12:35:39 2006 +++ Makefile. Mon Nov 18 22:57:18 2006 @@ -30,17 +30,26 @@ EMACS="no" CONFIGURE_ARGS= --disable-csharp \ --mandir=${PREFIX}/man -INSTALLS_SHLIB= yes +USE_LDCONFIG= yes .if !defined(WITHOUT_GETTEXT_OPTIONS) OPTIONS= EXAMPLES "install example files" off \ - HTMLMAN "install man pages in HTML format" off + HTMLMAN "install man pages in HTML format" off \ + MINIMAL "install only libintl" off .endif PLIST= ${WRKDIR}/plist PLISTU= ${WRKDIR}/plist-unsorted PLIST_SUB= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \ VERSION=${PORTVERSION} +.ifdef USE_GETTEXT +.error USE_GETTEXT is defined as an environment variable, or in the arguments \ + to "make". Please unset it and restart the build. +.endif + +.include + +.if !defined(WITH_MINIMAL) MAN1= autopoint.1 gettext.1 gettextize.1 msgattrib.1 msgcat.1 \ msgcmp.1 msgcomm.1 msgconv.1 msgen.1 msgexec.1 \ msgfilter.1 msgfmt.1 msggrep.1 msginit.1 msgmerge.1 \ @@ -52,14 +61,10 @@ bindtextdomain.3 bind_textdomain_codeset.3 INFO= autosprintf gettext - -.ifdef USE_GETTEXT -.error USE_GETTEXT is defined as an environment variable, or in the arguments \ - to "make". Please unset it and restart the build. +.else +MAN1= msgfmt.1 .endif -.include - .if ${OSVERSION} < 500000 CONFIGURE_ARGS+= --with-libexpat-prefix=${LOCALBASE}/lib LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 @@ -74,6 +79,15 @@ @sleep 5 .endif +.if defined(WITH_MINIMAL) +post-patch: + # make msgfmt static + @${REINPLACE_CMD} -e \ + 's:$$(LINK) $$(msgfmt_LDFLAGS):$$(LINK) $$(msgfmt_LDFLAGS) -static:'\ + ${WRKSRC}/gettext-tools/src/Makefile.in + +.endif + post-build: .if exists(${PREFIX}/bin/kaffe) -${MV} ${PREFIX}/bin/jar.backup ${PREFIX}/bin/jar @@ -82,9 +96,11 @@ @sleep 5 .endif +.if !defined(WITH_MINIMAL) pre-install: @${RM} -f ${PLISTU} @${TOUCH} ${PLISTU} + .if !defined (NOPORTDOCS) .for ii in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 foot toc ${ECHO_CMD} %%DOCSDIR%%/gettext_${ii}.html >> ${PLISTU} @@ -125,6 +141,25 @@ .if !defined (WITH_HTMLMAN) cd ${WRKSRC}/gettext-runtime/man && make uninstall-html cd ${WRKSRC}/gettext-tools/man && make uninstall-html +.endif + +.else # WITH_MINIMAL +pre-install: + @${ECHO} include/libintl.h > ${PLIST} + @${ECHO} lib/libintl.a >> ${PLIST} + @${ECHO} lib/libintl.la >> ${PLIST} + @${ECHO} lib/libintl.so >> ${PLIST} + @${ECHO} lib/libintl.so.6 >> ${PLIST} + @${ECHO} bin/msgfmt >> ${PLIST} + +do-install: + ${INSTALL_MAN} ${WRKSRC}/gettext-tools/man/msgfmt.1 ${PREFIX}/man/man1/ + ${INSTALL_DATA} ${WRKSRC}/gettext-tools/intl/libintl.h ${PREFIX}/include/ + ${INSTALL_DATA} ${WRKSRC}/gettext-tools/intl/.libs/libintl.a ${PREFIX}/lib/ + ${INSTALL_DATA} ${WRKSRC}/gettext-tools/intl/.libs/libintl.so.6 ${PREFIX}/lib/ + (cd ${WRKSRC} && ${LIBTOOL} --mode=install \ + ${INSTALL_DATA} ${WRKSRC}/gettext-tools/intl/libintl.la ${PREFIX}/lib/) + ${INSTALL_PROGRAM} ${WRKSRC}/gettext-tools/src/msgfmt ${PREFIX}/bin/msgfmt .endif .include >Release-Note: >Audit-Trail: >Unformatted: