Magellan Linux

Contents of /trunk/nonfree/openmotif/openmotif-2.3.3-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11782 - (show annotations) (download)
Wed Apr 11 19:40:59 2012 UTC (12 years, 1 month ago) by niro
File size: 2824 byte(s)
-fixed multilib and other issues
1 # $Id$
2
3 PNAME="openmotif"
4 PVER="2.3.3"
5 PBUILD="r2"
6
7 PCAT="x11-libs"
8
9 DESCRIPTION="Motif is the industry standard toolkit for UNIX systems."
10 HOMEPAGE="http://www.motifzone.org/"
11
12 DEPEND=">= virtual/glibc
13 >= x11-libs/libXmu-1
14 >= x11-libs/libXaw-1
15 >= media-libs/libjpeg-8
16 >= media-libs/libpng-1.5"
17
18 SDEPEND=">= sys-apps/sed-4
19 >= sys-dev/autoconf-4
20 >= sys-dev/automake-3
21 >= x11-proto/xextproto-1
22 >= x11-misc/xbitmaps-1"
23
24 SRCFILE="${PNAME}-${PVER}.tar.gz"
25 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
26
27 sminclude multilib mtools
28
29 SRC_URI=(
30 http://www.motifzone.org/files/public_downloads/${PNAME}/${PVER%.*}/${PVER}/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/openmotif-2.2.3-Mwm.defaults
33 mirror://${PNAME}/${PNAME}-${PVER}-no-demos.patch
34 mirror://${PNAME}/${PNAME}-${PVER}-libpng14.patch
35 )
36
37 # fake atm
38 UP2DATE="echo ${PVER}"
39
40 src_prepare()
41 {
42 munpack ${SRCFILE} || die
43
44 # disable compilation of demo binaries
45 mpatch ${PNAME}-${PVER}-no-demos.patch || die
46
47 # fix build with libpng-1.4 and newer
48 mpatch ${PNAME}-${PVER}-libpng14.patch || die
49
50 # add X.Org vendor string to aliases for virtual bindings
51 all-abis "echo -e '"The X.Org Foundation"\t\t\t\t\tpc' >> bindings/xmbind.alias" || die
52
53 # add missing files to run autoconf successfully
54 all-abis "touch NEWS AUTHORS INSTALL COPYING" || die
55 mautoreconf || die
56 }
57
58 src_compile()
59 {
60 # there are some issues with ${LANG}
61 unset LANG
62
63 # fix some anoying warnings
64 export CFLAGS="${CFLAGS} -fno-strict-aliasing"
65 export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
66
67 mconfigure \
68 --with-x \
69 --disable-printing \
70 --disable-xft \
71 --enable-png \
72 --enable-jpeg \
73 || die
74
75 # remove prebuild bison parsers
76 mmake clean || die
77
78 # doesn't like optimations and fixed build with as-needed"
79 mmake -j1 || die
80 }
81
82 src_install()
83 {
84 # needed directories
85 minstalldir /etc/X11/app-defaults || die
86 minstalldir /etc/X11/mwm || die
87
88 mmake -j1 DESTDIR=${BINDIR} install || die
89
90 # move system.mwmrc /etc/X11/mwm
91 mv ${BINDIR}/usr/$(mlibdir)/X11/system.mwmrc ${BINDIR}/etc/X11/mwm/system.mwmrc || die
92 mlink /etc/X11/mwm /usr/$(mlibdir)/X11/mwm || die
93
94 # fix man-pages
95 for i in ${BINDIR}/usr/share/man/man1/mwm.1 \
96 ${BINDIR}/usr/share/man/man4/mwmrc.4
97 do
98 sed -i "s:/usr/$(mlibdir)/X11/\(.*system\\&\.mwmrc\):/etc/X11/mwm/\1:g" ${i} || die
99 sed -i "s:/usr/$(mlibdir)/X11/app-defaults:/etc/X11/app-defaults:g" ${i} || die
100 done
101
102 # missing app-defaults
103 minstalletc openmotif-2.2.3-Mwm.defaults Mwm /etc/X11/app-defaults || die
104
105 # prune unneeded stuff
106 all-abis '[ -e ${BINDIR}/usr/$(mlibdir)/X11/bindings ] && rm -rf ${BINDIR}/usr/$(mlibdir)/X11/bindings || die'
107 if [ -e ${BINDIR}/usr/include/X11/bitmaps ]
108 then
109 rm -rf ${BINDIR}/usr/include/X11/bitmaps || die
110 fi
111
112 minstalldocs BUGREPORT COPYRIGHT.MOTIF LICENSE README RELEASE RELNOTES TODO || die
113 }