parent
9043245859
commit
93d1dec483
Binary file not shown.
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
Bug: https://bugs.gentoo.org/894204
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -17,6 +17,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA */
|
||||
+#include <locale.h>
|
||||
|
||||
#include "configure.h"
|
||||
#include "interface.h"
|
@ -0,0 +1,38 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Graphical tool to show free disk space like df"
|
||||
HOMEPAGE="https://gitlab.com/mazes_80/gtkdiskfree"
|
||||
COMMIT="bdda379b9109a226a37801505a19da91494144a6"
|
||||
SRC_URI="https://gitlab.com/mazes_80/${PN}/-/archive/${COMMIT}/${PN}-${COMMIT}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${COMMIT}"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="gtk2"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf
|
||||
gtk2? ( x11-libs/gtk+:2 )
|
||||
!gtk2? ( x11-libs/gtk+:3 )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-base/xorg-proto"
|
||||
BDEPEND="sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-musl-setlocale.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
if use gtk2 ; then
|
||||
econf $(use_with gtk2)
|
||||
else
|
||||
econf --enable-old-color-selector
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -0,0 +1,100 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit readme.gentoo-r1
|
||||
|
||||
MY_P="${PN}-$(ver_rs 2 b)"
|
||||
|
||||
DESCRIPTION="Dump/restore ext2fs backup utilities"
|
||||
HOMEPAGE="https://dump.sourceforge.io/"
|
||||
SRC_URI="mirror://sourceforge/dump/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
# We keep uuid USE flag default dsiabled for this version. Don't forget
|
||||
# to default enable it for later versions as this is the upstream default.
|
||||
IUSE="bzip2 debug ermt lzo readline selinux sqlite ssl static test uuid zlib"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
ermt? ( ssl )
|
||||
ssl? ( zlib )
|
||||
test? ( sqlite? ( uuid ) )"
|
||||
|
||||
RDEPEND="
|
||||
>=sys-fs/e2fsprogs-1.27:=
|
||||
sys-apps/util-linux
|
||||
bzip2? (
|
||||
app-arch/bzip2:=
|
||||
static? ( app-arch/bzip2[static-libs] )
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.1.4:= )
|
||||
lzo? (
|
||||
dev-libs/lzo:2=
|
||||
static? ( dev-libs/lzo:2[static-libs] )
|
||||
)
|
||||
sqlite? ( dev-db/sqlite:3= )
|
||||
ermt? ( dev-libs/openssl:0= )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
readline? (
|
||||
sys-libs/readline:0=
|
||||
sys-libs/ncurses:=
|
||||
static? ( sys-libs/ncurses:=[static-libs] )
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/os-headers"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-fix-incompatible-pointer-to-integer-conversion.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-dumpdatespath=/etc/dumpdates
|
||||
--with-rmtpath='$(sbindir)/rmt'
|
||||
--enable-blkid
|
||||
$(use_enable bzip2)
|
||||
$(use_enable debug)
|
||||
$(use_enable ermt)
|
||||
$(use_enable lzo)
|
||||
$(use_enable readline)
|
||||
$(use_enable selinux)
|
||||
$(use_enable sqlite)
|
||||
$(use_enable ssl)
|
||||
$(use_enable static static-progs)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
mv "${ED}"/usr/sbin/{,dump-}rmt || die
|
||||
mv "${ED}"/usr/share/man/man8/{,dump-}rmt.8 || die
|
||||
use ermt && newsbin rmt/ermt dump-ermt
|
||||
|
||||
dodoc KNOWNBUGS MAINTAINERS REPORTING-BUGS
|
||||
dodoc -r examples
|
||||
|
||||
# Don't install pre-compressed files
|
||||
gunzip "${ED}"/usr/share/doc/${PF}/examples/cron_dump_to_disk/backupskel.tar.gz \
|
||||
|| die
|
||||
|
||||
local DOC_CONTENTS="dump has serious bugs
|
||||
(see https://sourceforge.net/p/dump/bugs/162/ and
|
||||
https://sourceforge.net/p/dump/bugs/174/). This tool should only
|
||||
be used for restoring old backups, not for creating new ones.
|
||||
\n\n${CATEGORY}/${PN} installs 'rmt' as 'dump-rmt'.
|
||||
This is to avoid conflicts with app-arch/tar 'rmt'."
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_print_elog
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
From: listout <listout@protonmail.com>
|
||||
Date: Mon, 17 Apr 2023 12:36:40 +0530
|
||||
Subject: [PATCH] Fix incompatible pointer to integer conversion
|
||||
|
||||
transformation_null was initializing one of it's elements with NULL
|
||||
which is zero type casted to void. Hence, instead of initializing with
|
||||
NULL, now we are initializing that element with zero.
|
||||
|
||||
Refer: https://bugs.gentoo.org/874675
|
||||
|
||||
Signed-off-by: listout <listout@protonmail.com>
|
||||
--- a/common/transformation_null.c
|
||||
+++ b/common/transformation_null.c
|
||||
@@ -81,7 +81,7 @@ null_decompress(Transformation *xform, struct tapebuf *tpbin, unsigned long *des
|
||||
Transformation transformation_null =
|
||||
{
|
||||
0,
|
||||
- NULL,
|
||||
+ 0,
|
||||
"null",
|
||||
0,
|
||||
&null_initialize,
|
||||
--
|
||||
2.39.2
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,420 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Autogenerated by pycargoebuild 0.6.2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
addr2line@0.19.0
|
||||
adler@1.0.2
|
||||
aead@0.5.2
|
||||
ahash@0.8.3
|
||||
aho-corasick@0.7.20
|
||||
android_system_properties@0.1.5
|
||||
anyhow@1.0.66
|
||||
ascii-canvas@3.0.0
|
||||
async-trait@0.1.63
|
||||
atty@0.2.14
|
||||
autocfg@1.1.0
|
||||
backtrace@0.3.67
|
||||
base64@0.13.1
|
||||
base64@0.21.0
|
||||
bindgen@0.57.0
|
||||
bit-set@0.5.3
|
||||
bit-vec@0.6.3
|
||||
bitflags@1.3.2
|
||||
bitflags@2.3.2
|
||||
block-buffer@0.10.4
|
||||
block-buffer@0.9.0
|
||||
block-padding@0.3.3
|
||||
botan-sys@0.10.1
|
||||
botan@0.10.1
|
||||
buffered-reader@1.2.0
|
||||
bumpalo@3.11.1
|
||||
byteorder@1.4.3
|
||||
bytes@1.3.0
|
||||
bzip2-sys@0.1.11+1.0.8
|
||||
bzip2@0.4.3
|
||||
capnp-futures@0.14.2
|
||||
capnp-rpc@0.14.1
|
||||
capnp@0.14.11
|
||||
cc@1.0.78
|
||||
cexpr@0.4.0
|
||||
cfg-if@0.1.10
|
||||
cfg-if@1.0.0
|
||||
chrono@0.4.23
|
||||
cipher@0.2.5
|
||||
cipher@0.4.4
|
||||
clang-sys@1.4.0
|
||||
clap@4.0.32
|
||||
clap_complete@4.0.7
|
||||
clap_derive@4.0.21
|
||||
clap_lex@0.3.0
|
||||
clap_mangen@0.2.6
|
||||
cmac@0.7.2
|
||||
codespan-reporting@0.11.1
|
||||
core-foundation-sys@0.8.3
|
||||
core-foundation@0.9.3
|
||||
cpufeatures@0.2.5
|
||||
crc32fast@1.3.2
|
||||
crossbeam-channel@0.5.8
|
||||
crossbeam-deque@0.8.2
|
||||
crossbeam-epoch@0.9.13
|
||||
crossbeam-queue@0.3.8
|
||||
crossbeam-utils@0.8.14
|
||||
crossbeam@0.8.2
|
||||
crunchy@0.2.2
|
||||
crypto-common@0.1.6
|
||||
ctor@0.1.26
|
||||
ctr@0.9.2
|
||||
curve25519-dalek@3.2.1
|
||||
cxx-build@1.0.83
|
||||
cxx@1.0.83
|
||||
cxxbridge-flags@1.0.83
|
||||
cxxbridge-macro@1.0.83
|
||||
daemonize@0.5.0
|
||||
darling@0.20.1
|
||||
darling_core@0.20.1
|
||||
darling_macro@0.20.1
|
||||
data-encoding@2.3.3
|
||||
dbl@0.3.2
|
||||
diff@0.1.13
|
||||
digest@0.10.7
|
||||
digest@0.9.0
|
||||
dirs-next@2.0.0
|
||||
dirs-sys-next@0.1.2
|
||||
dirs-sys@0.3.7
|
||||
dirs-sys@0.4.1
|
||||
dirs@4.0.0
|
||||
dirs@5.0.1
|
||||
doc-comment@0.3.3
|
||||
dot-writer@0.1.3
|
||||
dyn-clone@1.0.9
|
||||
eax@0.5.0
|
||||
ed25519-dalek@1.0.1
|
||||
ed25519@1.5.3
|
||||
edit-distance@2.1.0
|
||||
either@1.8.0
|
||||
ena@0.14.0
|
||||
encoding_rs@0.8.32
|
||||
endian-type@0.1.2
|
||||
enum-as-inner@0.5.1
|
||||
enumber@0.3.0
|
||||
errno-dragonfly@0.1.2
|
||||
errno@0.2.8
|
||||
fallible-iterator@0.2.0
|
||||
fallible-streaming-iterator@0.1.9
|
||||
fastrand@1.8.0
|
||||
fd-lock@3.0.8
|
||||
filetime@0.2.19
|
||||
fixedbitset@0.4.2
|
||||
flate2@1.0.25
|
||||
fnv@1.0.7
|
||||
foreign-types-shared@0.1.1
|
||||
foreign-types@0.3.2
|
||||
form_urlencoded@1.1.0
|
||||
fs2@0.4.3
|
||||
futures-channel@0.3.25
|
||||
futures-core@0.3.25
|
||||
futures-executor@0.3.25
|
||||
futures-io@0.3.25
|
||||
futures-macro@0.3.25
|
||||
futures-sink@0.3.25
|
||||
futures-task@0.3.25
|
||||
futures-util@0.3.25
|
||||
futures@0.3.25
|
||||
generic-array@0.14.6
|
||||
getrandom@0.1.16
|
||||
getrandom@0.2.8
|
||||
gimli@0.27.0
|
||||
glob@0.3.0
|
||||
h2@0.3.15
|
||||
hashbrown@0.12.3
|
||||
hashbrown@0.13.2
|
||||
hashlink@0.8.2
|
||||
heck@0.4.0
|
||||
hermit-abi@0.1.19
|
||||
hermit-abi@0.2.6
|
||||
hex@0.4.3
|
||||
home-dir@0.1.0
|
||||
hostname@0.3.1
|
||||
http-body@0.4.5
|
||||
http@0.2.8
|
||||
httparse@1.8.0
|
||||
httpdate@1.0.2
|
||||
hyper-tls@0.5.0
|
||||
hyper@0.14.23
|
||||
iana-time-zone-haiku@0.1.1
|
||||
iana-time-zone@0.1.53
|
||||
ident_case@1.0.1
|
||||
idna@0.2.3
|
||||
idna@0.3.0
|
||||
indexmap@1.9.2
|
||||
inout@0.1.3
|
||||
instant@0.1.12
|
||||
interprocess@1.2.1
|
||||
io-lifetimes@1.0.3
|
||||
ipconfig@0.3.1
|
||||
ipnet@2.7.1
|
||||
is-terminal@0.4.2
|
||||
itertools@0.10.5
|
||||
itoa@1.0.5
|
||||
js-sys@0.3.60
|
||||
lalrpop-util@0.19.8
|
||||
lalrpop@0.19.8
|
||||
lazy_static@1.4.0
|
||||
lazycell@1.3.0
|
||||
libc@0.2.138
|
||||
libloading@0.7.4
|
||||
libm@0.2.6
|
||||
libsqlite3-sys@0.26.0
|
||||
link-cplusplus@1.0.7
|
||||
linked-hash-map@0.5.6
|
||||
linux-raw-sys@0.1.4
|
||||
lock_api@0.4.9
|
||||
log@0.4.17
|
||||
lru-cache@0.1.2
|
||||
match_cfg@0.1.0
|
||||
matches@0.1.10
|
||||
memchr@2.5.0
|
||||
memoffset@0.7.1
|
||||
memsec@0.6.2
|
||||
mime@0.3.16
|
||||
miniz_oxide@0.6.2
|
||||
mio@0.8.5
|
||||
native-tls@0.2.11
|
||||
nettle-sys@2.1.0
|
||||
nettle@7.2.2
|
||||
new_debug_unreachable@1.0.4
|
||||
nibble_vec@0.1.0
|
||||
nix@0.18.0
|
||||
nom@5.1.2
|
||||
ntest@0.9.0
|
||||
ntest_test_cases@0.9.0
|
||||
ntest_timeout@0.9.0
|
||||
num-bigint-dig@0.8.2
|
||||
num-integer@0.1.45
|
||||
num-iter@0.1.43
|
||||
num-traits@0.2.15
|
||||
num_cpus@1.14.0
|
||||
object@0.30.0
|
||||
once_cell@1.17.0
|
||||
opaque-debug@0.3.0
|
||||
openpgp-cert-d@0.1.0
|
||||
openssl-macros@0.1.0
|
||||
openssl-probe@0.1.5
|
||||
openssl-sys@0.9.83
|
||||
openssl@0.10.48
|
||||
option-ext@0.2.0
|
||||
os_str_bytes@6.4.1
|
||||
parking_lot@0.12.1
|
||||
parking_lot_core@0.9.5
|
||||
peeking_take_while@0.1.2
|
||||
percent-encoding@2.2.0
|
||||
petgraph@0.6.2
|
||||
phf_shared@0.10.0
|
||||
pin-project-lite@0.2.9
|
||||
pin-utils@0.1.0
|
||||
pkg-config@0.3.26
|
||||
ppv-lite86@0.2.17
|
||||
precomputed-hash@0.1.1
|
||||
proc-macro-crate@1.3.1
|
||||
proc-macro-error-attr@1.0.4
|
||||
proc-macro-error@1.0.4
|
||||
proc-macro2@1.0.60
|
||||
quick-error@1.2.3
|
||||
quote@1.0.28
|
||||
radix_trie@0.2.1
|
||||
rand@0.7.3
|
||||
rand@0.8.5
|
||||
rand_chacha@0.2.2
|
||||
rand_chacha@0.3.1
|
||||
rand_core@0.5.1
|
||||
rand_core@0.6.4
|
||||
rand_distr@0.4.3
|
||||
rand_hc@0.2.0
|
||||
rayon-core@1.10.2
|
||||
rayon@1.6.1
|
||||
redox_syscall@0.2.16
|
||||
redox_users@0.4.3
|
||||
regex-syntax@0.6.28
|
||||
regex@1.7.0
|
||||
remove_dir_all@0.5.3
|
||||
reqwest@0.11.14
|
||||
resolv-conf@0.7.0
|
||||
roff@0.2.1
|
||||
rusqlite@0.29.0
|
||||
rustc-demangle@0.1.21
|
||||
rustc-hash@1.1.0
|
||||
rustc_version@0.4.0
|
||||
rustix@0.36.5
|
||||
rustversion@1.0.9
|
||||
ryu@1.0.12
|
||||
schannel@0.1.21
|
||||
scopeguard@1.1.0
|
||||
scratch@1.0.2
|
||||
security-framework-sys@2.8.0
|
||||
security-framework@2.8.1
|
||||
semver@1.0.17
|
||||
sequoia-cert-store@0.3.2
|
||||
sequoia-ipc@0.30.1
|
||||
sequoia-net@0.27.0
|
||||
sequoia-openpgp-mt@0.1.0
|
||||
sequoia-openpgp@1.16.0
|
||||
sequoia-policy-config@0.6.0
|
||||
sequoia-wot@0.8.1
|
||||
serde@1.0.164
|
||||
serde_derive@1.0.164
|
||||
serde_json@1.0.91
|
||||
serde_urlencoded@0.7.1
|
||||
serde_with@3.0.0
|
||||
serde_with_macros@3.0.0
|
||||
sha1collisiondetection@0.2.7
|
||||
sha2@0.9.9
|
||||
shlex@0.1.1
|
||||
signature@1.6.4
|
||||
siphasher@0.3.10
|
||||
slab@0.4.7
|
||||
smallvec@1.10.0
|
||||
socket2@0.4.7
|
||||
spin@0.5.2
|
||||
stfu8@0.2.6
|
||||
string_cache@0.8.4
|
||||
strsim@0.10.0
|
||||
subtle@2.4.1
|
||||
syn@1.0.105
|
||||
syn@2.0.18
|
||||
synstructure@0.12.6
|
||||
tempfile@3.3.0
|
||||
term@0.7.0
|
||||
termcolor@1.1.3
|
||||
terminal_size@0.2.3
|
||||
thiserror-impl@1.0.37
|
||||
thiserror@1.0.37
|
||||
time-core@0.1.0
|
||||
time-macros@0.2.6
|
||||
time@0.1.45
|
||||
time@0.3.17
|
||||
tiny-keccak@2.0.2
|
||||
tinyvec@1.6.0
|
||||
tinyvec_macros@0.1.0
|
||||
to_method@1.1.0
|
||||
tokio-macros@1.8.2
|
||||
tokio-native-tls@0.3.0
|
||||
tokio-socks@0.5.1
|
||||
tokio-util@0.7.4
|
||||
tokio@1.23.0
|
||||
toml@0.5.11
|
||||
toml_datetime@0.6.1
|
||||
toml_edit@0.19.4
|
||||
tower-service@0.3.2
|
||||
tracing-attributes@0.1.23
|
||||
tracing-core@0.1.30
|
||||
tracing@0.1.37
|
||||
trust-dns-client@0.22.0
|
||||
trust-dns-proto@0.22.0
|
||||
trust-dns-resolver@0.22.0
|
||||
try-lock@0.2.4
|
||||
typenum@1.16.0
|
||||
unicode-bidi@0.3.8
|
||||
unicode-ident@1.0.5
|
||||
unicode-normalization@0.1.22
|
||||
unicode-width@0.1.10
|
||||
unicode-xid@0.2.4
|
||||
url@2.3.1
|
||||
vcpkg@0.2.15
|
||||
version_check@0.9.4
|
||||
want@0.3.0
|
||||
wasi@0.10.0+wasi-snapshot-preview1
|
||||
wasi@0.11.0+wasi-snapshot-preview1
|
||||
wasi@0.9.0+wasi-snapshot-preview1
|
||||
wasm-bindgen-backend@0.2.83
|
||||
wasm-bindgen-futures@0.4.33
|
||||
wasm-bindgen-macro-support@0.2.83
|
||||
wasm-bindgen-macro@0.2.83
|
||||
wasm-bindgen-shared@0.2.83
|
||||
wasm-bindgen@0.2.83
|
||||
web-sys@0.3.60
|
||||
widestring@0.5.1
|
||||
win-crypto-ng@0.4.0
|
||||
winapi-i686-pc-windows-gnu@0.4.0
|
||||
winapi-util@0.1.5
|
||||
winapi-x86_64-pc-windows-gnu@0.4.0
|
||||
winapi@0.3.9
|
||||
windows-sys@0.42.0
|
||||
windows-sys@0.48.0
|
||||
windows-targets@0.48.0
|
||||
windows_aarch64_gnullvm@0.42.0
|
||||
windows_aarch64_gnullvm@0.48.0
|
||||
windows_aarch64_msvc@0.42.0
|
||||
windows_aarch64_msvc@0.48.0
|
||||
windows_i686_gnu@0.42.0
|
||||
windows_i686_gnu@0.48.0
|
||||
windows_i686_msvc@0.42.0
|
||||
windows_i686_msvc@0.48.0
|
||||
windows_x86_64_gnu@0.42.0
|
||||
windows_x86_64_gnu@0.48.0
|
||||
windows_x86_64_gnullvm@0.42.0
|
||||
windows_x86_64_gnullvm@0.48.0
|
||||
windows_x86_64_msvc@0.42.0
|
||||
windows_x86_64_msvc@0.48.0
|
||||
winnow@0.3.5
|
||||
winreg@0.10.1
|
||||
xxhash-rust@0.8.6
|
||||
zbase32@0.1.2
|
||||
zeroize@1.3.0
|
||||
zeroize_derive@1.3.3
|
||||
"
|
||||
|
||||
LLVM_MAX_SLOT=15
|
||||
inherit cargo llvm xdg-utils
|
||||
|
||||
DESCRIPTION="Sequoia's reimplementation of the GnuPG interface"
|
||||
HOMEPAGE="https://sequoia-pgp.org/"
|
||||
SRC_URI="
|
||||
https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/archive/v${PV}/${P}-v${PV}.tar.bz2
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
S="${WORKDIR}"/${PN}-v${PV}-c0cd3843a40126a09de1f52a6a49da8c20e64b50
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
# Dependent crate licenses
|
||||
LICENSE+="
|
||||
Apache-2.0 BSD Boost-1.0 CC0-1.0 ISC LGPL-2+ LGPL-3+ MIT MPL-2.0
|
||||
Unicode-DFS-2016
|
||||
|| ( GPL-2 GPL-3 LGPL-3 )
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
# See e.g. https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/issues/8
|
||||
# Even though that's fixed as of >0.2.0, tests still completely fail inside
|
||||
# Portage. Not yet sure why/how. They do better outside, although some fail
|
||||
# still then.
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/gmp:=
|
||||
dev-libs/nettle:=
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
# Needed for bindgen
|
||||
BDEPEND="<sys-devel/clang-$((${LLVM_MAX_SLOT} + 1))"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/bin/gpg-sq usr/bin/gpgv-sq"
|
||||
|
||||
llvm_check_deps() {
|
||||
has_version -b "sys-devel/clang:${LLVM_SLOT}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export GNUPGHOME="${T}"/.gnupg
|
||||
export REAL_GPG_BIN="${BROOT}"/usr/bin/gpg
|
||||
export REAL_GPGV_BIN="${BROOT}"/usr/bin/gpgv
|
||||
|
||||
mkdir "${GNUPGHOME}" || die
|
||||
chmod 700 "${GNUPGHOME}" || die
|
||||
|
||||
xdg_environment_reset
|
||||
RUST_BACKTRACE=full cargo_src_test -vv
|
||||
}
|
Binary file not shown.
@ -0,0 +1,566 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV##*.} = 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
|
||||
EGIT_BRANCH="emacs-29"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
|
||||
S="${EGIT_CHECKOUT_DIR}"
|
||||
SLOT="${PV%%.*}-vcs"
|
||||
else
|
||||
# FULL_VERSION keeps the full version number, which is needed in
|
||||
# order to determine some path information correctly for copy/move
|
||||
# operations later on
|
||||
FULL_VERSION="${PV%%_*}"
|
||||
SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
|
||||
S="${WORKDIR}/emacs-${FULL_VERSION}"
|
||||
# PV can be in any of the following formats:
|
||||
# 27.1 released version (slot 27)
|
||||
# 27.1_rc1 upstream release candidate (27)
|
||||
# 27.0.9999 live ebuild (slot 27-vcs)
|
||||
# 27.0.90 upstream prerelease snapshot (27-vcs)
|
||||
# 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs)
|
||||
if [[ ${PV} == *_pre* ]]; then
|
||||
SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
|
||||
S="${WORKDIR}/emacs"
|
||||
elif [[ ${PV//[0-9]} != "." ]]; then
|
||||
SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
|
||||
fi
|
||||
SLOT="${PV%%.*}"
|
||||
[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
|
||||
HOMEPAGE="https://www.gnu.org/software/emacs/"
|
||||
|
||||
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
|
||||
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source sqlite ssl svg systemd +threads tiff toolkit-scroll-bars tree-sitter valgrind webp wide-int +X Xaw3d xft +xpm xwidgets zlib"
|
||||
|
||||
X_DEPEND="x11-libs/libICE
|
||||
x11-libs/libSM
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXinerama
|
||||
x11-libs/libXrandr
|
||||
x11-libs/libxcb
|
||||
x11-misc/xbitmaps
|
||||
xpm? ( x11-libs/libXpm )
|
||||
xft? (
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
x11-libs/libXrender
|
||||
cairo? ( >=x11-libs/cairo-1.12.18[X] )
|
||||
!cairo? ( x11-libs/libXft )
|
||||
harfbuzz? ( media-libs/harfbuzz:0= )
|
||||
m17n-lib? (
|
||||
>=dev-libs/libotf-0.9.4
|
||||
>=dev-libs/m17n-lib-1.5.1
|
||||
)
|
||||
)
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
xwidgets? (
|
||||
net-libs/webkit-gtk:4.1=
|
||||
x11-libs/libXcomposite
|
||||
)
|
||||
)
|
||||
!gtk? (
|
||||
motif? (
|
||||
>=x11-libs/motif-2.3:0
|
||||
x11-libs/libXpm
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
!motif? (
|
||||
Xaw3d? (
|
||||
x11-libs/libXaw3d
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
)
|
||||
!Xaw3d? ( athena? (
|
||||
x11-libs/libXaw
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
) )
|
||||
)
|
||||
)"
|
||||
|
||||
RDEPEND="app-emacs/emacs-common[games?,gui(-)?]
|
||||
sys-libs/ncurses:0=
|
||||
acl? ( virtual/acl )
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
dbus? ( sys-apps/dbus )
|
||||
games? ( acct-group/gamestat )
|
||||
gmp? ( dev-libs/gmp:0= )
|
||||
gpm? ( sys-libs/gpm )
|
||||
!inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
|
||||
jit? (
|
||||
sys-devel/gcc:=[jit(-)]
|
||||
sys-libs/zlib
|
||||
)
|
||||
json? ( dev-libs/jansson:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
lcms? ( media-libs/lcms:2 )
|
||||
libxml2? ( >=dev-libs/libxml2-2.2.0 )
|
||||
mailutils? ( net-mail/mailutils[clients] )
|
||||
!mailutils? ( acct-group/mail net-libs/liblockfile )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
sqlite? ( dev-db/sqlite:3 )
|
||||
ssl? ( net-libs/gnutls:0= )
|
||||
systemd? ( sys-apps/systemd )
|
||||
tree-sitter? ( dev-libs/tree-sitter )
|
||||
valgrind? ( dev-util/valgrind )
|
||||
zlib? ( sys-libs/zlib )
|
||||
gui? (
|
||||
gif? ( media-libs/giflib:0= )
|
||||
jpeg? ( media-libs/libjpeg-turbo:0= )
|
||||
png? ( >=media-libs/libpng-1.4:0= )
|
||||
svg? ( >=gnome-base/librsvg-2.0 )
|
||||
tiff? ( media-libs/tiff:= )
|
||||
webp? ( media-libs/libwebp:0= )
|
||||
imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= )
|
||||
!aqua? (
|
||||
gsettings? ( >=dev-libs/glib-2.28.6 )
|
||||
gtk? ( !X? (
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
>=x11-libs/cairo-1.12.18
|
||||
x11-libs/gtk+:3
|
||||
harfbuzz? ( media-libs/harfbuzz:0= )
|
||||
m17n-lib? (
|
||||
>=dev-libs/libotf-0.9.4
|
||||
>=dev-libs/m17n-lib-1.5.1
|
||||
)
|
||||
xwidgets? ( net-libs/webkit-gtk:4.1= )
|
||||
) )
|
||||
!gtk? ( ${X_DEPEND} )
|
||||
X? ( ${X_DEPEND} )
|
||||
)
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
gui? ( !aqua? (
|
||||
!gtk? ( x11-base/xorg-proto )
|
||||
X? ( x11-base/xorg-proto )
|
||||
) )"
|
||||
|
||||
BDEPEND="sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
gzip-el? ( app-arch/gzip )"
|
||||
|
||||
IDEPEND="app-eselect/eselect-emacs"
|
||||
|
||||
RDEPEND+=" ${IDEPEND}"
|
||||
|
||||
EMACS_SUFFIX="emacs-${SLOT}"
|
||||
SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV##*.} = 9999 ]]; then
|
||||
FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \
|
||||
configure.ac)
|
||||
[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
|
||||
einfo "Emacs branch: ${EGIT_BRANCH}"
|
||||
einfo "Commit: ${EGIT_VERSION}"
|
||||
einfo "Emacs version number: ${FULL_VERSION}"
|
||||
[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
|
||||
|| die "Upstream version number changed to ${FULL_VERSION}"
|
||||
fi
|
||||
|
||||
if use jit; then
|
||||
find lisp -type f -name "*.elc" -delete || die
|
||||
|
||||
# These files ignore LDFLAGS. We assign the variable here, because
|
||||
# for live ebuilds FULL_VERSION doesn't exist in global scope
|
||||
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"
|
||||
|
||||
# gccjit doesn't play well with ccache or distcc #801580
|
||||
# For now, work around the problem with an explicit LIBRARY_PATH
|
||||
has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \
|
||||
&& export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \
|
||||
| sed -n '/^libraries:/{s:^[^/]*::;p}')
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
# Fix filename reference in redirected man page
|
||||
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
|
||||
|
||||
# libseccomp is detected by configure but doesn't appear to have any
|
||||
# effect on the installed image. Suppress it by supplying pkg-config
|
||||
# with a wrong library name.
|
||||
sed -i -e "/CHECK_MODULES/s/libseccomp/DiSaBlE&/" configure.ac || die
|
||||
|
||||
AT_M4DIR=m4 eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
# Prevents e.g. tests interfering with running Emacs.
|
||||
unset EMACS_SOCKET_NAME
|
||||
|
||||
if use alsa; then
|
||||
use sound || ewarn \
|
||||
"USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
|
||||
myconf+=" --with-sound=alsa"
|
||||
else
|
||||
myconf+=" --with-sound=$(usex sound oss)"
|
||||
fi
|
||||
|
||||
if use jit; then
|
||||
use zlib || ewarn \
|
||||
"USE flag \"jit\" overrides \"-zlib\"; enabling zlib support."
|
||||
myconf+=" --with-zlib"
|
||||
else
|
||||
myconf+=" $(use_with zlib)"
|
||||
fi
|
||||
|
||||
# Emacs supports these window systems:
|
||||
# X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa).
|
||||
# General GUI support is enabled by the "gui" USE flag, then
|
||||
# the window system is selected as follows:
|
||||
# "aqua" -> Nextstep
|
||||
# "gtk -X" -> pure GTK
|
||||
# otherwise -> X11
|
||||
# For X11 there is the further choice of toolkits GTK, Motif,
|
||||
# Athena (Lucid), or no toolkit. They are enabled (in order of
|
||||
# preference) with the "gtk", "motif", "Xaw3d", and "athena" flags.
|
||||
|
||||
if ! use gui; then
|
||||
einfo "Configuring to build without window system support"
|
||||
myconf+=" --without-x --without-pgtk --without-ns"
|
||||
elif use aqua; then
|
||||
einfo "Configuring to build with Nextstep (Macintosh Cocoa) support"
|
||||
myconf+=" --with-ns --disable-ns-self-contained"
|
||||
myconf+=" --without-x --without-pgtk"
|
||||
elif use gtk && ! use X; then
|
||||
einfo "Configuring to build with pure GTK (without X11) support"
|
||||
myconf+=" --with-pgtk --without-x --without-ns"
|
||||
myconf+=" --with-toolkit-scroll-bars" #836392
|
||||
myconf+=" --without-gconf"
|
||||
myconf+=" $(use_with gsettings)"
|
||||
myconf+=" $(use_with harfbuzz)"
|
||||
myconf+=" $(use_with m17n-lib libotf)"
|
||||
myconf+=" $(use_with m17n-lib m17n-flt)"
|
||||
myconf+=" $(use_with xwidgets)"
|
||||
else
|
||||
# X11
|
||||
myconf+=" --with-x --without-pgtk --without-ns"
|
||||
myconf+=" --without-gconf"
|
||||
myconf+=" $(use_with gsettings)"
|
||||
myconf+=" $(use_with toolkit-scroll-bars)"
|
||||
myconf+=" $(use_with xpm)"
|
||||
|
||||
if use xft; then
|
||||
myconf+=" --with-xft"
|
||||
myconf+=" $(use_with cairo)"
|
||||
myconf+=" $(use_with harfbuzz)"
|
||||
myconf+=" $(use_with m17n-lib libotf)"
|
||||
myconf+=" $(use_with m17n-lib m17n-flt)"
|
||||
else
|
||||
myconf+=" --without-xft"
|
||||
myconf+=" --without-cairo"
|
||||
myconf+=" --without-libotf --without-m17n-flt"
|
||||
use cairo && ewarn \
|
||||
"USE flag \"cairo\" has no effect if \"xft\" is not set."
|
||||
use m17n-lib && ewarn \
|
||||
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
|
||||
fi
|
||||
|
||||
local f line
|
||||
if use gtk; then
|
||||
einfo "Configuring to build with GIMP Toolkit (GTK+)"
|
||||
while read line; do ewarn "${line}"; done <<-EOF
|
||||
Your version of GTK+ will have problems with closing open
|
||||
displays. This is no problem if you just use one display, but
|
||||
if you use more than one and close one of them Emacs may crash.
|
||||
See <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and
|
||||
<https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>.
|
||||
If you intend to use more than one display, then it is strongly
|
||||
recommended that you compile Emacs with the Athena/Lucid or the
|
||||
Motif toolkit instead.
|
||||
EOF
|
||||
myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
|
||||
for f in motif Xaw3d athena; do
|
||||
use ${f} && ewarn \
|
||||
"USE flag \"${f}\" has no effect if \"gtk\" is set."
|
||||
done
|
||||
elif use motif; then
|
||||
einfo "Configuring to build with Motif toolkit"
|
||||
myconf+=" --with-x-toolkit=motif"
|
||||
for f in Xaw3d athena; do
|
||||
use ${f} && ewarn \
|
||||
"USE flag \"${f}\" has no effect if \"motif\" is set."
|
||||
done
|
||||
elif use athena || use Xaw3d; then
|
||||
einfo "Configuring to build with Athena/Lucid toolkit"
|
||||
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
|
||||
else
|
||||
einfo "Configuring to build with no toolkit"
|
||||
myconf+=" --with-x-toolkit=no"
|
||||
fi
|
||||
! use gtk && use xwidgets && ewarn \
|
||||
"USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
|
||||
fi
|
||||
|
||||
if use gui; then
|
||||
# Common flags recognised for all GUIs
|
||||
myconf+=" $(use_with gif)"
|
||||
myconf+=" $(use_with jpeg)"
|
||||
myconf+=" $(use_with png)"
|
||||
myconf+=" $(use_with svg rsvg)"
|
||||
myconf+=" $(use_with tiff)"
|
||||
myconf+=" $(use_with webp)"
|
||||
myconf+=" $(use_with imagemagick)"
|
||||
fi
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
# Configure a CBUILD directory when cross-compiling to make tools
|
||||
mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
|
||||
ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
|
||||
popd >/dev/null || die
|
||||
# Don't try to execute the binary for dumping during the build
|
||||
myconf+=" --with-dumping=none"
|
||||
elif use m68k; then
|
||||
# Workaround for https://debbugs.gnu.org/44531
|
||||
myconf+=" --with-dumping=unexec"
|
||||
else
|
||||
myconf+=" --with-dumping=pdumper"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--program-suffix="-${EMACS_SUFFIX}" \
|
||||
--includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
|
||||
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
|
||||
--localstatedir="${EPREFIX}"/var \
|
||||
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
|
||||
--without-compress-install \
|
||||
--without-hesiod \
|
||||
--without-pop \
|
||||
--with-file-notification=$(usev inotify || usev gfile || echo no) \
|
||||
--with-pdumper \
|
||||
$(use_enable acl) \
|
||||
$(use_with dbus) \
|
||||
$(use_with dynamic-loading modules) \
|
||||
$(use_with games gameuser ":gamestat") \
|
||||
$(use_with gmp libgmp) \
|
||||
$(use_with gpm) \
|
||||
$(use_with jit native-compilation aot) \
|
||||
$(use_with json) \
|
||||
$(use_with kerberos) $(use_with kerberos kerberos5) \
|
||||
$(use_with lcms lcms2) \
|
||||
$(use_with libxml2 xml2) \
|
||||
$(use_with mailutils) \
|
||||
$(use_with selinux) \
|
||||
$(use_with sqlite sqlite3) \
|
||||
$(use_with ssl gnutls) \
|
||||
$(use_with systemd libsystemd) \
|
||||
$(use_with threads) \
|
||||
$(use_with tree-sitter) \
|
||||
$(use_with wide-int) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export ac_cv_header_valgrind_valgrind_h=$(usex valgrind)
|
||||
append-cppflags -DUSE_VALGRIND=$(usex valgrind)
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
# Build native tools for compiling lisp etc.
|
||||
emake -C "${S}-build" src
|
||||
emake lib # Cross-compile dependencies first for timestamps
|
||||
# Save native build tools in the cross-directory
|
||||
cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
|
||||
# Specify the native Emacs to compile lisp
|
||||
emake -C lisp all EMACS="${S}-build/src/emacs"
|
||||
fi
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# List .el test files with a comment above listing the exact
|
||||
# subtests which caused failure. Elements should begin with a %.
|
||||
# e.g. %lisp/gnus/mml-sec-tests.el.
|
||||
local exclude_tests=(
|
||||
# Reason: not yet known
|
||||
# mml-secure-en-decrypt-{1,2,3,4}
|
||||
# mml-secure-find-usable-keys-{1,2}
|
||||
# mml-secure-key-checks
|
||||
# mml-secure-select-preferred-keys-4
|
||||
# mml-secure-sign-verify-1
|
||||
%lisp/gnus/mml-sec-tests.el
|
||||
|
||||
# Reason: permission denied on /nonexistent
|
||||
# (vc-*-bzr only fails if breezy is installed, as they
|
||||
# try to access cache dirs under /nonexistent)
|
||||
#
|
||||
# rmail-undigest-test-multipart-mixed-digest
|
||||
# rmail-undigest-test-rfc1153-less-strict-digest
|
||||
# rmail-undigest-test-rfc1153-sloppy-digest
|
||||
# rmail-undigest-test-rfc934-digest
|
||||
# vc-test-bzr02-state
|
||||
# vc-test-bzr05-rename-file
|
||||
# vc-test-bzr06-version-diff
|
||||
# vc-bzr-test-bug9781
|
||||
%lisp/mail/undigest-tests.el
|
||||
%lisp/vc/vc-tests.el
|
||||
%lisp/vc/vc-bzr-tests.el
|
||||
|
||||
# Reason: fails if bubblewrap (bwrap) is installed
|
||||
# "bwrap: setting up uid map: Permission denied"
|
||||
#
|
||||
# bytecomp-tests--dest-mountpoint
|
||||
%lisp/emacs-lisp/bytecomp-tests.el
|
||||
)
|
||||
|
||||
# See test/README for possible options
|
||||
emake \
|
||||
EMACS_TEST_VERBOSE=1 \
|
||||
EXCLUDE_TESTS="${exclude_tests[*]}" \
|
||||
TEST_BACKTRACE_LINE_LENGTH=nil \
|
||||
check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= install
|
||||
|
||||
mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
|
||||
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
|
||||
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.metainfo.xml || die
|
||||
|
||||
# dissuade Portage from removing our dir file #257260
|
||||
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
|
||||
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir
|
||||
|
||||
# movemail must be setgid mail
|
||||
if ! use mailutils; then
|
||||
fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
|
||||
fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
|
||||
fi
|
||||
|
||||
# avoid collision between slots, see bug #169033 e.g.
|
||||
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die
|
||||
rm -rf "${ED}"/usr/share/{applications,icons} || die
|
||||
rm -rf "${ED}/usr/$(get_libdir)/systemd" || die
|
||||
rm -rf "${ED}"/var || die
|
||||
|
||||
# remove unused <version>/site-lisp dir
|
||||
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die
|
||||
|
||||
# remove COPYING file (except for etc/COPYING used by describe-copying)
|
||||
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die
|
||||
|
||||
if use systemd; then
|
||||
insinto /usr/lib/systemd/user
|
||||
sed -e "/^##/d" \
|
||||
-e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
|
||||
-e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
|
||||
etc/emacs.service | newins - ${EMACS_SUFFIX}.service
|
||||
assert
|
||||
fi
|
||||
|
||||
if use gzip-el; then
|
||||
# compress .el files when a corresponding .elc exists
|
||||
find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
|
||||
-name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
|
||||
assert "gzip .el failed"
|
||||
fi
|
||||
|
||||
local cdir
|
||||
if use source; then
|
||||
cdir="/usr/share/emacs/${FULL_VERSION}/src"
|
||||
insinto "${cdir}"
|
||||
# This is not meant to install all the source -- just the
|
||||
# C source you might find via find-function
|
||||
doins src/*.{c,h,m}
|
||||
elif has installsources ${FEATURES}; then
|
||||
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
|
||||
fi
|
||||
|
||||
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
|
||||
X
|
||||
;;; ${EMACS_SUFFIX} site-lisp configuration
|
||||
X
|
||||
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
|
||||
Y (setq find-function-C-source-directory
|
||||
Y "${EPREFIX}${cdir}")
|
||||
X (let ((path (getenv "INFOPATH"))
|
||||
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
|
||||
X (re "\\\\\`${EPREFIX}/usr/share\\\\>"))
|
||||
X (and path
|
||||
X ;; move Emacs Info dir before anything else in /usr/share
|
||||
X (let* ((p (cons nil (split-string path ":" t))) (q p))
|
||||
X (while (and (cdr q) (not (string-match re (cadr q))))
|
||||
X (setq q (cdr q)))
|
||||
X (setcdr q (cons dir (delete dir (cdr q))))
|
||||
X (setenv "INFOPATH" (mapconcat 'identity (cdr p) ":"))))))
|
||||
EOF
|
||||
elisp-site-file-install "${T}/${SITEFILE}" || die
|
||||
|
||||
dodoc README BUGS CONTRIBUTE
|
||||
|
||||
if use gui && use aqua; then
|
||||
dodir /Applications/Gentoo
|
||||
rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
|
||||
mv nextstep/Emacs.app \
|
||||
"${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
|
||||
fi
|
||||
|
||||
local DOC_CONTENTS="You can set the version to be started by
|
||||
/usr/bin/emacs through the Emacs eselect module, which also
|
||||
redirects man and info pages. Therefore, several Emacs versions can
|
||||
be installed at the same time. \"man emacs.eselect\" for details.
|
||||
\\n\\nIf you upgrade from a previous major version of Emacs, then
|
||||
it is strongly recommended that you use app-admin/emacs-updater
|
||||
to rebuild all byte-compiled elisp files of the installed Emacs
|
||||
packages."
|
||||
if use gui; then
|
||||
DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
|
||||
Installing media-fonts/font-adobe-{75,100}dpi on the X server's
|
||||
machine would satisfy basic Emacs requirements under X11.
|
||||
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
|
||||
for how to enable anti-aliased fonts."
|
||||
use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
|
||||
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or
|
||||
symlink it into /Applications by yourself."
|
||||
fi
|
||||
tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
|
||||
a portable dump file due to being cross-compiled.
|
||||
To create this file at run time, execute the following command:
|
||||
\\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable
|
||||
\"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# verify that the PM hasn't removed our Info directory index #257260
|
||||
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
|
||||
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elisp-site-regen
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use livecd; then
|
||||
# force an update of the emacs symlink for the livecd/dvd,
|
||||
# because some microemacs packages set it with USE=livecd
|
||||
eselect emacs update
|
||||
else
|
||||
eselect emacs update ifunset
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
elisp-site-regen
|
||||
eselect emacs update ifunset
|
||||
}
|
Binary file not shown.
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp
|
||||
|
||||
DESCRIPTION="Emacs Lisp Development Tool"
|
||||
HOMEPAGE="https://github.com/doublep/eldev/"
|
||||
|
||||
if [[ ${PV} == *9999* ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/doublep/${PN}.git"
|
||||
else
|
||||
SRC_URI="https://github.com/doublep/${PN}/archive/${PV}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~ppc64 ~riscv ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
|
||||
DOCS=( README.adoc )
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
src_test() {
|
||||
ELDEV_LOCAL="${S}" ./bin/${PN} test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
elisp_src_install
|
||||
dobin bin/${PN}
|
||||
|
||||
# NOTICE: If ELDEV_LOCAL is defined Eldev will use it
|
||||
# to load up it's components,
|
||||
# if it is not it will bootstrap itself from network
|
||||
# always check if it uses installed Emacs Lisp files.
|
||||
# Also, do not forget to run `env-update` & reopen your shell.
|
||||
# https://github.com/doublep/eldev#influential-environment-variables
|
||||
echo "ELDEV_LOCAL=${SITELISP}/${PN}" >> "${T}"/99${PN} || die
|
||||
doenvd "${T}"/99${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elisp_pkg_postinst
|
||||
|
||||
ewarn "Remember to run \`env-update && source /etc/profile\` if you plan"
|
||||
ewarn "to use Eldev in a shell before logging out (or restarting"
|
||||
ewarn "your login manager)."
|
||||
}
|
Binary file not shown.
@ -0,0 +1,387 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit autotools edo flag-o-matic multilib multilib-build
|
||||
inherit python-any-r1 toolchain-funcs wrapper
|
||||
|
||||
WINE_GECKO=2.47.4
|
||||
WINE_MONO=8.0.0
|
||||
WINE_P=wine-$(ver_cut 1-2)
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine-staging.git"
|
||||
WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
|
||||
else
|
||||
(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
|
||||
SRC_URI="
|
||||
https://dl.winehq.org/wine/source/${WINE_SDIR}/${WINE_P}.tar.xz
|
||||
https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="-* ~amd64 ~x86"
|
||||
fi
|
||||
S="${WORKDIR}/${WINE_P}"
|
||||
|
||||
DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
|
||||
HOMEPAGE="
|
||||
https://wiki.winehq.org/Wine-Staging
|
||||
https://gitlab.winehq.org/wine/wine-staging/"
|
||||
|
||||
LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
|
||||
SLOT="${PV}"
|
||||
IUSE="
|
||||
+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
|
||||
llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
|
||||
kerberos +mingw +mono netapi nls opencl +opengl osmesa pcap perl
|
||||
pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
|
||||
+truetype udev udisks +unwind usb v4l +vulkan wayland +xcomposite
|
||||
xinerama"
|
||||
REQUIRED_USE="
|
||||
X? ( truetype )
|
||||
crossdev-mingw? ( mingw )" # bug #551124 for truetype
|
||||
|
||||
# tests are non-trivial to run, can hang easily, don't play well with
|
||||
# sandbox, and several need real opengl/vulkan or network access
|
||||
RESTRICT="test"
|
||||
|
||||
# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
|
||||
WINE_DLOPEN_DEPEND="
|
||||
X? (
|
||||
x11-libs/libXcursor[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXfixes[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXi[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrandr[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXrender[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
|
||||
opengl? (
|
||||
media-libs/libglvnd[X,${MULTILIB_USEDEP}]
|
||||
osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
|
||||
xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
cups? ( net-print/cups[${MULTILIB_USEDEP}] )
|
||||
fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
|
||||
netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
|
||||
sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
|
||||
ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
|
||||
truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
|
||||
udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
|
||||
v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
|
||||
vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
|
||||
WINE_COMMON_DEPEND="
|
||||
${WINE_DLOPEN_DEPEND}
|
||||
X? (
|
||||
x11-libs/libX11[${MULTILIB_USEDEP}]
|
||||
x11-libs/libXext[${MULTILIB_USEDEP}]
|
||||
)
|
||||
alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
|
||||
capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
|
||||
gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
|
||||
gstreamer? (
|
||||
dev-libs/glib:2[${MULTILIB_USEDEP}]
|
||||
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
|
||||
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
|
||||
)
|
||||
opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
|
||||
pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
|
||||
pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
|
||||
scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
|
||||
smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
|
||||
udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
|
||||
unwind? (
|
||||
llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
|
||||
!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
|
||||
wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )"
|
||||
RDEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
app-emulation/wine-desktop-common
|
||||
dos? (
|
||||
|| (
|
||||
games-emulation/dosbox
|
||||
games-emulation/dosbox-staging
|
||||
)
|
||||
)
|
||||
gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
|
||||
gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
|
||||
mono? ( app-emulation/wine-mono:${WINE_MONO} )
|
||||
perl? (
|
||||
dev-lang/perl
|
||||
dev-perl/XML-LibXML
|
||||
)
|
||||
samba? ( net-fs/samba[winbind] )
|
||||
selinux? ( sec-policy/selinux-wine )
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="
|
||||
${WINE_COMMON_DEPEND}
|
||||
sys-kernel/linux-headers
|
||||
X? ( x11-base/xorg-proto )"
|
||||
# gitapply.sh prefers git but can fallback to patch+extras
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
|| (
|
||||
dev-vcs/git
|
||||
(
|
||||
sys-apps/gawk
|
||||
sys-apps/util-linux
|
||||
)
|
||||
)
|
||||
dev-lang/perl
|
||||
sys-devel/binutils
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
mingw? ( !crossdev-mingw? (
|
||||
>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
|
||||
) )
|
||||
nls? ( sys-devel/gettext )
|
||||
wayland? ( dev-util/wayland-scanner )"
|
||||
IDEPEND=">=app-eselect/eselect-wine-2"
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
__clear_cache # unused on amd64+x86 (bug #900334)
|
||||
res_getservers # false positive
|
||||
)
|
||||
QA_FLAGS_IGNORED="usr/lib/.*/wine/.*-unix/odbc32.so" # has no compiled objects
|
||||
QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-7.17-noexecstack.patch
|
||||
"${FILESDIR}"/${PN}-7.20-unwind.patch
|
||||
)
|
||||
|
||||
pkg_pretend() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
|
||||
local mingw=-w64-mingw32
|
||||
for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
|
||||
if ! type -P ${mingw}-gcc >/dev/null; then
|
||||
eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
|
||||
eerror "yourself by installing sys-devel/crossdev then running:"
|
||||
eerror
|
||||
eerror " crossdev --target ${mingw}"
|
||||
eerror
|
||||
eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
|
||||
die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
|
||||
git-r3_src_unpack
|
||||
|
||||
# hack: use subshell to preserve state (including what git-r3 unpack
|
||||
# sets) for smart-live-rebuild as this is not the repo to look at
|
||||
(
|
||||
EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die
|
||||
EGIT_REPO_URI=${WINE_EGIT_REPO_URI}
|
||||
EGIT_CHECKOUT_DIR=${S}
|
||||
einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})"
|
||||
git-r3_src_unpack
|
||||
)
|
||||
else
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patchinstallargs=(
|
||||
--all
|
||||
--no-autoconf
|
||||
${MY_WINE_STAGING_CONF}
|
||||
)
|
||||
|
||||
edo "${PYTHON}" ../${P}/staging/patchinstall.py "${patchinstallargs[@]}"
|
||||
|
||||
# sanity check, bumping these has a history of oversights
|
||||
local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
|
||||
dlls/appwiz.cpl/addons.c || die)
|
||||
if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
|
||||
local gmfatal=
|
||||
[[ ${PV} == *9999 ]] && gmfatal=nonfatal
|
||||
${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
# ensure .desktop calls this variant + slot
|
||||
sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
|
||||
|
||||
# always update for patches (including user's wrt #432348)
|
||||
eautoreconf
|
||||
tools/make_requests || die # perl
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
WINE_PREFIX=/usr/lib/${P}
|
||||
WINE_DATADIR=/usr/share/${P}
|
||||
|
||||
local conf=(
|
||||
--prefix="${EPREFIX}"${WINE_PREFIX}
|
||||
--datadir="${EPREFIX}"${WINE_DATADIR}
|
||||
--includedir="${EPREFIX}"/usr/include/${P}
|
||||
--libdir="${EPREFIX}"${WINE_PREFIX}
|
||||
--mandir="${EPREFIX}"${WINE_DATADIR}/man
|
||||
$(use_enable gecko mshtml)
|
||||
$(use_enable mono mscoree)
|
||||
--disable-tests
|
||||
$(use_with X x)
|
||||
$(use_with alsa)
|
||||
$(use_with capi)
|
||||
$(use_with cups)
|
||||
$(use_with fontconfig)
|
||||
$(use_with gphoto2 gphoto)
|
||||
$(use_with gstreamer)
|
||||
$(use_with kerberos gssapi)
|
||||
$(use_with kerberos krb5)
|
||||
$(use_with mingw)
|
||||
$(use_with netapi)
|
||||
$(use_with nls gettext)
|
||||
$(use_with opencl)
|
||||
$(use_with opengl)
|
||||
$(use_with osmesa)
|
||||
--without-oss # media-sound/oss is not packaged (OSSv4)
|
||||
$(use_with pcap)
|
||||
$(use_with pulseaudio pulse)
|
||||
$(use_with scanner sane)
|
||||
$(use_with sdl)
|
||||
$(use_with smartcard pcsclite)
|
||||
$(use_with ssl gnutls)
|
||||
$(use_with truetype freetype)
|
||||
$(use_with udev)
|
||||
$(use_with udisks dbus) # dbus is only used for udisks
|
||||
$(use_with unwind)
|
||||
$(use_with usb)
|
||||
$(use_with v4l v4l2)
|
||||
$(use_with vulkan)
|
||||
$(use_with wayland)
|
||||
$(use_with xcomposite)
|
||||
$(use_with xinerama)
|
||||
)
|
||||
|
||||
tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097)
|
||||
filter-lto # build failure
|
||||
use mingw || filter-flags -fno-plt # build failure
|
||||
use custom-cflags || strip-flags # can break in obscure ways at runtime
|
||||
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
|
||||
|
||||
# temporary workaround for tc-ld-force-bfd not yet enforcing with mold
|
||||
# https://github.com/gentoo/gentoo/pull/28355
|
||||
[[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] &&
|
||||
append-ldflags -fuse-ld=bfd
|
||||
|
||||
# build using upstream's way (--with-wine64)
|
||||
# order matters: configure+compile 64->32, install 32->64
|
||||
local -i bits
|
||||
for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
|
||||
(
|
||||
einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
|
||||
|
||||
mkdir ../build${bits} || die
|
||||
cd ../build${bits} || die
|
||||
|
||||
pe_arch=i386
|
||||
if (( bits == 64 )); then
|
||||
pe_arch=x86_64
|
||||
: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
|
||||
conf+=( --enable-win64 )
|
||||
elif use amd64; then
|
||||
conf+=(
|
||||
$(usev abi_x86_64 --with-wine64=../build64)
|
||||
TARGETFLAGS=-m32 # for widl
|
||||
)
|
||||
# _setup is optional, but use over Wine's auto-detect (+#472038)
|
||||
multilib_toolchain_setup x86
|
||||
fi
|
||||
: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
|
||||
|
||||
if use mingw; then
|
||||
# CROSSCC is no longer recognized by Wine, but still use for now
|
||||
# (future handling for CROSS* variables is subject to changes)
|
||||
conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" )
|
||||
|
||||
# use *FLAGS for mingw, but strip unsupported
|
||||
: "${CROSSCFLAGS:=$(
|
||||
filter-flags '-fstack-protector*' #870136
|
||||
filter-flags '-mfunction-return=thunk*' #878849
|
||||
# -mavx with mingw-gcc has a history of obscure issues and
|
||||
# disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
|
||||
# crashes with -march=skylake >=wine-8.10, similar issues with
|
||||
# znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
|
||||
append-cflags -mno-avx
|
||||
CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
|
||||
: "${CROSSLDFLAGS:=$(
|
||||
filter-flags '-fuse-ld=*'
|
||||
CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
|
||||
export CROSS{C,LD}FLAGS
|
||||
fi
|
||||
|
||||
ECONF_SOURCE=${S} econf "${conf[@]}"
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use abi_x86_64 && emake -C ../build64 # do first
|
||||
use abi_x86_32 && emake -C ../build32
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
|
||||
use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
|
||||
|
||||
# symlink for plain 'wine' and install its man pages if 64bit-only #404331
|
||||
if use abi_x86_64 && use !abi_x86_32; then
|
||||
dosym wine64 ${WINE_PREFIX}/bin/wine
|
||||
dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
|
||||
local man
|
||||
for man in ../build64/loader/wine.*man; do
|
||||
: "${man##*/wine}"
|
||||
: "${_%.*}"
|
||||
insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
|
||||
newins ${man} wine.1
|
||||
done
|
||||
fi
|
||||
|
||||
use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
|
||||
"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
|
||||
|
||||
# create variant wrappers for eselect-wine
|
||||
local bin
|
||||
for bin in "${ED}"${WINE_PREFIX}/bin/*; do
|
||||
make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
|
||||
done
|
||||
|
||||
if use mingw; then
|
||||
# don't let portage try to strip PE files with the wrong
|
||||
# strip executable and instead handle it here (saves ~120MB)
|
||||
dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
|
||||
|
||||
if use strip; then
|
||||
ebegin "Stripping Windows (PE) binaries"
|
||||
find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
|
||||
-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} +
|
||||
eend ${?} || die
|
||||
fi
|
||||
fi
|
||||
|
||||
dodoc ANNOUNCE AUTHORS README* documentation/README*
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
eselect wine update --if-unset || die
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect wine update --if-unset || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST ipcgull-0.1.tar.gz 31909 BLAKE2B dc86ce909682e6683ed127eb0824c1dd031a2082879f02832005f4ee7157e89a584829d96d9656a984047fea27094f59591361b0a491cd07a9331a6fa9c2560b SHA512 04dc7305d0fc825fc701ff13bee44ed0606eaed29428d82e93c600efc8fba3cc47895ecd32d4ab9d045ca561161cce9f5bd30e87192e83916a433f4919454d76
|
||||
DIST logiops-0.3.1.tar.gz 85535 BLAKE2B edef0ab57ee09d47cd6f0c214189c7b7afaa113ab882d7e3449a0818d4753250627671ad135748824de77680b63d113a64d8581571fdcaf2adbb5ed7c9a3885a SHA512 9b98b415fc3231066a51d3da780fd230f43a823316405eb4faba454b6fc5e3eb3b3b30cdeaf83126b848bfb267d4ff97ae8a19a9a76f48510f3af8fe3969bdab
|
||||
DIST logiops-0.3.2.tar.gz 87067 BLAKE2B 0c938824c8c8f8e5a26fbdcb47a2f04ef0316e3750cb85425083e17d68ee23726d99ba6c811045201cebe1c1ef3e58f1bcec0512f599c487494841f2ac3aa9c0 SHA512 c69dbf6f220e57515a9641de83625b533943fc78197dc1abbd9767e22fe58e60a55eedb2e9510131cfcda4e9d4f304038be89a70c7c45238a1c7846047d8d59a
|
||||
DIST logiops-v0.3.3.tar.gz 117966 BLAKE2B b7bb2997b38c33d70d2c8a8ef5a931d6aa021e200a48141dc3aca106e081adde91f23aece0c5d5a9dc66376a7b98354b6e59a13360e55cb7db631322b2fe2ee3 SHA512 87d84c9778cd046761a639fc775e8ea4f01d9864c532c55768a35dbd8718a561c398b44f0f3147403d45eac121c74f9fe84f6ac75e4d1c26d3f4f0da2ee5b4fa
|
||||
|
@ -0,0 +1,68 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_P="${PN}-v${PV}"
|
||||
|
||||
inherit cmake linux-info
|
||||
|
||||
DESCRIPTION="An unofficial userspace driver for HID++ Logitech devices"
|
||||
HOMEPAGE="https://github.com/PixlOne/logiops"
|
||||
SRC_URI="https://github.com/PixlOne/${PN}/releases/download/v${PV}/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="systemd"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/glib
|
||||
dev-libs/libconfig:=[cxx]
|
||||
dev-libs/libevdev
|
||||
sys-apps/dbus
|
||||
virtual/libudev
|
||||
systemd? ( sys-apps/systemd )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
DOCS=( "README.md" "TESTED.md" )
|
||||
|
||||
pkg_pretend() {
|
||||
local CHECK_CONFIG="~HID_LOGITECH ~HID_LOGITECH_HIDPP"
|
||||
|
||||
check_extra_config
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED="ON"
|
||||
-DBUILD_STATIC="OFF"
|
||||
-DLOGIOPS_VERSION="${PV}"
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
cmake_src_install
|
||||
|
||||
# Install lib of submodule, as no install routine exist
|
||||
dolib.so "${BUILD_DIR}/src/ipcgull/libipcgull.so"
|
||||
|
||||
insinto /etc
|
||||
newins logid.example.cfg logid.cfg
|
||||
|
||||
newinitd "${FILESDIR}"/logid.initd logid
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "An example config file has been installed as /etc/logid.cfg."
|
||||
einfo "See https://github.com/PixlOne/logiops/wiki/Configuration for more information."
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST gpyutils-0.10.gh.tar.gz 24963 BLAKE2B ef6bd54195e1bfbb0734ef8aedbd13dd27b52d2f62d95b741459ecf4f5e93b80085a4cebfbe184fb8ac7e7cf97f4fbb422c5b5e36d0bb9dbc27896a4ad72d86e SHA512 baf6d44db447774ffc976698874f87dbc858ef146aa46ccb0a7e15a1f3d4d1263f75b2f46f319e45fa5994620c71e37ccc42b42b5f05dbde8f3cbacfbd45cbee
|
||||
DIST gpyutils-0.11.gh.tar.gz 25460 BLAKE2B 7ade315fbc7101663b0585e9b36a559c52c57c39f1a70043a2b196d627028c463b238a841cdacccad452ce09598799d692f066f4e1c6e59f96ae42407cfdb968 SHA512 27c6d30fe00846fbf5094575e2dd64528fb970cc4031b1c1fa805c865adb0f39ebdf517c168ed8da8c645a5bfc79fd5df01a77ce8eacaf96064c730d1799638f
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=flit
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Utitilies for maintaining Python packages"
|
||||
HOMEPAGE="
|
||||
https://github.com/projg2/gpyutils/
|
||||
https://pypi.org/project/gpyutils/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/projg2/gpyutils/archive/v${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
|
||||
|
||||
RDEPEND="
|
||||
>=app-portage/gentoopm-0.3.2[${PYTHON_USEDEP}]
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1 @@
|
||||
DIST gentoo-syntax-10.tar.bz2 20945 BLAKE2B 7e081ae2d1498fc0b0616c750881c6f47cbae21d88d876c33d54bae0ff32f5eca44a004e31714fa4af0d351656c72df9e69f33ff0f97e6a2c59d835aacbd44a6 SHA512 790e24ac5427b50f1cd332b895e477bc9715a681cf8c21aaaff722151e6245b45fb33f49465258280eab6a903f3b0c8a8d40b935f44942b6b93f5c0d3c7c420a
|
||||
DIST gentoo-syntax-11.tar.bz2 20986 BLAKE2B dd4d4d3a65480a4600d9c1372fdb1db40c07d3a954232513a535cd9e7d59e5e89f185e32aa7bfe38909e1ef4b0e2639136478ba9ab7eb6ceedd9fdb459b08da2 SHA512 9c74b38880429e2e980e8f44b51ed5bc3bb1431d8429a7ac66574556e3ca01e909c445585da9152d78e38d23cc9a4c100bb81f56ea8c0b63291b8df0dca7b886
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit vim-plugin
|
||||
|
||||
DESCRIPTION="vim plugin: Gentoo and Portage syntax highlighting"
|
||||
HOMEPAGE="https://github.com/gentoo/gentoo-syntax"
|
||||
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-syntax.git/snapshot/${P}.tar.bz2"
|
||||
|
||||
LICENSE="vim"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="ignore-glep31"
|
||||
|
||||
VIM_PLUGIN_HELPFILES="gentoo-syntax"
|
||||
VIM_PLUGIN_MESSAGES="filetype"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if use ignore-glep31 ; then
|
||||
for f in ftplugin/*.vim ; do
|
||||
ebegin "Removing UTF-8 rules from ${f} ..."
|
||||
sed -i -e 's~\(setlocal fileencoding=utf-8\)~" \1~' ${f} \
|
||||
|| die "waah! bad sed voodoo. need more goats."
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
vim-plugin_pkg_postinst
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]] ; then
|
||||
if use ignore-glep31 1>/dev/null ; then
|
||||
ewarn "You have chosen to disable the rules which ensure GLEP 31"
|
||||
ewarn "compliance. When editing ebuilds, please make sure you get"
|
||||
ewarn "the character set correct."
|
||||
fi
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,27 +0,0 @@
|
||||
diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
|
||||
index 23470a8..2b8ae63 100644
|
||||
--- a/cmake/modules/FindMySQL.cmake
|
||||
+++ b/cmake/modules/FindMySQL.cmake
|
||||
@@ -85,20 +85,8 @@ find_path(MYSQL_INCLUDE_DIR mysql.h
|
||||
|
||||
set(TMP_MYSQL_LIBRARIES "")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .so .lib .so.1 .dylib .a)
|
||||
-foreach(MY_LIB ${MYSQL_ADD_LIBRARIES})
|
||||
- find_library("MYSQL_LIBRARIES_${MY_LIB}" NAMES ${MY_LIB}
|
||||
- HINTS
|
||||
- ${MYSQL_ADD_LIBRARY_PATH}
|
||||
- /usr/lib/mysql
|
||||
- /usr/lib
|
||||
- /usr/local/lib
|
||||
- /usr/local/lib/mysql
|
||||
- /usr/local/mysql/lib
|
||||
- )
|
||||
- list(APPEND TMP_MYSQL_LIBRARIES "${MYSQL_LIBRARIES_${MY_LIB}}")
|
||||
-endforeach(MY_LIB ${MYSQL_ADD_LIBRARIES})
|
||||
-
|
||||
-set(MYSQL_LIBRARIES ${TMP_MYSQL_LIBRARIES} CACHE FILEPATH INTERNAL)
|
||||
+
|
||||
+set(MYSQL_LIBRARIES ${MYSQL_ADD_LIBRARIES} CACHE FILEPATH INTERNAL)
|
||||
|
||||
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
set(MYSQL_FOUND TRUE CACHE INTERNAL "MySQL found")
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
DIST haxe-4.2.4.tar.gz 9151011 BLAKE2B 76e4442dbd33669abb2defcb66a781bf013ac41a4853f7911824e16816c60fff7e46bd58b9f2830194326aadbd79b2f07ab14308efdb0ef1e26177178daf3941 SHA512 c447b2fa7e7b7149a87af2dd75e08cce1b8d96238b88024d875659add62fa97d554ecd7f13200b817545eda8be00d61399551d64f7dbc9cc1aa66a5517dd2485
|
||||
DIST haxe-4.2.5.tar.gz 9151978 BLAKE2B da6555707e0c0c34fc9a7c987bf2258e08557acb4629422d9f50ac4c025675601ccb25cea322dad0c16a4378dc48cac8e6e6acf1b94965a7eac5261c765d4ccb SHA512 a371245f5f7c18c2d16a9c7246829225d9f03beb796cb76b0dd5011e7a5a56e25f871c8cc7257a6e6b7a855804f6e62d48c2974a9ce3f4e6591d44f06bfa65ca
|
||||
DIST haxe-4.3.1.tar.gz 8398956 BLAKE2B f665f44120fb16b0f542e63c3ca00d84e90356e9dddbf3c50332bdee3770fa83a11d273db26c392799d39f8c035f5732bf4f7092a31750f5a5766588ee8a7849 SHA512 10961e4a5d7fad6789ea4465c96149c0becfe87ad447a0d808af5771ccbd2846b2e6715cbd72dcae9d4340ee45f7caac9238df94e3c079696e89f5551e8e1cdb
|
||||
|
@ -0,0 +1,526 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
|
||||
inherit python-utils-r1 toolchain-funcs verify-sig
|
||||
|
||||
MY_PV=${PV/_beta/b}
|
||||
MY_P="Python-${MY_PV%_p*}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-${MY_PV}"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="
|
||||
https://www.python.org/
|
||||
https://github.com/python/cpython/
|
||||
"
|
||||
SRC_URI="
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
|
||||
verify-sig? (
|
||||
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="
|
||||
bluetooth build debug +ensurepip examples gdbm libedit lto
|
||||
+ncurses pgo +readline +sqlite +ssl test tk valgrind
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
app-crypt/libb2
|
||||
>=dev-libs/expat-2.1:=
|
||||
dev-libs/libffi:=
|
||||
dev-python/gentoo-common
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
ensurepip? ( dev-python/ensurepip-pip )
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
kernel_linux? ( sys-apps/util-linux:= )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? (
|
||||
!libedit? ( >=sys-libs/readline-4.1:= )
|
||||
libedit? ( dev-libs/libedit:= )
|
||||
)
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? ( >=dev-libs/openssl-1.1.1:= )
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? (
|
||||
app-arch/xz-utils[extra-filters(+)]
|
||||
dev-python/ensurepip-pip
|
||||
dev-python/ensurepip-setuptools
|
||||
dev-python/ensurepip-wheel
|
||||
)
|
||||
valgrind? ( dev-util/valgrind )
|
||||
"
|
||||
# autoconf-archive needed to eautoreconf
|
||||
BDEPEND="
|
||||
sys-devel/autoconf-archive
|
||||
app-alternatives/awk
|
||||
virtual/pkgconfig
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
|
||||
"
|
||||
RDEPEND+="
|
||||
!build? ( app-misc/mime-types )
|
||||
"
|
||||
if [[ ${PV} != *_alpha* ]]; then
|
||||
RDEPEND+="
|
||||
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
|
||||
"
|
||||
fi
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
QA_PKGCONFIG_VERSION=${PYVER}
|
||||
# false positives -- functions specific to *BSD
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
|
||||
fi
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat and libffi are not used.
|
||||
# TODO: Makefile has annoying deps on expat headers
|
||||
#rm -r Modules/expat || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
# force the correct number of jobs
|
||||
# https://bugs.gentoo.org/737660
|
||||
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local disable
|
||||
# disable automagic bluetooth headers detection
|
||||
if ! use bluetooth; then
|
||||
local -x ac_cv_header_bluetooth_bluetooth_h=no
|
||||
fi
|
||||
|
||||
append-flags -fwrapv
|
||||
filter-flags -malign-double
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if is-flagq -flto || is-flagq '-flto=*'; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
fi
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
# PKG_CONFIG needed for cross.
|
||||
tc-export CXX PKG_CONFIG
|
||||
|
||||
local dbmliborder=
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
if use pgo; then
|
||||
local profile_task_flags=(
|
||||
-m test
|
||||
"-j$(makeopts_jobs)"
|
||||
--pgo-extended
|
||||
-u-network
|
||||
|
||||
# We use a timeout because of how often we've had hang issues
|
||||
# here. It also matches the default upstream PROFILE_TASK.
|
||||
--timeout 1200
|
||||
|
||||
-x test_gdb
|
||||
-x test_dtrace
|
||||
|
||||
# All of these seem to occasionally hang for PGO inconsistently
|
||||
# They'll even hang here but be fine in src_test sometimes.
|
||||
# bug #828535 (and related: bug #788022)
|
||||
-x test_asyncio
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_multiprocessing_fork
|
||||
-x test_socket
|
||||
-x test_xmlrpc
|
||||
|
||||
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
|
||||
# bug #900429
|
||||
-x test_tools
|
||||
)
|
||||
|
||||
if has_version "app-arch/rpm" ; then
|
||||
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
|
||||
profile_task_flags+=(
|
||||
-x test_distutils
|
||||
)
|
||||
fi
|
||||
local -x PROFILE_TASK="${profile_task_flags[*]}"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
--without-static-libpython
|
||||
--enable-ipv6
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--with-system-expat
|
||||
--with-platlibdir=lib
|
||||
--with-pkg-config=yes
|
||||
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
|
||||
|
||||
$(use_with debug assertions)
|
||||
$(use_with lto)
|
||||
$(use_enable pgo optimizations)
|
||||
$(use_with readline readline "$(usex libedit editline readline)")
|
||||
$(use_with valgrind)
|
||||
)
|
||||
|
||||
# disable implicit optimization/debugging flags
|
||||
local -x OPT=
|
||||
|
||||
if tc-is-cross-compiler ; then
|
||||
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
|
||||
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# We need to build our own Python on CBUILD first, and feed it in.
|
||||
# bug #847910
|
||||
local myeconfargs_cbuild=(
|
||||
"${myeconfargs[@]}"
|
||||
|
||||
--libdir="${cbuild_libdir:2}"
|
||||
|
||||
# Avoid needing to load the right libpython.so.
|
||||
--disable-shared
|
||||
|
||||
# As minimal as possible for the mini CBUILD Python
|
||||
# we build just for cross to satisfy --with-build-python.
|
||||
--without-lto
|
||||
--without-readline
|
||||
--disable-optimizations
|
||||
)
|
||||
|
||||
myeconfargs+=(
|
||||
# Point the imminent CHOST build to the Python we just
|
||||
# built for CBUILD.
|
||||
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
|
||||
)
|
||||
|
||||
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
|
||||
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
|
||||
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
|
||||
# libdir correctly for cross.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
|
||||
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
|
||||
|
||||
# Avoid as many dependencies as possible for the cross build.
|
||||
cat >> Makefile <<-EOF || die
|
||||
MODULE_NIS_STATE=disabled
|
||||
MODULE__DBM_STATE=disabled
|
||||
MODULE__GDBM_STATE=disabled
|
||||
MODULE__DBM_STATE=disabled
|
||||
MODULE__SQLITE3_STATE=disabled
|
||||
MODULE__HASHLIB_STATE=disabled
|
||||
MODULE__SSL_STATE=disabled
|
||||
MODULE__CURSES_STATE=disabled
|
||||
MODULE__CURSES_PANEL_STATE=disabled
|
||||
MODULE_READLINE_STATE=disabled
|
||||
MODULE__TKINTER_STATE=disabled
|
||||
MODULE_PYEXPAT_STATE=disabled
|
||||
MODULE_ZLIB_STATE=disabled
|
||||
EOF
|
||||
|
||||
# Unfortunately, we do have to build this immediately, and
|
||||
# not in src_compile, because CHOST configure for Python
|
||||
# will check the existence of the --with-build-python value
|
||||
# immediately.
|
||||
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
|
||||
popd &> /dev/null || die
|
||||
fi
|
||||
|
||||
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
|
||||
# propagated to sysconfig for built extensions
|
||||
local -x CFLAGS_NODIST=${CFLAGS}
|
||||
local -x LDFLAGS_NODIST=${LDFLAGS}
|
||||
local -x CFLAGS= LDFLAGS=
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
if use ncurses; then
|
||||
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
|
||||
eerror "configure has detected that the sem_open function is broken."
|
||||
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
|
||||
die "Broken sem_open function (bug 496328)"
|
||||
fi
|
||||
|
||||
# force-disable modules we don't want built
|
||||
local disable_modules=( NIS )
|
||||
use gdbm || disable_modules+=( _GDBM _DBM )
|
||||
use sqlite || disable_modules+=( _SQLITE3 )
|
||||
use ssl || disable_modules+=( _HASHLIB _SSL )
|
||||
use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
|
||||
use readline || disable_modules+=( READLINE )
|
||||
use tk || disable_modules+=( _TKINTER )
|
||||
|
||||
local mod
|
||||
for mod in "${disable_modules[@]}"; do
|
||||
echo "MODULE_${mod}_STATE=disabled"
|
||||
done >> Makefile || die
|
||||
|
||||
# install epython.py as part of stdlib
|
||||
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
export PYTHONSTRICTEXTENSIONBUILD=1
|
||||
|
||||
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
|
||||
# end up writing bytecode & violating sandbox.
|
||||
# bug #831897
|
||||
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
if use pgo ; then
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
addpredict "/usr/lib/python${PYVER}/site-packages"
|
||||
fi
|
||||
|
||||
# also need to clear the flags explicitly here or they end up
|
||||
# in _sysconfigdata*
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Restore saved value from above.
|
||||
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# this just happens to skip test_support.test_freeze that is broken
|
||||
# without bundled expat
|
||||
# TODO: get a proper skip for it upstream
|
||||
local -x LOGNAME=buildbot
|
||||
|
||||
local test_opts=(
|
||||
-u-network
|
||||
-j "$(makeopts_jobs)"
|
||||
|
||||
# fails
|
||||
-x test_gdb
|
||||
)
|
||||
|
||||
if use sparc ; then
|
||||
# bug #788022
|
||||
test_opts+=(
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
)
|
||||
fi
|
||||
|
||||
# workaround docutils breaking tests
|
||||
cat > Lib/docutils.py <<-EOF || die
|
||||
raise ImportError("Thou shalt not import!")
|
||||
EOF
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
# workaround https://bugs.gentoo.org/775416
|
||||
addwrite "/usr/lib/python${PYVER}/site-packages"
|
||||
|
||||
nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
|
||||
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local ret=${?}
|
||||
|
||||
rm Lib/docutils.py || die
|
||||
|
||||
[[ ${ret} -eq 0 ]] || die "emake test failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
# the Makefile rules are broken
|
||||
# https://github.com/python/cpython/issues/100221
|
||||
mkdir -p "${libdir}"/lib-dynload || die
|
||||
|
||||
# -j1 hack for now for bug #843458
|
||||
emake -j1 DESTDIR="${D}" altinstall
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax-kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
rm -r "${libdir}"/ensurepip/_bundled || die
|
||||
if ! use ensurepip; then
|
||||
rm -r "${libdir}"/ensurepip || die
|
||||
fi
|
||||
if ! use sqlite; then
|
||||
rm -r "${libdir}/"sqlite3 || die
|
||||
fi
|
||||
if ! use tk; then
|
||||
rm -r "${ED}/usr/bin/idle${PYVER}" || die
|
||||
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
fi
|
||||
|
||||
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(
|
||||
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
|
||||
emake --no-print-directory -s -f - 2>/dev/null
|
||||
)
|
||||
newins Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local EPYTHON=python${PYVER}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
|
||||
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
|
||||
ewarn "installed previously are no longer valid and will be regenerated"
|
||||
ewarn "(or ignored) on the next import. This may cause sandbox failures"
|
||||
ewarn "when installing some packages and checksum mismatches when removing"
|
||||
ewarn "old versions. To actively prevent this, rebuild all packages"
|
||||
ewarn "installing Python 3.11 modules, e.g. using:"
|
||||
ewarn
|
||||
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
|
||||
fi
|
||||
done
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST gcl-2.6.13_pre99.tar.xz 10030460 BLAKE2B 8750d641062bcad5a124173013d38403f37ad352c7c436e89d4e329d997200be399a100dcefc4ce484e3f85f46e2dd90ee02947e5e728e001782e973c4122b0e SHA512 a3ad2bd639157ca2a80b534e87c169f6e07002a1b9ca8039483cff336af764123dec9e749da045b656b990e0a97c70881c798420ec4bd0e4494f43d0d040e413
|
||||
DIST gcl-2.6.14.tar.gz 11725385 BLAKE2B 3e6a7fc359f94897d1062f5e5e31a0ae36f5d24ca0155fd22044cb967f1fd6a0303572dafe25b1a7abbc936db4e8caa93d0e50b1779886e2ba40e148fa868b8f SHA512 1a69f5e8195783c88b618a613253da1089b13e390dd259056df52f1ed95cf0c99358c34d3782c8eb297c07fda74deb7db359e6b9bf94590ee7fc34e94742eb14
|
||||
DIST gcl-2.6.15_pre3-spelling.patch.gz 10530 BLAKE2B ce2f4a2a568467c77ef58d6063df4596220a0826e18158e0f3308dc6c4a89451910a2c54a179131a4d0cb5362e7b20ba33691d2a80c02dc81e826d664298c29b SHA512 f72cf9c6607603f548220ee169fdbaf9151ea41f2be03209c258a261c6274b97c78b02e8258b2a2550ff9fcd8ab144a334789f274deedf0fe9f050a10bd54a67
|
||||
DIST gcl-Version_2_6_15pre3.tar.gz 11433299 BLAKE2B cee392674f465477d37bcdf724651f88e08b90a74ca3e79a561b99f0e61227332dbee77ed688cda7525341421df262a0a58c325576d6e8a5daaa1122ae36c6e4 SHA512 bf05c3f4ecad74a9e29b25969d3f82d39c9715bfa98c1b734b279a7886e60076ecb5896723fe1888255c4eecf4e5eda60696d25ad6a8e17eb55088b2a37ad3ce
|
||||
|
@ -1,385 +0,0 @@
|
||||
diff -U3 -r sbcl-2.0.5.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-2.0.5/contrib/sb-bsd-sockets/tests.lisp
|
||||
--- sbcl-2.0.5.orig/contrib/sb-bsd-sockets/tests.lisp 2020-05-31 20:16:48.000000000 +0700
|
||||
+++ sbcl-2.0.5/contrib/sb-bsd-sockets/tests.lisp 2020-06-08 18:15:59.750860802 +0700
|
||||
@@ -18,16 +18,16 @@
|
||||
(equalp (make-inet-address "242.1.211.3") #(242 1 211 3))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-address.1
|
||||
- (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
- #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
- t)
|
||||
-
|
||||
-(deftest unparse-inet6-address
|
||||
- (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
- (make-inet6-address "fe80::abcd:1234"))
|
||||
- "fe80::abcd:1234")
|
||||
- t)
|
||||
+;(deftest make-inet6-address.1
|
||||
+; (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
+; #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest unparse-inet6-address
|
||||
+; (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
+; (make-inet6-address "fe80::abcd:1234"))
|
||||
+; "fe80::abcd:1234")
|
||||
+; t)
|
||||
|
||||
(deftest get-protocol-by-name/tcp
|
||||
(integerp (get-protocol-by-name "tcp"))
|
||||
@@ -40,15 +40,15 @@
|
||||
;;; See https://bugs.launchpad.net/sbcl/+bug/659857
|
||||
;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
|
||||
;;; for unknown protocols...
|
||||
-#-(and freebsd sb-thread)
|
||||
-#-(and dragonfly sb-thread)
|
||||
-(deftest get-protocol-by-name/error
|
||||
- (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
- (unknown-protocol ()
|
||||
- t)
|
||||
- (:no-error ()
|
||||
- nil))
|
||||
- t)
|
||||
+;#-(and freebsd sb-thread)
|
||||
+;#-(and dragonfly sb-thread)
|
||||
+;(deftest get-protocol-by-name/error
|
||||
+; (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
+; (unknown-protocol ()
|
||||
+; t)
|
||||
+; (:no-error ()
|
||||
+; nil))
|
||||
+; t)
|
||||
|
||||
(eval-when (:compile-toplevel :execute)
|
||||
(when (handler-case (make-instance 'inet-socket
|
||||
@@ -108,19 +108,19 @@
|
||||
(:no-error nil))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-socket.smoke
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
-
|
||||
-(deftest make-inet6-socket.keyword
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
+;(deftest make-inet6-socket.smoke
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest make-inet6-socket.keyword
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
|
||||
#+ipv4-support
|
||||
(deftest* (non-block-socket)
|
||||
@@ -129,54 +129,54 @@
|
||||
(non-blocking-mode s))
|
||||
t)
|
||||
|
||||
-#+ipv4-support
|
||||
-(deftest inet-socket-bind
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet-address "127.0.0.1"))
|
||||
- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (progn
|
||||
- (socket-bind s1 address 0)
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port)
|
||||
- nil)
|
||||
- (address-in-use-error () t)))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2)))
|
||||
- t)
|
||||
-
|
||||
-(deftest inet6-socket-bind
|
||||
- (handler-case
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet6-address "::1"))
|
||||
- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (handler-case
|
||||
- (socket-bind s1 address 0)
|
||||
- (socket-error ()
|
||||
- ;; This may mean no IPv6 support, can't fail a test
|
||||
- ;; because of that (address-family-not-supported doesn't catch that)
|
||||
- t)
|
||||
- (:no-error (x)
|
||||
- (declare (ignore x))
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port)
|
||||
- nil)
|
||||
- (address-in-use-error () t))))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2)))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
+;#+ipv4-support
|
||||
+;(deftest inet-socket-bind
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet-address "127.0.0.1"))
|
||||
+; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (progn
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port)
|
||||
+; nil)
|
||||
+; (address-in-use-error () t)))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2)))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest inet6-socket-bind
|
||||
+; (handler-case
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet6-address "::1"))
|
||||
+; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (handler-case
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (socket-error ()
|
||||
+; ;; This may mean no IPv6 support, can't fail a test
|
||||
+; ;; because of that (address-family-not-supported doesn't catch that)
|
||||
+; t)
|
||||
+; (:no-error (x)
|
||||
+; (declare (ignore x))
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port)
|
||||
+; nil)
|
||||
+; (address-in-use-error () t))))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2)))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
|
||||
#+ipv4-support
|
||||
(deftest* (simple-sockopt-test)
|
||||
@@ -244,37 +244,37 @@
|
||||
;;; to look at /etc/syslog.conf or local equivalent to find out where
|
||||
;;; the message ended up
|
||||
|
||||
-#-win32
|
||||
-(deftest simple-local-client
|
||||
- (progn
|
||||
- ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
- ;; /dev/log. We might also be building in a chroot or
|
||||
- ;; something, so don't fail this test just because the file is
|
||||
- ;; unavailable, or if it's a symlink to some weird character
|
||||
- ;; device.
|
||||
- (when (block nil
|
||||
- (handler-bind ((sb-posix:syscall-error
|
||||
- (lambda (e)
|
||||
- (declare (ignore e))
|
||||
- (return nil))))
|
||||
- (sb-posix:s-issock
|
||||
- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
- (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
- (format t "Connecting ~A... " s)
|
||||
- (finish-output)
|
||||
- (handler-case
|
||||
- (socket-connect s "/dev/log")
|
||||
- (sb-bsd-sockets::socket-error ()
|
||||
- (setq s (make-instance 'local-socket :type :stream))
|
||||
- (format t "failed~%Retrying with ~A... " s)
|
||||
- (finish-output)
|
||||
- (socket-connect s "/dev/log")))
|
||||
- (format t "ok.~%")
|
||||
- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
- (format stream
|
||||
- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
- t)
|
||||
- t)
|
||||
+;#-win32
|
||||
+;(deftest simple-local-client
|
||||
+; (progn
|
||||
+; ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
+; ;; /dev/log. We might also be building in a chroot or
|
||||
+; ;; something, so don't fail this test just because the file is
|
||||
+; ;; unavailable, or if it's a symlink to some weird character
|
||||
+; ;; device.
|
||||
+; (when (block nil
|
||||
+; (handler-bind ((sb-posix:syscall-error
|
||||
+; (lambda (e)
|
||||
+; (declare (ignore e))
|
||||
+; (return nil))))
|
||||
+; (sb-posix:s-issock
|
||||
+; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
+; (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
+; (format t "Connecting ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (handler-case
|
||||
+; (socket-connect s "/dev/log")
|
||||
+; (sb-bsd-sockets::socket-error ()
|
||||
+; (setq s (make-instance 'local-socket :type :stream))
|
||||
+; (format t "failed~%Retrying with ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (socket-connect s "/dev/log")))
|
||||
+; (format t "ok.~%")
|
||||
+; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
+; (format stream
|
||||
+; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
+; t)
|
||||
+; t)
|
||||
|
||||
;;; these require that the internet (or bits of it, at least) is available
|
||||
|
||||
@@ -390,59 +390,59 @@
|
||||
(format t "Received ~A bytes from ~A:~A - ~A ~%"
|
||||
len address port (subseq buf 0 (min 10 len)))))))
|
||||
|
||||
-#+(and ipv4-support sb-thread)
|
||||
-(deftest interrupt-io
|
||||
- (let (result
|
||||
- (sem (sb-thread:make-semaphore)))
|
||||
- (labels
|
||||
- ((client (port)
|
||||
- (setf result
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (socket-connect s #(127 0 0 1) port)
|
||||
- (let ((stream (socket-make-stream s
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (handler-case
|
||||
- (prog1
|
||||
- (catch 'stop
|
||||
- (sb-thread:signal-semaphore sem)
|
||||
- (read-char stream))
|
||||
- (close stream))
|
||||
- (error (c)
|
||||
- c))))))
|
||||
- (server ()
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (setf (sockopt-reuse-address s) t)
|
||||
- (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
- (socket-listen s 5)
|
||||
- (multiple-value-bind (* port)
|
||||
- (socket-name s)
|
||||
- (let* ((client (sb-thread:make-thread
|
||||
- (lambda () (client port))))
|
||||
- (r (socket-accept s))
|
||||
- (stream (socket-make-stream r
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (socket-close s)
|
||||
- (sb-thread:wait-on-semaphore sem)
|
||||
- (sleep 0.1)
|
||||
- (sb-thread:interrupt-thread client
|
||||
- (lambda () (throw 'stop :ok)))
|
||||
- (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
- (setf result :timeout))
|
||||
- (write-char #\x stream)
|
||||
- (close stream)
|
||||
- (socket-close r)
|
||||
- (sb-thread:join-thread client :timeout 5))))))
|
||||
- (server))
|
||||
- result)
|
||||
- :ok)
|
||||
+;#+(and ipv4-support sb-thread)
|
||||
+;(deftest interrupt-io
|
||||
+; (let (result
|
||||
+; (sem (sb-thread:make-semaphore)))
|
||||
+; (labels
|
||||
+; ((client (port)
|
||||
+; (setf result
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (socket-connect s #(127 0 0 1) port)
|
||||
+; (let ((stream (socket-make-stream s
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (handler-case
|
||||
+; (prog1
|
||||
+; (catch 'stop
|
||||
+; (sb-thread:signal-semaphore sem)
|
||||
+; (read-char stream))
|
||||
+; (close stream))
|
||||
+; (error (c)
|
||||
+; c))))))
|
||||
+; (server ()
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (setf (sockopt-reuse-address s) t)
|
||||
+; (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
+; (socket-listen s 5)
|
||||
+; (multiple-value-bind (* port)
|
||||
+; (socket-name s)
|
||||
+; (let* ((client (sb-thread:make-thread
|
||||
+; (lambda () (client port))))
|
||||
+; (r (socket-accept s))
|
||||
+; (stream (socket-make-stream r
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (socket-close s)
|
||||
+; (sb-thread:wait-on-semaphore sem)
|
||||
+; (sleep 0.1)
|
||||
+; (sb-thread:interrupt-thread client
|
||||
+; (lambda () (throw 'stop :ok)))
|
||||
+; (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
+; (setf result :timeout))
|
||||
+; (write-char #\x stream)
|
||||
+; (close stream)
|
||||
+; (socket-close r)
|
||||
+; (sb-thread:join-thread client :timeout 5))))))
|
||||
+; (server))
|
||||
+; result)
|
||||
+; :ok)
|
||||
|
||||
(defmacro with-client-and-server (((socket-class &rest common-initargs)
|
||||
(listen-socket-var &rest listen-address)
|
||||
@@ -505,8 +505,9 @@
|
||||
(define-shutdown-test ,(make-name 'shutdown.client.ub8)
|
||||
client server (unsigned-byte 8) ,direction)))))
|
||||
|
||||
- (define-shutdown-tests :output)
|
||||
- (define-shutdown-tests :io))
|
||||
+; (define-shutdown-tests :output)
|
||||
+; (define-shutdown-tests :io)
|
||||
+)
|
||||
|
||||
(defun poor-persons-random-address ()
|
||||
(let ((base (expt 36 8)))
|
@ -1,410 +0,0 @@
|
||||
diff -r -U3 sbcl-2.3.1.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-2.3.1/contrib/sb-bsd-sockets/tests.lisp
|
||||
--- sbcl-2.3.1.orig/contrib/sb-bsd-sockets/tests.lisp 2023-01-28 18:56:32.000000000 +0700
|
||||
+++ sbcl-2.3.1/contrib/sb-bsd-sockets/tests.lisp 2023-02-10 21:10:52.358958490 +0700
|
||||
@@ -13,16 +13,16 @@
|
||||
(equalp (make-inet-address "242.1.211.3") #(242 1 211 3))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-address.1
|
||||
- (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
- #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
- t)
|
||||
-
|
||||
-(deftest unparse-inet6-address
|
||||
- (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
- (make-inet6-address "fe80::abcd:1234"))
|
||||
- "fe80::abcd:1234")
|
||||
- t)
|
||||
+;(deftest make-inet6-address.1
|
||||
+; (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
+; #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest unparse-inet6-address
|
||||
+; (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
+; (make-inet6-address "fe80::abcd:1234"))
|
||||
+; "fe80::abcd:1234")
|
||||
+; t)
|
||||
|
||||
(deftest get-protocol-by-name/tcp
|
||||
(integerp (get-protocol-by-name "tcp"))
|
||||
@@ -35,15 +35,15 @@
|
||||
;;; See https://bugs.launchpad.net/sbcl/+bug/659857
|
||||
;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
|
||||
;;; for unknown protocols...
|
||||
-#-(and freebsd sb-thread)
|
||||
-#-(and dragonfly sb-thread)
|
||||
-(deftest get-protocol-by-name/error
|
||||
- (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
- (unknown-protocol ()
|
||||
- t)
|
||||
- (:no-error ()
|
||||
- nil))
|
||||
- t)
|
||||
+;#-(and freebsd sb-thread)
|
||||
+;#-(and dragonfly sb-thread)
|
||||
+;(deftest get-protocol-by-name/error
|
||||
+; (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
+; (unknown-protocol ()
|
||||
+; t)
|
||||
+; (:no-error ()
|
||||
+; nil))
|
||||
+; t)
|
||||
|
||||
(eval-when (:compile-toplevel :execute)
|
||||
(when (handler-case (make-instance 'inet-socket
|
||||
@@ -104,19 +104,19 @@
|
||||
(:no-error nil))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-socket.smoke
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
-
|
||||
-(deftest make-inet6-socket.keyword
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
+;(deftest make-inet6-socket.smoke
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest make-inet6-socket.keyword
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
|
||||
#+ipv4-support
|
||||
(deftest non-block-socket
|
||||
@@ -125,67 +125,67 @@
|
||||
(non-blocking-mode s))
|
||||
t)
|
||||
|
||||
-#+ipv4-support
|
||||
-(test-util:with-test (:name :inet-socket-bind)
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet-address "127.0.0.1"))
|
||||
- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
- (failure)
|
||||
- (got-addrinuse))
|
||||
- (format t "~&::: INFO: made sockets~%")
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (progn
|
||||
- (socket-bind s1 address 0)
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port) ; should fail
|
||||
- nil)
|
||||
- (address-in-use-error () (setq got-addrinuse t))
|
||||
- (condition (c) (setq failure c))))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2))
|
||||
- (cond (failure (error "BIND failed with ~A" failure))
|
||||
- ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
-
|
||||
-(test-util:with-test (:name :inet6-socket-bind)
|
||||
- (let ((notsupp)
|
||||
- (failure)
|
||||
- (got-addrinuse))
|
||||
- (handler-case
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet6-address "::1"))
|
||||
- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
- (format t "~&::: INFO: made sockets~%")
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (handler-case
|
||||
- (socket-bind s1 address 0)
|
||||
- (socket-error ()
|
||||
- ;; This may mean no IPv6 support, can't fail a test
|
||||
- ;; because of that (address-family-not-supported doesn't catch that)
|
||||
- t)
|
||||
- (:no-error (x)
|
||||
- (declare (ignore x))
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port) ; should fail
|
||||
- nil)
|
||||
- (address-in-use-error () (setq got-addrinuse t))
|
||||
- (condition (c) (setq failure c)))))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2)))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) ()
|
||||
- (setq notsupp t)))
|
||||
- (cond (notsupp (format t "~&INFO: not supported~%"))
|
||||
- (failure (error "BIND failed with ~A" failure))
|
||||
- ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
+;#+ipv4-support
|
||||
+;(test-util:with-test (:name :inet-socket-bind)
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet-address "127.0.0.1"))
|
||||
+; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
+; (failure)
|
||||
+; (got-addrinuse))
|
||||
+; (format t "~&::: INFO: made sockets~%")
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (progn
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port) ; should fail
|
||||
+; nil)
|
||||
+; (address-in-use-error () (setq got-addrinuse t))
|
||||
+; (condition (c) (setq failure c))))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2))
|
||||
+; (cond (failure (error "BIND failed with ~A" failure))
|
||||
+; ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
+
|
||||
+;(test-util:with-test (:name :inet6-socket-bind)
|
||||
+; (let ((notsupp)
|
||||
+; (failure)
|
||||
+; (got-addrinuse))
|
||||
+; (handler-case
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet6-address "::1"))
|
||||
+; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
+; (format t "~&::: INFO: made sockets~%")
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (handler-case
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (socket-error ()
|
||||
+; ;; This may mean no IPv6 support, can't fail a test
|
||||
+; ;; because of that (address-family-not-supported doesn't catch that)
|
||||
+; t)
|
||||
+; (:no-error (x)
|
||||
+; (declare (ignore x))
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port) ; should fail
|
||||
+; nil)
|
||||
+; (address-in-use-error () (setq got-addrinuse t))
|
||||
+; (condition (c) (setq failure c)))))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2)))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) ()
|
||||
+; (setq notsupp t)))
|
||||
+; (cond (notsupp (format t "~&INFO: not supported~%"))
|
||||
+; (failure (error "BIND failed with ~A" failure))
|
||||
+; ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
|
||||
#+ipv4-support
|
||||
(deftest simple-sockopt-test
|
||||
@@ -253,37 +253,37 @@
|
||||
;;; to look at /etc/syslog.conf or local equivalent to find out where
|
||||
;;; the message ended up
|
||||
|
||||
-#-win32
|
||||
-(deftest simple-local-client
|
||||
- (progn
|
||||
- ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
- ;; /dev/log. We might also be building in a chroot or
|
||||
- ;; something, so don't fail this test just because the file is
|
||||
- ;; unavailable, or if it's a symlink to some weird character
|
||||
- ;; device.
|
||||
- (when (block nil
|
||||
- (handler-bind ((sb-posix:syscall-error
|
||||
- (lambda (e)
|
||||
- (declare (ignore e))
|
||||
- (return nil))))
|
||||
- (sb-posix:s-issock
|
||||
- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
- (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
- (format t "Connecting ~A... " s)
|
||||
- (finish-output)
|
||||
- (handler-case
|
||||
- (socket-connect s "/dev/log")
|
||||
- (sb-bsd-sockets::socket-error ()
|
||||
- (setq s (make-instance 'local-socket :type :stream))
|
||||
- (format t "failed~%Retrying with ~A... " s)
|
||||
- (finish-output)
|
||||
- (socket-connect s "/dev/log")))
|
||||
- (format t "ok.~%")
|
||||
- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
- (format stream
|
||||
- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
- t)
|
||||
- t)
|
||||
+;#-win32
|
||||
+;(deftest simple-local-client
|
||||
+; (progn
|
||||
+; ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
+; ;; /dev/log. We might also be building in a chroot or
|
||||
+; ;; something, so don't fail this test just because the file is
|
||||
+; ;; unavailable, or if it's a symlink to some weird character
|
||||
+; ;; device.
|
||||
+; (when (block nil
|
||||
+; (handler-bind ((sb-posix:syscall-error
|
||||
+; (lambda (e)
|
||||
+; (declare (ignore e))
|
||||
+; (return nil))))
|
||||
+; (sb-posix:s-issock
|
||||
+; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
+; (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
+; (format t "Connecting ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (handler-case
|
||||
+; (socket-connect s "/dev/log")
|
||||
+; (sb-bsd-sockets::socket-error ()
|
||||
+; (setq s (make-instance 'local-socket :type :stream))
|
||||
+; (format t "failed~%Retrying with ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (socket-connect s "/dev/log")))
|
||||
+; (format t "ok.~%")
|
||||
+; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
+; (format stream
|
||||
+; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
+; t)
|
||||
+; t)
|
||||
|
||||
;;; these require that the internet (or bits of it, at least) is available
|
||||
|
||||
@@ -428,59 +428,59 @@
|
||||
(format t "Received ~A bytes from ~A:~A - ~A ~%"
|
||||
len address port (subseq buf 0 (min 10 len)))))))
|
||||
|
||||
-#+(and ipv4-support sb-thread)
|
||||
-(deftest interrupt-io
|
||||
- (let (result
|
||||
- (sem (sb-thread:make-semaphore)))
|
||||
- (labels
|
||||
- ((client (port)
|
||||
- (setf result
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (socket-connect s #(127 0 0 1) port)
|
||||
- (let ((stream (socket-make-stream s
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (handler-case
|
||||
- (prog1
|
||||
- (catch 'stop
|
||||
- (sb-thread:signal-semaphore sem)
|
||||
- (read-char stream))
|
||||
- (close stream))
|
||||
- (error (c)
|
||||
- c))))))
|
||||
- (server ()
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (setf (sockopt-reuse-address s) t)
|
||||
- (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
- (socket-listen s 5)
|
||||
- (multiple-value-bind (* port)
|
||||
- (socket-name s)
|
||||
- (let* ((client (sb-thread:make-thread
|
||||
- (lambda () (client port))))
|
||||
- (r (socket-accept s))
|
||||
- (stream (socket-make-stream r
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (socket-close s)
|
||||
- (sb-thread:wait-on-semaphore sem)
|
||||
- (sleep 0.1)
|
||||
- (sb-thread:interrupt-thread client
|
||||
- (lambda () (throw 'stop :ok)))
|
||||
- (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
- (setf result :timeout))
|
||||
- (write-char #\x stream)
|
||||
- (close stream)
|
||||
- (socket-close r)
|
||||
- (sb-thread:join-thread client :timeout 5))))))
|
||||
- (server))
|
||||
- result)
|
||||
- :ok)
|
||||
+;#+(and ipv4-support sb-thread)
|
||||
+;(deftest interrupt-io
|
||||
+; (let (result
|
||||
+; (sem (sb-thread:make-semaphore)))
|
||||
+; (labels
|
||||
+; ((client (port)
|
||||
+; (setf result
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (socket-connect s #(127 0 0 1) port)
|
||||
+; (let ((stream (socket-make-stream s
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (handler-case
|
||||
+; (prog1
|
||||
+; (catch 'stop
|
||||
+; (sb-thread:signal-semaphore sem)
|
||||
+; (read-char stream))
|
||||
+; (close stream))
|
||||
+; (error (c)
|
||||
+; c))))))
|
||||
+; (server ()
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (setf (sockopt-reuse-address s) t)
|
||||
+; (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
+; (socket-listen s 5)
|
||||
+; (multiple-value-bind (* port)
|
||||
+; (socket-name s)
|
||||
+; (let* ((client (sb-thread:make-thread
|
||||
+; (lambda () (client port))))
|
||||
+; (r (socket-accept s))
|
||||
+; (stream (socket-make-stream r
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (socket-close s)
|
||||
+; (sb-thread:wait-on-semaphore sem)
|
||||
+; (sleep 0.1)
|
||||
+; (sb-thread:interrupt-thread client
|
||||
+; (lambda () (throw 'stop :ok)))
|
||||
+; (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
+; (setf result :timeout))
|
||||
+; (write-char #\x stream)
|
||||
+; (close stream)
|
||||
+; (socket-close r)
|
||||
+; (sb-thread:join-thread client :timeout 5))))))
|
||||
+; (server))
|
||||
+; result)
|
||||
+; :ok)
|
||||
|
||||
(defmacro with-client-and-server (((socket-class &rest common-initargs)
|
||||
(listen-socket-var &rest listen-address)
|
||||
@@ -543,8 +543,8 @@
|
||||
(define-shutdown-test ,(make-name 'shutdown.client.ub8)
|
||||
client server (unsigned-byte 8) ,direction)))))
|
||||
|
||||
- (define-shutdown-tests :output)
|
||||
- (define-shutdown-tests :io))
|
||||
+; (define-shutdown-tests :output)
|
||||
+; (define-shutdown-tests :io))
|
||||
|
||||
(defun poor-persons-random-address ()
|
||||
(let ((base (expt 36 8)))
|
@ -1,410 +0,0 @@
|
||||
diff -r -U3 sbcl-2.3.6.orig/contrib/sb-bsd-sockets/tests.lisp sbcl-2.3.6/contrib/sb-bsd-sockets/tests.lisp
|
||||
--- sbcl-2.3.6.orig/contrib/sb-bsd-sockets/tests.lisp 2023-06-28 13:35:17.000000000 +0700
|
||||
+++ sbcl-2.3.6/contrib/sb-bsd-sockets/tests.lisp 2023-07-20 21:14:36.163025437 +0700
|
||||
@@ -13,16 +13,16 @@
|
||||
(equalp (make-inet-address "242.1.211.3") #(242 1 211 3))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-address.1
|
||||
- (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
- #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
- t)
|
||||
-
|
||||
-(deftest unparse-inet6-address
|
||||
- (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
- (make-inet6-address "fe80::abcd:1234"))
|
||||
- "fe80::abcd:1234")
|
||||
- t)
|
||||
+;(deftest make-inet6-address.1
|
||||
+; (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
|
||||
+; #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest unparse-inet6-address
|
||||
+; (string= (sb-bsd-sockets::unparse-inet6-address
|
||||
+; (make-inet6-address "fe80::abcd:1234"))
|
||||
+; "fe80::abcd:1234")
|
||||
+; t)
|
||||
|
||||
(deftest get-protocol-by-name/tcp
|
||||
(integerp (get-protocol-by-name "tcp"))
|
||||
@@ -35,15 +35,15 @@
|
||||
;;; See https://bugs.launchpad.net/sbcl/+bug/659857
|
||||
;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
|
||||
;;; for unknown protocols...
|
||||
-#-(and freebsd sb-thread)
|
||||
-#-(and dragonfly sb-thread)
|
||||
-(deftest get-protocol-by-name/error
|
||||
- (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
- (unknown-protocol ()
|
||||
- t)
|
||||
- (:no-error ()
|
||||
- nil))
|
||||
- t)
|
||||
+;#-(and freebsd sb-thread)
|
||||
+;#-(and dragonfly sb-thread)
|
||||
+;(deftest get-protocol-by-name/error
|
||||
+; (handler-case (get-protocol-by-name "nonexistent-protocol")
|
||||
+; (unknown-protocol ()
|
||||
+; t)
|
||||
+; (:no-error ()
|
||||
+; nil))
|
||||
+; t)
|
||||
|
||||
(eval-when (:compile-toplevel :execute)
|
||||
(when (handler-case (make-instance 'inet-socket
|
||||
@@ -104,19 +104,19 @@
|
||||
(:no-error nil))
|
||||
t)
|
||||
|
||||
-(deftest make-inet6-socket.smoke
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
-
|
||||
-(deftest make-inet6-socket.keyword
|
||||
- (handler-case
|
||||
- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
- (> (socket-file-descriptor s) 1))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
- t)
|
||||
+;(deftest make-inet6-socket.smoke
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
+
|
||||
+;(deftest make-inet6-socket.keyword
|
||||
+; (handler-case
|
||||
+; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
|
||||
+; (> (socket-file-descriptor s) 1))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) () t))
|
||||
+; t)
|
||||
|
||||
#+ipv4-support
|
||||
(deftest non-block-socket
|
||||
@@ -125,67 +125,67 @@
|
||||
(non-blocking-mode s))
|
||||
t)
|
||||
|
||||
-#+ipv4-support
|
||||
-(test-util:with-test (:name :inet-socket-bind)
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet-address "127.0.0.1"))
|
||||
- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
- (failure)
|
||||
- (got-addrinuse))
|
||||
- (format t "~&::: INFO: made sockets~%")
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (progn
|
||||
- (socket-bind s1 address 0)
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port) ; should fail
|
||||
- nil)
|
||||
- (address-in-use-error () (setq got-addrinuse t))
|
||||
- (condition (c) (setq failure c))))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2))
|
||||
- (cond (failure (error "BIND failed with ~A" failure))
|
||||
- ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
-
|
||||
-(test-util:with-test (:name :inet6-socket-bind)
|
||||
- (let ((notsupp)
|
||||
- (failure)
|
||||
- (got-addrinuse))
|
||||
- (handler-case
|
||||
- (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
- (address (make-inet6-address "::1"))
|
||||
- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
- (format t "~&::: INFO: made sockets~%")
|
||||
- (unwind-protect
|
||||
- ;; Given the functions we've got so far, if you can think of a
|
||||
- ;; better way to make sure the bind succeeded than trying it
|
||||
- ;; twice, let me know
|
||||
- (handler-case
|
||||
- (socket-bind s1 address 0)
|
||||
- (socket-error ()
|
||||
- ;; This may mean no IPv6 support, can't fail a test
|
||||
- ;; because of that (address-family-not-supported doesn't catch that)
|
||||
- (setf notsupp t))
|
||||
- (:no-error (x)
|
||||
- (declare (ignore x))
|
||||
- (handler-case
|
||||
- (let ((port (nth-value 1 (socket-name s1))))
|
||||
- (socket-bind s2 address port) ; should fail
|
||||
- nil)
|
||||
- (address-in-use-error () (setq got-addrinuse t))
|
||||
- (condition (c) (setq failure c)))))
|
||||
- (socket-close s1)
|
||||
- (socket-close s2)))
|
||||
- ((or address-family-not-supported protocol-not-supported-error) ()
|
||||
- (setq notsupp t)))
|
||||
- (cond (notsupp (format t "~&INFO: not supported~%"))
|
||||
- (failure (error "BIND failed with ~A" failure))
|
||||
- ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
+;#+ipv4-support
|
||||
+;(test-util:with-test (:name :inet-socket-bind)
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet-address "127.0.0.1"))
|
||||
+; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet-socket :type :stream :protocol tcp))
|
||||
+; (failure)
|
||||
+; (got-addrinuse))
|
||||
+; (format t "~&::: INFO: made sockets~%")
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (progn
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port) ; should fail
|
||||
+; nil)
|
||||
+; (address-in-use-error () (setq got-addrinuse t))
|
||||
+; (condition (c) (setq failure c))))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2))
|
||||
+; (cond (failure (error "BIND failed with ~A" failure))
|
||||
+; ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
+
|
||||
+;(test-util:with-test (:name :inet6-socket-bind)
|
||||
+; (let ((notsupp)
|
||||
+; (failure)
|
||||
+; (got-addrinuse))
|
||||
+; (handler-case
|
||||
+; (let* ((tcp (get-protocol-by-name "tcp"))
|
||||
+; (address (make-inet6-address "::1"))
|
||||
+; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
|
||||
+; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
|
||||
+; (format t "~&::: INFO: made sockets~%")
|
||||
+; (unwind-protect
|
||||
+; ;; Given the functions we've got so far, if you can think of a
|
||||
+; ;; better way to make sure the bind succeeded than trying it
|
||||
+; ;; twice, let me know
|
||||
+; (handler-case
|
||||
+; (socket-bind s1 address 0)
|
||||
+; (socket-error ()
|
||||
+; ;; This may mean no IPv6 support, can't fail a test
|
||||
+; ;; because of that (address-family-not-supported doesn't catch that)
|
||||
+; (setf notsupp t))
|
||||
+; (:no-error (x)
|
||||
+; (declare (ignore x))
|
||||
+; (handler-case
|
||||
+; (let ((port (nth-value 1 (socket-name s1))))
|
||||
+; (socket-bind s2 address port) ; should fail
|
||||
+; nil)
|
||||
+; (address-in-use-error () (setq got-addrinuse t))
|
||||
+; (condition (c) (setq failure c)))))
|
||||
+; (socket-close s1)
|
||||
+; (socket-close s2)))
|
||||
+; ((or address-family-not-supported protocol-not-supported-error) ()
|
||||
+; (setq notsupp t)))
|
||||
+; (cond (notsupp (format t "~&INFO: not supported~%"))
|
||||
+; (failure (error "BIND failed with ~A" failure))
|
||||
+; ((not got-addrinuse) (error "Expected ADDRESS-IN-USE err")))))
|
||||
|
||||
#+ipv4-support
|
||||
(deftest simple-sockopt-test
|
||||
@@ -253,37 +253,37 @@
|
||||
;;; to look at /etc/syslog.conf or local equivalent to find out where
|
||||
;;; the message ended up
|
||||
|
||||
-#-win32
|
||||
-(deftest simple-local-client
|
||||
- (progn
|
||||
- ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
- ;; /dev/log. We might also be building in a chroot or
|
||||
- ;; something, so don't fail this test just because the file is
|
||||
- ;; unavailable, or if it's a symlink to some weird character
|
||||
- ;; device.
|
||||
- (when (block nil
|
||||
- (handler-bind ((sb-posix:syscall-error
|
||||
- (lambda (e)
|
||||
- (declare (ignore e))
|
||||
- (return nil))))
|
||||
- (sb-posix:s-issock
|
||||
- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
- (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
- (format t "Connecting ~A... " s)
|
||||
- (finish-output)
|
||||
- (handler-case
|
||||
- (socket-connect s "/dev/log")
|
||||
- (sb-bsd-sockets::socket-error ()
|
||||
- (setq s (make-instance 'local-socket :type :stream))
|
||||
- (format t "failed~%Retrying with ~A... " s)
|
||||
- (finish-output)
|
||||
- (socket-connect s "/dev/log")))
|
||||
- (format t "ok.~%")
|
||||
- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
- (format stream
|
||||
- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
- t)
|
||||
- t)
|
||||
+;#-win32
|
||||
+;(deftest simple-local-client
|
||||
+; (progn
|
||||
+; ;; SunOS (Solaris) and Darwin systems don't have a socket at
|
||||
+; ;; /dev/log. We might also be building in a chroot or
|
||||
+; ;; something, so don't fail this test just because the file is
|
||||
+; ;; unavailable, or if it's a symlink to some weird character
|
||||
+; ;; device.
|
||||
+; (when (block nil
|
||||
+; (handler-bind ((sb-posix:syscall-error
|
||||
+; (lambda (e)
|
||||
+; (declare (ignore e))
|
||||
+; (return nil))))
|
||||
+; (sb-posix:s-issock
|
||||
+; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
|
||||
+; (let ((s (make-instance 'local-socket :type :datagram)))
|
||||
+; (format t "Connecting ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (handler-case
|
||||
+; (socket-connect s "/dev/log")
|
||||
+; (sb-bsd-sockets::socket-error ()
|
||||
+; (setq s (make-instance 'local-socket :type :stream))
|
||||
+; (format t "failed~%Retrying with ~A... " s)
|
||||
+; (finish-output)
|
||||
+; (socket-connect s "/dev/log")))
|
||||
+; (format t "ok.~%")
|
||||
+; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
|
||||
+; (format stream
|
||||
+; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
|
||||
+; t)
|
||||
+; t)
|
||||
|
||||
;;; these require that the internet (or bits of it, at least) is available
|
||||
|
||||
@@ -428,59 +428,59 @@
|
||||
(format t "Received ~A bytes from ~A:~A - ~A ~%"
|
||||
len address port (subseq buf 0 (min 10 len)))))))
|
||||
|
||||
-#+(and ipv4-support sb-thread)
|
||||
-(deftest interrupt-io
|
||||
- (let (result
|
||||
- (sem (sb-thread:make-semaphore)))
|
||||
- (labels
|
||||
- ((client (port)
|
||||
- (setf result
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (socket-connect s #(127 0 0 1) port)
|
||||
- (let ((stream (socket-make-stream s
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (handler-case
|
||||
- (prog1
|
||||
- (catch 'stop
|
||||
- (sb-thread:signal-semaphore sem)
|
||||
- (read-char stream))
|
||||
- (close stream))
|
||||
- (error (c)
|
||||
- c))))))
|
||||
- (server ()
|
||||
- (let ((s (make-instance 'inet-socket
|
||||
- :type :stream
|
||||
- :protocol :tcp)))
|
||||
- (setf (sockopt-reuse-address s) t)
|
||||
- (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
- (socket-listen s 5)
|
||||
- (multiple-value-bind (* port)
|
||||
- (socket-name s)
|
||||
- (let* ((client (sb-thread:make-thread
|
||||
- (lambda () (client port))))
|
||||
- (r (socket-accept s))
|
||||
- (stream (socket-make-stream r
|
||||
- :input t
|
||||
- :output t
|
||||
- :buffering :none)))
|
||||
- (socket-close s)
|
||||
- (sb-thread:wait-on-semaphore sem)
|
||||
- (sleep 0.1)
|
||||
- (sb-thread:interrupt-thread client
|
||||
- (lambda () (throw 'stop :ok)))
|
||||
- (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
- (setf result :timeout))
|
||||
- (write-char #\x stream)
|
||||
- (close stream)
|
||||
- (socket-close r)
|
||||
- (sb-thread:join-thread client :timeout 5))))))
|
||||
- (server))
|
||||
- result)
|
||||
- :ok)
|
||||
+;#+(and ipv4-support sb-thread)
|
||||
+;(deftest interrupt-io
|
||||
+; (let (result
|
||||
+; (sem (sb-thread:make-semaphore)))
|
||||
+; (labels
|
||||
+; ((client (port)
|
||||
+; (setf result
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (socket-connect s #(127 0 0 1) port)
|
||||
+; (let ((stream (socket-make-stream s
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (handler-case
|
||||
+; (prog1
|
||||
+; (catch 'stop
|
||||
+; (sb-thread:signal-semaphore sem)
|
||||
+; (read-char stream))
|
||||
+; (close stream))
|
||||
+; (error (c)
|
||||
+; c))))))
|
||||
+; (server ()
|
||||
+; (let ((s (make-instance 'inet-socket
|
||||
+; :type :stream
|
||||
+; :protocol :tcp)))
|
||||
+; (setf (sockopt-reuse-address s) t)
|
||||
+; (socket-bind s (make-inet-address "127.0.0.1") 0)
|
||||
+; (socket-listen s 5)
|
||||
+; (multiple-value-bind (* port)
|
||||
+; (socket-name s)
|
||||
+; (let* ((client (sb-thread:make-thread
|
||||
+; (lambda () (client port))))
|
||||
+; (r (socket-accept s))
|
||||
+; (stream (socket-make-stream r
|
||||
+; :input t
|
||||
+; :output t
|
||||
+; :buffering :none)))
|
||||
+; (socket-close s)
|
||||
+; (sb-thread:wait-on-semaphore sem)
|
||||
+; (sleep 0.1)
|
||||
+; (sb-thread:interrupt-thread client
|
||||
+; (lambda () (throw 'stop :ok)))
|
||||
+; (unless (sb-ext:wait-for (null (sb-thread::thread-interruptions client)) :timeout 5)
|
||||
+; (setf result :timeout))
|
||||
+; (write-char #\x stream)
|
||||
+; (close stream)
|
||||
+; (socket-close r)
|
||||
+; (sb-thread:join-thread client :timeout 5))))))
|
||||
+; (server))
|
||||
+; result)
|
||||
+; :ok)
|
||||
|
||||
(defmacro with-client-and-server (((socket-class &rest common-initargs)
|
||||
(listen-socket-var &rest listen-address)
|
||||
@@ -543,8 +543,8 @@
|
||||
(define-shutdown-test ,(make-name 'shutdown.client.ub8)
|
||||
client server (unsigned-byte 8) ,direction)))))
|
||||
|
||||
- (define-shutdown-tests :output)
|
||||
- (define-shutdown-tests :io))
|
||||
+; (define-shutdown-tests :output)
|
||||
+; (define-shutdown-tests :io))
|
||||
|
||||
(defun poor-persons-random-address ()
|
||||
(let ((base (expt 36 8)))
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue