motif-2.3.6-r1.ebuild 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools flag-o-matic multilib toolchain-funcs multilib-minimal
  5. DESCRIPTION="The Motif user interface component toolkit"
  6. HOMEPAGE="https://sourceforge.net/projects/motif/
  7. http://motif.ics.com/"
  8. SRC_URI="mirror://sourceforge/project/motif/Motif%20${PV}%20Source%20Code/${P}.tar.gz
  9. http://dev.gentoo.org/~ulm/distfiles/${P}-patches-2.tar.xz"
  10. LICENSE="LGPL-2.1+ MIT"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  13. IUSE="examples jpeg +motif22-compatibility png static-libs unicode xft"
  14. RDEPEND=">=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  15. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  16. >=x11-libs/libXmu-1.1.1-r1[${MULTILIB_USEDEP}]
  17. >=x11-libs/libXp-1.0.2[${MULTILIB_USEDEP}]
  18. >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
  19. jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
  20. png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
  21. unicode? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
  22. xft? (
  23. >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
  24. >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}]
  25. )"
  26. DEPEND="${RDEPEND}
  27. sys-devel/flex
  28. || ( dev-util/byacc sys-freebsd/freebsd-ubin )
  29. x11-misc/xbitmaps"
  30. src_prepare() {
  31. eapply ../patch
  32. eapply_user
  33. # disable compilation of demo binaries
  34. sed -i -e '/^SUBDIRS/{:x;/\\$/{N;bx;};s/[ \t\n\\]*demos//;}' Makefile.am
  35. # add X.Org vendor string to aliases for virtual bindings
  36. echo -e '"The X.Org Foundation"\t\t\t\t\tpc' >>bindings/xmbind.alias
  37. # remove header file which shouldn't be in the tarball #578168
  38. rm lib/Xm/Xm.h || die
  39. AT_M4DIR=. eautoreconf
  40. # get around some LANG problems in make (#15119)
  41. LANG=C
  42. # bug #80421
  43. filter-flags -ftracer
  44. # feel free to fix properly if you care
  45. append-flags -fno-strict-aliasing
  46. # for Solaris Xos_r.h :(
  47. [[ ${CHOST} == *-solaris2.11 ]] \
  48. && append-cppflags -DNEED_XOS_R_H -DHAVE_READDIR_R_3
  49. if use !elibc_glibc && use !elibc_uclibc && use unicode; then
  50. # libiconv detection in configure script doesn't always work
  51. # http://bugs.motifzone.net/show_bug.cgi?id=1423
  52. export LIBS="${LIBS} -liconv"
  53. fi
  54. # "bison -y" causes runtime crashes #355795
  55. export YACC=byacc
  56. # remember the name of the C compiler for the native ABI
  57. MY_NATIVE_CC=$(tc-getCC)
  58. }
  59. multilib_src_configure() {
  60. ECONF_SOURCE="${S}" econf \
  61. --with-x \
  62. $(use_enable static-libs static) \
  63. $(use_enable motif22-compatibility) \
  64. $(use_enable unicode utf8) \
  65. $(use_enable xft) \
  66. $(use_enable jpeg) \
  67. $(use_enable png)
  68. }
  69. multilib_src_compile() {
  70. # The wmluiltok build tool is linked with libfl.a, so always
  71. # compile it for the native ABI
  72. emake -C tools/wml CC="${MY_NATIVE_CC}" LIBS="-lfl" wmluiltok
  73. emake
  74. }
  75. multilib_src_install() {
  76. emake DESTDIR="${D}" install
  77. if multilib_is_native_abi && use examples; then
  78. emake -C demos DESTDIR="${D}" install-data
  79. dodir /usr/share/doc/${PF}/demos
  80. mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos || die
  81. fi
  82. }
  83. multilib_src_install_all() {
  84. # mwm default configs
  85. insinto /usr/share/X11/app-defaults
  86. newins "${FILESDIR}"/Mwm.defaults Mwm
  87. # cleanup
  88. rm -rf "${ED}"/usr/share/Xm
  89. find "${D}" -type f -name "*.la" -delete || die
  90. dodoc BUGREPORT ChangeLog README RELEASE RELNOTES TODO
  91. }