From owner-freebsd-ports@FreeBSD.ORG Fri Aug 29 20:51:03 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 7524C16A4BF for ; Fri, 29 Aug 2003 20:51:03 -0700 (PDT) Received: from ms-smtp-01.southeast.rr.com (ms-smtp-01.southeast.rr.com [24.93.67.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D7E643FDF for ; Fri, 29 Aug 2003 20:51:02 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158])h7U3i04P025127; Fri, 29 Aug 2003 23:44:01 -0400 (EDT) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) h7U3o5ff004741; Fri, 29 Aug 2003 23:50:05 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Simon Barner In-Reply-To: <20030830003102.GB11915@zi025.glhnet.mhn.de> References: <20030830003102.GB11915@zi025.glhnet.mhn.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-bBiEJyYScnUHL+mgDRlT" Organization: MarcusCom, Inc. Message-Id: <1062215457.25269.4.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Fri, 29 Aug 2003 23:50:57 -0400 X-Spam-Status: No, hits=-11.6 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-ports@freebsd.org Subject: Re: 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 03:51:03 -0000 --=-bBiEJyYScnUHL+mgDRlT Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-08-29 at 20:31, Simon Barner wrote: > Hi, >=20 > I saw that the new version of `gettext' (0.12.1) that is used by the port= s > collection broke the www/aria port: >=20 > http://bento.freebsd.org/errorlogs/i386-4-latest/aria-1.0.0.log >=20 > 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. >=20 > 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). It happens in three (not counting xmms which has already been patched): www/aria japanese/ebview math/oleo >=20 > 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 :-) >=20 > 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. >=20 > 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 compar= e > that variable _numerically_ as in >=20 > -------> >=20 > XGETTEXT_VER=3D`xgettext -V | awk 'NR =3D=3D 1 { gsub (/\./, "", $$4); > gsub (/^0*/, "", $$4); print $$4}'` Use XGETTEXT_VER!=3D instead. You should also add things like ${LOCALBASE}, and use ${AWK} where appropriate. Joe >=20 > .include > =20 > .if ${XGETTEXT_VER} > 115 > MAKE_ENV+=3D -DXGETTEXT_FLAGS=3D" --from-code " > .endif > =20 > foo:=20 > @echo ${MAKE_ENV} >=20 > <------- >=20 > But unfortunately, XGETTEXT_VER is always interpreted as a string: >=20 > 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 >=20 > I searched the archives, but I still don't know how to handle this... > Please help :-) >=20 > Regards, > Simon --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-bBiEJyYScnUHL+mgDRlT Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/UB8hb2iPiv4Uz4cRAtqRAKCQX9uNACct66WoXovKY6nxYQAnHgCeOf5E J4n7Phu599iLanm5FWfgMdg= =EXXe -----END PGP SIGNATURE----- --=-bBiEJyYScnUHL+mgDRlT--