Opened 2 years ago

Last modified 3 months ago

#58526 accepted update

gettext: update to 0.21

Reported by: akimd (Akim Demaille) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: l2dy (Zero King), jmroot (Joshua Root), i0ntempest, fredowski, ShadSterling (Shad Sterling), mascguy (Christopher Nielsen)
Port: gettext

Description

Hi!

GNU Gettext 0.20.1 is out there. It now also includes libtextstyle, which is used by the latest release of Bison for instance.

Thanks!

Change History (27)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Cc: ryandesign@… removed
Owner: set to ryandesign
Status: newassigned

comment:2 in reply to:  description ; Changed 2 years ago by ryandesign (Ryan Schmidt)

Status: assignedaccepted

Yes, but upstream recommends libtextstyle be packaged separately.

comment:3 in reply to:  2 Changed 2 years ago by akimd (Akim Demaille)

Replying to ryandesign:

Yes, but upstream recommends libtextstyle be packaged separately.

It makes sense. Thanks!

comment:4 Changed 22 months ago by akimd (Akim Demaille)

Ping?

Cheers!

comment:5 Changed 22 months ago by ryandesign (Ryan Schmidt)

When I last looked into it, I could not find a way to build and install the parts of gettext that we want in the main port (the parts that the 0.19.x port installs) without also building and installing the part we don't want (the libtextstyle part, which I want in a separate subport).

comment:6 Changed 13 months ago by l2dy (Zero King)

Cc: l2dy added

comment:7 Changed 13 months ago by ryandesign (Ryan Schmidt)

Gettext developer Bruno Haible emailed me this:

In https://savannah.gnu.org/bugs/index.php?56333 you find a recipe for building libtextstyle and the rest of gettext separately:

1)

rm -rf gettext-0.20.1
tar xfz gettext-0.20.1.tar.gz
cd gettext-0.20.1
cd libtextstyle
./configure --prefix=PREFIX CPPFLAGS=-Wall
make
[optionally] make check
make install

2)

rm -rf gettext-0.20.1
tar xfz gettext-0.20.1.tar.gz
cd gettext-0.20.1
cd gettext-runtime
./configure --prefix=PREFIX CPPFLAGS=-Wall
make
[optionally] make check
make install
cd ..
cp -a PREFIX/include/textstyle* gettext-tools/src
cp -a PREFIX/lib/libtextstyle.* libtextstyle/lib
cd gettext-tools
./configure --prefix=PREFIX CPPFLAGS=-Wall
make
[optionally] make check
make install

In the next GNU gettext release, there will be an easier way for 2):

rm -rf gettext-0.20.1
tar xfz gettext-0.20.1.tar.gz
cd gettext-0.20.1
cd gettext-runtime
./configure --prefix=PREFIX CPPFLAGS=-Wall
make
[optionally] make check
make install
cd ..
cd gettext-tools
./configure --with-installed-libtextstyle --with-installed-csharp-dll --prefix=PREFIX CPPFLAGS=-Wall
make
[optionally] make check
make install

comment:8 Changed 11 months ago by akimd (Akim Demaille)

Hi all!

Gentle reminder. I'm also very interested in getting a port for libtextstyle (and Bison would depend upon it). Maybe that would be easier to do?

Thanks for the efforts, cheers!

comment:9 Changed 11 months ago by ryandesign (Ryan Schmidt)

I did look into this again recently but don't have anything ready to share yet.

libtextstyle will be a subport of gettext.

It may be necessary additionally to separate gettext into gettext-runtime and gettext-tools, as upstream recommends. We can keep the main gettext port as a placeholder that depends on both, and ports can transition over time to depending on gettext-runtime and/or gettext-tools as needed.

An additional complication is that there is now a gettext-bootstrap port. The need to properly handle that as well (do we need gettext-runtime-bootstrap and gettext-tools-bootstrap and libtextstyle-bootstrap?) is what caused me once again to put this update aside for the time being.

comment:10 in reply to:  9 ; Changed 11 months ago by akimd (Akim Demaille)

Hi Ryan, thanks for the feedback!

Replying to ryandesign:

An additional complication is that there is now a gettext-bootstrap port. The need to properly handle that as well (do we need gettext-runtime-bootstrap and gettext-tools-bootstrap and libtextstyle-bootstrap?)

I don't know what these -bootstrap ports are for. But maybe the question is rhetorical, not really meant for the reader :)

is what caused me once again to put this update aside for the time being.

comment:11 in reply to:  10 Changed 11 months ago by ryandesign (Ryan Schmidt)

Cc: jmroot added

Replying to akimd:

I don't know what these -bootstrap ports are for.

We want to build everything using libc++ on Mac OS X 10.6 and later, but Mac OS X 10.6 does not provide libc++; we have to build it and install it. There is a chicken and egg problem: how could you build libc++'s dependencies using libc++ if there is no libc++ yet? The answer was to provide "bootstrap" versions of libc++'s dependencies that would use libstdc++ instead of libc++. gettext is one of those dependencies.

