diff options
author | Stanislav Brabec <utx@penguin.cz> | 2009-02-25 20:30:09 +0000 |
---|---|---|
committer | Michael 'Mickey' Lauer <mickey@vanille-media.de> | 2009-02-27 14:11:34 +0100 |
commit | 9e49fd17ab1da5589b089b02ae8129ac7341c0a2 (patch) | |
tree | 69f89fddb23ad90609848f02158f2595276a30a3 /packages | |
parent | 88539a8d8a18bde9bc50cfa97fa62b4b216f7d45 (diff) |
mc-4.6.2: Miscelaneous fixes:
* Correctly build help whiles cross compiling.
* Detect codeset from langinfo tables, not locale name.
* Ignore modifiers with Esc + Numeral F-keys emulation.
* Package locale dependent files to locale sub-packages.
* Install profile.
* Use standars stages.
* Fixed Serbian locale.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/mc/mc-4.6.2/cross-compile.patch | 16 | ||||
-rw-r--r-- | packages/mc/mc-4.6.2/mc-utf8-slang-codeset.patch | 20 | ||||
-rw-r--r-- | packages/mc/mc-4.6.2/multi-press-f-keys.patch | 55 | ||||
-rw-r--r-- | packages/mc/mc.inc | 47 | ||||
-rw-r--r-- | packages/mc/mc_4.6.2.bb | 16 |
5 files changed, 127 insertions, 27 deletions
diff --git a/packages/mc/mc-4.6.2/cross-compile.patch b/packages/mc/mc-4.6.2/cross-compile.patch new file mode 100644 index 0000000000..53879e9cef --- /dev/null +++ b/packages/mc/mc-4.6.2/cross-compile.patch @@ -0,0 +1,16 @@ +Index: mc-4.6.2/src/Makefile.am +=================================================================== +--- mc-4.6.2.orig/src/Makefile.am 2009-02-01 19:30:21.000000000 +0000 ++++ mc-4.6.2/src/Makefile.am 2009-02-25 13:24:16.000000000 +0000 +@@ -14,7 +14,10 @@ + endif + + noinst_PROGRAMS = man2hlp +-man2hlp_LDADD = $(GLIB_LIBS) ++man2hlp_CFLAGS = $(GLIB_CFLAGS_FOR_BUILD) ++man2hlp_LDADD = $(GLIB_LIBS_FOR_BUILD) ++$(man2hlp_OBJECTS): CC=$(CC_FOR_BUILD) ++man2hlp_LINK = $(LD_FOR_BUILD) -o $@ + + mcmfmt_SOURCES = mfmt.c + diff --git a/packages/mc/mc-4.6.2/mc-utf8-slang-codeset.patch b/packages/mc/mc-4.6.2/mc-utf8-slang-codeset.patch new file mode 100644 index 0000000000..ff4780c7ce --- /dev/null +++ b/packages/mc/mc-4.6.2/mc-utf8-slang-codeset.patch @@ -0,0 +1,20 @@ +--- mc-4.6.2/slang/slcommon.c ++++ mc-4.6.2/slang/slcommon.c +@@ -31,7 +31,7 @@ + # include <locale.h> + #endif + +-#ifdef HAVE_LANGINFO_H ++#ifdef HAVE_LANGINFO_CODESET + # include <langinfo.h> + #endif + +@@ -87,7 +87,7 @@ + + (void) setlocale (LC_ALL, ""); + +-#ifdef HAVE_NL_LANGINFO_CODESET ++#ifdef HAVE_LANGINFO_CODESET + locale = nl_langinfo (CODESET); + if ((locale != NULL) && (*locale)) + { diff --git a/packages/mc/mc-4.6.2/multi-press-f-keys.patch b/packages/mc/mc-4.6.2/multi-press-f-keys.patch new file mode 100644 index 0000000000..571402552b --- /dev/null +++ b/packages/mc/mc-4.6.2/multi-press-f-keys.patch @@ -0,0 +1,55 @@ +http://www.midnight-commander.org/ticket/287 +Index: mc-4.6.2/src/key.c +=================================================================== +--- mc-4.6.2.orig/src/key.c 2009-02-01 19:30:21.000000000 +0000 ++++ mc-4.6.2/src/key.c 2009-02-25 20:16:46.000000000 +0000 +@@ -694,6 +694,8 @@ + /* F0 is the same as F10 for out purposes */ + if (c == KEY_F (0)) + c = KEY_F (10); ++ if (c == KEY_F_IMMUTABLE (0)) ++ c = KEY_F_IMMUTABLE (10); + + /* + * We are not interested if Ctrl was pressed when entering control +@@ -765,6 +767,16 @@ + mod &= ~KEY_M_SHIFT; + } + ++ /* ++ * Numerals may require modifilers with some keymaps or on obscure ++ * keyboards (e. g. F4 = Esc Shift+4). We have to ignore all ++ * modifiers while interpreting Esc + Numeral. ++ */ ++ if (c >= KEY_F_IMMUTABLE (1) && c <= KEY_F_IMMUTABLE (10)) { ++ c += KEY_F (0) - KEY_F_IMMUTABLE (0); ++ mod &= ~KEY_M_MASK; ++ } ++ + if (!alternate_plus_minus) + switch (c) { + case KEY_KP_ADD: +@@ -917,10 +929,9 @@ + this = this->next; + else { + if (parent != NULL && parent->action == MCKEY_ESCAPE) { +- + /* Convert escape-digits to F-keys */ + if (isdigit(c)) +- c = KEY_F (c - '0'); ++ c = KEY_F_IMMUTABLE (c - '0'); + else if (c == ' ') + c = ESC_CHAR; + else +Index: mc-4.6.2/src/myslang.h +=================================================================== +--- mc-4.6.2.orig/src/myslang.h 2009-02-25 18:25:29.000000000 +0000 ++++ mc-4.6.2/src/myslang.h 2009-02-25 18:25:31.000000000 +0000 +@@ -29,6 +29,7 @@ + }; + + #define KEY_F(x) (1000+x) ++#define KEY_F_IMMUTABLE(x) (970+x) + + #define ACS_VLINE SLSMG_VLINE_CHAR + #define ACS_HLINE SLSMG_HLINE_CHAR diff --git a/packages/mc/mc.inc b/packages/mc/mc.inc index 039fea6a61..5bafa9d1d7 100644 --- a/packages/mc/mc.inc +++ b/packages/mc/mc.inc @@ -4,18 +4,18 @@ HOMEPAGE = "http://www.ibiblio.org/mc/" LICENSE = "GPLv2" SECTION = "console/utils" PRIORITY = "optional" -DEPENDS = "ncurses glib-2.0" +DEPENDS = "ncurses glib-2.0 glib-2.0-native" RDEPENDS = "ncurses-terminfo" SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-${PV}.tar.gz" inherit autotools -EXTRA_OECONF = "--disable-glibtest --without-x --without-samba \ +EXTRA_OECONF = "--libexecdir=${libdir} --disable-glibtest --without-x --without-samba \ --without-nfs --without-gpm-mouse --with-screen=ncurses" PACKAGES += "${PN}-extfs ${PN}-hilite" -FILES_${PN} = "${bindir}/ ${libdir}/ ${datadir}/mc/*.*" +FILES_${PN} = "${bindir}/ ${libdir}/ ${datadir}/mc/*.charsets ${datadir}/mc/*.ext ${datadir}/mc/*.hint ${datadir}/mc/*.hlp ${datadir}/mc/*.lib ${datadir}/mc/*.menu ${datadir}/mc/*.rc ${datadir}/mc/bin /etc/profile.d" FILES_${PN}-extfs = "${datadir}/mc/extfs/" FILES_${PN}-hilite = "${datadir}/mc/syntax/" RRECOMMENDS_${PN} += "${PN}-extfs ${PN}-hilite" @@ -24,29 +24,26 @@ RDEPENDS_${PN}-hilite = "${PN}" PACKAGE_ARCH_${PN}-extfs = "all" PACKAGE_ARCH_${PN}-hilite = "all" +export CC_FOR_BUILD = "${BUILD_CC}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" +export LD_FOR_BUILD = "${BUILD_CC}" +do_compile_prepend() { + export GLIB_CFLAGS_FOR_BUILD="`${STAGING_BINDIR_NATIVE}/pkg-config --cflags glib-2.0`" + export GLIB_LIBS_FOR_BUILD="`${STAGING_BINDIR_NATIVE}/pkg-config --libs glib-2.0`" +} -do_configure() { - gnu-configize - oe_runconf +do_install_append() { + if test -f ${D}${datadir}/mc/bin/mc.sh ; then + mkdir -p ${D}/etc/profile.d + mv ${D}${datadir}/mc/bin/mc.*sh ${D}/etc/profile.d + fi } -do_install() { - cd src - oe_runmake 'DESTDIR=${D}' install - cd ../syntax - oe_runmake 'DESTDIR=${D}' install - cd ../po - oe_runmake 'DESTDIR=${D}' install - cd ../vfs - oe_runmake 'DESTDIR=${D}' install - cd .. - - install -m 0644 lib/cedit.menu ${D}${datadir}/mc/ - install -m 0644 lib/edit.indent.rc ${D}${datadir}/mc/ - install -m 0644 lib/edit.spell.rc ${D}${datadir}/mc/ - install -m 0644 lib/mc.charsets ${D}${datadir}/mc/ - install -m 0644 lib/mc.ext ${D}${datadir}/mc/ - install -m 0644 lib/mc.lib ${D}${datadir}/mc/ - install -m 0644 lib/mc.menu ${D}${datadir}/mc/ - install -m 0644 lib/mc.menu.sr ${D}${datadir}/mc/ +PACKAGES_DYNAMIC = "mc-localedata-*" + +python populate_packages_prepend () { + mcdir = bb.data.expand('${datadir}/mc', d) + do_split_packages(d, mcdir, '^mc\.[hm][ile][npn].*\.(.*)$', + output_pattern='mc-locale-%s', + description='%s translation for mc') } diff --git a/packages/mc/mc_4.6.2.bb b/packages/mc/mc_4.6.2.bb index a2a5df8afe..ea44320e26 100644 --- a/packages/mc/mc_4.6.2.bb +++ b/packages/mc/mc_4.6.2.bb @@ -1,4 +1,5 @@ require mc.inc +PR = "r1" HOMEPAGE = "http://www.midnight-commander.org/" # UTF-8 fixes copied from openSUSE Factory: @@ -13,9 +14,13 @@ SRC_URI = "http://www.midnight-commander.org/downloads/${P}.tar.gz \ file://00-76-utf8-hotlist-highlight.patch;patch=1 \ file://00-77-utf8-filename-search-highlight.patch;patch=1 \ file://mc-utf8-nlink.patch;patch=1 \ - file://mc-utf8-look-and-feel.patch;patch=1" + file://mc-utf8-look-and-feel.patch;patch=1 \ + file://mc-utf8-slang-codeset.patch;patch=1 \ + file://multi-press-f-keys.patch;patch=1 \ + file://cross-compile.patch;patch=1" -EXTRA_OECONF = "--enable-charset --libexecdir=${libdir}" +EXTRA_OECONF = "--libexecdir=${libdir} --without-x --without-samba \ +--without-nfs --without-gpm-mouse --enable-charset" do_unpack_append() { bb.build.exec_func('do_utf8_conversion', d) @@ -30,9 +35,11 @@ do_utf8_conversion() { iconv -f iso8859-2 -t utf-8 -o mc.hint.cs.tmp mc.hint.cs && mv mc.hint.cs.tmp mc.hint.cs iconv -f iso8859-2 -t utf-8 -o mc.hint.hu.tmp mc.hint.hu && mv mc.hint.hu.tmp mc.hint.hu iconv -f iso8859-2 -t utf-8 -o mc.hint.pl.tmp mc.hint.pl && mv mc.hint.pl.tmp mc.hint.pl + iconv -f iso8859-5 -t utf-8 -o mc.hint.sr.tmp mc.hint.sr && mv mc.hint.sr.tmp mc.hint.sr iconv -f koi8-r -t utf8 -o mc.hint.ru.tmp mc.hint.ru && mv mc.hint.ru.tmp mc.hint.ru iconv -f koi8-u -t utf8 -o mc.hint.uk.tmp mc.hint.uk && mv mc.hint.uk.tmp mc.hint.uk iconv -f big5 -t utf8 -o mc.hint.zh.tmp mc.hint.zh && mv mc.hint.zh.tmp mc.hint.zh + iconv -f iso8859-5 -t utf-8 -o mc.menu.sr.tmp mc.menu.sr && mv mc.menu.sr.tmp mc.menu.sr popd # convert docs to utf-8 pushd doc @@ -56,5 +63,10 @@ do_utf8_conversion() { iconv -f koi8-r -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in iconv -f koi8-r -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp popd + pushd sr + iconv -f iso8859-5 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in + iconv -f iso8859-5 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp + iconv -f iso8859-5 -t utf-8 -o mcserv.8.in.tmp mcserv.8.in && mv mcserv.8.in.tmp mcserv.8.in + popd popd } |