From 80c9dbcd99bd44c2ad719d97168b73d4a8809f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 26 Jan 2024 21:18:53 +0700 Subject: [PATCH 1/2] New package: sqlite-lemon-3.45.0 --- srcpkgs/sqlite-lemon/template | 29 +++++++++++++++++++++++++++++ srcpkgs/sqlite-lemon/update | 1 + 2 files changed, 30 insertions(+) create mode 100644 srcpkgs/sqlite-lemon/template create mode 100644 srcpkgs/sqlite-lemon/update diff --git a/srcpkgs/sqlite-lemon/template b/srcpkgs/sqlite-lemon/template new file mode 100644 index 0000000000000..ce9132a399a91 --- /dev/null +++ b/srcpkgs/sqlite-lemon/template @@ -0,0 +1,29 @@ +# Template file for 'sqlite-lemon' +pkgname=sqlite-lemon +version=3.45.0 +revision=1 +short_desc="LALR(1) Parser Generator" +maintainer="Đoàn Trần Công Danh " +license="Public Domain" +homepage="https://sqlite.org/lemon.html" +distfiles="https://raw.githubusercontent.com/sqlite/sqlite/version-${version}/tool/lemon.c + https://raw.githubusercontent.com/sqlite/sqlite/version-${version}/tool/lempar.c" +checksum="8a7d39a6d55cef0e6769f869a09d1269e3aca366c44291e1445bb877e5e94b00 + 4cfe425b513895dd11af7d3cde963920a2daeb7f5731f706e6973bfc79f207ed" + +skip_extraction="lemon.c lempar.c" + +do_extract() { + vsrccopy $skip_extraction . + vsed -i -e 's,"lempar","/usr/share/lemon/lempar.c",' lemon.c +} + +do_build() { + echo $CC $CFLAGS $LDFLAGS -o lemon lemon.c + $CC $CFLAGS $LDFLAGS -o lemon lemon.c +} + +do_install() { + vbin lemon + vinstall lempar.c 644 usr/share/lemon +} diff --git a/srcpkgs/sqlite-lemon/update b/srcpkgs/sqlite-lemon/update new file mode 100644 index 0000000000000..425926ce0dad9 --- /dev/null +++ b/srcpkgs/sqlite-lemon/update @@ -0,0 +1 @@ +pattern='>Version \K[\d.]+' From 4c3cee024e9f4b8f0d6e6d614c69937323aeed9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 26 Jan 2024 21:18:11 +0700 Subject: [PATCH 2/2] wireshark: update to 4.2.2. --- common/shlibs | 3 -- .../patches/HAVE_C99_VSNPRINTF.patch | 35 ---------------- srcpkgs/wireshark/patches/cross.patch | 41 ------------------- .../wireshark/patches/install-pkgconfig.patch | 32 +++++++++++++++ srcpkgs/wireshark/template | 17 ++++---- 5 files changed, 42 insertions(+), 86 deletions(-) delete mode 100644 srcpkgs/wireshark/patches/HAVE_C99_VSNPRINTF.patch delete mode 100644 srcpkgs/wireshark/patches/cross.patch create mode 100644 srcpkgs/wireshark/patches/install-pkgconfig.patch diff --git a/common/shlibs b/common/shlibs index 27763bf428b75..bd91984e1a6d7 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1550,9 +1550,6 @@ libdovecot-compression.so.0 dovecot-2.3.13_3 libdovecot-sql.so.0 dovecot-2.3.13_3 libdovecot-storage.so.0 dovecot-2.3.13_3 libdovecot-lda.so.0 dovecot-2.3.13_3 -libwiretap.so.13 libwireshark-4.0.0_1 -libwireshark.so.16 libwireshark-4.0.0_1 -libwsutil.so.14 libwireshark-4.0.0_1 libKPim5ContactEditor.so.5 akonadi-contacts-23.04.0_1 libKPim5AkonadiContact.so.5 akonadi-contacts-23.04.0_1 libKF5Prison.so.5 prison-5.43.0_1 diff --git a/srcpkgs/wireshark/patches/HAVE_C99_VSNPRINTF.patch b/srcpkgs/wireshark/patches/HAVE_C99_VSNPRINTF.patch deleted file mode 100644 index b500598fd3603..0000000000000 --- a/srcpkgs/wireshark/patches/HAVE_C99_VSNPRINTF.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/ConfigureChecks.cmake 2021-12-29 13:12:48.000000000 -0600 -+++ b/ConfigureChecks.cmake 2022-01-06 06:45:07.907628761 -0600 -@@ -104,32 +104,6 @@ - check_symbol_exists(tzname "time.h" HAVE_TZNAME) - - # --# Check if the libc vsnprintf() conforms to C99. If this fails we may --# need to fall-back on GLib I/O. --# --check_c_source_runs(" -- #include -- int main(void) -- { -- /* Check that snprintf() and vsnprintf() don't return -- * -1 if the buffer is too small. C99 says this value -- * is the length that would be written not including -- * the nul byte. */ -- char buf[3]; -- return snprintf(buf, sizeof(buf), \"%s\", \"ABCDEF\") > 0 ? 0 : 1; -- }" -- HAVE_C99_VSNPRINTF --) --if (NOT HAVE_C99_VSNPRINTF) -- message(FATAL_ERROR --"Building Wireshark requires a C99 compliant vsnprintf() and this \ --target does not meet that requirement. Compiling for ${CMAKE_SYSTEM} \ --using ${CMAKE_C_COMPILER_ID}. Please report this issue to the Wireshark \ --developers at wireshark-dev@wireshark.org." -- ) --endif() -- --# - # *If* we found libnl, check if we can use nl80211 stuff with it. - # - if (NL_FOUND) diff --git a/srcpkgs/wireshark/patches/cross.patch b/srcpkgs/wireshark/patches/cross.patch deleted file mode 100644 index d454505b8279c..0000000000000 --- a/srcpkgs/wireshark/patches/cross.patch +++ /dev/null @@ -1,41 +0,0 @@ -Source: Johannes (@jnbr) -Upstream: no - ---- a/tools/lemon/CMakeLists.txt 2019-02-28 18:56:38.000000000 +0100 -+++ b/tools/lemon/CMakeLists.txt 2019-03-11 20:41:14.211616335 +0100 -@@ -7,6 +7,14 @@ - # SPDX-License-Identifier: GPL-2.0-or-later - # - -+if(CMAKE_CROSSCOMPILING) -+ add_custom_target( -+ lemon -+ COMMAND $ENV{CC_FOR_BUILD} -o ${EXECUTABLE_OUTPUT_PATH}/lemon ${CMAKE_CURRENT_SOURCE_DIR}/lemon.c -+ COMMENT "generate lemon for host" -+ ) -+else() -+ - add_executable(lemon lemon.c) - - # To keep lemon.c as close to upstream as possible, deliberately ignore -@@ -62,6 +70,7 @@ - endif() - target_compile_options(lemon PRIVATE ${lemon_cflags}) - -+endif() # CMAKE_CROSSCOMPILING - # - # Editor modelines - https://www.wireshark.org/tools/modelines.html - # - ---- a/cmake/modules/UseLemon.cmake 2019-02-28 18:56:38.000000000 +0100 -+++ b/cmake/modules/UseLemon.cmake 2019-03-11 21:19:28.352163076 +0100 -@@ -13,7 +13,7 @@ - # These files are generated as side-effect - ${_out}.h - ${_out}.out -- COMMAND $ -+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/lemon - -T${_lemonpardir}/lempar.c - -d. - ${_in} - diff --git a/srcpkgs/wireshark/patches/install-pkgconfig.patch b/srcpkgs/wireshark/patches/install-pkgconfig.patch new file mode 100644 index 0000000000000..8816155aa520d --- /dev/null +++ b/srcpkgs/wireshark/patches/install-pkgconfig.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3981,7 +3981,6 @@ set(SHARK_PUBLIC_HEADERS + install(FILES ${SHARK_PUBLIC_HEADERS} + DESTINATION ${PROJECT_INSTALL_INCLUDEDIR} + COMPONENT "Development" +- EXCLUDE_FROM_ALL + ) + + # Install icons and other desktop files for Freedesktop.org-compliant desktops. +@@ -4039,7 +4038,6 @@ install( + ${CMAKE_INSTALL_LIBDIR}/pkgconfig + COMPONENT + "Development" +- EXCLUDE_FROM_ALL + ) + + install( +@@ -4093,13 +4091,11 @@ install( + ${WIRESHARK_INSTALL_CMAKEDIR} + COMPONENT + "Development" +- EXCLUDE_FROM_ALL + ) + + install(EXPORT WiresharkTargets + DESTINATION ${WIRESHARK_INSTALL_CMAKEDIR} + COMPONENT "Development" +- EXCLUDE_FROM_ALL + ) + + # This isn't strictly needed but it makes working around debhelper's diff --git a/srcpkgs/wireshark/template b/srcpkgs/wireshark/template index 7e29cc31431eb..70d9ac504406c 100644 --- a/srcpkgs/wireshark/template +++ b/srcpkgs/wireshark/template @@ -1,23 +1,26 @@ # Template file for 'wireshark' pkgname=wireshark -version=4.0.6 +version=4.2.2 revision=1 build_style=cmake +configure_args="-DHAVE_C99_VSNPRINTF=ON" hostmakedepends="pkg-config flex gettext perl python3-devel mit-krb5-devel -qt5-tools qt5-host-tools qt5-qmake ruby-asciidoctor" + qt6-base qt6-tools ruby-asciidoctor libxslt sqlite-lemon" makedepends="libpcap-devel zlib-devel lua52-devel mit-krb5-devel gnutls-devel - libmaxminddb-devel libgcrypt-devel libcap-devel sbc-devel c-ares-devel libxml2-devel + libmaxminddb-devel libgcrypt-devel libcap-devel sbc-devel c-ares-devel libssh-devel libnl3-devel spandsp-devel tiff-devel libcap-progs liblz4-devel - nghttp2-devel qt5-devel qt5-tools-devel qt5-multimedia-devel qt5-svg-devel + libxml2-devel nghttp2-devel + qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-qt5compat-devel minizip-devel libzstd-devel brotli-devel speexdsp-devel pcre2-devel" -depends="libcap-progs" +depends="libcap-progs qt6-svg" +checkdepends="python3-pytest-xdist" short_desc="Network protocol analyzer" maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://www.wireshark.org" changelog="https://www.wireshark.org/news/" distfiles="https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz" -checksum=0079097a1b17ebc7250a73563f984c13327dac5016b7d53165810fbcca4bd884 +checksum=9e3672be8c6caf9279a5a13582d6711ab699ae2a79323e92a99409c1ead98521 system_groups="wireshark" CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2" @@ -84,7 +87,7 @@ libwireshark-devel_package() { vmove usr/include vmove usr/lib/pkgconfig vmove "usr/lib/*.so" - vmove usr/lib/wireshark/cmake + vmove usr/lib/cmake/wireshark } }