aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/scim/scim.inc
blob: 5b1690a54a071a5ac367768bb71ce2efa27c58db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
DESCRIPTION = "Smart Common Input Method (SCIM) platform"
HOMEPAGE = "http://www.scim-im.org"
SECTION = "libs/inputmethod"
LICENSE = "LGPL"
PR = "r0"

SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.gz \
           file://configure.patch;patch=1 \
#           file://composemacron.patch;patch=1 \
	"
DEPENDS = "gtk+"

inherit autotools pkgconfig

EXTRA_OECONF = " --without-doxygen "
LEAD_SONAME = "libscim-1.0.so"

PDIR = "${PN}-1.0"

do_configure_append () {
	# Fix unset @ALL_LINGUAS@
	#   Replace with a list of available translations in ${S}/po

	cd ${S}/po
	SEDR=`ls *.gmo -1 --color=none | sed 's/.gmo//' | tr '\n' ' '`
	SEDL='@ALL_LINGUAS@'
	sed "s/${SEDL}.*/${SEDR}/" Makefile.in.in > Mii.tmp
	sed "s/${SEDL}.*/${SEDR}/" Makefile.in > Mi.tmp
	sed "s/${SEDL}.*/${SEDR}/" Makefile > M.tmp
	mv Mii.tmp Makefile.in.in
	mv Mi.tmp Makefile.in
	mv M.tmp Makefile

	# Fix unset @INTLTOOL_LIBDIR@
	#   Only needed for a check to see if charmap.alias is present,
	#   not really needed, so we fail that test by having it look
	#   in ${S}

	cd ${S}
	sed 's/@INTLTOOL_LIBDIR@/./' intltool-merge.in > Ii.tmp
	sed 's/@INTLTOOL_LIBDIR@/./' intltool-merge > I.tmp
	mv Ii.tmp intltool-merge.in
	mv I.tmp intltool-merge

	# Fix unset @GTK_LIBDIR@
	#   This is the same as ${libdir} so we use that

	cd ${S}/extras/gtk2_immodule
	sed 's/@GTK_LIBDIR@/$(libdir)/g' Makefile.in > Mi.tmp
	sed 's/@GTK_LIBDIR@/$(libdir)/g' Makefile.am > Ma.tmp
	mv Mi.tmp Makefile.in
	mv Ma.tmp Makefile.am
}

pkg_postinst_${PN} () {
	# Update gtk2 immodules
	#   Adds SCIM to the list
	/usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
}

pkg_postrm_${PN} () {
	# Update gtk2 immodules
	#   Removes SCIM from the list
	/usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
}

FILES_${PN}-dbg +=   "${libdir}/${PDIR}/.debug \
                      ${libdir}/${PDIR}/1.4.0/*/.debug \
		      ${libdir}/gtk-2.0/immodules/.debug"
FILES_${PN} +=       "${libdir}/${PDIR}/scim-panel-gtk \
                      ${libdir}/${PDIR}/scim-helper* \
                      ${libdir}/${PDIR}/scim-launcher \
		      ${libdir}/${PDIR}/1.4.0 \
                      ${libdir}/gtk-2.0/immodules"