It could be argued that for the bootstrap ports we should disable as much optional functionality as possible, since they're just for us to use to build libc++ and are not intended for users to use directly, and that that might include natural language support provided by gettext. I wasn't involved with the creation of the bootstrap ports so I don't know why that wasn't done, but it would introduce additional complexity into the bootstrap ports. Maybe it was felt to be better to keep the bootstrap and non-bootstrap versions of the ports as similar as possible.

Joshua, do you recall whether it was considered to disable gettext support in the bootstrap ports so that we wouldn't need to have a gettext-bootstrap port?

comment:12 Changed 11 months ago by akimd (Akim Demaille)

Thanks a lot for the details! It makes a lot of sense. (Maybe "port info" for these packages should explain a bit their point, and possibly point to a page explaining all this?)

comment:13 Changed 11 months ago by ryandesign (Ryan Schmidt)

That could certainly be done, but I'm not going to work on it myself as I have a lot of other things I'm working on.

comment:14 Changed 11 months ago by jmroot (Joshua Root)

If the dependency can be removed, then sure, that's a better option than having a bootstrap version of a port. But I'm not aware of a way to turn off python's use of gettext, nor am I sure the dependents of python27-bootstrap don't need that functionality. As far as I'm aware, python only uses libintl, so the other subports likely don't need -bootstrap flavours.

I didn't look at the possibility of disabling gettext in xz since python already needed it.

comment:15 Changed 11 months ago by akimd (Akim Demaille)

I have no idea how far these packages go into their use of gettext, but maybe a simple stub would do (#define _). Besides, packages ought to offer a --disable-nls option to avoid all this mess when you don't need it. Packages that use Gettext's Autoconf macros support this by default.

comment:16 Changed 11 months ago by ryandesign (Ryan Schmidt)

--disable-nls is what I was naively assuming, but I don't see such an option for python's configure script. Josh is the maintainer of the python ports so he would know. :) Still, I feel there must be a way to disable python's NLS, since macOS includes python but not gettext.

Last edited 11 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:17 in reply to:  16 Changed 11 months ago by ryandesign (Ryan Schmidt)

Replying to ryandesign:

there must be a way to disable python's NLS

This at least compiles for me: https://github.com/macports/macports-ports/pull/7074

comment:18 in reply to:  14 Changed 11 months ago by ryandesign (Ryan Schmidt)

Replying to jmroot:

I didn't look at the possibility of disabling gettext in xz since python already needed it.

https://github.com/macports/macports-ports/pull/7075

comment:19 Changed 11 months ago by i0ntempest

Cc: i0ntempest added

comment:20 Changed 10 months ago by fredowski

Hi everybody,

I created a pull request for the update to gettext 0.20.2 with the proposed split runtime and tools subports.

https://github.com/macports/macports-ports/pull/7399

I removed the bootstrap subport, so Ryans python2.7 update should be done together. I ran into the default language setting problem for the pspp application which is fixed in the 0.20.2 release.

https://savannah.gnu.org/bugs/?58537

So this update has some real benefit...

comment:21 Changed 9 months ago by akimd (Akim Demaille)

Hi all,

Is there anything that prevents using fredowski's work?

FWIW, gettext 0.21 was released. It contains an updated libtextstyle (which should be installed as a separate port), on which Bison should depend.

Cheers!

comment:22 in reply to:  21 Changed 9 months ago by ryandesign (Ryan Schmidt)

Replying to akimd:

Is there anything that prevents using fredowski's work?

Yes, there is the license issue, and the removal of the gettext-bootstrap subport that is still being used; the other PRs that remove the use of gettext-bootstrap need to be tested and merged first.

FWIW, gettext 0.21 was released. It contains an updated libtextstyle (which should be installed as a separate port), on which Bison should depend.

Yes, it was. Yes, libtextstyle should be a separate subport; it already is in the PR. The PR should be updated to the new version.

comment:23 Changed 7 months ago by ryandesign (Ryan Schmidt)

Cc: fredowski added
Keywords: haspatch added
Summary: gettext: 0.20.1 was releasedgettext: update to 0.21

Just a note that I haven't forgotten about this, and I know that the PR has been updated to 0.21; thank you fredowski.

https://github.com/macports/macports-ports/pull/7399

comment:24 Changed 7 months ago by ShadSterling (Shad Sterling)

Cc: ShadSterling added

comment:25 Changed 5 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:26 Changed 4 months ago by ryandesign (Ryan Schmidt)

In 67b09b7215e90fee0dbc9403b124d3eab6f91c92/macports-ports (master):

xz-bootstrap: Remove nonessential features

Don't link with gettext.
Don't use libiconv.
Don't create a static library.
Don't create lzmautils compatibility programs and symlinks.
Don't create the xzdec program.
Don't create the scripts.
Don't install documentation.
Don't install manpages.

See: #58526

comment:27 Changed 3 months ago by akimd (Akim Demaille)

Hi, Sorry about that, but...

Ping!

Note: See TracTickets for help on using tickets.