Magellan Linux

Contents of /smage/trunk/core/openmotif/openmotif-2.3.3-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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