Opened 5 years ago

Closed 2 years ago

#58526 closed update (fixed)

gettext: update to 0.21

Reported by: akimd (Akim Demaille) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: l2dy (Zero King), jmroot (Joshua Root), i0ntempest, fredowski, ShadSterling (Shad Sterling), mascguy (Christopher Nielsen), cooljeanius (Eric Gallager), miken32 (Michael Newton)
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 (37)

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

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

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

Status: assignedaccepted

Yes, but upstream recommends libtextstyle be packaged separately.

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

Replying to ryandesign:

Yes, but upstream recommends libtextstyle be packaged separately.

It makes sense. Thanks!

comment:4 Changed 5 years ago by akimd (Akim Demaille)

Ping?

Cheers!

comment:5 Changed 5 years ago by ryandesign (Ryan Carsten 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 4 years ago by l2dy (Zero King)

Cc: l2dy added

comment:7 Changed 4 years ago by ryandesign (Ryan Carsten 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 4 years 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 4 years ago by ryandesign (Ryan Carsten 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 4 years 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 4 years ago by ryandesign (Ryan Carsten 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 4 years 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 4 years ago by ryandesign (Ryan Carsten 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 4 years 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 4 years 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 4 years ago by ryandesign (Ryan Carsten 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 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:17 in reply to:  16 Changed 4 years ago by ryandesign (Ryan Carsten 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 4 years ago by ryandesign (Ryan Carsten 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 4 years ago by i0ntempest

Cc: i0ntempest added

comment:20 Changed 4 years 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 4 years 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 4 years ago by ryandesign (Ryan Carsten 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 4 years ago by ryandesign (Ryan Carsten 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 3 years ago by ShadSterling (Shad Sterling)

Cc: ShadSterling added

comment:25 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:26 Changed 3 years ago by ryandesign (Ryan Carsten 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 years ago by akimd (Akim Demaille)

Hi, Sorry about that, but...

Ping!

comment:28 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:29 Changed 2 years ago by miken32 (Michael Newton)

It's worth mentioning that this old version of gettext suffers from a bug that causes the wrong language to be displayed for users with more than one preferred language set in Language & Region prefs. My Bash is in French because of it! Looking forward to this update. https://savannah.gnu.org/bugs/?func=detailitem&item_id=49560

comment:30 Changed 2 years ago by miken32 (Michael Newton)

Cc: miken32 added

comment:31 in reply to:  29 ; Changed 2 years ago by cooljeanius (Eric Gallager)

Replying to miken32:

It's worth mentioning that this old version of gettext suffers from a bug that causes the wrong language to be displayed for users with more than one preferred language set in Language & Region prefs. My Bash is in French because of it! Looking forward to this update. https://savannah.gnu.org/bugs/?func=detailitem&item_id=49560

Ah, so THAT'S why I've got so many GNOME apps launching in Japanese for whatever reason! I was wondering about that...

comment:32 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

In b68b11485edccfa987e2fae7be8daa2bc0f64123/macports-ports (master):

python27-bootstrap: Stop using gettext-bootstrap

See: #58526

comment:33 in reply to:  31 Changed 2 years ago by mascguy (Christopher Nielsen)

Replying to cooljeanius:

Ah, so THAT'S why I've got so many GNOME apps launching in Japanese for whatever reason! I was wondering about that...

Personally, mine appear to be using some unholy combination of Vulcan and Klingon! LOL

Jokes aside, I've requested that folks provide final feedback on the PR for this update, as it can now move forward: Merging of the change for python27-bootstrap, per comment:32, was the key prerequisite. So barring any last-minute objections, we should be good-to-go.

comment:34 Changed 2 years ago by fredowski

In fea008a043ad2b96fd1ee872d7b2152de8210614/macports-ports (master):

gettext: update to 0.20.2 with runtime and tools split

  • Update to upstream version 0.20.2
  • Added two subports gettext-runtime and gettext-libtextstyle
  • Removed the gettext-bootstrap subport
  • Removed the myprefix construction

The gettext port can now install just the libintl library via
the gettext-runtime subport. The gettext tools like msgfmt are
installed via the gettext port. The tools have a dependency
libtextstyle which is also added via a subport. I removed
the bootstrap subport and the myprefix parts.

See: #58526
See: https://github.com/macports/macports-ports/pull/7074

comment:35 Changed 2 years ago by mascguy (Christopher Nielsen)

Observers: Despite the commit message - and you can probably blame me, as that was overlooked - getext was updated to 0.21. Sorry for any confusion, but the key is that it's finally been merged!

comment:36 Changed 2 years ago by akimd (Akim Demaille)

Congratulations! That particular change appears to require heroic endurance!

comment:37 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.