Magellan Linux

Contents of /branches/R11-stable/include/gnome2.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19317 - (show annotations) (download)
Tue Sep 3 15:56:41 2013 UTC (10 years, 8 months ago) by niro
File size: 3673 byte(s)
-release stable
1 # $Id$
2
3 : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"}
4 : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"}
5
6 : ${HOMEPAGE="http://gnome.org/"}
7
8 INHERITS="${INHERITS} gnome2"
9
10 # default SRC_URIs
11 SRC_URI=(
12 gnome://${PNAME}/${PVER%.*}/${SRCFILE}
13 gnome://${PNAME}/${PVER%.*.*}/${SRCFILE}
14 mirror://${PNAME}/${SRCFILE}
15 )
16
17 # gnome default setup
18 export SCROLLKEEPER_UPDATE=${SCROLLKEEPER_UPDATE:-0}
19 export SCROLL_DEBUG=${SCROLL_DEBUG:-0}
20 export GNOME_PREFIX="/usr"
21 export PATH="${PATH}:${GNOME_PREFIX}/bin"
22 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${GNOME_PREFIX}/$(mlibdir)/pkgconfig"
23 export GNOME_LIBCONFIG_PATH="/usr/$(mlibdir):${GNOME_PREFIX}/$(mlibdir)"
24
25 # add scrollkeeper to dependencies if requested
26 if [[ ${SCROLLKEEPER_UPDATE} = 1 ]]
27 then
28 DEPEND="${DEPEND}
29 >= app-text/scrollkeeper-0.3.14"
30 fi
31
32
33 # function to clean gnome pakages
34 # scrollkeeper and mimeinfo crap
35 gn2_clean_gnome_pkg()
36 {
37 # litte check to show if you must run scrollkeeper in postinstall or not
38 if [ -z "$(find ${BINDIR} -name '*.omf')" ]
39 then
40 echo
41 echo "########################"
42 echo "scrollkeeper isn't needed to run."
43 echo "########################"
44 echo
45 if [ "${SCROLL_DEBUG}" = "1" ]
46 then
47 echo "Press [Enter] to continue ..."
48 read
49 else
50 sleep 3
51 fi
52 else
53 echo
54 echo "########################"
55 echo "you need to run scrollkeeper in postinstall for ${PNAME}-${PVER}"
56 echo "########################"
57 echo
58 if [ "${SCROLL_DEBUG}" = "1" ]
59 then
60 echo "Press [Enter] to continue ..."
61 read
62 else
63 sleep 3
64 fi
65 fi
66
67 # remove scrollkeeper crap
68 if [[ -d ${BINDIR}/var/lib/scrollkeeper ]]
69 then
70 rm -rf ${BINDIR}/var/lib/scrollkeeper || die
71 fi
72
73 # mime database will rebuilded later
74 if [[ -e ${BINDIR}/usr/share/applications/mimeinfo.cache ]]
75 then
76 rm -rf ${BINDIR}/usr/share/applications/mimeinfo.cache || die
77 fi
78
79 # delete /var/tmp if exist
80 if [[ -d ${BINDIR}/var/tmp ]]
81 then
82 rm -rf ${BINDIR}/var/tmp || die
83 fi
84 }
85
86 gn2_configure()
87 {
88 local configure_opts="$@"
89
90 # we run scrollkeeper manually within postinstall
91 [[ ${SCROLLKEEPER_UPDATE} = 1 ]] && configure_opts="${configure_opts} --disable-scrollkeeper"
92
93 ./configure \
94 --host=${CHOST} \
95 --build=${CHOST} \
96 --prefix=${GNOME_PREFIX} \
97 --sysconfdir=/etc \
98 --infodir=${GNOME_PREFIX}/share/info \
99 --mandir=${GNOME_PREFIX}/share/man \
100 --localstatedir=/var/lib \
101 --libdir=${GNOME_PREFIX}/$(mlibdir) \
102 --libexecdir=${GNOME_PREFIX}/$(mlibdir)/${PNAME} \
103 --enable-static=no \
104 --disable-gtk-doc \
105 ${configure_opts} \
106 || die
107 }
108
109 gn2_src_prepare()
110 {
111 munpack ${SRCFILE} || die
112 }
113
114 gn2_src_compile()
115 {
116 cd ${SRCDIR}
117 gn2_configure || die
118 mmake ${GN2_MAKE_OPTS} || die
119 }
120
121 gn2_src_install()
122 {
123 cd ${SRCDIR}
124
125 # needed directories
126 # scrollkeeper needs this
127 install -d ${BINDIR}/var/lib/scrollkeeper || die
128
129 # using make install instead of minstall
130 make DESTDIR=${BINDIR} ${GN2_MAKE_OPTS} install || die
131
132 local i
133 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
134 FAQ LICENSE NEWS README TODO
135 do
136 if [ -f ${SRCDIR}/${i} ]
137 then
138 minstalldocs ${i} || die
139 fi
140 done
141
142 gn2_clean_gnome_pkg
143 }
144
145 gn2_fix_omf_makefiles()
146 {
147 # remove scrollkeeper update; we do it later
148 # taken from gentoo
149 local omf_makefiles
150 local omf_base
151 local omf
152
153 omf_makefiles="$@"
154
155 [ -f ${SRCDIR}/omf-install/Makefile.in ] \
156 && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf-install/Makefile.in"
157
158 [ -f ${SRCDIR}/omf.make ] \
159 && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf.make"
160
161 for omf in ${omf_makefiles}; do
162 omfbase=$(basename ${omf})
163 echo "Fixing OMF Makefile: ${omf#${SRCDIR}/}"
164 sed -i 's:-scrollkeeper-update.*::' ${omf}
165 done
166 }
167
168 export_inherits gn2 src_prepare src_compile src_install