python3_12: fork banch of random packages and add python target

This commit is contained in:
Anton Bolshakov 2023-12-22 18:08:17 +08:00
parent 2149ebc198
commit cb037bd8f0
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
110 changed files with 5203 additions and 0 deletions

View file

@ -0,0 +1 @@
DIST system-config-printer-1.5.18.tar.xz 1396808 BLAKE2B 910e853829ee876edc597a3103b5ab857b3b8c1cb87096f25213b1088e35d9f4d320dad61f55b530283a7650b07abe028a53b4e144b33b1b66c733cb2caa8011 SHA512 33dc9c52d92f4234e055fb10a99cadd58424dcdb62554797b44bdd5319f1c3662bd2fa33417ac3a3f5ec51216d64e81e1897f3e671eb49f6be34057d7c38f3f4

View file

@ -0,0 +1,22 @@
From 399b3334d6519639cfe7f1c0457e2475b8ee5230 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Thu, 13 Oct 2022 14:03:37 +0200
Subject: [PATCH] Fix debugprint() in options.py (fixes #291)
---
options.py | 2 +-
1 file changed, 1 insertions(+), 1 deletion(-)
diff --git a/options.py b/options.py
index d756f98dc..d7c236deb 100644
--- a/options.py
+++ b/options.py
@@ -423,7 +423,7 @@ def __init__(self, name, value, supported, on_change):
debugprint("Unknown value for %s: %s" % (name, value))
debugprint("Choices: %s" % (supported))
if len(supported) > 0:
- debugprint("Selecting from choices:", supported[0])
+ debugprint("Selecting from choices: %s" % supported[0])
self.selector.set_active(0)
self.selector.connect("changed", self.changed)

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>reavertm@gentoo.org</email>
<name>Maciej Mrozowski</name>
</maintainer>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<maintainer type="project">
<email>kde@gentoo.org</email>
<name>Gentoo KDE Project</name>
</maintainer>
<upstream>
<remote-id type="github">OpenPrinting/system-config-printer</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,92 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="xml(+)"
inherit python-single-r1 systemd udev xdg
DESCRIPTION="Graphical user interface for CUPS administration"
HOMEPAGE="https://github.com/OpenPrinting/system-config-printer"
SRC_URI="https://github.com/OpenPrinting/${PN}/releases/download/v${PV}/${P}.tar.xz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
IUSE="keyring policykit"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# Needs cups running, bug 284005
RESTRICT="test"
# Additional unhandled dependencies
# gnome-extra/gnome-packagekit[${PYTHON_USEDEP}] with pygobject:2 ?
# python samba client: smbc
# selinux: needed for troubleshooting
COMMON_DEPEND="${PYTHON_DEPS}
dev-libs/glib:2
net-print/cups[dbus]
virtual/libusb:1
>=virtual/udev-172
x11-libs/gtk+:3[introspection]
x11-libs/libnotify[introspection]
x11-libs/pango[introspection]
"
DEPEND="${COMMON_DEPEND}
app-text/docbook-xml-dtd:4.1.2
>=app-text/xmlto-0.0.22
dev-perl/XML-Parser
dev-util/desktop-file-utils
>=sys-devel/gettext-0.20
virtual/pkgconfig
"
RDEPEND="${COMMON_DEPEND}
$(python_gen_cond_dep '
dev-python/dbus-python[${PYTHON_USEDEP}]
dev-python/pycairo[${PYTHON_USEDEP}]
dev-python/pycups[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/urllib3[${PYTHON_USEDEP}]
')
keyring? ( app-crypt/libsecret[introspection] )
policykit? ( net-print/cups-pk-helper )
"
PATCHES=( "${FILESDIR}/${P}-fix-debugprint-exception.patch" ) # git master (1.5.19)
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local myeconfargs=(
--with-xmlto
--enable-nls
--with-desktop-vendor=Gentoo
--with-udev-rules
--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
)
econf "${myeconfargs[@]}"
}
src_compile() {
default
python_optimize cupshelpers
}
src_install() {
default
python_fix_shebang "${ED}"
python_optimize
python_domodule cupshelpers
}
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}

1
app-misc/recoll/Manifest Normal file
View file

@ -0,0 +1 @@
DIST recoll-1.36.2.tar.gz 3129206 BLAKE2B 0631d8c88f56f3381dd899fa385cba84a720d9d3a49b19b9b344de9542d79e3e5d5e10008fd7dd098795df2a4c79a682ff9a10ff4f99243fa2f7abd99831b553 SHA512 4c7ce5b6f6213ba4cb9266dcd6ea26e56850aa984c343552464766c5036ac6fd2ac6e9e71157997e10e8ba0350d23a4ebc3f2d57978805aa2d33674aa2a6c8b0

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>ppurka@gmail.com</email>
<name>Punarbasu 'ppurka' Purkayastha</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers Project</name>
</maintainer>
<upstream>
<maintainer status="active">
<email>jfd@recoll.org</email>
<name>Jean-Francois Dockes</name>
</maintainer>
<bugs-to>https://bitbucket.org/medoc/recoll/issues</bugs-to>
</upstream>
<use>
<flag name="camelcase">Enable indexing for camelCase sentences and words</flag>
<flag name="chm">Enable CHM file support via <pkg>dev-python/pychm</pkg></flag>
<flag name="inotify">Use the Linux Kernel notification subsystem for monitoring file alterations in realtime</flag>
<flag name="session">Stop monitoring file alterations when X11 session terminates</flag>
<flag name="webengine">Use <pkg>dev-qt/qtwebengine</pkg> for fancy result list display</flag>
</use>
<longdescription lang="en">
Recoll is a desktop full-text search tool. It can search most document
formats. You may need external applications for text extraction. It
can reach any storage place: files, archive members, email attachments,
transparently handling decompression.
</longdescription>
</pkgmetadata>

View file

@ -0,0 +1,128 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit linux-info optfeature python-single-r1 qmake-utils systemd
DESCRIPTION="Personal full text search package"
HOMEPAGE="https://www.lesbonscomptes.com/recoll/"
SRC_URI="https://www.lesbonscomptes.com/recoll/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="camelcase chm +inotify qt5 session +spell systemd webengine"
REQUIRED_USE="
session? ( inotify )
webengine? ( qt5 )
${PYTHON_REQUIRED_USE}
"
DEPEND="
dev-libs/libxml2
dev-libs/libxslt
dev-libs/xapian:=
sys-libs/zlib
virtual/libiconv
chm? (
dev-libs/chmlib
dev-python/pychm
)
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtprintsupport:5
dev-qt/qtwidgets:5
webengine? ( dev-qt/qtwebengine:5[widgets] )
)
session? (
inotify? (
x11-libs/libSM
x11-libs/libICE
x11-libs/libX11
)
)
spell? ( app-text/aspell )
systemd? ( sys-apps/systemd )
${PYTHON_DEPS}
"
BDEPEND="
qt5? ( dev-qt/linguist-tools:5 )
"
RDEPEND="
${DEPEND}
app-arch/unzip
"
pkg_setup() {
if use inotify; then
local CONFIG_CHECK="~INOTIFY_USER"
check_extra_config
fi
python-single-r1_pkg_setup
}
src_prepare() {
default
python_fix_shebang filters
}
src_configure() {
use qt5 && export QMAKE="$(qt5_get_bindir)/qmake"
local myeconfargs=(
$(use_enable camelcase)
$(use_enable chm python-chm)
$(use_enable session x11mon)
$(use_enable qt5 qtgui)
$(use_enable spell python-aspell)
$(use_enable webengine)
$(use_with inotify)
$(use_with spell aspell)
$(use_with systemd)
--with-system-unit-dir="$(systemd_get_systemunitdir)"
--with-user-unit-dir="$(systemd_get_userunitdir)"
--disable-webkit
--without-fam
--enable-recollq
)
econf "${myeconfargs[@]}"
}
src_install() {
emake STRIP="$(type -P true || die)" DESTDIR="${D}" install
python_optimize
# html docs should be placed in /usr/share/doc/${PN}/html
dodoc -r "${ED}"/usr/share/recoll/doc/.
rm -r "${ED}/usr/share/recoll/doc" || die
find "${D}" -name '*.la' -delete || die
}
pkg_postinst() {
optfeature "XML based documents support" "dev-libs/libxslt[python] dev-libs/libxml2[python]"
optfeature "PDF files support" app-text/poppler
optfeature "PDF files with OCR support" app-text/tesseract
optfeature "MS Word files support" app-text/antiword
optfeature "Wordperfect files support" "app-text/libwpd[tools]"
optfeature "Lyx files support" app-office/lyx
optfeature "GNU Info files support" sys-apps/texinfo
optfeature "RAR archives support" dev-python/rarfile
optfeature "7zip archives support" dev-python/pylzma
optfeature "iCalendar files support" dev-python/icalendar
optfeature "Postscript files support" app-text/pstotext
optfeature "RTF files support" app-text/unrtf
optfeature "TeX files support" dev-text/detex
optfeature "DVI files support" virtual/tex-base
optfeature "DJVU files support" app-text/djvu
optfeature "tags in audio files support" media-libs/mutagen
optfeature "tags in image files support" media-libs/exiftool
optfeature "Midi karaoke files support" dev-python/chardet
}

View file

@ -0,0 +1,2 @@
DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916
DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97

View file

@ -0,0 +1,79 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.75.0:2
dev-libs/libffi:=
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
sys-devel/flex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View file

@ -0,0 +1,79 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.$(($(ver_cut 2) - 1)).0:2
dev-libs/libffi:=
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
sys-devel/flex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="doctool">Install g-ir-doc-tool for generating documentation from introspected data</flag>
</use>
<upstream>
<remote-id type="gnome-gitlab">GNOME/gobject-introspection</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST pycups-2.0.1.tar.gz 62968 BLAKE2B c9d955b89f2e9746827721c875dfc97538bb4575ee3f78c41a94f06b361cd3d22c14d453bfbea210160026d33c6e161b1d14c4dffeaddd644c260779f56e1db7 SHA512 fdebf1cac8cc4fffb8a76a938aa91965dae4a3dcdb6d8ee26e8e6054809d26dd3fb20b10c2351fb9265c03b16d6bde011815111c452ccb058518372f22d9d617

View file

@ -0,0 +1,24 @@
From 8cbf6d40a0132764ad51e7416aa7034966875091 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Mon, 28 Jun 2021 13:17:45 +0200
Subject: [PATCH] cupsipp.h: define PY_SSIZE_T_CLEAN
Fixes traceback during IPPRequest.writeIO with Python 3.10
---
NEWS | 2 ++
cupsipp.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/cupsipp.h b/cupsipp.h
index 2a15ce6..b890198 100644
--- a/cupsipp.h
+++ b/cupsipp.h
@@ -21,6 +21,8 @@
#ifndef HAVE_CUPSIPP_H
#define HAVE_CUPSIPP_H
+#define PY_SSIZE_T_CLEAN
+
#include <Python.h>
#include <cups/ipp.h>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>reavertm@gentoo.org</email>
<name>Maciej Mrozowski</name>
</maintainer>
<maintainer type="project">
<email>printing@gentoo.org</email>
<name>Gentoo Printing Project</name>
</maintainer>
<upstream>
<remote-id type="pypi">pycups</remote-id>
<remote-id type="github">OpenPrinting/pycups</remote-id>
<bugs-to>https://github.com/OpenPrinting/pycups/issues</bugs-to>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,32 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..12} )
inherit distutils-r1 pypi
DESCRIPTION="Python bindings for the CUPS API"
HOMEPAGE="https://github.com/OpenPrinting/pycups"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
IUSE="examples"
RDEPEND="net-print/cups"
DEPEND="${RDEPEND}"
# https://github.com/OpenPrinting/pycups/commit/8cbf6d40a0132764ad51e7416aa7034966875091
PATCHES=( "${FILESDIR}/${P}-py3.10.patch" )
python_install_all() {
if use examples; then
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}

View file

@ -0,0 +1 @@
DIST itstool-2.0.7.tar.bz2 104648 BLAKE2B e2d27d7b0a772596a0fa02b157bbef65b132b839c908c114596d21a54c245a0c941419a3555a8b9b7255800f9ef65d557a5b0f6847103b0a3934c908d43128ab SHA512 710c188e518a7eccbf9d31df59692fd6acc79430589a93ef4333f33f74440c311c340614ca74cc43191830567a98024d0981325ccd83a8fd9b75410d9dd91992

View file

@ -0,0 +1,34 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="xml(+)"
inherit python-single-r1
DESCRIPTION="Translation tool for XML documents that uses gettext files and ITS rules"
HOMEPAGE="http://itstool.org/"
SRC_URI="http://files.itstool.org/itstool/${P}.tar.bz2"
# files in /usr/share/itstool/its are under a special exception || GPL-3+
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-libs/libxml2[python,${PYTHON_USEDEP}]
')"
DEPEND="${RDEPEND}"
BDEPEND=""
DOCS=(ChangeLog NEWS) # AUTHORS, README are empty
src_test() {
:
#"${PYTHON}" tests/run_tests.py || die "test suite failed" # Test suite not shipped in tarball
}

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<longdescription lang="en">ITS Tool allows you to translate your XML documents
with gettext PO files, using rules from the W3C Internationalization Tag Set
(ITS) to determine what to translate and how to separate it into PO file
messages.
</longdescription>
<upstream>
<remote-id type="github">itstool/itstool</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST fontforge-20230101.tar.xz 13761728 BLAKE2B 69e79e7c5d8b551a847ba8706157b0f559ae2a85f61711f50e4855eb6a177bbfb25de2650caf9bc8a7dd1d6af074ca5063519b2f3c151d8c784c4750c6ddc1d8 SHA512 7684a2824d5199e230d2e0a654c2119cef422a57b64e6dd75afde6ba623abed6581f596fd5b7509e03f3b3ad3cf69629aafd4c85aeda64fa91a9e1ab88c9b418

View file

@ -0,0 +1,159 @@
https://bugs.gentoo.org/908868
https://savannah.gnu.org/bugs/index.php?64333
https://github.com/fontforge/fontforge/issues/5251
From f80f80871c6e3777f9974a44058f494eb5353c66 Mon Sep 17 00:00:00 2001
From: blockiv <blockiv@tuta.io>
Date: Thu, 22 Jun 2023 04:39:16 +0000
Subject: [PATCH] Mark breaking translations as fuzzy
--- a/po/fr.po
+++ b/po/fr.po
@@ -289,7 +289,7 @@ msgstr "chaîne %1$.30s pour %2$.30s"
#. GT: $2 is the glyph's encoding
#. GT: $3 is the font name
#. GT: $4 is the changed flag ('*' for the changed items)
-#, c-format
+#, c-format, fuzzy
msgid "%1$.80s at %2$d from %3$.90s%4$s"
msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
@@ -300,7 +300,7 @@ msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
#. GT: $2 is the glyph's encoding
#. GT: $3 is the pixel size of the bitmap font
#. GT: $4 is the font name
-#, c-format
+#, c-format, fuzzy
msgid "%1$.80s at %2$d size %3$d from %4$.80s"
msgstr "%1$.80s (%2$d) taille %3$d de %4$.80hs"
@@ -7427,7 +7427,7 @@ msgstr ""
"La fonte %1$.40s dans le fichier %2$.40s a été modifiée.\n"
"Voulez-vous l'enregistrer ?"
-#, c-format
+#, c-format, fuzzy
msgid ""
"Font %1$.40s in file %2$.40s has been changed.\n"
"Reverting the file will lose those changes.\n"
@@ -19920,7 +19920,7 @@ msgstr ""
"Le nom de la fonte commence avec une séquence d'ordre d'octet utf8. Ceci "
"n'est pas permis. %s"
-#, c-format
+#, c-format, fuzzy
msgid ""
"The fonts %1$.30s and %2$.30s have a different number of glyphs or different "
"encodings"
@@ -19928,7 +19928,7 @@ msgstr ""
"Les fontes %1$.30s et %2$.30hs n'ont pas le même nombre de glyphes ou des "
"codages différents"
-#, c-format
+#, c-format, fuzzy
msgid ""
"The fonts %1$.30s and %2$.30s use different types of splines (one quadratic, "
"one cubic)"
@@ -19963,7 +19963,7 @@ msgstr ""
"Le glyphe %1$.30s dans %2$.30s a à la fois des références et des contours. "
"Ceci n'est pas supporté dans une fonte MM"
-#, c-format
+#, c-format, fuzzy
msgid ""
"The glyph %1$.30s in font %2$.30s has a different hint mask on its contours "
"than in %3$.30s"
@@ -19979,7 +19979,7 @@ msgstr ""
"Le glyphe %1$.30s de la fonte %2$.30s a un nombre de points (ou de points de "
"contrôle) différent que dans %3$.30s"
-#, c-format
+#, c-format, fuzzy
msgid ""
"The glyph %1$.30s in font %2$.30s has a different number of references than "
"in %3$.30s"
@@ -20454,7 +20454,7 @@ msgstr ""
"individuellement. Cela peut être utile si vous vouliez\n"
"conserver les versions quadratiques et cubiques d'une fonte."
-#, c-format
+#, c-format, fuzzy
msgid "The outlines of glyph %2$.30s were not found in the font %1$.60s"
msgstr ""
"Le contours du glyphe %2$.30s n'ont pas été trouvés dans la police %1$.60hs"
@@ -21040,7 +21040,7 @@ msgstr ""
msgid "There is already a subtable with that name, please pick another."
msgstr "Il y a déjà une sous-table avec ce nom, changez de nom SVP"
-#, c-format
+#, c-format, fuzzy
msgid "There is already an anchor point named %1$.40s in %2$.40s."
msgstr "Il y a déjà une ancre appelée %1$.40s dans %2$.40hs."
@@ -21435,7 +21435,7 @@ msgstr ""
"Cette fonte ne précise pas de 'unitsPerEm', alors nous assumons que c'est "
"1000."
-#, c-format
+#, c-format, fuzzy
msgid ""
"This font is based on the charset %1$.20s-%2$.20s-%3$d, but the best I've "
"been able to find is %1$.20s-%2$.20s-%4$d.\n"
@@ -21764,7 +21764,7 @@ msgstr ""
"Et sur в, г, д, е, ж, л, м, ц, щ, ъ, ђ\n"
"Et sur toutes les lettres grecques minuscules. Et peut être tout le reste."
-#, c-format
+#, c-format, fuzzy
msgid ""
"This kerning pair (%.20s and %.20s) is currently part of a kerning class "
"with a 0 offset for this combination. Would you like to alter this kerning "
@@ -24544,7 +24544,7 @@ msgstr ""
"Vous voulez effacer %.30s qui est référencé par un\n"
"autre glyphe. Êtes-vous sûr(e) de vouloir poursuivre ?"
-#, c-format
+#, c-format, fuzzy
msgid ""
"You are attempting to paste a reference to %1$s into %2$s.\n"
"But %1$s does not exist in this font, nor can I find the original character "
@@ -24556,7 +24556,7 @@ msgstr ""
"glyphe auquel il se référait.\n"
"Le glyphe ne sera pas copié."
-#, c-format
+#, c-format, fuzzy
msgid ""
"You are attempting to paste a reference to %1$s into %2$s.\n"
"But %1$s does not exist in this font.\n"
--- a/po/it.po
+++ b/po/it.po
@@ -2297,7 +2297,7 @@ msgstr "Riferimento invertito"
msgid "Flipping"
msgstr "Ribaltamento"
-#, c-format
+#, c-format, fuzzy
msgid ""
"Font %1$.40s in file %2$.40s has been changed.\n"
"Reverting the file will lose those changes.\n"
@@ -5830,7 +5830,7 @@ msgstr ""
msgid "The font does not contain a glyph named %s."
msgstr "Questo font non contiene un glifo chiamato %s."
-#, c-format
+#, c-format, fuzzy
msgid ""
"The glyph %1$.30s has a different number of contours in font %2$.30s than in "
"%3$.30s"
@@ -6229,7 +6229,7 @@ msgstr ""
msgid "This font does not specify font-face\n"
msgstr "Questo font non specifica il font-face\n"
-#, c-format
+#, c-format, fuzzy
msgid ""
"This font is based on the charset %1$.20s-%2$.20s-%3$d, but the best I've "
"been able to find is %1$.20s-%2$.20s-%4$d.\n"
--
2.41.0

