Contents of /trunk/nonfree/openmotif/openmotif-2.3.3-r2.smage2
Parent Directory | Revision Log
Revision 11781 -
(show annotations)
(download)
Wed Apr 11 19:29:17 2012 UTC (12 years, 5 months ago) by niro
File size: 2850 byte(s)
Wed Apr 11 19:29:17 2012 UTC (12 years, 5 months ago) by niro
File size: 2850 byte(s)
-use a patch to disable demos and added libpng patch
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 | --x-libraries='/usr/$(mlibdir)' \ |
70 | --disable-printing \ |
71 | --disable-xft \ |
72 | --enable-png \ |
73 | --enable-jpeg \ |
74 | || die |
75 | |
76 | # doesn't like optimations and fixed build with as-needed" |
77 | mmake -j1 LIBS="-lXmu -lXt -lXext -lX11 -ljpeg -lpng" || die |
78 | } |
79 | |
80 | src_install() |
81 | { |
82 | # needed directories |
83 | minstalldir /etc/X11/app-defaults || die |
84 | minstalldir /etc/X11/mwm || die |
85 | |
86 | mmake -j1 DESTDIR=${BINDIR} install || die |
87 | |
88 | # move system.mwmrc /etc/X11/mwm |
89 | mv ${BINDIR}/usr/$(mlibdir)/X11/system.mwmrc ${BINDIR}/etc/X11/mwm/system.mwmrc || die |
90 | mlink /etc/X11/mwm /usr/$(mlibdir)/X11/mwm || die |
91 | |
92 | # fix man-pages |
93 | for i in ${BINDIR}/usr/share/man/man1/mwm.1 \ |
94 | ${BINDIR}/usr/share/man/man4/mwmrc.4 |
95 | do |
96 | sed -i "s:/usr/$(mlibdir)/X11/\(.*system\\&\.mwmrc\):/etc/X11/mwm/\1:g" ${i} || die |
97 | sed -i "s:/usr/$(mlibdir)/X11/app-defaults:/etc/X11/app-defaults:g" ${i} || die |
98 | done |
99 | |
100 | # missing app-defaults |
101 | minstalletc openmotif-2.2.3-Mwm.defaults Mwm /etc/X11/app-defaults || die |
102 | |
103 | # prune unneeded stuff |
104 | all-abis '[ -e ${BINDIR}/usr/$(mlibdir)/X11/bindings ] && rm -rf ${BINDIR}/usr/$(mlibdir)/X11/bindings || die' |
105 | if [ -e ${BINDIR}/usr/include/X11/bitmaps ] |
106 | then |
107 | rm -rf ${BINDIR}/usr/include/X11/bitmaps || die |
108 | fi |
109 | |
110 | minstalldocs BUGREPORT COPYRIGHT.MOTIF LICENSE README RELEASE RELNOTES TODO || die |
111 | } |