Author: yamakenz
Date: Sun Sep 16 06:55:48 2007
New Revision: 4970

Added:
   trunk/pixmaps/uim-m17nlib-relink-icons.in
Modified:
   trunk/configure.ac
   trunk/pixmaps/Makefile.am

Log:
* This commit fix bug #11966 "Requiring m17n-db installed at build time"

* pixmaps/uim-m17nlib-relink-icons.in
  - New file
* pixmaps/Makefile.am
  - (bin_SCRIPTS): Add uim-m17nlib-relink-icons
  - Replace m17n icons linking script with uim-m17nlib-relink-icons
* configure.ac
  - Modify for uim-m17nlib-relink-icons


Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Sun Sep 16 06:55:48 2007
@@ -18,6 +18,7 @@
 AC_PROG_MAKE_SET
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
+AC_PATH_PROG(SH, sh)
 AC_PATH_PROG(RSVG, rsvg)
 AC_PATH_PROGS(MD5, md5 md5sum)
 AC_PATH_PROGS(SHA1, sha1 sha1sum)
@@ -1332,6 +1333,7 @@
 
 SRCDIR=$srcdir
 AC_SUBST(SRCDIR)
+AC_SUBST(DESTDIR)
 
 AC_SUBST(abs_srcdir)
 AC_SUBST(abs_builddir)
@@ -1368,6 +1370,7 @@
                 examples/Makefile
                 examples/uim-custom/Makefile
                 pixmaps/Makefile
+                pixmaps/uim-m17nlib-relink-icons
                 replace/Makefile
                 uim.pc
                 uim.desktop.in

Modified: trunk/pixmaps/Makefile.am
==============================================================================
--- trunk/pixmaps/Makefile.am   (original)
+++ trunk/pixmaps/Makefile.am   Sun Sep 16 06:55:48 2007
@@ -1,5 +1,9 @@
 pixmapsdir = @uim_pixmapsdir@
 
+if M17NLIB
+bin_SCRIPTS = uim-m17nlib-relink-icons
+endif
+
 SVGS = unknown.svg
 
 # input methods
@@ -104,9 +108,5 @@
 
 install-data-hook:
 if M17NLIB
-       for f in $(m17n_db_dir)/icons/*.png; do \
-         if test -f "$$f"; then \
-           $(LN_S) -f "$$f" $(DESTDIR)$(pkgdatadir)/pixmaps/m17n-`basename 
"$$f"`; \
-         fi \
-       done
+       $(SH) $(srcdir)/uim-m17nlib-relink-icons
 endif

Added: trunk/pixmaps/uim-m17nlib-relink-icons.in
==============================================================================
--- (empty file)
+++ trunk/pixmaps/uim-m17nlib-relink-icons.in   Sun Sep 16 06:55:48 2007
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# uim-m17nlib-relink-icons:
+#   Relink icon files provided by m17n-db into uim icon directory
+#
+# Copyright (c) 2007 uim Project http://code.google.com/p/uim/
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of authors nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+for f in @m17n_db_dir@/icons/*.png; do
+    if test -f "$f"; then
+        @LN_S@ -f "$f" @DESTDIR@@uim_pixmapsdir@/m17n-`basename "$f"`
+    fi
+done

Reply via email to