View file

@ -0,0 +1,25 @@
From e8164ed0fa747bfc8e7e80e6ff6b9a34b7c1a33f Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Mon, 27 Apr 2020 20:00:54 -0400
Subject: [PATCH] doc: do not treat warnings as errors
---
doc/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 6c4601a05..e5aeaed4f 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -21,7 +21,7 @@ file(STRINGS manifest.txt _manifest)
configure_file(manifest.txt manifest.txt COPYONLY)
add_custom_command(OUTPUT sphinx-docs
- COMMAND "${Sphinx_BUILD_BINARY}" -q -n -W -b html -d doctrees "${CMAKE_CURRENT_SOURCE_DIR}/sphinx" sphinx-docs
+ COMMAND "${Sphinx_BUILD_BINARY}" -q -n -b html -d doctrees "${CMAKE_CURRENT_SOURCE_DIR}/sphinx" sphinx-docs
DEPENDS ${_manifest}
)
--
2.26.2

View file

@ -0,0 +1,110 @@
# Copyright 2004-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
inherit python-single-r1 xdg cmake
DESCRIPTION="postscript font editor and converter"
HOMEPAGE="https://fontforge.org/"
SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/${P}.tar.xz"
LICENSE="BSD GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc truetype-debugger gif gtk jpeg png +python readline test tiff svg woff2 X"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
>=dev-libs/glib-2.67:2
dev-libs/libltdl:0
dev-libs/libxml2:2=
>=media-libs/freetype-2.3.7:2=
gif? ( media-libs/giflib:= )
jpeg? ( media-libs/libjpeg-turbo:= )
png? ( media-libs/libpng:= )
tiff? ( media-libs/tiff:= )
truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
gtk? ( >=x11-libs/gtk+-3.10:3 )
!gtk? (
X? (
>=x11-libs/cairo-1.6:0=
>=x11-libs/pango-1.10:0=[X]
x11-libs/libX11:=
x11-libs/libXi:=
)
)
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
woff2? ( media-libs/woff2:0= )
"
DEPEND="${RDEPEND}
!gtk? ( X? ( x11-base/xorg-proto ) )
"
BDEPEND="
sys-devel/gettext
doc? ( >=dev-python/sphinx-2 )
python? ( ${PYTHON_DEPS} )
test? ( ${RDEPEND} )
"
PATCHES=(
"${FILESDIR}"/fontforge-doc-no-warn-error.patch
"${FILESDIR}"/${PN}-20230101-workaround-broken-translations.patch
)
pkg_setup() {
use python && python-single-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DENABLE_DOCS=$(usex doc ON OFF)
-DENABLE_LIBGIF=$(usex gif ON OFF)
-DENABLE_LIBJPEG=$(usex jpeg ON OFF)
-DENABLE_LIBPNG=$(usex png ON OFF)
-DENABLE_LIBREADLINE=$(usex readline ON OFF)
-DENABLE_LIBSPIRO=OFF # No package in Gentoo
-DENABLE_LIBTIFF=$(usex tiff ON OFF)
-DENABLE_MAINTAINER_TOOLS=OFF
-DENABLE_PYTHON_EXTENSION=$(usex python ON OFF)
-DENABLE_PYTHON_SCRIPTING=$(usex python ON OFF)
-DENABLE_TILE_PATH=ON
-DENABLE_WOFF2=$(usex woff2 ON OFF)
)
if use gtk || use X; then
mycmakeargs+=(
-DENABLE_GUI=ON
# Prefer GTK over X11 if both USE flage are enabled
-DENABLE_X11=$(usex gtk OFF ON)
)
else
mycmakeargs+=( -DENABLE_GUI=OFF )
fi
if use python; then
python_setup
mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
fi
if use truetype-debugger ; then
local ft2="${ESYSROOT}/usr/include/freetype2"
local ft2i="${ft2}/internal4fontforge"
mycmakeargs+=(
-DENABLE_FREETYPE_DEBUGGER="${ft2}"
-DFreeTypeSource_INCLUDE_DIRS="${ft2};${ft2i}/include;${ft2i}/include/freetype;${ft2i}/src/truetype"
)
fi
cmake_src_configure
}
src_install() {
cmake_src_install
docompress -x /usr/share/doc/${PF}/html
einstalldocs
find "${ED}" -name '*.la' -type f -delete || die
}

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>fonts@gentoo.org</email>
<name>Fonts</name>
</maintainer>
<longdescription>
FontForge -- An outline font editor that lets you create your own
postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap
(bdf, FON, NFNT) fonts, or edit existing ones. Also lets you convert one
format to another. FontForge has support for many macintosh font formats.
</longdescription>
<use>
<flag name="truetype-debugger">Enable truetype debugger in fontforge</flag>
<flag name="woff2">Enable support for WOFF2 format</flag>
</use>
<upstream>
<remote-id type="github">fontforge/fontforge</remote-id>
<remote-id type="sourceforge">fontforge</remote-id>
</upstream>
</pkgmetadata>

1
media-libs/lv2/Manifest Normal file
View file

@ -0,0 +1 @@
DIST lv2-1.18.10.tar.xz 237380 BLAKE2B 72f9bc50ebac5d71279e0616bb1eb3c2a6748a28ff68988294135b18c7adc68c46a52b4698faf79f633768bf850d5052128a9f84b90aa9b5f9a56721acaf04c3 SHA512 ab4bcf593f633b1ed16c0eb6aa4525458a00655ef9c87619bf85eaa966f8fd094a8e871b825f679e0d97923f8bbbf11841ff467022390ca2f1a5b5f66ccd5d1b

View file

@ -0,0 +1,53 @@
https://gitlab.com/lv2/lv2/-/commit/8726bffa337e6374b04d0739df2812798b2c8858
From 8726bffa337e6374b04d0739df2812798b2c8858 Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Sat, 19 Nov 2022 17:49:14 -0500
Subject: [PATCH] Avoid test directory entirely if tests are disabled
--- a/meson.build
+++ b/meson.build
@@ -346,7 +346,9 @@ endif
subdir('util')
# Data and build tests
-subdir('test')
+if not get_option('tests').disabled()
+ subdir('test')
+endif
if not meson.is_subproject()
summary('Tests', not get_option('tests').disabled(), bool_yn: true)
--- a/test/meson.build
+++ b/test/meson.build
@@ -122,17 +122,15 @@ test_names = [
]
# Build and run tests
-if not get_option('tests').disabled()
- foreach test_name : test_names
- test(
+foreach test_name : test_names
+ test(
+ test_name,
+ executable(
test_name,
- executable(
- test_name,
- files('test_@0@.c'.format(test_name)),
- c_args: c_suppressions,
- dependencies: lv2_dep,
- ),
- suite: 'unit',
- )
- endforeach
-endif
+ files('test_@0@.c'.format(test_name)),
+ c_args: c_suppressions,
+ dependencies: lv2_dep,
+ ),
+ suite: 'unit',
+ )
+endforeach
--
GitLab

View file

@ -0,0 +1,12 @@
--- a/meson.build
+++ b/meson.build
@@ -144,6 +144,9 @@ if get_option('old_headers')
include_prefix / 'core' / 'lv2_util.h',
)
+ # Special case lv2.h is also in top-level include directory
+ install_headers(files(include_prefix / 'core' / 'lv2.h'))
+
# Core headers are inconsistently in "lv2plug.in/ns/lv2core"
install_data(core_headers, install_dir: uri_include_dir / 'lv2core')

View file

