Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/improve i18n related thing #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tagoh
Copy link
Contributor

@tagoh tagoh commented Mar 30, 2023

This contains a fix of the build fail with enabling NLS support on BSD-based system.

Fixes #59

This contains a fix of the build fail with enabling
NLS support on BSD-based system.

Fixes dov#59
@nunotexbsd
Copy link

Hello,

I've tested patch and I've got (FreeBSD):

Making all in src
--- paps-paps.o ---
--- paps-format_from_dict.o ---
--- paps-paps.o ---
c++ -DHAVE_CONFIG_H -I. -I..  -DGETTEXT_PACKAGE='"paps"' -DDATADIR='"/usr/local/"' -I/usr/local/include  -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/u
sr/local/lib/glib-2.0/include -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/i
nclude/pixman-1 -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE -pthread -D_THREAD_SAFE -D_THREAD_SAFE -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
 -MT paps-paps.o -MD -MP -MF .deps/paps-paps.Tpo -c -o paps-paps.o `test -f 'paps.cc' || echo './'`paps.cc
--- paps-format_from_dict.o ---
c++ -DHAVE_CONFIG_H -I. -I..  -DGETTEXT_PACKAGE='"paps"' -DDATADIR='"/usr/local/"' -I/usr/local/include  -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/u
sr/local/lib/glib-2.0/include -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/i
nclude/pixman-1 -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE -D_THREAD_SAFE -pthread -D_THREAD_SAFE -D_THREAD_SAFE -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
 -MT paps-format_from_dict.o -MD -MP -MF .deps/paps-format_from_dict.Tpo -c -o paps-format_from_dict.o `test -f 'format_from_dict.cc' || echo './'`format_from_dict.cc
In file included from format_from_dict.cc:23:
./format_from_dict.h:30:23: error: no template named 'variant' in namespace 'std'
using scalar_t = std::variant<int, std::string, double, std::time_t>;
                 ~~~~~^
./format_from_dict.h:31:38: error: use of undeclared identifier 'scalar_t'
using dict_t = std::map<std::string, scalar_t>;
                                     ^
./format_from_dict.h:36:30: error: unknown type name 'dict_t'
                             dict_t dict);
                             ^
format_from_dict.cc:28:32: error: unknown type name 'scalar_t'
static string scalar_to_string(scalar_t scalar,
                               ^
format_from_dict.cc:65:25: error: unknown type name 'dict_t'
                        dict_t dict)
                        ^
--- paps-paps.o ---
In file included from paps.cc:42:
./format_from_dict.h:30:23: error: no template named 'variant' in namespace 'std'
using scalar_t = std::variant<int, std::string, double, std::time_t>;
                 ~~~~~^
./format_from_dict.h:31:38: error: use of undeclared identifier 'scalar_t'
using dict_t = std::map<std::string, scalar_t>;
                                     ^
./format_from_dict.h:36:30: error: unknown type name 'dict_t'
                             dict_t dict);
                             ^
paps.cc:160:3: error: unknown type name 'dict_t'
  dict_t document_info;
  ^
paps.cc:221:45: error: unknown type name 'dict_t'
                                            dict_t&           document_info,
                                            ^
paps.cc:227:45: error: unknown type name 'dict_t'
                                            dict_t& document_info);
                                            ^

Any clues?

Thanks

@tagoh
Copy link
Contributor Author

tagoh commented Mar 31, 2023

Which C++ did you use? If they support C++17, std::variant class should be available.

@nunotexbsd
Copy link

Sorry! I forgot to add c++17 std.
It builds fine!

Thanks

@tagoh
Copy link
Contributor Author

tagoh commented Mar 31, 2023

Oops, I forgot to make nls support optional in meson build.

@nunotexbsd
Copy link

Oops, I forgot to make nls support optional in meson build.

I will do further tests to see if port needs an NLS knob to turn it on/off by adding an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FreeBSD: 0.8.0 fails to build (autoreconf)
2 participants