1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit autotools distutils-r1 perl-module java-pkg-opt-2
9 DESCRIPTION="Suite of tools for moving data between a Palm device and a desktop"
10 HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
11 SRC_URI="mirror://gentoo/${P}.tar.bz2
12 https://dev.gentoo.org/~mgorny/dist/${P}-gentoo-patchset.tar.bz2"
14 LICENSE="|| ( GPL-2 LGPL-2 )"
16 KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
17 IUSE="bluetooth debug java perl png python static-libs threads usb"
21 >=sys-libs/ncurses-5.7-r7:0=
22 >=sys-libs/readline-6:0=
24 bluetooth? ( net-wireless/bluez )
25 perl? ( >=dev-lang/perl-5.12 )
26 png? ( media-libs/libpng:0= )
27 usb? ( virtual/libusb:0 )
29 DEPEND="${COMMON_DEPEND}
30 java? ( >=virtual/jdk-1.4 )
32 RDEPEND="${COMMON_DEPEND}
33 java? ( >=virtual/jre-1.4 )
36 RESTRICT="test" #672872
41 eapply -p0 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-java-install.patch
42 eapply -p0 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-respect-javacflags.patch
43 eapply -p0 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.2-werror_194921.patch
44 eapply -p1 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.2-threads.patch
45 eapply -p0 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-libpng14.patch
46 eapply -p1 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-png.patch
47 eapply -p0 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-distutils.patch
48 eapply -p1 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.3-libusb-compat-usb_open.patch
49 eapply -p1 "${WORKDIR}/${P}-gentoo-patchset"/${PN}-0.12.5-perl514.patch
51 sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #467600
53 AT_M4DIR="m4" eautoreconf
57 # tcl/tk support is disabled as per upstream request.
58 # readline is not really optional, bug #626504
60 --includedir="${EPREFIX}"/usr/include/libpisock \
61 $(use_enable static-libs static) \
64 $(use_enable threads) \
65 $(use_enable usb libusb) \
67 $(use_with png libpng) \
68 $(use_with bluetooth bluez) \
79 cd "${S}"/bindings/Perl
80 perl-module_src_configure
81 local mymake=( OTHERLDFLAGS="${LDFLAGS} -L../../libpisock/.libs -lpisock" ) #308629
82 perl-module_src_compile
86 cd "${S}"/bindings/Python
87 distutils-r1_src_compile
92 emake DESTDIR="${D}" install
93 dodoc ChangeLog NEWS README doc/{README*,TODO}
96 cd "${S}"/bindings/Java
97 java-pkg_newjar ${PN}.jar
98 java-pkg_doso libjpisock.so
102 cd "${S}"/bindings/Perl
103 perl-module_src_install
107 cd "${S}"/bindings/Python
108 distutils-r1_src_install
111 find "${D}" -name '*.la' -delete || die
116 java-pkg-opt-2_pkg_preinst