@ -0,0 +1,85 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE='threads(+)'
inherit meson-multilib python-single-r1
DESCRIPTION="A simple but extensible successor of LADSPA"
HOMEPAGE="https://lv2plug.in/"
SRC_URI="https://lv2plug.in/spec/${P}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
IUSE="doc plugins test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
BDEPEND="
plugins? ( virtual/pkgconfig )
doc? (
app-doc/doxygen
dev-python/rdflib
)
test? (
dev-libs/serd
dev-libs/sord[tools]
dev-python/rdflib
)
"
CDEPEND="
${PYTHON_DEPS}
plugins? (
media-libs/libsamplerate
media-libs/libsndfile
x11-libs/gtk+:2[${MULTILIB_USEDEP}]
)
"
DEPEND="
${CDEPEND}
doc? ( dev-python/markdown )
"
RDEPEND="
${CDEPEND}
$(python_gen_cond_dep '
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/rdflib[${PYTHON_USEDEP}]
')
"
PATCHES=(
"${FILESDIR}/${PN}-1.18.6-add-missing-lv2.h.patch"
"${FILESDIR}/${P}-tests-optional.patch"
)
src_prepare() {
default
# XXX: Drop this > 1.18.10, -Dstrict=false should prevent it now, bug #906047.
sed -i -e "/codespell = /s:get_option('tests'):false:" test/meson.build || die
# fix doc installation path
sed -iE "s%lv2_docdir = .*%lv2_docdir = '"${EPREFIX}"/usr/share/doc/${PF}'%g" meson.build || die
}
multilib_src_configure() {
local emesonargs=(
-Dlv2dir="${EPREFIX}"/usr/$(get_libdir)/lv2
-Dstrict=false
$(meson_native_use_feature doc docs)
$(meson_feature plugins)
$(meson_feature test tests)
)
meson_src_configure
}
multilib_src_install_all() {
local DOCS=( NEWS README.md )
einstalldocs
}

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>proaudio@gentoo.org</email>
<name>Gentoo ProAudio Project</name>
</maintainer>
<use>
<flag name="plugins">Enables examples plugins.</flag>
</use>
<upstream>
<remote-id type="gitlab">lv2/lv2</remote-id>
<remote-id type="github">lv2/lv2</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,3 @@
DIST nmap-7.94-patches.tar.xz 4112 BLAKE2B 0720242bf507f2a1502cf854592d94a57a33d5ac1e520c752e548092f91bbffeb0f6f762f4da27ff445419ff3845060242aa43aba53d0161ae2bebccf728cc97 SHA512 d47e2215e1923af65e3a392c3d990d650e68135f139013c311a26d12cfd0b27d9d5c3cbc27bb8583251a353a6284fb9d518373f17624db242be7060b8bfa0ba5
DIST nmap-7.94.tar.bz2 11102195 BLAKE2B 5819b458b50e33f6a507ad3c32a731c13e730c40d31a61731c3cfcd41fad8e3fdfcbb721ef46b05a80e406d0a646d0966d4b645551711144822551ef374a443a SHA512 a55cddf9c1d9272243d01251eb3315b26f232d0596818857083222a385398618b428dc2bd8282c3e832527e135a74aeb020ca8609d83d8337342f5d8a04d7f2c
DIST nmap-7.94.tar.bz2.asc 198 BLAKE2B 38a363499fe236f675238ecf015a7e597d66cdd84eef13bed4986b4081c4f1f7a288121e3666e0f31a9282fd84f30cbceb65341f1c173086c7421a8ea719afe9 SHA512 dcbaf88e9ead21f303a7ee5390de0d2bd67477c2628858dc3380b0ac7d73d4d1b330f3b303ff32b0cb9a22eaa37af535bd7aa622531451e404a8c9a256a98eec

View file

@ -0,0 +1,32 @@
# nls.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
AC_PREREQ([2.50])
AC_DEFUN([AM_NLS],
[
AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE([nls],
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT([$USE_NLS])
AC_SUBST([USE_NLS])
])

View file

@ -0,0 +1,11 @@
--- nmap-5.10BETA1/Target.h.org 2009-12-08 08:21:59.000000000 +0100
+++ nmap-5.10BETA1/Target.h 2009-12-08 08:22:02.000000000 +0100
@@ -99,6 +99,8 @@
#ifndef NOLUA
#include "nse_main.h"
+#else
+#include <string>
#endif
#include "portreasons.h"

View file

@ -0,0 +1,21 @@
diff -Naurp nmap-5.21-orig/Makefile.in nmap-5.21/Makefile.in
--- nmap-5.21-orig/Makefile.in 2010-01-31 09:53:53.000000000 +0100
+++ nmap-5.21/Makefile.in 2010-01-31 09:54:48.000000000 +0100
@@ -253,7 +253,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZE
install-zenmap: $(ZENMAPDIR)/setup.py
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)")
+ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
$(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/
# Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is
# already a link.
@@ -267,7 +267,7 @@ build-ndiff:
cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)")
install-ndiff:
- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)")
+ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
NSE_FILES = scripts/script.db scripts/*.nse
NSE_LIB_LUA_FILES = nselib/*.lua

View file

@ -0,0 +1,20 @@
--- a/liblua/Makefile
+++ b/liblua/Makefile
@@ -11,7 +11,7 @@
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
-AR= ar rcu
+AR= ar
RANLIB= ranlib
RM= rm -f
@@ -56,7 +56,7 @@
a: $(ALL_A)
$(LUA_A): $(BASE_O)
- $(AR) $@ $(BASE_O)
+ $(AR) rcu $@ $(BASE_O)
$(RANLIB) $@
$(LUA_T): $(LUA_O) $(LUA_A)

View file

@ -0,0 +1,19 @@
--- a/zenmap/setup.py
+++ b/zenmap/setup.py
@@ -245,7 +245,6 @@
self.set_perms()
self.set_modules_path()
self.fix_paths()
- self.create_uninstaller()
self.write_installed_files()
def get_installed_files(self):
@@ -263,8 +262,6 @@
os.path.join(self.install_data, data_dir)):
for dir in dirs:
installed_files.append(os.path.join(dirpath, dir))
- installed_files.append(
- os.path.join(self.install_scripts, "uninstall_" + APP_NAME))
return installed_files
def create_uninstaller(self):

View file

@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -477,7 +477,7 @@
./docs/style/lua-format -i scripts/*.nse
makefile.dep:
- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@
+ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@
-include makefile.dep
# These the old names of scripts that have been renamed or deleted. Any

View file

@ -0,0 +1,10 @@
--- a/configure.ac
+++ b/configure.ac
@@ -522,7 +522,6 @@
# If we still don't have it, we use our own
if test $have_pcre != yes ; then
- AC_CONFIG_SUBDIRS( libpcre )
CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS"
LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a"
PCRE_BUILD="build-pcre"

View file

@ -0,0 +1,15 @@
nping does not call anything nl_* related so it should not link against libnl (bug #529244)
Patching configure.ac would be best but eautoreconf does not handle the subdirs very well.
--- a/nping/configure.ac
+++ b/nping/configure.ac
@@ -114,9 +114,6 @@
# OpenSSL and NSE C modules can require dlopen
AC_SEARCH_LIBS(dlopen, dl)
-# libpcap can require libnl
-AC_SEARCH_LIBS(nl_handle_alloc, nl)
-
# We test whether they specified openssl desires explicitly
use_openssl="yes"
specialssldir=""

View file

@ -0,0 +1,26 @@
--- a/configure.ac
+++ b/configure.ac
@@ -468,7 +468,6 @@
fi
if test $have_libpcap != yes; then
- AC_CONFIG_SUBDIRS(libpcap)
if test "${LIBPCAP_INC+set}" = "set"; then
CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC"
else
@@ -611,7 +610,6 @@
fi
if test $have_libz != yes; then
- AC_CONFIG_SUBDIRS(libz)
# TODO: This doesn't work because libssh2's configure script is looking for
# already-built libs. Giving up for now: build libz first or install
# headers/libs on your own if you want compression support for SSH.
@@ -697,7 +695,6 @@
# If we still don't have it, we use our own
if test $have_libssh2 != yes; then
have_libssh2=yes
- AC_CONFIG_SUBDIRS(libssh2)
CPPFLAGS="-I\$(top_srcdir)/$LIBSSH2DIR/include $CPPFLAGS"
LIBSSH2_LIBS="$LIBSSH2DIR/lib/libssh2.a"
LIBSSH2_BUILD="build-libssh2"

View file

@ -0,0 +1,66 @@
--- a/nbase/Makefile.in
+++ b/nbase/Makefile.in
@@ -12,7 +12,7 @@
CCOPT =
DEFS = @DEFS@
# With GCC, add extra security checks to source code.
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
STATIC =
--- a/ncat/Makefile.in
+++ b/ncat/Makefile.in
@@ -53,7 +53,7 @@
LIBS = @LIBS@
DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\""
# With GCC, add extra security checks to source code.
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR)
RM = rm -f
STRIP = @STRIP@
--- a/nsock/src/Makefile.in
+++ b/nsock/src/Makefile.in
@@ -13,7 +13,7 @@
CCOPT =
DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
# With GCC, add extra security checks to source code.
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
INCLS = -I../include
CFLAGS = @CFLAGS@ $(CCOPT)
# CFLAGS = -g -Wall $(DEFS) $(INCLS)
--- a/libnetutil/Makefile.in
+++ b/libnetutil/Makefile.in
@@ -5,7 +5,7 @@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@ $(DEFS)
DEFS = @DEFS@
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
AR = ar
RANLIB = @RANLIB@
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,7 +41,7 @@
# http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
# Level 1 only makes changes that don't affect "conforming" programs,
# while level 2 enforces additional restrictions.
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
# For mtrace debugging -- see MTRACE define in main.cc for instructions
# Should only be enabled during debugging and not in any real release.
# DEFS += -DMTRACE=1
--- a/nping/Makefile.in
+++ b/nping/Makefile.in
@@ -38,7 +38,7 @@
# http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
# Level 1 only makes changes that don't affect "conforming" programs,
# while level 2 enforces additional restrictions.
-DEFS += -D_FORTIFY_SOURCE=2
+DEFS +=
# For mtrace debugging -- see MTRACE define in main.cc for instructions
# Should only be enabled during debugging and not in any real release.
# DEFS += -DMTRACE=1

View file

@ -0,0 +1,287 @@
https://github.com/nmap/nmap/commit/d6bea8dcdee36a3902cece14097993350306f1b6
https://github.com/nmap/nmap/issues/2516
https://bugs.gentoo.org/868483
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
Date: Tue, 6 Sep 2022 22:39:34 +0000
Subject: [PATCH] Build based on OpenSSL version, not API level. Fixes #2516
--- a/ncat/http_digest.c
+++ b/ncat/http_digest.c
@@ -133,7 +133,7 @@ int http_digest_init_secret(void)
return 0;
}
-#if OPENSSL_API_LEVEL < 10100
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define EVP_MD_CTX_new EVP_MD_CTX_create
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
#endif
--- a/ncat/ncat_connect.c
+++ b/ncat/ncat_connect.c
@@ -82,8 +82,8 @@
#include <openssl/err.h>
/* Deprecated in OpenSSL 3.0 */
-#if OPENSSL_API_LEVEL >= 30000
-#define SSL_get_peer_certificate SSL_get1_peer_certificate
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+# define SSL_get_peer_certificate SSL_get1_peer_certificate
#endif
#endif
--- a/ncat/ncat_ssl.c
+++ b/ncat/ncat_ssl.c
@@ -80,7 +80,7 @@
#define FUNC_ASN1_STRING_data ASN1_STRING_data
#endif
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
@@ -117,7 +117,7 @@ SSL_CTX *setup_ssl_listen(void)
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
SSL_load_error_strings();
-#elif OPENSSL_API_LEVEL >= 30000
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
{
loguser("OpenSSL legacy provider failed to load.\n");
@@ -477,7 +477,7 @@ static int ssl_gen_cert(X509 **cert, EVP_PKEY **key)
const char *commonName = "localhost";
char dNSName[128];
int rc;
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
int ret = 0;
RSA *rsa = NULL;
BIGNUM *bne = NULL;
--- a/ncat/ncat_ssl.h
+++ b/ncat/ncat_ssl.h
@@ -67,18 +67,6 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
#define NCAT_CA_CERTS_FILE "ca-bundle.crt"
enum {
--- a/ncat/test/test-wildcard.c
+++ b/ncat/test/test-wildcard.c
@@ -20,7 +20,7 @@ are rejected. The SSL transactions happen over OpenSSL BIO pairs.
#include "ncat_core.h"
#include "ncat_ssl.h"
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
#include <openssl/bn.h>
#endif
@@ -294,7 +294,7 @@ static int set_dNSNames(X509 *cert, const struct lstr dNSNames[])
static int gen_cert(X509 **cert, EVP_PKEY **key,
const struct lstr commonNames[], const struct lstr dNSNames[])
{
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
int rc, ret=0;
RSA *rsa = NULL;
BIGNUM *bne = NULL;
--- a/nse_openssl.cc
+++ b/nse_openssl.cc
@@ -20,6 +20,9 @@
#define FUNC_EVP_CIPHER_CTX_init EVP_CIPHER_CTX_reset
#define FUNC_EVP_CIPHER_CTX_cleanup EVP_CIPHER_CTX_reset
#define PASS_EVP_CTX(ctx) (ctx)
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+# include <openssl/provider.h>
+#endif
#else
#define FUNC_EVP_MD_CTX_init EVP_MD_CTX_init
#define FUNC_EVP_MD_CTX_cleanup EVP_MD_CTX_cleanup
@@ -37,23 +40,6 @@ extern NmapOps o;
#include "nse_openssl.h"
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-
-#if OPENSSL_API_LEVEL >= 30000
-#include <openssl/provider.h>
-#endif
-
#define NSE_SSL_LUA_ERR(_L) \
luaL_error(_L, "OpenSSL error: %s", ERR_error_string(ERR_get_error(), NULL))
@@ -184,7 +170,7 @@ static int l_bignum_is_prime( lua_State *L ) /** bignum_is_prime( BIGNUM p ) */
bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
BN_CTX * ctx = BN_CTX_new();
int is_prime =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( p->bn, ctx, NULL );
@@ -199,7 +185,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
bignum_data_t * p = (bignum_data_t *) luaL_checkudata( L, 1, "BIGNUM" );
BN_CTX * ctx = BN_CTX_new();
int is_prime =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( p->bn, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( p->bn, ctx, NULL );
@@ -210,7 +196,7 @@ static int l_bignum_is_safe_prime( lua_State *L ) /** bignum_is_safe_prime( BIGN
BN_sub_word( n, (BN_ULONG)1 );
BN_div_word( n, (BN_ULONG)2 );
is_safe =
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
BN_is_prime_ex( n, BN_prime_checks, ctx, NULL );
#else
BN_check_prime( n, ctx, NULL );
@@ -582,7 +568,7 @@ LUALIB_API int luaopen_openssl(lua_State *L) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
-#elif OPENSSL_API_LEVEL >= 30000
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy") && o.debugging > 1)
{
// Legacy provider may not be available.
--- a/nse_ssl_cert.cc
+++ b/nse_ssl_cert.cc
@@ -89,19 +89,7 @@
#define X509_get0_notAfter X509_get_notAfter
#endif
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/core_names.h>
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
@@ -459,7 +447,7 @@ static const char *pkey_type_to_string(int type)
}
int lua_push_ecdhparams(lua_State *L, EVP_PKEY *pubkey) {
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
char tmp[64] = {0};
size_t len = 0;
/* This structure (ecdhparams.curve_params) comes from tls.lua */
@@ -634,7 +622,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
else
#endif
if (pkey_type == EVP_PKEY_RSA) {
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
RSA *rsa = EVP_PKEY_get1_RSA(pubkey);
if (rsa) {
#endif
@@ -643,7 +631,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
luaL_getmetatable( L, "BIGNUM" );
lua_setmetatable( L, -2 );
#if HAVE_OPAQUE_STRUCTS
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
const BIGNUM *n = NULL, *e = NULL;
data->should_free = false;
RSA_get0_key(rsa, &n, &e, NULL);
@@ -663,7 +651,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
luaL_getmetatable( L, "BIGNUM" );
lua_setmetatable( L, -2 );
#if HAVE_OPAQUE_STRUCTS
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
data->should_free = false;
#else
data->should_free = true;
@@ -673,7 +661,7 @@ static int parse_ssl_cert(lua_State *L, X509 *cert)
data->bn = rsa->n;
#endif
lua_setfield(L, -2, "modulus");
-#if OPENSSL_API_LEVEL < 30000
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
RSA_free(rsa);
}
#endif
--- a/nsock/src/nsock_ssl.c
+++ b/nsock/src/nsock_ssl.c
@@ -64,7 +64,7 @@
#include "netutils.h"
#if HAVE_OPENSSL
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
#endif
@@ -120,7 +120,7 @@ static SSL_CTX *ssl_init_helper(const SSL_METHOD *method) {
SSL_library_init();
#else
OPENSSL_atexit(nsock_ssl_atexit);
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (NULL == OSSL_PROVIDER_load(NULL, "legacy"))
{
nsock_log_error("OpenSSL legacy provider failed to load.\n");
--- a/nsock/src/nsock_ssl.h
+++ b/nsock/src/nsock_ssl.h
@@ -69,20 +69,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
-/* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
-#ifndef OPENSSL_API_LEVEL
-# if OPENSSL_API_COMPAT < 0x900000L
-# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
-# else
-# define OPENSSL_API_LEVEL \
- (((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
- + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
- + ((OPENSSL_API_COMPAT >> 12) & 0xFF))
-# endif
-#endif
-
-
-#if OPENSSL_API_LEVEL >= 30000
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
/* Deprecated in OpenSSL 3.0 */
#define SSL_get_peer_certificate SSL_get1_peer_certificate
#endif

View file

@ -0,0 +1,11 @@
--- a/libnetutil/netutil.cc
+++ b/libnetutil/netutil.cc
@@ -2571,7 +2571,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
/* CASE 4: where we (finally!) have a full 20 byte TCP header so we can
* safely print all fields */
- else { /* if (datalen >= 20) */
+ else if (datalen >= 20) {
/* TCP Flags */
p = tflags;

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>sam@gentoo.org</email>
<name>Sam James</name>
</maintainer>
<maintainer type="person">
<email>dilfridge@gentoo.org</email>
<name>Andreas K. Hüttel</name>
</maintainer>
<use>
<flag name="libssh2">Enable SSH support through <pkg>net-libs/libssh2</pkg></flag>
<flag name="ncat">Install the ncat utility</flag>
<flag name="ndiff">Install the ndiff utility</flag>
<flag name="nping">Install the nping utility</flag>
<flag name="nse">Include support for the Nmap Scripting Engine (NSE)</flag>
<flag name="symlink">Install symlink to nc</flag>
<flag name="zenmap">Install the GTK+ based nmap GUI, zenmap</flag>
</use>
<upstream>
<remote-id type="github">nmap/nmap</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,187 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-4 )
LUA_REQ_USE="deprecated"
PYTHON_COMPAT=( python3_{10..12} )
PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
PLOCALE_BACKUP="en"
inherit autotools lua-single plocale python-single-r1 toolchain-funcs
DESCRIPTION="Network exploration tool and security / port scanner"
HOMEPAGE="https://nmap.org/"
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/nmap/nmap"
else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/nmap.asc
inherit verify-sig
SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
fi
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.94-patches.tar.xz"
# https://github.com/nmap/nmap/issues/2199
LICENSE="NPSL-0.95"
SLOT="0"
IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
nse? ( ${LUA_REQUIRED_USE} )
symlink? ( ncat )
"
RDEPEND="
dev-libs/liblinear:=
dev-libs/libpcre
net-libs/libpcap
ndiff? ( ${PYTHON_DEPS} )
libssh2? (
net-libs/libssh2[zlib]
sys-libs/zlib
)
nls? ( virtual/libintl )
nse? (
${LUA_DEPS}
sys-libs/zlib
)
ssl? ( dev-libs/openssl:= )
symlink? (
ncat? (
!net-analyzer/netcat
!net-analyzer/openbsd-netcat
)
)
zenmap? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
)
"
DEPEND="${RDEPEND}"
# Python is always needed at build time for some scripts
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
nls? ( sys-devel/gettext )
"
if [[ ${PV} != *9999* ]] ; then
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
fi
PATCHES=(
"${WORKDIR}"/${PN}-7.94-patches
)
pkg_setup() {
python-single-r1_pkg_setup
use nse && lua-single_pkg_setup
}
src_unpack() {
if [[ ${PV} == *9999 ]] ; then
git-r3_src_unpack
elif use verify-sig ; then
# Needed for downloaded patch (which is unsigned, which is fine)
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
fi
default
}
src_prepare() {
default
# Drop bundled libraries
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
delete_disabled_locale() {
# Force here as PLOCALES contains supported locales for man
# pages and zenmap doesn't have all of those
rm -rf zenmap/share/zenmap/locale/${1} || die
rm -f zenmap/share/zenmap/locale/${1}.po || die
}
plocale_for_each_disabled_locale delete_disabled_locale
sed -i \
-e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
Makefile.in || die
cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
eautoreconf
if [[ ${CHOST} == *-darwin* ]] ; then
# We need the original for a Darwin-specific fix, bug #604432
mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
fi
}
src_configure() {
export ac_cv_path_PYTHON="${PYTHON}"
export am_cv_pathless_PYTHON="${EPYTHON}"
local myeconfargs=(
$(use_enable ipv6)
$(use_enable nls)
$(use_with libssh2)
$(use_with ncat)
$(use_with ndiff)
$(use_with nping)
$(use_with nse liblua)
$(use_with ssl openssl)
$(use_with zenmap)
$(usex libssh2 --with-zlib)
$(usex nse --with-zlib)
--cache-file="${S}"/config.cache
# The bundled libdnet is incompatible with the version available in the
# tree, so we cannot use the system library here.
--with-libdnet=included
--with-pcre="${ESYSROOT}"/usr
--without-dpdk
)
econf "${myeconfargs[@]}"
}
src_compile() {
local directory
for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
emake -C "${directory}" makefile.dep
done
emake \
AR="$(tc-getAR)" \
RANLIB="$(tc-getRANLIB)"
}
src_install() {
# See bug #831713 for return of -j1
LC_ALL=C emake \
-j1 \
DESTDIR="${D}" \
STRIP=: \
nmapdatadir="${EPREFIX}"/usr/share/nmap \
install
dodoc CHANGELOG HACKING docs/README docs/*.txt
if use ndiff || use zenmap ; then
python_optimize
fi
use symlink && dosym /usr/bin/ncat /usr/bin/nc
}

1
net-dns/avahi/Manifest Normal file
View file

@ -0,0 +1 @@
DIST avahi-0.8.tar.gz 953319 BLAKE2B ddede1b8790ff3057ea5f4bb710e95578229e078a7abac83121e043017dda1ab3d971c723f920fdd4f3d98b88bd2cf21f9645bec1b7bbd2ea194cb399a5f5b46 SHA512 27bba9a551152dfc7e721f326042e7bfce55d227044a6cbaee04d6fb0e3f59c36e159c2b7a4dd42d1c955cdf37cc1c303e91991c08928bbded91d796e9a22abe

View file

@ -0,0 +1,218 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="gdbm"
inherit autotools flag-o-matic multilib-minimal mono-env python-single-r1 systemd
DESCRIPTION="System which facilitates service discovery on a local network"
HOMEPAGE="https://avahi.org/"
SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="autoipd bookmarks +dbus doc gdbm gtk howl-compat +introspection ipv6 mdnsresponder-compat mono nls python qt5 selinux systemd test"
REQUIRED_USE="
python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
bookmarks? ( python )
mono? ( dbus )
howl-compat? ( dbus )
mdnsresponder-compat? ( dbus )
systemd? ( dbus )
"
RESTRICT="!test? ( test )"
DEPEND="
dev-libs/libdaemon
dev-libs/libevent:=[${MULTILIB_USEDEP}]
dev-libs/expat
dev-libs/glib:2[${MULTILIB_USEDEP}]
gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
qt5? ( dev-qt/qtcore:5 )
gtk? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
kernel_linux? ( sys-libs/libcap )
introspection? ( dev-libs/gobject-introspection:= )
mono? ( dev-lang/mono )
python? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
bookmarks? ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] )
dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
')
)
"
RDEPEND="
acct-user/avahi
acct-group/avahi
acct-group/netdev
autoipd? (
acct-user/avahi-autoipd
acct-group/avahi-autoipd
)
${DEPEND}
selinux? ( sec-policy/selinux-avahi )
"
BDEPEND="
dev-util/glib-utils
doc? ( app-doc/doxygen )
app-doc/xmltoman
sys-devel/gettext
virtual/pkgconfig
"
MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
PATCHES=(
"${FILESDIR}/${P}-disable-avahi-ui-sharp.patch" # bug 769062
"${FILESDIR}/${P}-dependency-error.patch"
"${FILESDIR}/${P}-null-pointer-crash.patch"
"${FILESDIR}/${P}-potentially-undefined-fix.patch"
"${FILESDIR}/${P}-strict-prototypes.patch"
# These patches do not apply cleanly but may need to be re-instated.
# I'll leave them commented out for now.
# "${FILESDIR}/${PN}-0.7-qt5.patch"
# "${FILESDIR}/${PN}-0.7-CVE-2017-6519.patch"
# "${FILESDIR}/${PN}-0.7-remove-empty-avahi_discover.patch"
# "${FILESDIR}/${PN}-0.7-python3.patch"
# "${FILESDIR}/${PN}-0.7-python3-unittest.patch"
# "${FILESDIR}/${PN}-0.7-python3-gdbm.patch"
)
pkg_setup() {
use mono && mono-env_pkg_setup
use python && python-single-r1_pkg_setup
}
src_prepare() {
default
if ! use ipv6; then
sed -i \
-e "s/use-ipv6=yes/use-ipv6=no/" \
avahi-daemon/avahi-daemon.conf || die
fi
sed -i \
-e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
doxygen_to_devhelp.xsl || die
eautoreconf
# bundled manpages
multilib_copy_sources
}
multilib_src_configure() {
local myconf=(
--disable-gtk
--disable-monodoc
--disable-python-dbus
--disable-qt3
--disable-qt4
--disable-static
--enable-manpages
--enable-glib
--enable-gobject
--enable-xmltoman
--localstatedir="${EPREFIX}/var"
--with-distro=gentoo
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
$(use_enable dbus)
$(use_enable gdbm)
$(use_enable gtk gtk3)
$(use_enable howl-compat compat-howl)
$(use_enable mdnsresponder-compat compat-libdns_sd)
$(use_enable nls)
$(multilib_native_use_enable autoipd)
$(multilib_native_use_enable doc doxygen-doc)
$(multilib_native_use_enable introspection)
$(multilib_native_use_enable mono)
$(multilib_native_use_enable python)
$(multilib_native_use_enable test tests)
)
if use python; then
myconf+=(
$(multilib_native_use_enable dbus python-dbus)
$(multilib_native_use_enable introspection pygobject)
)
fi
if use mono; then
myconf+=( $(multilib_native_use_enable doc monodoc) )
fi
if ! multilib_is_native_abi; then
myconf+=(
# used by daemons only
--disable-libdaemon
--with-xml=none
)
fi
myconf+=( $(multilib_native_use_enable qt5) )
econf "${myconf[@]}"
}
multilib_src_compile() {
emake
multilib_is_native_abi && use doc && emake avahi.devhelp
}
multilib_src_install() {
emake install DESTDIR="${D}"
if ! use bookmarks || ! use python || ! use dbus; then
rm -f "${ED}"/usr/bin/avahi-bookmarks || die
fi
# https://github.com/lathiat/avahi/issues/28
use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
if multilib_is_native_abi && use doc; then
docinto html
dodoc -r doxygen/html/.
insinto /usr/share/devhelp/books/avahi
doins avahi.devhelp
fi
# The build system creates an empty "/run" directory, so we clean it up here
rmdir "${ED}"/run || die
}
multilib_src_install_all() {
use python && python_optimize
if use autoipd; then
insinto /lib/rcscripts/net
doins "${FILESDIR}"/autoipd.sh
insinto /lib/netifrc/net
newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
fi
dodoc docs/{AUTHORS,NEWS,README,TODO}
find "${ED}" -name '*.la' -type f -delete || die
}
pkg_postinst() {
if use autoipd; then
elog
elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
elog
fi
systemd_reenable avahi-daemon.service
}

View file

@ -0,0 +1,32 @@
# Copyright (C) 2004-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Contributed by Sven Wegener (swegener@gentoo.org)
_config_vars="$_config_vars autoipd"
autoipd_depend() {
program /usr/sbin/avahi-autoipd
after interface
}
autoipd_start() {
_exists true || return 1
eval args=\$autoipd_${IFVAR}
ebegin "Starting avahi-autoipd"
/usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
eend "${?}" || return 1
_show_address
return 0
}
autoipd_stop() {
/usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
ebegin "Stopping avahi-autoipd"
/usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
eend "${?}"
}

View file

@ -0,0 +1,52 @@
# Copyright (c) 2004-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Contributed by Sven Wegener (swegener@gentoo.org)
# void autoipd_depend(void)
#
# Sets up the dependencies for the module
autoipd_depend() {
after interface
}
# void autoipd_expose(void)
#
# Expose variables that can be configured
autoipd_expose() {
variables autoipd
}
# bool autoipd_start(char *iface)
#
# Tries to configure the interface via avahi-autoipd
autoipd_start() {
local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr=""
interface_exists "${iface}" true || return 1
ebegin "Starting avahi-autoipd"
if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}"
then
eend 0
addr="$(interface_get_address "${iface}")"
einfo "${iface} received address ${addr}"
return 0
fi
eend "${?}" "Failed to get address via avahi-autoipd!"
}
# bool autoipd_stop(char *iface)
#
# Stops a running avahi-autoipd instance
autoipd_stop() {
local iface="${1}"
/usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0
ebegin "Stopping avahi-autoipd"
/usr/sbin/avahi-autoipd --kill --syslog "${iface}"
eend "${?}" "Failed to stop running avahi-autoipd instance!"
}
# vim: set ts=4 :

View file

@ -0,0 +1,15 @@
https://github.com/lathiat/avahi/commit/366e3798bdbd6b7bf24e59379f4a9a51af575ce9.patch
From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= <tpgxyz@gmail.com>
Date: Thu, 20 Feb 2020 16:09:40 +0100
Subject: [PATCH] fix requires in pc file
--- a/avahi-libevent.pc.in
+++ b/avahi-libevent.pc.in
@@ -6,6 +6,6 @@ includedir=${prefix}/include
Name: avahi-libevent
Description: Avahi Multicast DNS Responder (libevent Support)
Version: @PACKAGE_VERSION@
-Requires: libevent-2.1.5
+Requires: libevent >= 2.1.5
Libs: -L${libdir} -lavahi-libevent
Cflags: -D_REENTRANT -I${includedir}

View file

@ -0,0 +1,45 @@
From ebd2a01a7b5e88f3be35b2f803d5adbd36ae6593 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Sat, 27 Mar 2021 22:49:08 +0100
Subject: [PATCH] Disable avahi-ui-sharp
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,7 +46,6 @@ EXTRA_DIST = \
avahi-qt4.pc.in \
avahi-qt5.pc.in \
avahi-sharp.pc.in \
- avahi-ui-sharp.pc.in \
avahi-compat-libdns_sd.pc.in \
avahi-compat-howl.pc.in \
avahi-ui.pc.in \
@@ -77,7 +76,6 @@ SUBDIRS = \
avahi-compat-howl \
avahi-autoipd \
avahi-ui \
- avahi-ui-sharp \
avahi-libevent \
po
@@ -188,8 +186,8 @@ CLEANFILES += avahi-compat-libdns_sd.pc
endif
if HAVE_MONO
-pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
-CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
+pkgconfig_DATA += avahi-sharp.pc
+CLEANFILES += avahi-sharp.pc
endif
endif
--- a/configure.ac
+++ b/configure.ac
@@ -1166,7 +1166,6 @@ man/Makefile
tests/Makefile
service-type-database/Makefile
avahi-sharp/Makefile
-avahi-ui-sharp/Makefile
avahi-compat-libdns_sd/Makefile
avahi-compat-howl/Makefile
avahi-compat-howl/samples/Makefile

View file

@ -0,0 +1,129 @@
https://github.com/lathiat/avahi/commit/fd482a74625b8db8547b8cfca3ee3d3c6c721423.patch
From: Tommi Rantala <tommi.t.rantala@nokia.com>
Date: Mon, 8 Feb 2021 11:04:43 +0200
Subject: [PATCH] Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
--- a/avahi-core/browse-dns-server.c
+++ b/avahi-core/browse-dns-server.c
@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
AvahiSDNSServerBrowser* b;
b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_dns_server_browser_start(b);
return b;
-}
\ No newline at end of file
+}
--- a/avahi-core/browse-domain.c
+++ b/avahi-core/browse-domain.c
@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new(
AvahiSDomainBrowser *b;
b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_domain_browser_start(b);
return b;
-}
\ No newline at end of file
+}
--- a/avahi-core/browse-service-type.c
+++ b/avahi-core/browse-service-type.c
@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
AvahiSServiceTypeBrowser *b;
b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_service_type_browser_start(b);
return b;
--- a/avahi-core/browse-service.c
+++ b/avahi-core/browse-service.c
@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new(
AvahiSServiceBrowser *b;
b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_service_browser_start(b);
return b;
--- a/avahi-core/browse.c
+++ b/avahi-core/browse.c
@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new(
AvahiSRecordBrowser *b;
b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_record_browser_start_query(b);
return b;
--- a/avahi-core/resolve-address.c
+++ b/avahi-core/resolve-address.c
@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new(
AvahiSAddressResolver *b;
b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_address_resolver_start(b);
return b;
-}
\ No newline at end of file
+}
--- a/avahi-core/resolve-host-name.c
+++ b/avahi-core/resolve-host-name.c
@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
AvahiSHostNameResolver *b;
b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_host_name_resolver_start(b);
return b;
-}
\ No newline at end of file
+}
--- a/avahi-core/resolve-service.c
+++ b/avahi-core/resolve-service.c
@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new(
AvahiSServiceResolver *b;
b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata);
+ if (!b)
+ return NULL;
+
avahi_s_service_resolver_start(b);
return b;
-}
\ No newline at end of file
+}

View file

@ -0,0 +1,25 @@
https://github.com/lathiat/avahi/commit/b897ca43ac100d326d118e5877da710eb7f836f9.patch
From: traffic-millions <60914101+traffic-millions@users.noreply.github.com>
Date: Tue, 3 Mar 2020 11:15:48 +0800
Subject: [PATCH] avahi_dns_packet_consume_uint32: fix potential undefined
behavior
avahi_dns_packet_consume_uint32 left shifts uint8_t values by 8, 16 and 24 bits to combine them into a 32-bit value. This produces an undefined behavior warning with gcc -fsanitize when fed input values of 128 or 255 however in testing no actual unexpected behavior occurs in practice and the 32-bit uint32_t is always correctly produced as the final value is immediately stored into a uint32_t and the compiler appears to handle this "correctly".
Cast the intermediate values to uint32_t to prevent this warning and ensure the intended result is explicit.
Closes: #267
Closes: #268
Reference: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19304
--- a/avahi-core/dns.c
+++ b/avahi-core/dns.c
@@ -455,7 +455,7 @@ int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) {
return -1;
d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
- *ret_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
+ *ret_v = ((uint32_t)d[0] << 24) | ((uint32_t)d[1] << 16) | ((uint32_t)d[2] << 8) | (uint32_t)d[3];
p->rindex += sizeof(uint32_t);
return 0;

View file

@ -0,0 +1,38 @@
https://github.com/lathiat/avahi/pull/405
From 54409e5af9c382117b67674756971f4f1bf646f8 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 5 Nov 2022 23:49:47 +0000
Subject: [PATCH] configure.ac: fix -Wstrict-prototypes
Fixes errors like:
```
-ignoreme: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
+ignoreme: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void test_broken_ssp(c)
^
```
Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -99,8 +99,7 @@ if test x"$enable_ssp" = x"yes"; then
LDFLAGS="$LDFLAGS -Wl,-z,defs"
cat confdefs.h > conftest.c
cat >>conftest.c <<_ACEOF
-void test_broken_ssp(c)
- const char *c;
+void test_broken_ssp(const char *c)
{
char arr[[123]], *p; /* beware of possible double-braces if copying this */
for (p = arr; *c; ++p) {
@@ -300,7 +299,7 @@ AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
test_gcc_flag() {
- AC_LANG_CONFTEST([int main() {}])
+ AC_LANG_CONFTEST([int main(void) {}])
$CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
ret=$?
rm -f conftest.o

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="autoipd">Build and install the IPv4LL (RFC3927) network address configuration daemon</flag>
<flag name="bookmarks">Install the avahi-bookmarks application (requires <pkg>dev-python/twisted</pkg>)</flag>
<flag name="gtk">Use gtk3 for the avahi utilities to build the avahi-ui-gtk3 library</flag>
<flag name="howl-compat">Enable compat libraries for howl</flag>
<flag name="mdnsresponder-compat">Enable compat libraries for mDNSResponder</flag>
</use>
<upstream>
<remote-id type="github">lathiat/avahi</remote-id>
<remote-id type="cpe">cpe:/a:avahi:avahi</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST cifs-utils-7.0.tar.bz2 418638 BLAKE2B 514d35f243d0ef7b866068a9a53a4b1704d2856d491d56aa469e8e3919b4030cb920a7f60d08851b0a23d28a020d1ddf7daa8b9ac412f1567a0a60d2f6ee6774 SHA512 4c57741af0c4567a78f352c73caca998881666a5ed36536275cfa775efd66ff1a44ebe539a8ed96c409c5b08a1378266964ce667a27e9fc7f2d43999c63dd0eb

View file

@ -0,0 +1,143 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
inherit autotools bash-completion-r1 linux-info pam python-single-r1
DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils https://git.samba.org/cifs-utils.git/?p=cifs-utils.git"
SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
IUSE="+acl +ads +caps creds pam +python systemd"
RDEPEND="
ads? (
sys-apps/keyutils:=
sys-libs/talloc
virtual/krb5
)
caps? ( sys-libs/libcap-ng )
creds? ( sys-apps/keyutils:= )
pam? (
sys-apps/keyutils:=
sys-libs/pam
)
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="dev-python/docutils"
PDEPEND="
acl? ( >=net-fs/samba-4.0.0_alpha1 )
"
REQUIRED_USE="
acl? ( ads )
python? ( ${PYTHON_REQUIRED_USE} )
"
DOCS="doc/linux-cifs-client-guide.odt"
PATCHES=(
"${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594
"${FILESDIR}/${PN}-6.15-musl.patch"
"${FILESDIR}/${PN}-7.0-no-clobber-fortify-source.patch"
)
pkg_setup() {
linux-info_pkg_setup
if ! linux_config_exists || ! linux_chkconfig_present CIFS; then
ewarn "You must enable CIFS support in your kernel config, "
ewarn "to be able to mount samba shares. You can find it at"
ewarn
ewarn " File systems"
ewarn " Network File Systems"
ewarn " CIFS support"
ewarn
ewarn "and recompile your kernel ..."
fi
use python && python-single-r1_pkg_setup
}
src_prepare() {
default
if has_version app-crypt/heimdal ; then
# https://bugs.gentoo.org/612584
eapply "${FILESDIR}/${PN}-6.7-heimdal.patch"
fi
eautoreconf
}
src_configure() {
local myeconfargs=(
--enable-man
--enable-smbinfo
$(use_enable acl cifsacl cifsidmap)
$(use_enable ads cifsupcall)
$(use_with caps libcap)
$(use_enable creds cifscreds)
$(use_enable pam)
$(use_with pam pamdir $(getpam_mod_dir))
$(use_enable python pythontools)
# mount.cifs can get passwords from systemd
$(use_enable systemd)
)
ROOTSBINDIR="${EPREFIX}"/sbin \
econf "${myeconfargs[@]}"
}
src_install() {
default
# remove empty directories
find "${ED}" -type d -empty -delete || die
if use acl ; then
dodir /etc/cifs-utils
dosym ../../usr/$(get_libdir)/cifs-utils/idmapwb.so \
/etc/cifs-utils/idmap-plugin
dodir /etc/request-key.d
echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
> "${ED}/etc/request-key.d/cifs.idmap.conf"
fi
if use ads ; then
dodir /etc/request-key.d
echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
> "${ED}/etc/request-key.d/cifs.upcall.conf"
echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
> "${ED}/etc/request-key.d/cifs.spnego.conf"
fi
dobashcomp bash-completion/smbinfo
use python && python_fix_shebang "${ED}"
}
pkg_postinst() {
# Inform about set-user-ID bit of mount.cifs
ewarn "setuid use flag was dropped due to multiple security implications"
ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586"
ewarn "You are free to set setuid flags by yourself"
# Inform about upcall usage
if use acl ; then
einfo "The cifs.idmap utility has been enabled by creating the"
einfo "configuration file /etc/request-key.d/cifs.idmap.conf"
einfo "This enables you to get and set CIFS acls."
fi
if use ads ; then
einfo "The cifs.upcall utility has been enabled by creating the"
einfo "configuration file /etc/request-key.d/cifs.upcall.conf"
einfo "This enables you to mount DFS shares."
fi
}

View file

@ -0,0 +1,22 @@
Fixed an inverted race condition when installing with MAKEOPTS="-j1"
jer found this:
install-root_sbinPROGRAMS is called from install-data-am but
install-exec-hook is called from install-exec-am
So moving the failing ln call into install-data-hook for now...
--- cifs-utils-6.12/Makefile.am
+++ cifs-utils-6.12/Makefile.am
@@ -117,10 +117,8 @@
SUBDIRS = contrib
-install-exec-hook: install-sbinPROGRAMS
+install-data-hook: install-sbinPROGRAMS
(cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
-
-install-data-hook:
if CONFIG_MAN
( cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
endif

View file

@ -0,0 +1,80 @@
https://marc.info/?l=linux-cifs&m=165604639613381&w=2
From c267ecf6a1c2152e640897d30cc0e8f637a8ef76 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 24 Jun 2022 05:25:23 +0100
Subject: [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h>
include for XATTR_SIZE_MAX
Needed to build on musl. It only works on glibc because of transitive includes
(which could break in future).
Example failure:
```
getcifsacl.c: In function 'getcifsacl':
getcifsacl.c:429:24: error: 'XATTR_SIZE_MAX' undeclared (first use in this function)
429 | if (bufsize >= XATTR_SIZE_MAX) {
| ^~~~~~~~~~~~~~
```
Bug: https://bugs.gentoo.org/842195
Signed-off-by: Sam James <sam@gentoo.org>
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <limits.h>
#include <ctype.h>
+#include <linux/limits.h>
#include <sys/xattr.h>
#include "cifsacl.h"
#include "idmap_plugin.h"
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -48,6 +48,7 @@
#include <errno.h>
#include <limits.h>
#include <ctype.h>
+#include <linux/limits.h>
#include <sys/xattr.h>
#include "cifsacl.h"
From d1a36cc4caa541d1f0f9a3426a5202b680cf7ff8 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 24 Jun 2022 05:26:54 +0100
Subject: [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include
for le32toh
Needed to fix build on musl libc. It only works by chance on glibc
because of transitive includes (which could break at any time).
Example failure:
```
getcifsacl.c: In function 'print_ace':
getcifsacl.c:284:16: warning: implicit declaration of function 'le16toh' [-Wimplicit-function-declaration]
284 | size = le16toh(pace->size);
| ^~~~~~~
```
Bug: https://bugs.gentoo.org/842195
Signed-off-by: Sam James <sam@gentoo.org>
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -23,6 +23,7 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <endian.h>
#include <string.h>
#include <getopt.h>
#include <stdint.h>
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -38,6 +38,7 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <endian.h>
#include <string.h>
#include <getopt.h>
#include <stdint.h>

View file

@ -0,0 +1,27 @@
https://bugs.gentoo.org/612584
--- cifs-utils-6.7/cifs.upcall.c
+++ cifs-utils-6.7/cifs.upcall.c
@@ -75,11 +75,13 @@
#define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length)
#define KRB5_KEY_DATA(k) ((k)->keyvalue.data)
#define KRB5_KEY_DATA_CAST void
+#define KRB5_FREE_STRING(c,k) krb5_xfree(k)
#else /* MIT */
#define KRB5_KEY_TYPE(k) ((k)->enctype)
#define KRB5_KEY_LENGTH(k) ((k)->length)
#define KRB5_KEY_DATA(k) ((k)->contents)
#define KRB5_KEY_DATA_CAST krb5_octet
+#define KRB5_FREE_STRING(c,k) krb5_free_string(c,k)
#endif
#ifdef HAVE_LIBCAP_NG
@@ -358,7 +360,7 @@
syslog(LOG_DEBUG, "%s: krb5_cc_get_full_name failed: %d\n", __func__, ret);
} else {
syslog(LOG_DEBUG, "%s: default ccache is %s\n", __func__, cachename);
- krb5_free_string(context, cachename);
+ KRB5_FREE_STRING(context, cachename);
}
if (!get_tgt_time(cc)) {

View file

@ -0,0 +1,11 @@
Don't clobber toolchain defaults.
https://bugs.gentoo.org/890278
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2 $(PIE_CFLAGS) $(RELRO_CFLAGS)
+AM_CFLAGS = -Wall -Wextra $(PIE_CFLAGS) $(RELRO_CFLAGS)
ACLOCAL_AMFLAGS = -I aclocal
root_sbindir = $(ROOTSBINDIR)

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>samba@gentoo.org</email>
<name>Samba Team</name>
</maintainer>
<longdescription>
The in-kernel CIFS filesystem relies on a set of user-space
tools. That package of tools is called cifs-utils. Although not
really part of Samba proper, these tools were originally part of
the Samba package. For several reasons, shipping these tools as
part of Samba was problematic and it was deemed better to split
them off into their own package
</longdescription>
<upstream>
<remote-id type="cpe">cpe:/a:samba:cifs-utils</remote-id>
</upstream>
<use>
<flag name="ads">Enable Active Directory support and create cifs.idmap binary - idmap support</flag>
<flag name="caps">Enable <pkg>sys-libs/libcap-ng</pkg> support</flag>
<flag name="creds">cifs credentials support</flag>
<flag name="python">Enable support for python and install python tools</flag>
</use>
</pkgmetadata>

1
net-fs/samba/Manifest Normal file
View file

@ -0,0 +1 @@
DIST samba-4.19.3.tar.gz 41829749 BLAKE2B f83af3b50d795bdc4a250fe96040721150acc3b8effddd473e3cfa3ef6eeec99928b1307a18a472be45049e1d0b74650b9f6dd4bf5c434277c94ab88cb493b3b SHA512 1eacc6be2866ecc7cbb13c5d17a32ad14cc8148e811db9c730a11065ac3ed84a82e406e750dc97fbc884377346c4538a38d8031e63db6b09acd78fbd2c02d702

View file

@ -0,0 +1,45 @@
# Add "winbind" to the daemon_list if you also want winbind to start.
# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
# file server part or the rpc proxy to start.
# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
# accordingly.
daemon_list="smbd nmbd"
piddir="/run/samba"
#----------------------------------------------------------------------------
# Daemons calls: <daemon_name>_<command_option>
#----------------------------------------------------------------------------
my_service_name="samba"
my_service_PRE="unset TMP TMPDIR"
my_service_POST=""
#----------------------------------------------------------------------------
# Daemons calls: <daemon_name>_<command_option>
#----------------------------------------------------------------------------
smbd_start_options="-D"
smbd_command="/usr/sbin/smbd"
smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"
smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"
smbd_reload="killall -HUP smbd"
nmbd_start_options="-D"
nmbd_command="/usr/sbin/nmbd"
nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"
nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"
nmbd_reload="killall -HUP nmbd"
samba4_start_options=""
samba4_command="/usr/sbin/samba"
samba4_pidfile="${piddir}/samba.pid"
samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"
samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"
samba4_reload="killall -HUP samba"
winbind_start_options=""
winbind_command="/usr/sbin/winbindd"
winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"
winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"
winbind_reload="killall -HUP winbindd"

View file

@ -0,0 +1,54 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2 or later
extra_started_commands="reload"
[ -z "${piddir}" ] && piddir="/run/samba"
depend() {
after slapd
use cupsd
}
DAEMONNAME="${SVCNAME##samba.}"
[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
signal_do() {
local signal="$1"
[ -z "${signal}" ] && return 0
local result=0 last_result=0 daemon= cmd_exec=
for daemon in ${daemon_list} ; do
eval cmd_exec=\$${daemon}_${signal}
if [ -n "${cmd_exec}" ]; then
ebegin "${my_service_name} -> ${signal}: ${daemon}"
#echo ${cmd} '->' ${!cmd}
${cmd_exec} > /dev/null
last_result=$?
eend ${last_result}
fi
result=$(( ${result} + ${last_result} ))
done
return ${result}
}
start() {
${my_service_PRE}
[ -d "${piddir}" ] || mkdir -p "${piddir}"
signal_do start && return 0
eerror "Error: starting services (see system logs)"
signal_do stop
return 1
}
stop() {
${my_service_PRE}
if signal_do stop ; then
${my_service_POST}
return 0
fi
}
reload() {
${my_service_PRE}
signal_do reload
}

View file

@ -0,0 +1,18 @@
#%PAM-1.0
# $Id$
auth required pam_env.so
auth sufficient pam_winbind.so
auth sufficient pam_unix.so likeauth nullok use_first_pass
auth required pam_deny.so
account sufficient pam_winbind.so
account required pam_unix.so
password required pam_cracklib.so retry=3
password sufficient pam_unix.so nullok use_authtok md5 shadow
password required pam_deny.so
session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
session required pam_limits.so
session required pam_unix.so

View file

@ -0,0 +1,12 @@
--- ldb-1.3.6/lib/tevent/wscript
+++ ldb-1.3.6/lib/tevent/wscript
@@ -34,8 +34,7 @@
if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
onlyif='talloc', implied_deps='replace talloc'):
conf.define('USING_SYSTEM_TEVENT', 1)
- if not conf.env.disable_python and \
- conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
+ if not conf.env.disable_python:
conf.define('USING_SYSTEM_PYTEVENT', 1)
if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):

View file

@ -0,0 +1,56 @@
https://bugs.gentoo.org/910306
https://bugzilla.samba.org/show_bug.cgi?id=15418
source3/rpc_server/netlogon/srv_netlog_nt.c | 9 +++++----
source4/rpc_server/netlogon/dcerpc_netlogon.c | 8 ++++----
2 files changed, 9 insertions(+), 8 deletions(-)
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -2284,6 +2284,11 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
struct netlogon_creds_CredentialState *creds;
NTSTATUS status;
+ if (r->in.query_level != 1) {
+ p->fault_state = DCERPC_NCA_S_FAULT_INVALID_TAG;
+ return NT_STATUS_NOT_SUPPORTED;
+ }
+
become_root();
status = dcesrv_netr_creds_server_step_check(p->dce_call,
p->mem_ctx,
@@ -2296,10 +2301,6 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
return status;
}
- if (r->in.query_level != 1) {
- return NT_STATUS_NOT_SUPPORTED;
- }
-
r->out.capabilities->server_capabilities = creds->negotiate_flags;
return NT_STATUS_OK;
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -2364,6 +2364,10 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c
struct netlogon_creds_CredentialState *creds;
NTSTATUS status;
+ if (r->in.query_level != 1) {
+ DCESRV_FAULT(DCERPC_NCA_S_FAULT_INVALID_TAG);
+ }
+
status = dcesrv_netr_creds_server_step_check(dce_call,
mem_ctx,
r->in.computer_name,
@@ -2375,10 +2379,6 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c
}
NT_STATUS_NOT_OK_RETURN(status);
- if (r->in.query_level != 1) {
- return NT_STATUS_NOT_SUPPORTED;
- }
-
r->out.capabilities->server_capabilities = creds->negotiate_flags;
return NT_STATUS_OK;

View file

@ -0,0 +1,29 @@
--- a/source3/wscript
+++ b/source3/wscript
@@ -863,7 +863,7 @@
if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1)
- if Options.options.with_pam:
+ if Options.options.with_pam != False:
use_pam=True
conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
@@ -940,6 +940,17 @@
"or headers not found. Use --without-pam to disable "
"PAM support.");
+ else:
+ Logs.warn("PAM disabled")
+ use_pam=False
+ conf.undefine('WITH_PAM')
+ conf.undefine('WITH_PAM_MODULES')
+ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
+ conf.undefine('PAM_RHOST')
+ conf.undefine('PAM_TTY')
+ conf.undefine('HAVE_PAM_PAM_APPL_H')
+
+
seteuid = False
#

View file

@ -0,0 +1,8 @@
d /run/samba
d /run/ctdb
d /run/lock/samba
d /var/cache/samba
d /var/lib/ctdb
d /var/lib/samba/bind-dns
d /var/lib/samba/private
d /var/log/samba

View file

@ -0,0 +1,382 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit python-single-r1 flag-o-matic waf-utils multilib-minimal linux-info systemd pam tmpfiles
DESCRIPTION="Samba Suite Version 4"
HOMEPAGE="https://samba.org/"
MY_PV="${PV/_rc/rc}"
MY_P="${PN}-${MY_PV}"
if [[ ${PV} == *_rc* ]]; then
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0"
IUSE="acl addc ads ceph client cluster cups debug fam glusterfs gpg"
IUSE+=" iprint json ldap llvm-libunwind pam profiling-data python quota +regedit selinux"
IUSE+=" snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind winbind"
IUSE+=" zeroconf"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
addc? ( json python !system-mitkrb5 winbind )
ads? ( acl ldap python winbind )
cluster? ( ads )
gpg? ( addc )
spotlight? ( json )
test? ( python )
!ads? ( !addc )
?? ( system-heimdal system-mitkrb5 )
"
# the test suite is messed, it uses system-installed samba
# bits instead of what was built, tests things disabled via use
# flags, and generally just fails to work in a way ebuilds could
# rely on in its current state
RESTRICT="test"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/samba-4.0/policy.h
/usr/include/samba-4.0/dcerpc_server.h
/usr/include/samba-4.0/ctdb.h
/usr/include/samba-4.0/ctdb_client.h
/usr/include/samba-4.0/ctdb_protocol.h
/usr/include/samba-4.0/ctdb_private.h
/usr/include/samba-4.0/ctdb_typesafe_cb.h
/usr/include/samba-4.0/ctdb_version.h
)
TALLOC_VERSION="2.4.1"
TDB_VERSION="1.4.9"
TEVENT_VERSION="0.15.0"
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2:=[${MULTILIB_USEDEP}]
dev-lang/perl:=
dev-libs/icu:=[${MULTILIB_USEDEP}]
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/libtasn1:=[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
dev-perl/Parse-Yapp
>=net-libs/gnutls-3.4.7:=[${MULTILIB_USEDEP}]
>=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
>=sys-libs/ldb-2.8.0:=[ldap(+)?,${MULTILIB_USEDEP}]
<sys-libs/ldb-2.9.0:=[ldap(+)?,${MULTILIB_USEDEP}]
sys-libs/libcap[${MULTILIB_USEDEP}]
sys-libs/liburing:=[${MULTILIB_USEDEP}]
sys-libs/ncurses:=
sys-libs/readline:=
>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/libcrypt:=[${MULTILIB_USEDEP}]
virtual/libiconv
$(python_gen_cond_dep '
addc? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
)
ads? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
net-dns/bind-tools[gssapi]
)
')
acl? ( virtual/acl )
ceph? ( sys-cluster/ceph )
cluster? ( net-libs/rpcsvc-proto )
cups? ( net-print/cups )
debug? ( dev-util/lttng-ust )
fam? ( virtual/fam )
gpg? ( app-crypt/gpgme:= )
json? ( dev-libs/jansson:= )
ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
pam? ( sys-libs/pam )
python? (
sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
snapper? ( sys-apps/dbus )
system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl(-),${MULTILIB_USEDEP}] )
system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
systemd? ( sys-apps/systemd:= )
unwind? (
llvm-libunwind? ( sys-libs/llvm-libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
)
zeroconf? ( net-dns/avahi[dbus] )
"
DEPEND="${COMMON_DEPEND}
dev-perl/JSON
net-libs/libtirpc[${MULTILIB_USEDEP}]
net-libs/rpcsvc-proto
spotlight? ( dev-libs/glib )
test? (
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
$(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
!system-mitkrb5? (
>=net-dns/resolv_wrapper-1.1.4
>=net-libs/socket_wrapper-1.1.9
>=sys-libs/nss_wrapper-1.1.3
>=sys-libs/uid_wrapper-1.2.1
)
)"
RDEPEND="${COMMON_DEPEND}
client? ( net-fs/cifs-utils[ads?] )
python? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-samba )
"
BDEPEND="${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-4.18.4-pam.patch
"${FILESDIR}"/ldb-2.5.2-skip-wav-tevent-check.patch
)
CONFDIR="${FILESDIR}/4.4"
WAF_BINARY="${S}/buildtools/bin/waf"
SHAREDMODS=""
pkg_setup() {
# Package fails to build with distcc
export DISTCC_DISABLE=1
export PYTHONHASHSEED=1
python-single-r1_pkg_setup
SHAREDMODS="$(usev !snapper '!')vfs_snapper"
if use cluster ; then
SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
elif use ads ; then
SHAREDMODS+=",idmap_ad"
fi
}
check_samba_dep_versions() {
actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
eerror "Source talloc version: ${TALLOC_VERSION}"
eerror "Ebuild talloc version: ${actual_talloc_version}"
die "Ebuild needs to fix TALLOC_VERSION!"
fi
actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
eerror "Source tdb version: ${TDB_VERSION}"
eerror "Ebuild tdb version: ${actual_tdb_version}"
die "Ebuild needs to fix TDB_VERSION!"
fi
actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
eerror "Source tevent version: ${TEVENT_VERSION}"
eerror "Ebuild tevent version: ${actual_tevent_version}"
die "Ebuild needs to fix TEVENT_VERSION!"
fi
}
src_prepare() {
default
check_samba_dep_versions
# Unbundle dnspython
sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
# Unbundle iso8601 unless tests are enabled
if ! use test ; then
sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
fi
# Ugly hackaround for bug #592502
#cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
-i source4/dsdb/samdb/ldb_modules/password_hash.c \
|| die
# WAF
multilib_copy_sources
}
multilib_src_configure() {
# When specifying libs for samba build you must append NONE to the end to
# stop it automatically including things
local bundled_libs="NONE"
if ! use system-heimdal && ! use system-mitkrb5 ; then
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
fi
# We "use" bundled cmocka when we're not running tests as we're
# not using it anyway. Means we avoid making users install it for
# no reason. bug #802531
if ! use test ; then
bundled_libs="cmocka,${bundled_libs}"
fi
# bug #874633
if use llvm-libunwind ; then
mkdir -p "${T}"/${ABI}/pkgconfig || die
local -x PKG_CONFIG_PATH="${T}/${ABI}/pkgconfig:${PKG_CONFIG_PATH}"
cat <<-EOF > "${T}"/${ABI}/pkgconfig/libunwind-generic.pc || die
exec_prefix=\${prefix}
libdir=/usr/$(get_libdir)
includedir=\${prefix}/include
Name: libunwind-generic
Description: libunwind generic library
Version: 1.70
Libs: -L\${libdir} -lunwind
Cflags: -I\${includedir}
EOF
fi
local myconf=(
--enable-fhs
--sysconfdir="${EPREFIX}/etc"
--localstatedir="${EPREFIX}/var"
--with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
--with-piddir="${EPREFIX}/run/${PN}"
--bundled-libraries="${bundled_libs}"
--builtin-libraries=NONE
--disable-rpath
--disable-rpath-install
--nopyc
--nopyo
--without-winexe
$(multilib_native_use_with acl acl-support)
$(multilib_native_usex addc '' '--without-ad-dc')
$(multilib_native_use_with ads)
$(multilib_native_use_enable ceph cephfs)
$(multilib_native_use_with cluster cluster-support)
$(multilib_native_use_enable cups)
--without-dmapi
$(multilib_native_use_with fam)
$(multilib_native_use_enable glusterfs)
$(multilib_native_use_with gpg gpgme)
$(multilib_native_use_with json)
$(multilib_native_use_enable iprint)
$(multilib_native_use_with pam)
$(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
$(multilib_native_use_with quota quotas)
$(multilib_native_use_with regedit)
$(multilib_native_use_enable spotlight)
$(multilib_native_use_with syslog)
$(multilib_native_use_with systemd)
--systemd-install-services
--with-systemddir="$(systemd_get_systemunitdir)"
$(multilib_native_use_with unwind libunwind)
$(multilib_native_use_with winbind)
$(multilib_native_usex python '' '--disable-python')
$(multilib_native_use_enable zeroconf avahi)
$(multilib_native_usex test '--enable-selftest' '')
$(usev system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')")
$(use_with debug lttng)
$(use_with ldap)
$(use_with profiling-data)
# bug #683148
--jobs 1
)
if multilib_is_native_abi ; then
myconf+=( --with-shared-modules=${SHAREDMODS} )
else
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
append-cppflags "-I${ESYSROOT}/usr/include/et"
waf-utils_src_configure ${myconf[@]}
}
multilib_src_compile() {
waf-utils_src_compile
}
multilib_src_test() {
if multilib_is_native_abi ; then
"${WAF_BINARY}" test || die "Test failed"
fi
}
multilib_src_install() {
waf-utils_src_install
# Make all .so files executable
find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
# smbspool_krb5_wrapper must only be accessible to root, bug #880739
find "${ED}" -type f -name "smbspool_krb5_wrapper" -exec chmod go-rwx {} + || die
# Remove empty runtime dirs created by build system (bug #892341)
find "${ED}"/{run,var} -type d -empty -delete || die
if multilib_is_native_abi ; then
# Install ldap schema for server (bug #491002)
if use ldap ; then
insinto /etc/openldap/schema
doins examples/LDAP/samba.schema
fi
# Create symlink for cups (bug #552310)
if use cups ; then
dosym ../../../bin/smbspool \
/usr/libexec/cups/backend/smb
fi
# Install example config file
insinto /etc/samba
doins examples/smb.conf.default
# Fix paths in example file (bug #603964)
sed \
-e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
-e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
-e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
-e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
-e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
-i "${ED}"/etc/samba/smb.conf.default || die
# Install init script and conf.d file
newinitd "${CONFDIR}/samba4.initd-r1" samba
newconfd "${CONFDIR}/samba4.confd" samba
dotmpfiles "${FILESDIR}"/samba.conf
if ! use addc ; then
rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
|| die
fi
# Preserve functionality for old gentoo-specific unit names
dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
fi
if use pam && use winbind ; then
newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
# bugs #376853 and #590374
insinto /etc/security
doins examples/pam_winbind/pam_winbind.conf
fi
}
pkg_postinst() {
tmpfiles_process samba.conf
}

View file

@ -0,0 +1 @@
DIST libsearpc-3.3.0.tar.gz 54140 BLAKE2B 6645a7e4c14c9d50b59ce8ebaecd13bb247d16d66449b0d251d27d12d46507cc2e4b8468e87f6f1b222da2243b59fc01b69349eb06e96b5cd0d6aabd1aeff72b SHA512 0fd07dcd417b540cb8ed53f1103a03bc6b1a2b9bbb8ca0858aef44a352e3d5d2b6ad51901a29ac6be27acfe25f93233530003982315d0f6e268fa43992f04240

View file

@ -0,0 +1,164 @@
https://bugs.gentoo.org/870544
https://github.com/haiwen/libsearpc/pull/63
From ae466d2b3b503f4831bc701e97d0a600e23fed60 Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Sat, 8 Apr 2023 16:53:07 -0700
Subject: [PATCH 1/2] Fix -Werror=strict-prototypes
---
lib/searpc-client.c | 2 +-
lib/searpc-client.h | 2 +-
lib/searpc-codegen.py | 4 ++--
lib/searpc-server.c | 2 +-
lib/searpc-server.h | 2 +-
tests/clar.c | 4 ++--
tests/searpc.c | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/searpc-client.c b/lib/searpc-client.c
index 050a524..916241a 100644
--- a/lib/searpc-client.c
+++ b/lib/searpc-client.c
@@ -36,7 +36,7 @@ static void clean_objlist(GList *list)
SearpcClient *
-searpc_client_new ()
+searpc_client_new (void)
{
return g_new0 (SearpcClient, 1);
}
diff --git a/lib/searpc-client.h b/lib/searpc-client.h
index 725fadd..157a407 100644
--- a/lib/searpc-client.h
+++ b/lib/searpc-client.h
@@ -44,7 +44,7 @@ struct _SearpcClient {
typedef struct _SearpcClient LIBSEARPC_API SearpcClient;
LIBSEARPC_API
-SearpcClient *searpc_client_new ();
+SearpcClient *searpc_client_new (void);
LIBSEARPC_API void
searpc_client_free (SearpcClient *client);
diff --git a/lib/searpc-codegen.py b/lib/searpc-codegen.py
index dbbf8c9..acee024 100644
--- a/lib/searpc-codegen.py
+++ b/lib/searpc-codegen.py
@@ -139,7 +139,7 @@ def generate_marshal_register_item(ret_type, arg_types):
signature_name=signature_name)
def gen_marshal_register_function(f):
- write_file(f, "static void register_marshals()""")
+ write_file(f, "static void register_marshals(void)""")
write_file(f, "{")
for item in func_table:
write_file(f, generate_marshal_register_item(item[0], item[1]))
@@ -147,7 +147,7 @@ def gen_marshal_register_function(f):
signature_template = r"""
inline static gchar *
-${signature_name}()
+${signature_name}(void)
{
return searpc_compute_signature (${args});
}
diff --git a/lib/searpc-server.c b/lib/searpc-server.c
index 3d6dc09..a82fbe4 100644
--- a/lib/searpc-server.c
+++ b/lib/searpc-server.c
@@ -248,7 +248,7 @@ searpc_server_reopen_slow_log (const char *slow_log_path)
#endif
void
-searpc_server_final()
+searpc_server_final(void)
{
g_hash_table_destroy (service_table);
g_hash_table_destroy (marshal_table);
diff --git a/lib/searpc-server.h b/lib/searpc-server.h
index 02722a4..aa1a9fe 100644
--- a/lib/searpc-server.h
+++ b/lib/searpc-server.h
@@ -67,7 +67,7 @@ searpc_server_reopen_slow_log (const char *slow_log_path);
* Free the server structure.
*/
LIBSEARPC_API
-void searpc_server_final ();
+void searpc_server_final (void);
/**
* searpc_create_service:
diff --git a/tests/clar.c b/tests/clar.c
index 1546447..81da15a 100644
--- a/tests/clar.c
+++ b/tests/clar.c
@@ -371,7 +371,7 @@ clar_test_init(int argc, char **argv)
}
int
-clar_test_run()
+clar_test_run(void)
{
if (_clar.argc > 1)
clar_parse_args(_clar.argc, _clar.argv);
@@ -386,7 +386,7 @@ clar_test_run()
}
void
-clar_test_shutdown()
+clar_test_shutdown(void)
{
clar_print_shutdown(
_clar.tests_ran,
diff --git a/tests/searpc.c b/tests/searpc.c
index 4c7edb7..7a2d5a5 100644
--- a/tests/searpc.c
+++ b/tests/searpc.c
@@ -204,7 +204,7 @@ get_substring (const gchar *orig_str, int sub_len, GError **error)
}
static SearpcClient *
-do_create_client_with_pipe_transport()
+do_create_client_with_pipe_transport(void)
{
SearpcNamedPipeClient *pipe_client = searpc_create_named_pipe_client(pipe_path);
cl_must_pass_(searpc_named_pipe_client_connect(pipe_client), "named pipe client failed to connect");
From d78aede0e4c559fa3dbce0e64ffc943da47fe76c Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Sat, 8 Apr 2023 17:13:55 -0700
Subject: [PATCH 2/2] Fix -Werror=implicit-function-declaration
unistd.h is needed for write, close and read
---
demo/searpc-demo-packet.h | 1 +
demo/test-object.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/demo/searpc-demo-packet.h b/demo/searpc-demo-packet.h
index 926f36b..6552396 100644
--- a/demo/searpc-demo-packet.h
+++ b/demo/searpc-demo-packet.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdio.h>
+#include <unistd.h>
#include <errno.h>
#ifdef WIN32
diff --git a/demo/test-object.h b/demo/test-object.h
index f3f7589..a6d8b5d 100644
--- a/demo/test-object.h
+++ b/demo/test-object.h
@@ -4,6 +4,8 @@
#include <glib.h>
#include <glib-object.h>
+GType test_object_get_type (void);
+
#define TEST_OBJECT_TYPE (test_object_get_type())
#define TEST_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_OBJECT_TYPE, TestObject))
#define IS_TEST_OBJCET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_OBJCET_TYPE))

View file

@ -0,0 +1,46 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
# Upstream is moving tags repeatedly, then we use commit hash.
RELEASE_COMMIT="15f6f0b9f451b9ecf99dedab72e9242e54e124eb" #tag v3.3-latest
inherit autotools python-single-r1
DESCRIPTION="A simple C language RPC framework"
HOMEPAGE="https://github.com/haiwen/libsearpc/ http://seafile.com/"
SRC_URI="https://github.com/haiwen/${PN}/archive/${RELEASE_COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~x86"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="${PYTHON_DEPS}
>=dev-libs/glib-2.26.0
>=dev-libs/jansson-2.2.1:="
RDEPEND="${DEPEND}
$(python_gen_cond_dep '
dev-python/simplejson[${PYTHON_USEDEP}]
')"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
PATCHES=(
"${FILESDIR}"/${P}-clang16.patch #870544
)
src_prepare() {
default
sed -i -e "s/(DESTDIR)//" ${PN}.pc.in || die
eautoreconf
}
src_install() {
default
# Remove unnecessary .la files
find "${ED}" -name '*.la' -delete || die
}

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">haiwen/libsearpc</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST seafile-client-9.0.4.tar.gz 11720648 BLAKE2B 3bdcf84a9f8aedeae29ad8e8f01b7cbc18a1c274f3f89b9a115f6066f76d479c7754c42e8b16b17e151de525098e8c125712bcdca9368b24dd6966e47c6bee0b SHA512 e75508f8d57dec0f4df2e9fddb4a6f522f52dfa181323926df0588f505b62c4053d90218f6c49ca40a17eb9835dc8ae8779012ef007e5f840a88847e65791bcd

View file

@ -0,0 +1,37 @@
https://github.com/haiwen/seafile-client/pull/1297
From 86ebea086c6b78738b3140c922c909331d2b9a94 Mon Sep 17 00:00:00 2001
From: Joffrey <j-off@live.fr>
Date: Fri, 29 May 2020 15:59:11 +0000
Subject: [PATCH] Fix build with Qt5 v5.15.0
---
src/ui/events-list-view.cpp | 1 +
src/ui/private-share-dialog.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/ui/events-list-view.cpp b/src/ui/events-list-view.cpp
index b1d04abb..09536b9e 100644
--- a/src/ui/events-list-view.cpp
+++ b/src/ui/events-list-view.cpp
@@ -1,4 +1,5 @@
#include <QPainter>
+#include <QPainterPath>
#include <QApplication>
#include <QPixmap>
#include <QToolTip>
diff --git a/src/ui/private-share-dialog.cpp b/src/ui/private-share-dialog.cpp
index 511d476b..284cc043 100644
--- a/src/ui/private-share-dialog.cpp
+++ b/src/ui/private-share-dialog.cpp
@@ -2,6 +2,7 @@
#include <QCompleter>
#include <QLineEdit>
#include <QPainter>
+#include <QPainterPath>
#include <QResizeEvent>
#include <QStringList>
#include <QStringListModel>
--
2.26.2

View file

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c4a4447..5747df46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,14 +133,12 @@ ENDIF()
####################
###### BEGIN: QT configuration
####################
-FIND_PROGRAM(qmake_executable NAMES qmake qmake.exe)
-EXECUTE_PROCESS(COMMAND
- bash -c "${qmake_executable} --version | grep -iE '^using qt version [0-9.]+' | awk '{print $4}'"
- OUTPUT_VARIABLE DETECTED_QT_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+FIND_PACKAGE(Qt5Core)
+SET(DETECTED_QT_VERSION ${Qt5Core_VERSION})
MESSAGE("Qt version: ${DETECTED_QT_VERSION}")
+GET_TARGET_PROPERTY(QMAKE_EXECUTABLE_PATH Qt5::qmake IMPORTED_LOCATION)
EXECUTE_PROCESS(COMMAND
- bash -c "qmake --version|grep -iE '^using qt version [0-9]'|awk '{print $4}'|grep -iE '^[0-9]'|awk -F . '{print $1}'"
+ bash -c "${QMAKE_EXECUTABLE_PATH} --version|grep -iE '^using qt version [0-9]'|awk '{print $4}'|grep -iE '^[0-9]'|awk -F . '{print $1}'"
OUTPUT_VARIABLE QT_VERSION_MAJOR
OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE("QT_VERSION_MAJOR: ${QT_VERSION_MAJOR}")

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="shibboleth">Build support for Shibboleth single sign-on</flag>
</use>
<upstream>
<remote-id type="github">haiwen/seafile-client</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,55 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Upstream is moving tags repeatedly, then we use commit hash.
RELEASE_COMMIT="5bc61af6ad2bfd39d0c6da6cc90ac16d62ad3150"
inherit xdg cmake
DESCRIPTION="Seafile desktop client"
HOMEPAGE="https://www.seafile.com/ https://github.com/haiwen/seafile-client/"
SRC_URI="https://github.com/haiwen/${PN}/archive/${RELEASE_COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="shibboleth test"
RESTRICT="!test? ( test )"
RDEPEND="dev-db/sqlite:3
dev-libs/glib:2
dev-libs/jansson:=
dev-libs/openssl:=
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtwidgets:5
>=net-libs/libsearpc-3.2.0_p1
~net-misc/seafile-${PV}
sys-libs/zlib
virtual/opengl
elibc_musl? ( sys-libs/fts-standalone )
shibboleth? ( dev-qt/qtwebengine:5[widgets] )"
DEPEND="${RDEPEND}
test? ( dev-qt/qttest:5 )"
BDEPEND="dev-qt/linguist-tools:5"
PATCHES=(
"${FILESDIR}/${PN}-8.0.6-select-qt5.patch"
"${FILESDIR}/${PN}-7.0.9-qt-5.15.patch"
)
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
src_configure() {
local mycmakeargs=(
-DBUILD_SHIBBOLETH_SUPPORT="$(usex shibboleth)"
-DBUILD_TESTING="$(usex test)"
)
# 863554
use elibc_musl && mycmakeargs+=( -DCMAKE_CXX_STANDARD_LIBRARIES="-lfts" )
cmake_src_configure
}

View file

@ -0,0 +1 @@
DIST seafile-9.0.4.tar.gz 752960 BLAKE2B 3baebf086e3fc50e7eeacffbfcec65889409ec2b899aa7b7739dd3e28f499f5cd13f7099e8fd2636c1a5c304ca56811d29059d83c604a36f3e281d43e9bb7a35 SHA512 e184058d65a70e9eaff8a2115e1f8c8c939c18be961c5ef54d1acd0439db005c0083f06184fa266848ba0f6f695ca66d2d42b79287cf54e7d6fd645b864e6cdb

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">haiwen/seafile</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,65 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
# Upstream is moving tags repeatedly, then we use commit hash.
RELEASE_COMMIT="ecc2a9adf4932659ca371cefc0aab27d87d5cb42"
inherit autotools python-single-r1 vala
DESCRIPTION="File syncing and sharing software with file encryption and group sharing"
HOMEPAGE="https://www.seafile.com/ https://github.com/haiwen/seafile/"
SRC_URI="https://github.com/haiwen/${PN}/archive/${RELEASE_COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2+-with-openssl-exception"
SLOT="0"
KEYWORDS="~amd64 ~x86"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/future[${PYTHON_USEDEP}]
')
dev-libs/openssl:=
dev-db/sqlite:3
dev-libs/glib:2
dev-libs/jansson:=
dev-libs/libevent:=
net-libs/libsearpc[${PYTHON_SINGLE_USEDEP}]
net-libs/libwebsockets[client]
net-misc/curl
sys-apps/util-linux
sys-libs/zlib
elibc_musl? ( sys-libs/fts-standalone )"
DEPEND="${RDEPEND}"
BDEPEND="${PYTHON_DEPS}
$(vala_depend)"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
pkg_setup() {
python-single-r1_pkg_setup
vala_setup
}
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
--disable-static
)
econf "${myeconfargs[@]}"
}
src_install() {
default
# Remove unnecessary .la files
find "${ED}" -name '*.la' -delete || die
python_fix_shebang "${ED}"/usr/bin/seaf-cli
}

4
net-print/hplip/Manifest Normal file
View file

@ -0,0 +1,4 @@
DIST hplip-3.23.12-patches-1.tar.xz 21132 BLAKE2B 83cee13ef988618cf6537b3954649c733b3de99f4d1c2ffefe9aeaba8f21e61a92dfa2e4cdb87af3d4b56df244e7de1b1d6bf73d878aa8ccabe60c537e05916f SHA512 89a0139660b013c11ba1dfa6adf1840b8ccc5b49bc31580481967c85e75ca79aba537bc4b65834ee464013b7aa0544267235d14dc877cb5276cb6e89c6a3fafa
DIST hplip-3.23.12.tar.gz 30162044 BLAKE2B 752a5b75855677e4f8b5b8738181d40c426268be4e393e5df7565c78efca68389e86d92f21002a733c0b2d5d62913bef3986e4bedd36a9f35f205c11e6027e7a SHA512 7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956fd221f7e1561635508103ae944f19e04d6052d3f8928f2c9685fdcdcf515df
DIST hplip-3.23.5-patches-1.tar.xz 21444 BLAKE2B 500e06f34ad4fc607a587e2e897dbd852d21e3a1a2845fe8603a4fef109ea4556e614a38397a96be2ad9cc7efe8113e893e698696203f289d21a9f067c3a9fa7 SHA512 94b7b508913969303e7d63f392a64e7f43c3d2e651d6a10acbfc1fd1a6ce2324d2a1b19394d7f4f0b89802d9efc59df04cd902e486ebd40b3428a8037ffca8cf
DIST hplip-3.23.8.tar.gz 30121648 BLAKE2B 1bee02f2de4f14b7aa4d491550f82146e0e55a3297a8110ff7973992772089041578fed5560f98658ed9f6896d75481c89c22131501ca5048e709519db76eb77 SHA512 727b5a6c5b5c77571f1bc27efd493cf8177f543412fa70f0f1ff3439d6599c85985206ccb1c60dbc8bec1e23ef6b25f9030fd872c24799029ba8526b0061cc90

View file

@ -0,0 +1,290 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev
DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing"
SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz
https://dev.gentoo.org/~billie/distfiles/${PN}-3.23.12-patches-1.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm arm64 ppc ppc64 ~x86"
IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
COMMON_DEPEND="
net-print/cups
sys-apps/dbus
media-libs/libjpeg-turbo:0
hpijs? ( net-print/cups-filters[foomatic] )
!libusb0? ( virtual/libusb:1 )
libusb0? ( virtual/libusb:0 )
${PYTHON_DEPS}
!minimal? (
scanner? (
media-gfx/sane-backends
)
snmp? (
dev-libs/openssl:0=
net-analyzer/net-snmp:=[${PYTHON_SINGLE_USEDEP}]
net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}]
)
)
"
BDEPEND="
virtual/pkgconfig
"
DEPEND="
${COMMON_DEPEND}
"
RDEPEND="
${COMMON_DEPEND}
app-text/ghostscript-gpl
!minimal? (
$(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
kernel_linux? ( virtual/udev )
$(python_gen_cond_dep '
>=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
dev-python/distro[${PYTHON_USEDEP}]
fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
qt5? (
>=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
)
scanner? (
>=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
>=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
X? (
|| (
kde? ( kde-misc/skanlite )
media-gfx/xsane
media-gfx/sane-frontends
)
)
)
')
)
policykit? ( sys-auth/polkit )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
PATCHES=(
"${WORKDIR}/patches"
)
CONFIG_CHECK="~PARPORT ~PPDEV"
ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
#DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="
For more information on setting up your printer please take
a look at the hplip section of the gentoo printing guide:
https://wiki.gentoo.org/wiki/Printing
"
pkg_setup() {
python-single-r1_pkg_setup
use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
use parport && linux-info_pkg_setup
if use minimal ; then
ewarn "Installing driver portions only, make sure you know what you are doing."
ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
ewarn "This also disables fax, network, scanner and gui support!"
fi
if ! use hpcups && ! use hpijs ; then
ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
ewarn "which is probably not what you want."
ewarn "You will almost certainly not be able to print."
fi
}
src_prepare() {
default
python_fix_shebang .
# Make desktop files follow the specification
# Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680
# Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324
sed -i -e '/^Categories=/s/Application;//' \
-e '/^Encoding=.*/d' hplip.desktop.in || die
sed -i -e '/^Categories=/s/Application;//' \
-e '/^Version=.*/d' \
-e '/^Comment=.*/d' hplip-systray.desktop.in || die
# Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725
# Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847,
# https://bugs.launchpad.net/hplip/+bug/500086
local udevdir=$(get_udevdir)
sed -i -e "s|/etc/udev|${udevdir}|g" \
$(find . -type f -exec grep -l /etc/udev {} +) || die
# Force recognition of Gentoo distro by hp-check
sed -i \
-e "s:file('/etc/issue', 'r').read():'Gentoo':" \
installer/core_install.py || die
eautoreconf
}
src_configure() {
local drv_build minimal_build
if use hpcups ; then
drv_build="$(use_enable hpcups hpcups-install)"
if use static-ppds ; then
drv_build="${drv_build} --enable-cups-ppd-install"
drv_build="${drv_build} --disable-cups-drv-install"
else
drv_build="${drv_build} --enable-cups-drv-install"
drv_build="${drv_build} --disable-cups-ppd-install"
fi
else
drv_build="--disable-hpcups-install"
drv_build="${drv_build} --disable-cups-drv-install"
drv_build="${drv_build} --disable-cups-ppd-install"
fi
if use hpijs ; then
drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
if use static-ppds ; then
drv_build="${drv_build} --enable-foomatic-ppd-install"
drv_build="${drv_build} --disable-foomatic-drv-install"
else
drv_build="${drv_build} --enable-foomatic-drv-install"
drv_build="${drv_build} --disable-foomatic-ppd-install"
fi
else
drv_build="${drv_build} --disable-hpijs-install"
drv_build="${drv_build} --disable-foomatic-drv-install"
drv_build="${drv_build} --disable-foomatic-ppd-install"
fi
if use minimal ; then
if use hpijs ; then
minimal_build="--enable-hpijs-only-build"
else
minimal_build="--disable-hpijs-only-build"
fi
if use hpcups ; then
minimal_build="${minimal_build} --enable-hpcups-only-build"
else
minimal_build="${minimal_build} --disable-hpcups-only-build"
fi
minimal_build="${minimal_build} --disable-fax-build"
minimal_build="${minimal_build} --disable-network-build"
minimal_build="${minimal_build} --disable-scan-build"
minimal_build="${minimal_build} --disable-gui-build"
else
if use fax ; then
minimal_build="${minimal_build} --enable-fax-build"
else
minimal_build="${minimal_build} --disable-fax-build"
fi
if use snmp ; then
minimal_build="${minimal_build} --enable-network-build"
else
minimal_build="${minimal_build} --disable-network-build"
fi
if use scanner ; then
minimal_build="${minimal_build} --enable-scan-build"
else
minimal_build="${minimal_build} --disable-scan-build"
fi
if use qt5 ; then
minimal_build="${minimal_build} --enable-qt5"
minimal_build="${minimal_build} --enable-gui-build"
else
minimal_build="${minimal_build} --disable-gui-build"
minimal_build="${minimal_build} --disable-qt5"
fi
fi
# disable class driver for now
econf \
--disable-class-driver \
--disable-cups11-build \
--disable-foomatic-rip-hplip-install \
--disable-imageProcessor-build \
--disable-lite-build \
--disable-shadow-build \
--disable-qt3 \
--disable-qt4 \
--disable-udev_sysfs_rules \
--with-cupsbackenddir=$(cups-config --serverbin)/backend \
--with-cupsfilterdir=$(cups-config --serverbin)/filter \
--with-docdir=/usr/share/doc/${PF} \
--with-htmldir=/usr/share/doc/${PF}/html \
--enable-hpps-install \
--enable-dbus-build \
${drv_build} \
${minimal_build} \
$(use_enable doc doc-build) \
$(use_enable libusb0 libusb01_build) \
$(use_enable parport pp-build) \
$(use_enable policykit)
# hpijs ppds are created at configure time but are not installed (3.17.11)
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
# The hpcups driver does not use foomatic-rip
#local i
#for i in ppd/hpijs/*.ppd.gz ; do
# rm -f ${i}.temp || die
# gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
# gzip > ${i}.temp || die
# mv ${i}.temp ${i} || die
#done
}
src_install() {
# Disable parallel install
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
emake -j1 DESTDIR="${D}" install
einstalldocs
# default
# Installed by sane-backends
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
rm -f "${ED}"/etc/sane.d/dll.conf || die
# Remove desktop and autostart files
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
use qt5 || {
rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
}
rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
# Remove hal fdi files
rm -rf "${ED}"/usr/share/hal || die
find "${D}" -name '*.la' -delete || die
python_optimize "${ED}"/usr/share/hplip
readme.gentoo_create_doc
}
pkg_postinst() {
udev_reload
readme.gentoo_print_elog
}
pkg_postrm() {
udev_reload
}

View file

@ -0,0 +1,290 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev
DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools"
HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing"
SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz
https://dev.gentoo.org/~billie/distfiles/${PN}-3.23.5-patches-1.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm arm64 ppc ppc64 x86"
IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X"
COMMON_DEPEND="
net-print/cups
sys-apps/dbus
media-libs/libjpeg-turbo:0
hpijs? ( net-print/cups-filters[foomatic] )
!libusb0? ( virtual/libusb:1 )
libusb0? ( virtual/libusb:0 )
${PYTHON_DEPS}
!minimal? (
scanner? (
media-gfx/sane-backends
)
snmp? (
dev-libs/openssl:0=
net-analyzer/net-snmp:=[${PYTHON_SINGLE_USEDEP}]
net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}]
)
)
"
BDEPEND="
virtual/pkgconfig
"
DEPEND="
${COMMON_DEPEND}
"
RDEPEND="
${COMMON_DEPEND}
app-text/ghostscript-gpl
!minimal? (
$(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*')
kernel_linux? ( virtual/udev )
$(python_gen_cond_dep '
>=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}]
dev-python/distro[${PYTHON_USEDEP}]
fax? ( dev-python/reportlab[${PYTHON_USEDEP}] )
qt5? (
>=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}]
libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] )
)
scanner? (
>=dev-python/reportlab-3.2[${PYTHON_USEDEP}]
>=dev-python/pillow-3.1.1[${PYTHON_USEDEP}]
X? (
|| (
kde? ( kde-misc/skanlite )
media-gfx/xsane
media-gfx/sane-frontends
)
)
)
')
)
policykit? ( sys-auth/polkit )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
PATCHES=(
"${WORKDIR}/patches"
)
CONFIG_CHECK="~PARPORT ~PPDEV"
ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)."
#DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="
For more information on setting up your printer please take
a look at the hplip section of the gentoo printing guide:
https://wiki.gentoo.org/wiki/Printing
"
pkg_setup() {
python-single-r1_pkg_setup
use scanner && ! use X && ewarn "You need USE=X for the scanner GUI."
use parport && linux-info_pkg_setup
if use minimal ; then
ewarn "Installing driver portions only, make sure you know what you are doing."
ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver"
ewarn "is installed. If both USE flags are set hpijs overrides hpcups."
ewarn "This also disables fax, network, scanner and gui support!"
fi
if ! use hpcups && ! use hpijs ; then
ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver,"
ewarn "which is probably not what you want."
ewarn "You will almost certainly not be able to print."
fi
}
src_prepare() {
default
python_fix_shebang .
# Make desktop files follow the specification
# Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680
# Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324
sed -i -e '/^Categories=/s/Application;//' \
-e '/^Encoding=.*/d' hplip.desktop.in || die
sed -i -e '/^Categories=/s/Application;//' \
-e '/^Version=.*/d' \
-e '/^Comment=.*/d' hplip-systray.desktop.in || die
# Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725
# Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847,
# https://bugs.launchpad.net/hplip/+bug/500086
local udevdir=$(get_udevdir)
sed -i -e "s|/etc/udev|${udevdir}|g" \
$(find . -type f -exec grep -l /etc/udev {} +) || die
# Force recognition of Gentoo distro by hp-check
sed -i \
-e "s:file('/etc/issue', 'r').read():'Gentoo':" \
installer/core_install.py || die
eautoreconf
}
src_configure() {
local drv_build minimal_build
if use hpcups ; then
drv_build="$(use_enable hpcups hpcups-install)"
if use static-ppds ; then
drv_build="${drv_build} --enable-cups-ppd-install"
drv_build="${drv_build} --disable-cups-drv-install"
else
drv_build="${drv_build} --enable-cups-drv-install"
drv_build="${drv_build} --disable-cups-ppd-install"
fi
else
drv_build="--disable-hpcups-install"
drv_build="${drv_build} --disable-cups-drv-install"
drv_build="${drv_build} --disable-cups-ppd-install"
fi
if use hpijs ; then
drv_build="${drv_build} $(use_enable hpijs hpijs-install)"
if use static-ppds ; then
drv_build="${drv_build} --enable-foomatic-ppd-install"
drv_build="${drv_build} --disable-foomatic-drv-install"
else
drv_build="${drv_build} --enable-foomatic-drv-install"
drv_build="${drv_build} --disable-foomatic-ppd-install"
fi
else
drv_build="${drv_build} --disable-hpijs-install"
drv_build="${drv_build} --disable-foomatic-drv-install"
drv_build="${drv_build} --disable-foomatic-ppd-install"
fi
if use minimal ; then
if use hpijs ; then
minimal_build="--enable-hpijs-only-build"
else
minimal_build="--disable-hpijs-only-build"
fi
if use hpcups ; then
minimal_build="${minimal_build} --enable-hpcups-only-build"
else
minimal_build="${minimal_build} --disable-hpcups-only-build"
fi
minimal_build="${minimal_build} --disable-fax-build"
minimal_build="${minimal_build} --disable-network-build"
minimal_build="${minimal_build} --disable-scan-build"
minimal_build="${minimal_build} --disable-gui-build"
else
if use fax ; then
minimal_build="${minimal_build} --enable-fax-build"
else
minimal_build="${minimal_build} --disable-fax-build"
fi
if use snmp ; then
minimal_build="${minimal_build} --enable-network-build"
else
minimal_build="${minimal_build} --disable-network-build"
fi
if use scanner ; then
minimal_build="${minimal_build} --enable-scan-build"
else
minimal_build="${minimal_build} --disable-scan-build"
fi
if use qt5 ; then
minimal_build="${minimal_build} --enable-qt5"
minimal_build="${minimal_build} --enable-gui-build"
else
minimal_build="${minimal_build} --disable-gui-build"
minimal_build="${minimal_build} --disable-qt5"
fi
fi
# disable class driver for now
econf \
--disable-class-driver \
--disable-cups11-build \
--disable-foomatic-rip-hplip-install \
--disable-imageProcessor-build \
--disable-lite-build \
--disable-shadow-build \
--disable-qt3 \
--disable-qt4 \
--disable-udev_sysfs_rules \
--with-cupsbackenddir=$(cups-config --serverbin)/backend \
--with-cupsfilterdir=$(cups-config --serverbin)/filter \
--with-docdir=/usr/share/doc/${PF} \
--with-htmldir=/usr/share/doc/${PF}/html \
--enable-hpps-install \
--enable-dbus-build \
${drv_build} \
${minimal_build} \
$(use_enable doc doc-build) \
$(use_enable libusb0 libusb01_build) \
$(use_enable parport pp-build) \
$(use_enable policykit)
# hpijs ppds are created at configure time but are not installed (3.17.11)
# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
# The hpcups driver does not use foomatic-rip
#local i
#for i in ppd/hpijs/*.ppd.gz ; do
# rm -f ${i}.temp || die
# gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \
# gzip > ${i}.temp || die
# mv ${i}.temp ${i} || die
#done
}
src_install() {
# Disable parallel install
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018
emake -j1 DESTDIR="${D}" install
einstalldocs
# default
# Installed by sane-backends
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023
rm -f "${ED}"/etc/sane.d/dll.conf || die
# Remove desktop and autostart files
# Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770
use qt5 || {
rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg
}
rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die
rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die
# Remove hal fdi files
rm -rf "${ED}"/usr/share/hal || die
find "${D}" -name '*.la' -delete || die
python_optimize "${ED}"/usr/share/hplip
readme.gentoo_create_doc
}
pkg_postinst() {
udev_reload
readme.gentoo_print_elog
}
pkg_postrm() {
udev_reload
}

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>billie@gentoo.org</email>
<name>Daniel Pielmeier</name>
</maintainer>
<maintainer type="project">
<email>printing@gentoo.org</email>
<name>Gentoo Printing Project</name>
</maintainer>
<use>
<flag name="fax">Enable fax on multifunction devices which support it</flag>
<flag name="hpcups">Build the hpcups driver for cups (by HP)</flag>
<flag name="hpijs">Build the IJS driver for cups (Foomatic)</flag>
<flag name="kde">Enables <pkg>kde-misc/skanlite</pkg> as scanner GUI with USE="scanner X"</flag>
<flag name="libusb0">Depend on <pkg>virtual/libusb</pkg> SLOT 0. Some old printers do not work with <pkg>virtual/libusb</pkg> SLOT 1.</flag>
<flag name="minimal">Only build internal hpijs/hpcups driver (not recommended at all, make sure you know what you are doing)</flag>
<flag name="parport">Enable parallel port for devices which require it</flag>
<flag name="scanner">Enable scanner on multifunction devices which support it</flag>
<flag name="snmp">Add support for <pkg>net-analyzer/net-snmp</pkg> which enables this driver to work over networks (both for server and client)</flag>
<flag name="static-ppds">Use statically-generated PPDs instead of Dynamic PPDs. Although this is deprecated some printers may still need it to work properly. Use this flag if hp-setup fails to find/create a valid PPD file</flag>
<flag name="X">Enables scanner GUI dependencies with USE="scanner" where <pkg>media-gfx/xsane</pkg> is preferred over <pkg>media-gfx/sane-frontends</pkg></flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:hp:linux_imaging_and_printing_project</remote-id>
<remote-id type="sourceforge">hplip</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST pcsc-lite-2.0.1.tar.bz2 815103 BLAKE2B a9eea4a4da1a78fc22797b17c128889b2f7caf8c4aa02dd77f4ac79e4ec458fb0162578b5422552545cd39303750d5396f3687f8cfee7603fad8d60cb54ee1e8 SHA512 af007f00f43e8d897710580f6f27814c9e7d3ca489ff01edf2e3b979e46267915aa04d9c15f225a420fa681de936e42a1d4779d962717cf9a9f4a3d1ca31502b

View file

@ -0,0 +1,6 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# We add this here so that it runs after ccid's and ifd-gempc's rules;
# if we just added a pcscd-owned device, we hotplug the pcscd service.
ACTION=="add", ENV{PCSCD}=="1", GROUP="pcscd", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pcscd.service", RUN+="pcscd.sh"

View file

@ -0,0 +1,20 @@
Index: pcsc-lite-1.8.11/doc/org.debian.pcsc-lite.policy
===================================================================
--- pcsc-lite-1.8.11.orig/doc/org.debian.pcsc-lite.policy
+++ pcsc-lite-1.8.11/doc/org.debian.pcsc-lite.policy
@@ -15,6 +15,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
+ <annotate key="org.freedesktop.policykit.owner">unix-user:pcscd</annotate>
</action>
<action id="org.debian.pcsc-lite.access_card">
@@ -25,6 +26,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
+ <annotate key="org.freedesktop.policykit.owner">unix-user:pcscd</annotate>
</action>
</policyconfig>

View file

@ -0,0 +1,18 @@
Don't run the daemon as root
https://bugs.gentoo.org/545390
--- a/etc/pcscd.service.in
+++ b/etc/pcscd.service.in
@@ -4,9 +4,12 @@
Documentation=man:pcscd(8)
[Service]
+PIDFile=/run/pcscd/pcscd.pid
ExecStart=@sbindir_exp@/pcscd --foreground --auto-exit $PCSCD_ARGS
ExecReload=@sbindir_exp@/pcscd --hotplug
EnvironmentFile=-@sysconfdir@/default/pcscd
+User=pcscd
+Group=pcscd
[Install]
Also=pcscd.socket

View file

@ -0,0 +1,22 @@
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="PC/SC Daemon"
pidfile=/run/pcscd/pcscd.pid
command=/usr/sbin/pcscd
command_args="${EXTRA_OPTS}"
start_stop_daemon_args="--user pcscd:pcscd"
depend() {
need localmount
after udev openct dbus
use logger
}
start_pre() {
checkpath -q -d -m 0755 -o pcscd:pcscd /run/pcscd
}

View file

@ -0,0 +1,14 @@
#!/bin/sh
#
# pcscd.sh: udev external RUN script
#
# based on netifrc net.sh helper
# Copyright 2007 Roy Marples <uberlord@gentoo.org>
# Distributed under the terms of the GNU General Public License v2
# make sure openrc is managing services
if [ ! -d /run/openrc ]; then
exit 0
fi
IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start

View file

@ -0,0 +1 @@
d /run/pcscd 0755 pcscd pcscd -

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<use>
<flag name="embedded">limit RAM and CPU ressources by disabling features</flag>
<flag name="libusb" restrict="&gt;=sys-apps/pcsc-lite-1.8.0">Use <pkg>dev-libs/libusb</pkg> detection to hotplug new smartcard readers. This flag should only be enabled if you're running a non-Linux kernel or you don't want to use udev.</flag>
<flag name="udev">Use <pkg>virtual/libudev</pkg> rules to handle devices' permissions and hotplug support. Unless you know what you're doing do not disable this flag on Linux kernels. This is provided as an option for completeness.</flag>
<flag name="policykit">Uses <pkg>sys-auth/polkit</pkg> to restrict access to smartcard readers or smartcards to given users.</flag>
</use>
<upstream>
<changelog>https://salsa.debian.org/rousseau/PCSC/blob/master/ChangeLog</changelog>
<remote-id type="github">LudovicRousseau/PCSC</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,109 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
inherit python-single-r1 systemd tmpfiles udev multilib-minimal
DESCRIPTION="PC/SC Architecture smartcard middleware library"
HOMEPAGE="https://pcsclite.apdu.fr https://github.com/LudovicRousseau/PCSC"
SRC_URI="https://pcsclite.apdu.fr/files/${P}.tar.bz2"
# GPL-2 is there for the init script; everything else comes from
# upstream.
LICENSE="BSD ISC MIT GPL-3+ GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
# This is called libusb so that it doesn't fool people in thinking that
# it is _required_ for USB support. Otherwise they'll disable udev and
# that's going to be worse.
IUSE="doc embedded libusb policykit selinux systemd +udev"
REQUIRED_USE="^^ ( udev libusb ) ${PYTHON_REQUIRED_USE}"
# No dependencies need the MULTILIB_DEPS because the libraries are actually
# standalone, the deps are only needed for the daemon itself.
DEPEND="
libusb? ( virtual/libusb:1 )
udev? ( virtual/libudev:= )
policykit? ( >=sys-auth/polkit-0.111 )
acct-group/openct
acct-group/pcscd
acct-user/pcscd
${PYTHON_DEPS}"
RDEPEND="${DEPEND}
selinux? ( sec-policy/selinux-pcscd )"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-1.8.11-polkit-pcscd.patch
"${FILESDIR}"/${PN}-1.9.8-systemd-user.patch
)
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
--disable-maintainer-mode \
--disable-strict \
--enable-usbdropdir="${EPREFIX}"/usr/$(get_libdir)/readers/usb \
--enable-ipcdir=/run/pcscd \
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
$(multilib_native_use_enable doc documentation) \
$(multilib_native_use_enable embedded) \
$(multilib_native_use_enable systemd libsystemd) \
$(multilib_native_use_enable udev libudev) \
$(multilib_native_use_enable libusb) \
$(multilib_native_use_enable policykit polkit)
}
multilib_src_install_all() {
einstalldocs
dodoc HELP SECURITY
newinitd "${FILESDIR}"/pcscd-init.7 pcscd
dotmpfiles "${FILESDIR}"/pcscd.conf
if use udev; then
exeinto "$(get_udevdir)"
newexe "${FILESDIR}"/pcscd-udev pcscd.sh
insinto "$(get_udevdir)"/rules.d
newins "${FILESDIR}"/99-pcscd-hotplug-r1.rules 99-pcscd-hotplug.rules
fi
python_fix_shebang "${ED}"/usr/bin/pcsc-spy
find "${ED}" -name '*.la' -delete || die
}
pkg_postinst() {
elog "Starting from version 1.6.5, pcsc-lite will start as user nobody in"
elog "the pcscd group, to avoid running as root."
elog
elog "This also means you need the newest drivers available so that the"
elog "devices get the proper owner."
elog
elog "Furthermore, a conf.d file is no longer installed by default, as"
elog "the default configuration does not require one. If you need to"
elog "pass further options to pcscd, create a file and set the"
elog "EXTRA_OPTS variable."
elog
if use udev; then
elog "Hotplug support is provided by udev rules."
elog "When using OpenRC you additionally need to tell it to hotplug"
elog "pcscd by setting this variable in /etc/rc.conf:"
elog
elog " rc_hotplug=\"pcscd\""
fi
tmpfiles_process pcscd.conf
use udev && udev_reload
}
pkg_postrm() {
use udev && udev_reload
}

1
sys-libs/ldb/Manifest Normal file
View file

@ -0,0 +1 @@
DIST ldb-2.8.0.tar.gz 1747616 BLAKE2B 19fd4cc0893ca36e7aa65eb605b050e3faeb7add6c00a2dfd8415334c58b7dc644ffaad41c24fe358b39292aaa581e3231e6b8161b03c073e903cdae16050ac5 SHA512 b6f289af3137e02a8e3ee0588bc300d1756b8980558e0b3a3a9eee4449100ccd42ed873187dbdb334e7e7834a8bff8478cd4f20588d4ca834d9ea14c0ee2c2f9

View file

@ -0,0 +1,17 @@
--- a/wscript 2017-07-05 15:35:52.178964698 -0400
+++ b/wscript 2017-07-05 15:49:20.137977649 -0400
@@ -208,6 +208,14 @@
ldb_headers = ('include/ldb.h include/ldb_errors.h '
'include/ldb_module.h include/ldb_handlers.h')
+ # we're not currently linking against the ldap libs, but ldb.pc.in
+ # has @LDAP_LIBS@
+ bld.env.LDAP_LIBS = ''
+
+ if not 'PACKAGE_VERSION' in bld.env:
+ bld.env.PACKAGE_VERSION = VERSION
+ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+
bld.SAMBA_LIBRARY('ldb',
COMMON_SRC + ' ' + LDB_MAP_SRC,
deps='tevent LIBLDB_MAIN replace',

View file

@ -0,0 +1,40 @@
--- ldb-1.5.2/wscript
+++ ldb-1.5.2/wscript
@@ -33,6 +33,10 @@
opt.RECURSE('lib/tevent')
opt.RECURSE('lib/replace')
opt.load('python') # options for disabling pyc or pyo compilation
+ if opt.IN_LAUNCH_DIR():
+ opt.add_option('--disable-ldap',
+ help=("disable ldap support"),
+ action="store_true", dest='disable_ldap', default=False)
opt.add_option('--without-ldb-lmdb',
help='disable new LMDB backend for LDB',
@@ -40,6 +44,10 @@
def configure(conf):
+ conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
+
+ conf.env.disable_ldap = getattr(Options.options, 'disable_ldap', False)
+
conf.RECURSE('lib/tdb')
conf.RECURSE('lib/tevent')
@@ -157,9 +165,12 @@
if conf.env.standalone_ldb:
conf.CHECK_XSLTPROC_MANPAGES()
- # we need this for the ldap backend
- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
- conf.env.ENABLE_LDAP_BACKEND = True
+ if not conf.env.disable_ldap:
+ # we need this for the ldap backend
+ if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+ conf.env.ENABLE_LDAP_BACKEND = True
+ else:
+ conf.env.ENABLE_LDAP_BACKEND = False
# we don't want any libraries or modules to rely on runtime
# resolution of symbols

View file

@ -0,0 +1,35 @@
From 38f5e8e09a7ae641b3669068b10c6bd966e46632 Mon Sep 17 00:00:00 2001
From: Mathieu Parent <math.parent@gmail.com>
Date: Thu, 4 Nov 2021 22:46:15 +0100
Subject: [PATCH] Skip failing tests (on 32-bit architectures)
See https://bugzilla.samba.org/show_bug.cgi?id=14558#c17
---
tests/python/api.py | 4 ++++++
1 file changed, 4 insertions(+)
diff --git a/tests/python/api.py b/tests/python/api.py
index 8d154aa..e1de40c 100755
--- a/tests/python/api.py
+++ b/tests/python/api.py
@@ -44,6 +44,8 @@ class NoContextTests(TestCase):
self.assertEqual("19700101000000.0Z", ldb.timestring(0))
self.assertEqual("20071119191012.0Z", ldb.timestring(1195499412))
+ self.skipTest('Test failing on 32-bit')
+
self.assertEqual("00000101000000.0Z", ldb.timestring(-62167219200))
self.assertEqual("99991231235959.0Z", ldb.timestring(253402300799))
@@ -62,6 +64,8 @@ class NoContextTests(TestCase):
self.assertEqual(0, ldb.string_to_time("19700101000000.0Z"))
self.assertEqual(1195499412, ldb.string_to_time("20071119191012.0Z"))
+ self.skipTest('Test failing on 32-bit')
+
self.assertEqual(-62167219200, ldb.string_to_time("00000101000000.0Z"))
self.assertEqual(253402300799, ldb.string_to_time("99991231235959.0Z"))
--
2.30.2

View file

@ -0,0 +1,12 @@
--- ldb-1.3.6/lib/tevent/wscript
+++ ldb-1.3.6/lib/tevent/wscript
@@ -34,8 +34,7 @@
if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
onlyif='talloc', implied_deps='replace talloc'):
conf.define('USING_SYSTEM_TEVENT', 1)
- if not conf.env.disable_python and \
- conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
+ if not conf.env.disable_python:
conf.define('USING_SYSTEM_PYTEVENT', 1)
if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):

View file

@ -0,0 +1,173 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="threads(+)"
inherit python-single-r1 waf-utils multilib-minimal
DESCRIPTION="LDAP-like embedded database"
HOMEPAGE="https://ldb.samba.org"
SRC_URI="https://samba.org/ftp/pub/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0/${PV}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="doc ldap +lmdb python test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
test? ( lmdb )"
RESTRICT="!test? ( test )"
TALLOC_VERSION="2.4.1"
TDB_VERSION="1.4.9"
TEVENT_VERSION="0.15.0"
RDEPEND="
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
ldap? ( net-nds/openldap:= )
lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
python? (
${PYTHON_DEPS}
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
"
DEPEND="
${RDEPEND}
virtual/libcrypt
test? ( >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] )
"
BDEPEND="${PYTHON_DEPS}
dev-libs/libxslt
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
WAF_BINARY="${S}/buildtools/bin/waf"
MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
PATCHES=(
"${FILESDIR}"/${PN}-1.5.2-optional_packages.patch
"${FILESDIR}"/${PN}-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
"${FILESDIR}"/${PN}-2.4.2-skip-32bit-time_t-tests.patch
"${FILESDIR}"/${PN}-2.5.2-skip-waf-tevent-check.patch
)
pkg_setup() {
# Package fails to build with distcc
export DISTCC_DISABLE=1
export PYTHONHASHSEED=1
# waf requires a python interpreter
python-single-r1_pkg_setup
}
check_samba_dep_versions() {
actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
eerror "Source talloc version: ${TALLOC_VERSION}"
eerror "Ebuild talloc version: ${actual_talloc_version}"
die "Ebuild needs to fix TALLOC_VERSION!"
fi
actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
eerror "Source tdb version: ${TDB_VERSION}"
eerror "Ebuild tdb version: ${actual_tdb_version}"
die "Ebuild needs to fix TDB_VERSION!"
fi
actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
eerror "Source tevent version: ${TEVENT_VERSION}"
eerror "Ebuild tevent version: ${actual_tevent_version}"
die "Ebuild needs to fix TEVENT_VERSION!"
fi
}
src_prepare() {
default
check_samba_dep_versions
if use test && ! use python ; then
# We want to be able to run tests w/o Python as it makes
# automated testing much easier (as USE=python isn't default-enabled).
truncate -s0 tests/python/{repack,index,api,crash}.py || die
fi
multilib_copy_sources
}
multilib_src_configure() {
# When specifying libs for samba build you must append NONE to the end to
# stop it automatically including things
local bundled_libs="NONE"
# We "use" bundled cmocka when we're not running tests as we're
# not using it anyway. Means we avoid making users install it for
# no reason. bug #802531
if ! use test; then
bundled_libs="cmocka,${bundled_libs}"
fi
local myconf=(
$(usex ldap '' --disable-ldap)
$(usex lmdb '' --without-ldb-lmdb)
--disable-rpath
--disable-rpath-install
--with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba
--bundled-libraries="${bundled_libs}"
--builtin-libraries=NONE
)
if ! use python || ! multilib_is_native_abi; then
myconf+=( --disable-python )
fi
waf-utils_src_configure "${myconf[@]}"
}
multilib_src_compile() {
waf-utils_src_compile
multilib_is_native_abi && use doc && doxygen Doxyfile
}
multilib_src_test() {
if multilib_is_native_abi; then
WAF_MAKE=1 \
PATH=buildtools/bin:../../../buildtools/bin:${PATH}:"${BUILD_DIR}"/bin/shared/private/ \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
waf test || die
fi
}
multilib_src_install() {
waf-utils_src_install
if multilib_is_native_abi && use doc; then
doman apidocs/man/man3/*.3
docinto html
dodoc -r apidocs/html/.
fi
# bug #726454
use python && python_optimize
}
pkg_postinst() {
if has_version sys-auth/sssd; then
ewarn "You have sssd installed. It is known to break after ldb upgrades,"
ewarn "so please try to rebuild it before reporting bugs."
ewarn "See https://bugs.gentoo.org/404281"
fi
}

Some files were not shown because too many files have changed in this diff Show more