dev-python/agate: Bump to 1.13.0
[gentoo/gentoo.git] / net-print / cnijfilter2 / cnijfilter2-6.60.ebuild
blobe52da964bebed92f646085fc9c25ba32e720ad8b
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit autotools
8 MY_P="${PN}-source-${PV}-1"
10 DESCRIPTION="IJ Printer Driver"
11 HOMEPAGE="https://www.usa.canon.com/support/p/pixma-g4270#idReference%3Dsoftware-drivers"
12 SRC_URI="https://pdisp01.c-wss.com/gdl/WWUFORedirectTarget.do?id=MDEwMDAxMTc1MzAx -> cnijfilter2-source-${PV}-1.tar.gz"
14 S="${WORKDIR}"/${MY_P}
16 LICENSE="Canon-IJ"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
20 DEPEND="virtual/libusb:1
21         dev-libs/libxml2
22         net-print/cups"
23 RDEPEND="${DEPEND}"
25 PATCHES=(
26         "${FILESDIR}"/${PN}-6.50-gentoo.patch
27         "${FILESDIR}"/${PN}-5.80-cflags.patch
28         "${FILESDIR}"/${PN}-5.80-fno-common.patch
29         "${FILESDIR}"/${P}-c99.patch
32 pkg_setup()  {
33         QA_PREBUILT="
34                 /usr/$(get_libdir)/libcnbpnet30.so.1.0.0
35                 /usr/$(get_libdir)/libcnbpcnclapicom2.so.5.0.0
36                 /usr/$(get_libdir)/libcnnet2.so.1.2.5
37                 /usr/$(get_libdir)/libcnbpnet20.so.1.0.0
38                 /usr/bin/cnijlgmon3
39         "
42 src_prepare() {
43         default
44         DIRS="cmdtocanonij2 cmdtocanonij3 cnijbe2 lgmon3 rastertocanonij tocanonij tocnpwg"
45         LIBDIR=com/libs_bin$(usex amd64 _x86_64 _i686)
46         for d in ${DIRS}; do
47                 mv "${d}"/configure.{in,ac} || die
48         done
49         echo "AC_INIT([${PN}], [${PV}])" >> configure.ac
50         echo "AM_INIT_AUTOMAKE" >> configure.ac
51         echo "AC_CONFIG_SUBDIRS([${DIRS}])" >> configure.ac
52         echo "AC_CONFIG_FILES([Makefile])" >> configure.ac
53         echo "AC_OUTPUT()" >> configure.ac
54         echo "SUBDIRS= ${DIRS}" >> Makefile.am
55         sed -i \
56                 -e "/^CFLAGS/d" \
57                 */configure.ac \
58                 cnijbe2/src/Makefile.am || die
59         eautoreconf
60         cd ${LIBDIR}
61         rm libcn*.so || die
62         ln -sf libcnbpcnclapicom2.so.5.0.0 libcnbpcnclapicom2.so || die
63         ln -sf libcnbpnet20.so.1.0.0 libcnbpnet20.so || die
64         ln -sf libcnbpnet30.so.1.0.0 libcnbpnet30.so || die
65         ln -sf libcnnet2.so.1.2.5 libcnnet2.so || die
67         cd -
70 src_configure() {
71         econf --enable-progpath="${EPREFIX}/usr/bin" LDFLAGS="-L${S}/${LIBDIR} ${LDFLAGS}"
74 src_install() {
75         default
76         insinto /usr/share/ppd/cupsfilters
77         doins ppd/*ppd
78         dolib.so ${LIBDIR}/*