From owner-freebsd-ports@FreeBSD.ORG Fri Aug 29 17:31:08 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CED2116A4BF for ; Fri, 29 Aug 2003 17:31:08 -0700 (PDT) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4C9043FB1 for ; Fri, 29 Aug 2003 17:31:07 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id 965633873A; Sat, 30 Aug 2003 02:31:02 +0200 (CEST) Date: Sat, 30 Aug 2003 02:31:02 +0200 From: Simon Barner To: freebsd-ports@freebsd.org Message-ID: <20030830003102.GB11915@zi025.glhnet.mhn.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de Subject: Gettext update broke port - need help with fix X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 00:31:08 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I saw that the new version of `gettext' (0.12.1) that is used by the ports collection broke the www/aria port: http://bento.freebsd.org/errorlogs/i386-4-latest/aria-1.0.0.log The reason for this is that some of the port's source files contain C++ comments with non-ascii characters. These where ignored by the old version of `xgettext' (0.11.5) but the new one needs an extra command-line option (--from-source) in order to cope with those files. Since this problem might happen in more than a few ports, a clean solution is needed imo (one could of course add patches for each and every troublesome comment, but I think we don't want that). Passing that command-line option to the new version of `xgettext' looks like a good approach. I was able to extract its version number with the following command (I am sure there is a simpler solution, but well. I found that one :-) xgettext -V | awk 'NR =3D=3D 1 { gsub (/\./, "", $4); \ gsub (/^0*/, "", $4); print $4}' =20 This yields 115 for the old 'xgettext' and 121 for the new one. What I would like to do is to pass the result of that command into a variable (with back-ticks, i.e. XGETTEXT_VER=3D`xgettext ...`) and compare that variable _numerically_ as in -------> XGETTEXT_VER=3D`xgettext -V | awk 'NR =3D=3D 1 { gsub (/\./, "", $$4); gsub (/^0*/, "", $$4); print $$4}'` =2Einclude =20 =2Eif ${XGETTEXT_VER} > 115 MAKE_ENV+=3D -DXGETTEXT_FLAGS=3D" --from-code " =2Eendif =20 foo:=20 @echo ${MAKE_ENV} <------- But unfortunately, XGETTEXT_VER is always interpreted as a string: make foo "Makefile", line 37: warning: String comparison operator should be either =3D=3D or !=3D "Makefile", line 37: Malformed conditional (${XGETTEXT_VER} < 115) Unterminated {} clause "" "Makefile", line 37: Error in archive specification: "" "Makefile", line 39: if-less endif "Makefile", line 39: Need an operator make: fatal errors encountered -- cannot continue I searched the archives, but I still don't know how to handle this... Please help :-) Regards, Simon --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/T/BGCkn+/eutqCoRAs5eAKCJWdP3TBjldzpPXs1Ywhw4ebGI2ACgk3H8 jFZ+nkWoUrP38fsFl/9l8RM= =t2uC -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--