On Thu, Dec 08, 2011 at 03:59:38PM +0000, Hin-Tak Leung wrote:
> Theppitak wrote:
> >
> >My problem with it is that thailatex installation as described there
> >is over-complicated.
> 
> I think it is clearer (for those who want to understand how it works).
> I could replace all the 6 environment variables with just one (HOMETEXMF
> , which defaults to $HOME/texmf ), and a tree-layout.
> 
> Also, I don't use /usr/local, nor install non-packaged software on my
> system. i.e. software not tracked by apt(or rpm or yum or yast) are in
> /home or not all all. So installing a small library (datrie) just to
> build a small tool swath, just doesn't do for me. I think you should
> consider needs of people who don't have admin access to their little
> unix boxes.

This case is common.  Just set PKG_CONFIG_PATH and LD_LIBRARY_PATH
environments to your home-based dir.

> >In brief, you just need libdatrie, from here:
> >
> >  ftp://linux.thai.net/pub/thailinux/software/libthai/
> >
> >Historically, swath used to bundle an outdated and unmaintained version
> >of libdatrie.  And that had caused maintenance problem as its word break
> >dictionary couldn't be modified any more, due to incompatibility with
> >newer command-line tools.  Meanwhile, libdatrie was rewritten for use in
> >the libthai project.  So, swath was later migrated to the new one instead.
> >That's the benefit of code sharing over bundling.
> 
> libdatrie does not seem to have libthai dependency currently?

No.

> There is the problem with over-dividing as well, when one only wants to
> build one small tool that depends on another small library which few
> others needs.

I also considered this, but libdatrie has had its own uses in many
applications.  Not just for non-Thai dictionaries, it's known to have
been used in information retrieval projects, or even bio-informatics.
Benefit of splitting it outweighs the cost of bundling it in every
piece of such software.  And in your particular case of casual tryout,
common technique is well-known.

> Anyyway, here is the receipe to build swath without needing libdatrie
> afterwards - and that *is* complicated for trying to build a small
> command-line tool.

Yep, I agree it's very complicated, compared to this:

Suppose you want to install locally under ${HOME}/local.  Then, in your
~/.bashrc:

  export PKG_CONFIG_PATH=${HOME}/local/lib/pkgconfig
  export LD_LIBRARY_PATH=${HOME}/local/lib
  export PATH=${HOME}/local/bin:${PATH}

Then, to install the software:

  cd libdatrie-0.2.5
  ./configure --prefix=${HOME}/local
  make
  make install

  cd ../swath-0.4.1
  ./configure --prefix=${HOME}/local
  make
  make install

And this also applies to any other autotools-based software.  You only
need to set it up once.

Not satisfied after trying?  "make uninstall" is available to help.

> I think you have completely lose context with your potential users
> - to try out something which may or may not work well to my purpose
> (or somebody's purpose), I do not want to pollute my /usr/local just
> to try something out. So if something is this difficult to *try out*
> without system-wide install, it does not get installed system-wide .

No, I didn't, as demonstrated above.  I think the technique is very
common.

> >Treat thailatex like a "shared library".  It's no longer an end-user
> >package.  The fonts are, just like lmodern et al.
> 
> That's where your mentality doesn't work for some users - thailatex is
> a small add-on package I like to try out, which may or may not suit my
> use, overall. I don't want to install it system-wide as a shared
> resources, until I have estalished its general usefulness.

I did mention the --with-texmfdir=${HOME}/texmf option, did't I?

> >The designed way:
> ...
> >   sudo make install
> ...
> >   sudo make install
> 
> >2. Install thailatex
> >   make
> >   [sudo] make install
> 
> >3. Install fonts
> >   [sudo] make install
> 
> You will find it hard to persuade potential users to 'sudo make
> install' a piece of software of unknown usefulness, just to try it
> out.
> You are asking for a lot of trust from your *potential* users that
> you do not do make a mess in their /usr/local or the TEXMF tree.

As I said, the home installation technique is very common.  It would
have made it too tedious to read to list all well-known use cases in
the first place.

-- 
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/

_______________________________________________
Cjk maillist  -  Cjk@ffii.org
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to