summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/common.sh12
-rw-r--r--lib/load.sh3
3 files changed, 17 insertions, 0 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 4f26b57..5c2a6f9 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -26,11 +26,13 @@ libdir = @libdir@
datadir = @datadir@
localedir = @localedir@
libopkhelper = @libopkhelper@
+libopkbuild_1 = @libopkbuild_1@
sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\
s&@@PACKAGE_VERSION@@&$(package_version)&;\
s&@@LOCALEDIR@@&$(localedir)&;\
s&@@LIBOPKHELPER@@&$(libopkhelper)&;\
+ s&@@LIBOPKBUILD_1@@&$(libopkbuild_1)&;
.SUFFIXES:
.SUFFIXES: .sh .sm
diff --git a/lib/common.sh b/lib/common.sh
index 14762db..b0c465c 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -48,3 +48,15 @@ _oh_return()
return ${1}
}
+
+oh_init()
+{
+ ob_use locale
+ ob_use output
+
+ # Since nothing other than opkhelper is supposed to use libopkhelper, we can
+ # do strange things like affecting application-wide locale settings from the
+ # library and assume that no one will play with them.
+ ob_set_locale_path '@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
+ ob_set_text_domain 'opkhelper'
+}
diff --git a/lib/load.sh b/lib/load.sh
index 2a71036..0b54f4a 100644
--- a/lib/load.sh
+++ b/lib/load.sh
@@ -24,6 +24,9 @@ _OH_LOAD_SM='true'
# We have to manually load the "common" module so we can use it in oh_use.
. '@@LIBOPKHELPER@@/common.sm'
+# Assume that every library module and utility uses libopkbuild.
+. '@@LIBOPKBUILD_1@@/load.sm'
+
oh_use()
{
_oh_local _ohu_module