/[gentoo-x86]/x11-libs/openmotif/openmotif-2.3.3-r1.ebuild
Gentoo

Diff of /x11-libs/openmotif/openmotif-2.3.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/Attic/openmotif-2.3.3-r1.ebuild,v 1.2 2010/10/10 16:39:42 ulm dead $ 3# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/Attic/openmotif-2.3.3-r1.ebuild,v 1.3 2012/01/06 00:04:40 ulm Exp $
4 4
5EAPI="3" 5EAPI=4
6 6
7inherit autotools eutils flag-o-matic multilib 7inherit autotools eutils flag-o-matic multilib
8 8
9DESCRIPTION="Open Motif" 9DESCRIPTION="Open Motif"
10HOMEPAGE="http://www.motifzone.net/" 10HOMEPAGE="http://www.motifzone.net/"
11SRC_URI="ftp://ftp.ics.com/openmotif/${PV%.*}/${PV}/${P}.tar.gz" 11SRC_URI="ftp://ftp.ics.com/openmotif/${PV%.*}/${PV}/${P}.tar.gz"
12 12
13LICENSE="MOTIF MIT" 13LICENSE="MOTIF MIT"
14SLOT="0" 14SLOT="0"
15KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~ppc64 sh sparc x86 ~ppc-aix ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" 15KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
16IUSE="doc examples jpeg png unicode xft" 16IUSE="doc examples jpeg png static-libs unicode xft"
17# license allows distribution only for "open source operating systems" 17# license allows distribution only for "open source operating systems"
18RESTRICT="!kernel_linux? ( 18RESTRICT="!kernel_linux? (
19 !kernel_FreeBSD? ( 19 !kernel_FreeBSD? (
20 !kernel_Darwin? ( 20 !kernel_Darwin? (
21 !kernel_SunOS? ( 21 !kernel_SunOS? (
28 xft? ( x11-libs/libXft ) 28 xft? ( x11-libs/libXft )
29 jpeg? ( virtual/jpeg ) 29 jpeg? ( virtual/jpeg )
30 png? ( >=media-libs/libpng-1.4 )" 30 png? ( >=media-libs/libpng-1.4 )"
31DEPEND="${RDEPEND} 31DEPEND="${RDEPEND}
32 sys-devel/flex 32 sys-devel/flex
33 dev-util/byacc
33 x11-misc/xbitmaps" 34 x11-misc/xbitmaps"
34RDEPEND="${RDEPEND} 35RDEPEND="${RDEPEND}
35 !x11-libs/motif-config
36 !x11-libs/lesstif
37 doc? ( app-doc/openmotif-manual )" 36 doc? ( app-doc/openmotif-manual )"
38 37
39pkg_nofetch() { 38pkg_nofetch() {
40 local line 39 local line
41 while read line; do einfo "${line}"; done <<-EOF 40 while read line; do einfo "${line}"; done <<-EOF
47 46
48 If you have got such a license, you may download the file: 47 If you have got such a license, you may download the file:
49 ${SRC_URI} 48 ${SRC_URI}
50 and place it in ${DISTDIR}. 49 and place it in ${DISTDIR}.
51 EOF 50 EOF
52}
53
54pkg_setup() {
55 # clean up orphaned cruft left over by motif-config
56 local i l count=0
57 for i in "${EROOT}"/usr/bin/{mwm,uil,xmbind} \
58 "${EROOT}"/usr/include/{Xm,uil,Mrm} \
59 "${EROOT}"/usr/$(get_libdir)/lib{Xm,Uil,Mrm}.*; do
60 [[ -L "${i}" ]] || continue
61 l=$(readlink "${i}")
62 if [[ ${l} == *openmotif-* || ${l} == *lesstif-* ]]; then
63 einfo "Cleaning up orphaned ${i} symlink ..."
64 rm -f "${i}"
65 fi
66 done
67
68 cd "${EROOT}"/usr/share/man
69 for i in $(find . -type l); do
70 l=$(readlink "${i}")
71 if [[ ${l} == *-openmotif-* || ${l} == *-lesstif-* ]]; then
72 (( count++ ))
73 rm -f "${i}"
74 fi
75 done
76 [[ ${count} -ne 0 ]] && \
77 einfo "Cleaned up ${count} orphaned symlinks in ${EROOT}/usr/share/man"
78} 51}
79 52
80src_prepare() { 53src_prepare() {
81 epatch "${FILESDIR}/${PN}-2.3.2-darwin.patch" 54 epatch "${FILESDIR}/${PN}-2.3.2-darwin.patch"
82 epatch "${FILESDIR}/${PN}-2.3.2-sanitise-paths.patch" 55 epatch "${FILESDIR}/${PN}-2.3.2-sanitise-paths.patch"
98 LANG=C 71 LANG=C
99 72
100 # bug #80421 73 # bug #80421
101 filter-flags -ftracer 74 filter-flags -ftracer
102 75
103 # multilib includes don't work right in this package...
104 has_multilib_profile && append-flags "-I$(get_ml_incdir)"
105
106 # feel free to fix properly if you care 76 # feel free to fix properly if you care
107 append-flags -fno-strict-aliasing 77 append-flags -fno-strict-aliasing
108 78
109 # For Solaris Xos_r.h :( 79 # For Solaris Xos_r.h :(
110 [[ ${CHOST} == *-solaris2.11 ]] && append-flags -DNEED_XOS_R_H=1 80 [[ ${CHOST} == *-solaris2.11 ]] && append-flags -DNEED_XOS_R_H=1
113 # libiconv detection in configure script doesn't always work 83 # libiconv detection in configure script doesn't always work
114 # http://bugs.motifzone.net/show_bug.cgi?id=1423 84 # http://bugs.motifzone.net/show_bug.cgi?id=1423
115 export LIBS="${LIBS} -liconv" 85 export LIBS="${LIBS} -liconv"
116 fi 86 fi
117 87
88 # "bison -y" causes runtime crashes #355795
89 export YACC=byacc
90
118 econf --with-x \ 91 econf --with-x \
92 $(use_enable static-libs static) \
119 $(use_enable unicode utf8) \ 93 $(use_enable unicode utf8) \
120 $(use_enable xft) \ 94 $(use_enable xft) \
121 $(use_enable jpeg) \ 95 $(use_enable jpeg) \
122 $(use_enable png) 96 $(use_enable png)
123} 97}
124 98
125src_compile() { 99src_compile() {
100 make clean # remove pre-made bison parsers
126 emake -j1 MWMRCDIR="${EPREFIX}"/etc/X11/mwm || die "emake failed" 101 emake -j1 MWMRCDIR="${EPREFIX}"/etc/X11/mwm
127} 102}
128 103
129src_install() { 104src_install() {
130 emake -j1 DESTDIR="${D}" MWMRCDIR="${EPREFIX}"/etc/X11/mwm install \ 105 emake -j1 DESTDIR="${D}" MWMRCDIR="${EPREFIX}"/etc/X11/mwm install
131 || die "emake install failed"
132 106
133 # mwm default configs 107 # mwm default configs
134 insinto /usr/share/X11/app-defaults 108 insinto /usr/share/X11/app-defaults
135 newins "${FILESDIR}"/Mwm.defaults Mwm 109 newins "${FILESDIR}"/Mwm.defaults Mwm
136 110
137 if use examples; then 111 if use examples; then
138 emake -j1 -C demos DESTDIR="${D}" install-data \ 112 emake -j1 -C demos DESTDIR="${D}" install-data
139 || die "installation of demos failed"
140 dodir /usr/share/doc/${PF}/demos 113 dodir /usr/share/doc/${PF}/demos
141 mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos 114 mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos || die
142 fi 115 fi
143 rm -rf "${ED}"/usr/share/Xm 116 rm -rf "${ED}"/usr/share/Xm
117
118 # don't install libtool archives
119 rm -f "${ED}"/usr/$(get_libdir)/*.la
144 120
145 dodoc BUGREPORT ChangeLog README RELEASE RELNOTES TODO 121 dodoc BUGREPORT ChangeLog README RELEASE RELNOTES TODO
146} 122}
147 123
148pkg_postinst() { 124pkg_postinst() {
154 compatible with this release." 130 compatible with this release."
155 131
156 If you have binary-only applications requiring libXm.so.3, you may 132 If you have binary-only applications requiring libXm.so.3, you may
157 therefore create a symlink from libXm.so.3 to libXm.so.4. 133 therefore create a symlink from libXm.so.3 to libXm.so.4.
158 Please note, however, that there will be no Gentoo support for this. 134 Please note, however, that there will be no Gentoo support for this.
159 Alternatively, you may install x11-libs/openmotif-compat-2.2* for 135 Alternatively, you may install slot 2.2 of x11-libs/openmotif for
160 the Open Motif 2.2 libraries. 136 the Open Motif 2.2 libraries.
161 EOF 137 EOF
162} 138}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20