Diff linux-gpib-4.3.6-r200 with a linux-gpib-9999

/usr/portage/sci-libs/linux-gpib/linux-gpib-9999.ebuild 2025-10-09 18:21:06.188617300 +0300
8 8
DISTUTILS_EXT=1
9 9
DISTUTILS_OPTIONAL=1
10 10
DISTUTILS_USE_PEP517=setuptools
11
MODULES_OPTIONAL_IUSE=+modules
12 11

  
13
inherit autotools distutils-r1 guile-single linux-mod-r1
14
inherit perl-functions readme.gentoo-r1 udev
12
inherit linux-info readme.gentoo-r1 autotools guile-single perl-functions python-single-r1 udev
15 13

  
16 14
# Check for latest firmware version on bump
17 15
FW_PV="2008-08-10"
......
31 29
SRC_URI+="
32 30
	firmware? ( https://linux-gpib.sourceforge.io/firmware/gpib_firmware-${FW_PV}.tar.gz )
33 31
"
32
S="${WORKDIR}/${PN}-user-${PV}"
34 33

  
35 34
LICENSE="GPL-2"
36 35
SLOT="0"
37
IUSE="guile pcmcia perl php python static tcl doc firmware"
36

  
37
IUSE="pcmcia static guile perl php python tcl doc firmware +modules"
38

  
38 39
REQUIRED_USE="
39 40
	guile? ( ${GUILE_REQUIRED_USE} )
40 41
	python? ( ${PYTHON_REQUIRED_USE} )
......
46 47
	guile? ( ${GUILE_DEPS} )
47 48
	perl? ( dev-lang/perl:= )
48 49
	php? ( dev-lang/php:= )
50
	python? ( ${PYTHON_DEPS} )
49 51
	firmware? ( sys-apps/fxload )
50 52
"
51 53
RDEPEND="${COMMONDEPEND}
52 54
	acct-group/gpib
53
	python? ( ${PYTHON_DEPS} )
54
	!sci-libs/linux-gpib-modules
55
	modules? ( ~sci-libs/linux-gpib-modules-${PV} )
55 56
"
56 57
DEPEND="${COMMONDEPEND}"
57 58
BDEPEND="
......
66 67

  
67 68
pkg_setup() {
68 69
	if use modules; then
69
		linux-mod-r1_pkg_setup
70
		linux-info_pkg_setup
70 71
		if kernel_is -ge 6 13 0; then
71 72
			eerror "The GPIB drivers have been merged upstream into kernel"
72 73
			eerror "version 6.13.0 and up. Please enable CONFIG_GPIB for"
......
89 90
	else
90 91
		default
91 92
		unpack "${WORKDIR}/${P}/${PN}-user-${PV}.tar.gz"
92
		if use modules; then
93
			unpack "${WORKDIR}/${P}/${PN}-kernel-${PV}.tar.gz"
94
			mv "${WORKDIR}/${PN}-kernel-${PV}" "${WORKDIR}/${PN}-kernel" || die
95
		fi
96 93
	fi
97 94
}
98 95

  
......
135 132
		distutils-r1_src_configure
136 133
		popd >/dev/null || die
137 134
	fi
138

  
139
	if use modules; then
140
		MODULES_MAKEARGS+=( LINUX_SRCDIR="${KV_OUT_DIR}" )
141
		use debug && MODULES_MAKEARGS+=( 'GPIB-DEBUG=1' )
142
	fi
143 135
}
144 136

  
145 137
src_compile() {
......
149 141
		distutils-r1_src_compile
150 142
		popd >/dev/null || die
151 143
	fi
152

  
153
	if use modules; then
154
		local modlist=(
155
			"agilent_82350b=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/agilent_82350b"
156
			"agilent_82357a=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/agilent_82357a"
157
			"cb7210=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/cb7210"
158
			"cec_gpib=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/cec"
159
			"fmh_gpib=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/fmh_gpib"
160
			"gpib_bitbang=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/gpio"
161
			"hp82335=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/hp_82335"
162
			"hp_82341=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/hp_82341"
163
			"ines_gpib=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/ines"
164
			"lpvo_usb_gpib=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/lpvo_usb_gpib"
165
			"nec7210=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/nec7210"
166
			"ni_usb_gpib=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/ni_usb"
167
			"gpib_common=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/sys"
168
			"tms9914=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/tms9914"
169
			"tnt4882=gpib:${S}/../${PN}-kernel:${S}/../${PN}-kernel/drivers/gpib/tnt4882"
170
		)
171
		linux-mod-r1_src_compile
172
	fi
173 144
}
174 145

  
175 146
src_install() {
......
185 156
		PYTHONDONTWRITEBYTECODE=0 \
186 157
		docdir="/usr/share/doc/${PF}/html" install
187 158

  
188
	use modules && linux-mod-r1_src_install
189

  
190 159
	use guile && guile_unstrip_ccache
191 160

  
192 161
	if use perl; then
......
280 249
}
281 250

  
282 251
pkg_postinst() {
283
	use modules && linux-mod-r1_pkg_postinst
284 252
	readme.gentoo_print_elog
285 253
	udev_reload
286 254
}
Thank you!