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