1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.2.2-r3.ebuild,v 1.3 2003/11/30 12:17:51 lanius Exp $
inherit libtool
MY_P=${P/m/M}
S=${WORKDIR}/${MY_P}
DESCRIPTION="Open Motif"
HOMEPAGE="http://www.motifzone.org/"
SRC_URI="ftp://ftp.sgi.com/other/motifzone/2.2/src/${MY_P}.tar.gz"
SLOT="2.2"
LICENSE="MOTIF"
KEYWORDS="~x86 ~ppc ~sparc ~hppa ~alpha ~amd64"
PROVIDE="virtual/motif"
RDEPEND="virtual/x11"
DEPEND=">=sys-apps/sed-4"
src_unpack() {
unpack ${A}
cd ${S}
#
# Don't compile/install demo programs.
# They're meant to demonstrate programming techniques and features
# of motif, but are of limited to no use for end users. Further,
# those progs that demonstrate Uil/Mrm functionality won't even work
# because their data(.uid) files are installed in nonstandard places,
# /usr/X11R6/share/Xm/<progname> (see `man MrmOpenHierarchy' for
# locations Mrm expects them to be). Most of the demos also don't
# have compiled in fallback resources and will not work correctly
# without their app-defaults files installed.
#
# So there a basically 4 choices:
# a) add wrappers that set XAPPLRESDIR and UIDPATH,
# b) clutter two more system directories with demo related files,
# c) put sources, data, binaries AND wrappers in
# /usr/X11R6/share/Xm/ (move this to X11R6/lib/X11/Xm/demos ?),
# OR
# D) don't install them at all.
#
#
ebegin "patching configure.in (no-demos patch)..."
sed -i 's:^\(demos/.*\):dnl \1:g' configure.in
eend $?
ebegin "patching toplevel Makefile.am (no-demos patch)..."
sed -i -e 's/\(\s*doc\) \\$/\1/' -e '/\s*demos$/d' Makefile.am
eend $?
#
# fix include order (#6536):
# This replaces `include-order.diff'. Had to change this patch so
# it modifies Makefile.am instead of Makefile.in because rerunning
# autotools below would undo any changes made to Makefile.in.
# Added `clients/mwm/WmWsmLib/' to the list.
#
ebegin "fixing include order..."
list="tools/wml/Makefile.am clients/mwm/WmWsmLib/Makefile.am"
for f in ${list}; do
einfo " ...${f}"
sed -i 's:\(^INCLUDES =\) \(\${X_CFLAGS}\) \(.*\):\1 \3 \2:' ${f}
done
eend $?
unset f list
#
# Rebuild libtool (#15119, #20540, #21681)
#
elibtoolize
#
# Rebuild configure, Makefile.in
#
einfo " ...aclocal..."
aclocal || die "aclocal failed"
einfo " ...automake..."
automake --foreign || die "automake failed"
einfo " ...autoconf..."
autoconf || die "autoconf failed"
}
src_compile() {
# get around some LANG problems in make (#15119)
unset LANG
./configure \
--prefix=/usr/X11R6 \
--sysconfdir=/etc/X11 \
--with-x \
--with-gnu-ld \
--host=${CHOST} || die "configuration failed"
make || die "make failed, if you have lesstif installed removed it, compile openmotif and recompile lesstif"
}
src_install() {
make \
DESTDIR=${D} \
VARDIR=${D}/var/X11/ install || die "make install failed"
# move includes
dodir /usr/include/Mrm/2.2/Mrm
dodir /usr/include/Xm/2.2/Xm
dodir /usr/include/uil/2.2/uil
mv ${D}/usr/X11R6/include/Mrm/*.h ${D}/usr/include/Mrm/2.2/Mrm
mv ${D}/usr/X11R6/include/Xm/*.h ${D}/usr/include/Xm/2.2/Xm
mv ${D}/usr/X11R6/include/uil/*.h ${D}/usr/include/uil/2.2/uil
# bin
dodir /usr/bin
for file in `ls ${D}/usr/X11R6/bin`
do
mv ${D}/usr/X11R6/bin/${file} ${D}/usr/bin/${file}-2.2
done
# libs
dodir /usr/lib/motif/2.2
mv ${D}/usr/X11R6/lib/lib* ${D}/usr/lib/motif/2.2
for lib in libMrm.so.3 libMrm.so.3.0.1 \
libXm.so.3 libXm.so.3.0.1 \
libUil.so.3 libUil.so.3.0.1
do
dosym "/usr/lib/motif/2.2/${lib}"\
"/usr/lib/${lib}"
done
# man pages
dodir /usr/share/man/man1
dodir /usr/share/man/man3
dodir /usr/share/man/man4
dodir /usr/share/man/man5
for file in `ls ${D}/usr/X11R6/man/man1`
do
file=${file/.1/}
mv ${D}/usr/X11R6/man/man1/${file}.1 ${D}/usr/share/man/man1/${file}-22.1
done
for file in `ls ${D}/usr/X11R6/man/man3`
do
file=${file/.3/}
mv ${D}/usr/X11R6/man/man3/${file}.3 ${D}/usr/share/man/man3/${file}-22.3
done
for file in `ls ${D}/usr/X11R6/man/man4`
do
file=${file/.4/}
mv ${D}/usr/X11R6/man/man4/${file}.4 ${D}/usr/share/man/man4/${file}-22.4
done
for file in `ls ${D}/usr/X11R6/man/man5`
do
file=${file/.5/}
mv ${D}/usr/X11R6/man/man5/${file}.5 ${D}/usr/share/man/man5/${file}-22.5
done
# docs
dodoc COPYRIGHT.MOTIF LICENSE
dodoc README RELEASE RELNOTES
dodoc BUGREPORT OPENBUGS CLOSEDBUGS
}
|