File mlterm.spec of Package mlterm

#
# spec file for package mlterm (Version 2.9.3.20071112)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           mlterm
BuildRequires:  coreutils fribidi-devel gcc-c++ giflib-devel gtk2-devel imlib-devel libotf-devel libtiff-devel m17n-lib-devel scim-devel uim-devel update-desktop-files utempter wordcut-devel
License:        BSD 3-Clause
Group:          System/X11/Terminals
AutoReqProv:    on
Provides:       locale(xorg-x11:ja;ko;zh;ar;he)
Version:        2.9.3.20071112
Release:        134
Url:            http://mlterm.sourceforge.net/
# Source0:      http://prdownloads.sourceforge.net/mlterm/mlterm-2.7.0.tar.bz2
#    cvs -d :pserver:anonymous@mlterm.cvs.sourceforge.net:/cvsroot/mlterm login
#    (hit Enter)
#    cvs -d :pserver:anonymous@mlterm.cvs.sourceforge.net:/cvsroot/mlterm checkout mlterm
#    cvs -z3 -d:ext:mfabian@mlterm.cvs.sourceforge.net:/cvsroot/mlterm co mlterm
#    tar jcvf mlterm-2.7.0.tar.bz2 mlterm
Source0:        http://prdownloads.sourceforge.net/mlterm/mlterm-%{version}.tar.bz2
Source10:       %name.desktop
Source11:       %name.png
Patch0:         etc.patch
Patch1:         kiklib-configure.diff
Patch2:         mlterm-lib64.patch
Patch3:         cross-compile-not-needed.patch
Patch5:         mlterm-po.patch
Patch6:         mlterm-gettext-version.patch
Patch7:         norootforbuild.patch
Patch8:         cast-from-pointer-to-integer-of-different-size.patch
Patch9:         mlconfig_fixdups.diff
Patch11:        mlterm-pkgconfig.patch
Patch12:        mlterm-scim.patch
Patch15:        mlterm-configure.patch
Patch16:        missing-includes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Multilingual Terminal Emulator for X

%description
Mlterm is a multilingual terminal emulator for the X Window System.

Multilingual features:

supported charsets: US_ASCII, ISO8859[1-11], ISO8859[13-16], TCVN5712,
VISCII, KOI8_R, KOI8_U, JISX0201, JISX0208, JISX0212, JISX0213, GB2312,
GBK, KSC5601, UHC, CNS11643-N, Big5, UCS2(4)

supported encodings: ISO-8859-[1-11], ISO-8859- [13-16], TCVN5612,
VISCII, KOI8_R, KOI8_U, EUC-JP, EUC-JISX0213, ISO-2022-JP [1, 2, 3],
Shift_JIS, Shift_JISX0213, EUC-KR, UHC, JOHAB, ISO-2022-KR,
ISO-2022-CN, GB2312(EUC-CN), GBK, GB18030, EUC-TW, Big5, Hz, UTF-8

character composition: TIS620, TCVN5712, JISX0213, UNICODE

Multiple xims are also supported and you can dynamically change various
xims.

Other features:

* scroll by wheel mouse

* antialias font (requires Xft and Xrender extensions)

* proportional font

* transparent background

* background image (requires Imlib)

* multiple pty windows

* scrollbar plug-in API (unstable)



Authors:
--------
    Araki Ken <j00v0113@ip.media.kyoto-u.ac.jp>

%package -n mlterm-scim
License:        BSD 3-Clause
Summary:        SCIM plugin for mlterm
Group:          System/X11/Terminals
Provides:       locale(scim:ja;ko;zh;ar;he)

%description -n mlterm-scim
A plugin to use the SCIM input methods directly from mlterm.



Authors:
--------
    Araki Ken <j00v0113@ip.media.kyoto-u.ac.jp>

%package -n mlterm-uim
License:        BSD 3-Clause
Summary:        An uim plugin for mlterm
Group:          System/X11/Terminals
Provides:       locale(uim:ja;ko;zh;ar;he)

