Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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