Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2003 23:50:57 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Simon Barner <barner@in.tum.de>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Gettext update broke port - need help with fix
Message-ID:  <1062215457.25269.4.camel@shumai.marcuscom.com>
In-Reply-To: <20030830003102.GB11915@zi025.glhnet.mhn.de>
References:  <20030830003102.GB11915@zi025.glhnet.mhn.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-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 <bsd.port.pre.mk>
> =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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1062215457.25269.4.camel>