%description -n mlterm-uim
A plugin to use the uim input methods directly from mlterm.



Authors:
--------
    Araki Ken <j00v0113@ip.media.kyoto-u.ac.jp>

%package -n mlterm-m17n
License:        BSD 3-Clause
Summary:        A m17n plugin for mlterm
Group:          System/X11/Terminals
Provides:       locale(m17n:ja;ko;zh;ar;he)

%description -n mlterm-m17n
A plugin to use the m17n input methods directly from mlterm.



Authors:
--------
    Araki Ken <j00v0113@ip.media.kyoto-u.ac.jp>

%define pixmapdir  /usr/share/pixmaps

%prep
%setup0 -q -n mlterm-%{version}
%patch0 -p1
%patch1
#%patch2 -p1 -b .lib64
%patch3 -p1
%patch5 -p1 -b .po
%patch6 -p1 -b .gettext-version
%patch7 -p1 -b .norootforbuild
%patch8 -p1
#%patch9 -p1
%patch11
%patch12 -p1
%patch15 -p1
%patch16 -p0
GETTEXT_VERSION=$(gettext --version | head -n 1 | awk '{print $NF}')
perl -pi'*.orig' -e "s/AM_GNU_GETTEXT_VERSION\\([0-9.]+\\)/AM_GNU_GETTEXT_VERSION(${GETTEXT_VERSION})/g" configure.in
rm -rf doc/{en,ja}/CVS
find -name configure -exec chmod 755 {} \;
find . -type f | xargs chmod u+w

%build
autoreconf --force --install 
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strict-aliasing $(/usr/bin/freetype-config --cflags)"
#export CFLAGS="-g -O0 -D_GNU_SOURCE -fno-strict-aliasing $(/usr/bin/freetype-config --cflags)"
./configure --prefix=%{_prefix} \
            --bindir=/usr/bin \
	    --libdir=%{_libdir} \
            --libexecdir=%{_libdir}/mlterm \
	    --mandir=%{_mandir} \
            --infodir=%{_infodir} \
	    --sysconfdir=/etc/X11 \
	    --enable-utmp \
	    --enable-anti-alias \
	    --enable-fribidi \
	    --enable-uim \
	    --enable-m17nlib \
	    --with-tools=mlclient,mlconfig,mlterm-menu,mlcc,mlterm-zoom \
	    --with-scrollbars=sample,extra \
%if %suse_version > 900	    
	    --with-libltdl \
%endif
	    --enable-scim 
make
# make -C tool/w3mmlconfig \
#         prefix=/usr \
# 	LIB_DIR=%{_libdir}/w3mmlconfig \
# 	PERL=/usr/bin/perl 

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{pixmapdir}
install -m 644 doc/icon/mlterm*xpm $RPM_BUILD_ROOT%{pixmapdir}
install -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{pixmapdir}
# make -C tool/w3mmlconfig install \
#         prefix=/usr \
# 	LIB_DIR=%{_libdir}/w3mmlconfig \
# 	PERL=/usr/bin/perl \
# 	DESTDIR=$RPM_BUILD_ROOT
install -m 644 contrib/tool/mlterm-menu/menu $RPM_BUILD_ROOT/etc/X11/mlterm/
mv $RPM_BUILD_ROOT/usr/%{_lib}/mlterm/mlterm-zoom \
   $RPM_BUILD_ROOT/usr/bin/mlterm-zoom
# remove static libraries in plugin directory:
# (mlconfig duplicates buttons when the static libraries are still there!)
rm -f $RPM_BUILD_ROOT%{_libdir}/mlterm/*.*a
# install terminfo entry-description
#mkdir -p $RPM_BUILD_ROOT/usr/share/terminfo/m
#tic -o $RPM_BUILD_ROOT/usr/share/terminfo/ doc/term/mlterm.ti
%find_lang mlconfig
%suse_update_desktop_file -i %name TerminalEmulator

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean

%files -f mlconfig.lang
%defattr(-, root, root)
%doc LICENCE* README* doc/en doc/ja 
%attr(555,root,tty) /usr/bin/mlterm
/usr/share/applications/%name.desktop
/usr/bin/mlclient
/usr/bin/mlcc
/usr/bin/mlterm-zoom
# %{_bindir}/*
# %{_libdir}/w3mmlconfig/
%{_libdir}/libkik.*
%{_libdir}/libmkf.*
%dir %{_libdir}/mlterm/
%{_libdir}/mlterm/libathena.so
%{_libdir}/mlterm/libim-kbd.so
%{_libdir}/mlterm/libmotif.so
%{_libdir}/mlterm/libmozmodern.so
%{_libdir}/mlterm/libnext.so
%{_libdir}/mlterm/libsample.so
%{_libdir}/mlterm/libsample2.so
%{_libdir}/mlterm/mlconfig
%{_libdir}/mlterm/mlterm-menu
%dir /etc/X11/mlterm/
%config /etc/X11/mlterm/*
%{_mandir}/man?/*
%{pixmapdir}/*
#/usr/share/terminfo/m/mlterm

%files -n mlterm-scim
%defattr(-, root, root)
%{_libdir}/mlterm/libim-scim.so

%files -n mlterm-uim
%defattr(-, root, root)
%{_libdir}/mlterm/libim-uim.so

%files -n mlterm-m17n
%defattr(-, root, root)
%{_libdir}/mlterm/libim-m17nlib.so

%changelog
* Thu Aug 28 2008 kukuk@suse.de
- Don't link against old imlib
* Fri Mar 14 2008 schwab@suse.de
- Run autoreconf only once and make sure no obsolete macros are present.
- Always use the included libtool.
* Mon Nov 12 2007 mfabian@suse.de
- update to 2.9.3.20071112 (= 2.9.4 pre):
  • mlterm/x_screen.c: added config key string "title" to allow
  change pty title by "mlcc title foobar".
  • mlter/ml_term.h: updated for ml_vt100_parser_set_logging_vt_seq.
  • xwindow/x_dnd.h: handle zero-length property properly.
  • xwindow/x_screen.c: selection can be expanded on middle-click.
  (Thanks to ssakane)
- remove bugzilla-238194-array-subscript-out-of-bounds.patch
  (included upstream).
- fix the build with gcc 4.3.
* Wed Jan 24 2007 mfabian@suse.de
- update to 2.9.3.20070123 (= 2.9.4 pre).
- fix Bugzilla #238194.
* Fri Sep 08 2006 mfabian@suse.de
- update to 2.9.3 (various bugfixes).
- remove mlterm-lib64.patch (included upstream).
- remove buggy_wm.diff (now included).
- remove bugzilla-105320-use-utempter.patch (included upstream).
- remove fix-implicit-declarations_2.patch (included upstream).
* Fri Aug 11 2006 mfabian@suse.de
- fix build (mkinstalldirs problem).
- move binaries from /usr/X11R6/bin to /usr/bin (because of X11R7).
* Mon Jun 19 2006 schwab@suse.de
- Don't use automake macros without using automake.
* Wed Mar 08 2006 kkaempf@suse.de
- fix locale(...) provide.
* Wed Mar 01 2006 mfabian@suse.de
- add "Provides: locale(xorg-x11:ja,ko,zh,ar,he)" and
  similar provides to the sub-packages.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 29 2005 sbrabec@suse.cz
- Do not install terminfo entry already present in ncurses.
  Cleans rpm -V output.
* Sun Oct 02 2005 stbinner@suse.de
- fix capitalization of .desktop GenericName entry
* Thu Sep 22 2005 mfabian@suse.de
- use better patch to fix the implicit declarations by
  MINAMI Hirokazu <minami@mistfall.net>.
* Thu Sep 22 2005 mfabian@suse.de
- fix implicit declarations.
* Mon Aug 22 2005 mfabian@suse.de
- Bugzilla #105320: use libutempter again.
* Fri Aug 19 2005 tiwai@suse.de
- added icon file and fixed desktop file (#105842)
* Tue Aug 02 2005 ro@suse.de
- use gtk2-devel-packages in nfb
* Mon Jun 06 2005 uli@suse.de
- fixed to build with SCIM 1.3
* Thu May 19 2005 ro@suse.de
- fix build with current pkgconfig
* Wed May 04 2005 mfabian@suse.de
- Bugzilla #81227: split input method plugins into sub-packages
  (mlterm-scim, mlterm-uim, mlterm-m17n) so that mlterm itself
  doesn't require scim, uim, or m17n.
* Fri Apr 01 2005 schwab@suse.de
- Fix broken configure script.
* Thu Mar 17 2005 mfabian@suse.de
- add patch for transparency on buggy window managers
- add default keybinding KP_Begin="\e[E" (requested by
  the mined author, Thomas Wolff <mined@towo.net> to make the
  '5' key usable in mined.
* Mon Mar 07 2005 mfabian@suse.de
- update to 2.9.2:
  + [SECURITY] Fixed possible integer overflow.
- enable scim support
* Tue Feb 15 2005 mfabian@suse.de
- update to 2.9.1.20050215
* Wed Jan 19 2005 mfabian@suse.de
- update to 2.9.1.20050119 (now includes fix by
  Seiichi SATO <ssato@sh.rim.or.jp> to make IM plugin work with
  libltdl even when the plugin directory contains .a and .la files.
* Fri Jan 14 2005 mfabian@suse.de
- update to 2.9.1.20050114
- add "Shift+space=IM_HOTKEY" to /etc/X11/mlterm/key.
- Bugzilla #42964: add mlterm terminfo entry and make TERM=mlterm
  the default.
* Sat Jan 08 2005 mfabian@suse.de
- update to 2.9.1.20050107.
* Wed Jan 05 2005 mfabian@suse.de
- update to 2.9.1.20050105.
- remove mlterm-configure.patch, and autoconf.patch
  (included upstream).
* Sun Sep 05 2004 mfabian@suse.de
- update to 2.8.0.2004090.
- enable uim.
- fix typo in man-page and compiler warning.
* Sun Sep 05 2004 mfabian@suse.de
- replace Kochi fonts with Sazanami fonts in config files.
- add entry for SCIM in /etc/X11/mlterm/xim.
* Tue Mar 02 2004 mfabian@suse.de
- update to 2.8.0.20040301.
- build against gtk2 instead of gtk1 now.
* Tue Feb 10 2004 mfabian@suse.de
- update to 2.8.0.20040210.
  fixes problems with dec special characters when starting mlterm
  like this "mlterm -A false -Y true" (Background was not redrawn).
* Tue Feb 03 2004 mfabian@suse.de
- update to 2.8.0.20040203.
- remove initial-font-size-out-of-range.patch (included upstream).
- make scrollbars selectable again and add the "pixmap_engine"
  scrollbar.
- mlterm-zoom is included in CVS now, drop extra tarball.
- add -fno-strict-aliasing
* Thu Jan 29 2004 mfabian@suse.de
- add initial-font-size-out-of-range.patch to fix crash when
  initial font size if out of range (e.g. "mlterm -R 1-10 -w 16").
- update to 2.8.0-20040129.
* Fri Jan 23 2004 mfabian@suse.de
- update to 2.8.0.20040123
- remove fontsize-range-segfault.patch and
  fontsize-range-enable.patch (included upstream).
* Mon Jan 19 2004 mfabian@suse.de
- update to 2.8.0.20040119
- fix segfault when only one argument is given to the "-R" option.
- make the "-R" option with correct parameters actually work.
- add mlterm-zoom-0.2.
- add default keybindings to increase/decrease fontsize with
  Shift+KP_Add/Shift+KP_Subtract respectively.
* Wed Jan 14 2004 mfabian@suse.de
- update to 2.8.0.20040109
- remove mlterm-enable-keypad.patch (included upstream).
- remove mlterm-default-xim.patch (included upstream).
* Tue Aug 19 2003 mfabian@suse.de
- use use_login_shell=false by default
- improve default font settings:
  * add 10x20 and 18x18ja font pair for iso10646-1 encoding
  * add "luxi mono" and "kochi gothic" font pair for iso10646-1
  encoding as a fallback for non-specified bitmap sizes
  * replace "kochi-mincho" by "kochi-gothic" (for Xft and core
  fonts)
  * add jiskan24 for jisx0208.1986 encoding (core fonts)
- add translations to desktop file.
* Sat Aug 16 2003 adrian@suse.de
- add desktop file
* Thu Jul 03 2003 mfabian@suse.de
- make KP_insert work as well.
* Wed Jul 02 2003 mfabian@suse.de
- make keys on keypad work when numlock is off.
* Mon Jun 30 2003 mfabian@suse.de
- remove w3mmlconfig, it's disabled anyway because of security
  concerns.
- make it build for older distributions as well
* Wed Jun 25 2003 mfabian@suse.de
- update to 2.7.0.
- remove mlterm-mlterm-menu.patch, mlterm-xft-null-pointer.patch,
  mlterm-libtool.patch:
  fixed upstream.
- add 10 pixel version of efont-unicode to the default font
  settings.
- update German translations (mlterm-po.patch).
* Mon Jun 23 2003 ro@suse.de
- fix build with current gettext/libtool
* Tue Apr 29 2003 mfabian@suse.de
- add "fontconfig fontconfig-devel" to neededforbuild
* Tue Mar 25 2003 mfabian@suse.de
- update to 2.6.3.20030325
  - cursor foreground and background colour can be selected now
  - setup changes done in the setup dialog can be saved now
  - new setup menu 'mlterm-menu' which is launched with
  "Ctrl+Left mouse button" by default
- mlterm-mlterm-menu.patch: use /etc/X11/mlterm/menu if
  ~/.mlterm/menu doesn't exist
- update German translation.
- mlterm-xft-null-pointer.patch: avoid crashes on 64 bit systems
  when using anti-aliasing.
- add compose_dec_special_font=true to /etc/X11/mlterm/main
* Mon Mar 24 2003 mfabian@suse.de
- add "kterm" entry to /etc/X11/mlterm/termcap to
  make the Delete key and the Backspace key behave the same way
  for TERM=kterm and TERM=mlterm by default.
* Mon Jan 20 2003 mfabian@suse.de
- update to 2.6.3
  - compose and dead keys work now
  - Xft2 support
  - annoying cut and paste bug is fixed (focusing the window
  and then pasting is now possible).
- remove mlterm-2.6.2-utmp.patch (included upstream)
- add local=en_GB.UTF-8 to /etc/X11/mlterm/xim, this input method
  is needed to use compose and dead keys
- add mlterm-default-xim.patch to make "local" the default input
  method if XMODIFIERS is not set, i.e. use compose and dead keys
  if XMODIFIERS is not set.
* Wed Nov 27 2002 mfabian@suse.de
- add expat to "# neededforbuild"
* Tue Nov 26 2002 mfabian@suse.de
- update to 2.6.2
- port mlterm-2.5.0-l10n.patch to 2.6.2 and update the
  German and Japanese translations
- UTMP support is broken again, but because of a different reason.
  make new patch: mlterm-2.6.2-utmp.patch.
- use better default font for ISO-8859-15 (without anti-aliasing)
* Wed Nov 13 2002 mfabian@suse.de
- fix for Bug #21078: gtk_set_locale must be called *before*
  gtk_init. Thanks to Koushi Takahashi <koushi@turbolinux.co.jp>
* Wed Oct 02 2002 mfabian@suse.de
- fix utempter support.
* Fri Sep 06 2002 mfabian@suse.de
- add /usr/share/locale/*/LC_MESSAGES/*.mo to filelist
- add /usr/share/man/man1/mlclient.1.gz to filelist
- add German translations
* Fri Sep 06 2002 koushi@turbolinux.co.jp
- modified prep procedure for non-root build
- add mlterm-2.5.0-l10n.patch
* Thu Jun 20 2002 mfabian@suse.de
- update to 2.5.0
  contains the following new features:
  - gdk-pixbuf as well as imlib is supported.(Thanks to
  Minami Hirokazu san)
  - mlterm can be built in other directories than the source tree.
  (Thanks to Nakada Nobuyoshi san)
  - BCE is supported.
  - mlterm is separated into vt100 core functions(mlterm/) and
  x window system specific functions(xwindow/), and mlterm
  window can be revived even if it is destroyed by a window
  manager.
  - UCS4 is used internally even if --enable-ucs4 option is
  not specified.
  - <KEY>=<OUTPUT STRING> format is supported in key config file.
  - mlcc is added. (Thanks to Minami Hirokazu san)
  - extra scrollbar plugins(athena,motif,mozmodern,next) are added.
  (Thanks to Sato Seiichi san)
  - 16 color support.
  - And many minor bugs are fixed.
- add default font settings for iso-8859-9 (Turkish)
* Thu Jun 13 2002 stepan@suse.de
- added lib64 patch
* Mon Apr 08 2002 mfabian@suse.de
- fix for new autoconf
* Wed Mar 20 2002 mfabian@suse.de
- add 'termtype=kterm' to /etc/X11/mlterm/main because this
  works better with mlterm. w3m sends 'ESC ( B ESC ) 0' to mlterm
  when 'termtype=xterm' is used because /usr/share/terminfo/x/xterm
  contains 'enacs=\E(B\E)0'. This causes the problem that
  Japanese kanji disappear after using w3mmlconfig.
* Fri Mar 15 2002 mfabian@suse.de
- fix problems with scroll_region using patches from upstream cvs
- add default font settings for iso8859-7 (Greek)
* Tue Mar 05 2002 mfabian@suse.de
- update to release 2.3.1
  contains the following fixes since the last update:
  - coredumps when scrolling while cursor is out of scroll region
  fixed
  - arrow icons in scroll bar fixed.
  - w3mmlconfig configuration tool updated.
  - mlclient with invalid options caused mlterm process to exit
  - man page updated
- add mlterm-2.3.1-ml-font-custom.patch from upstream cvs
  to avoid that the iso8859-1 font setting gets overwritten by the
  iso8859-15 font setting.
- add mlterm-2.3.1-ml-window.patch from upstream cvs to enable
  the use of iso8859-X encodings with X != 1 with anti-aliasing.
- simplify and improve default font settings,
  esp. add default font entries for iso8859-15 and iso8859-2
  and better defaults for UTF-8 with anti-aliasing
- add mlterm-2.3.1-man-page.patch to fix formatting errors in
  man-page
- add mlterm-2.3.1-ml-image-esc-j-and-wraparound.patch to make
  ESC [ J and linewrapping in 'cat' work correctly.
- remove mlterm-2.2.0.20020215-debug.patch, included upstream
* Sun Feb 24 2002 schwab@suse.de
- Fix missing declaration.
* Fri Feb 15 2002 mfabian@suse.de
- remove utempter patch, is now included upstream
- improve default font setup to pass the interactive terminal
  test of the LI18NUX200 specification
* Wed Feb 13 2002 mfabian@suse.de
- fix utempter support for the case of several terminals running
  under the same process
- some more fixes from CVS
* Tue Feb 12 2002 mfabian@suse.de
- upgrade to 2.2.0 + CVS fixes.
* Fri Nov 30 2001 mfabian@suse.de
- new package: mlterm, version 2.0.0