forked from osmocom/wireshark
MSYS2: Add some packages for missing dependencies
Add mingw packages for dependencies that are missing upstream; these should eventually be submitted there. Fix a version check for libsmi. Update README.master
parent
84f3a094d4
commit
7738d5af5d
46
README.msys2
46
README.msys2
|
@ -5,49 +5,49 @@ How to setup MSYS2:
|
|||
|
||||
1. Download and install MSYS2 from https://www.msys2.org.
|
||||
|
||||
2. Open the MSYS2 MSYS shell.
|
||||
2. Open the MSYS shell.
|
||||
|
||||
3. Update with "pacman -Syu" as many times as necessary. You also need to
|
||||
have base-devel installed: pacman -S base-devel. Anytime you
|
||||
want to run pacman it's recommended to do so from the MSYS shell.
|
||||
have base-devel installed:
|
||||
|
||||
$ pacman -S base-devel.
|
||||
|
||||
How to build the Wireshark MSYS2 package:
|
||||
|
||||
1. Open the MSYS2 MSYS shell.
|
||||
1. Open the UCRT64 shell.
|
||||
|
||||
2. Create a build directory and copy the PKGBUILD from the source tree:
|
||||
2. (Optional) Build and install some missing dependencies in the MSYS2 repository.
|
||||
|
||||
$ mkdir build && cd build
|
||||
$ wget https://gitlab.com/wireshark/wireshark/-/raw/master/packaging/msys2/mingw-w64-wireshark-git/PKGBUILD
|
||||
$ cd $srcdir/packaging/msys2/mingw-w64-bcg729
|
||||
$ makepkg-mingw -si
|
||||
|
||||
3. Build the package:
|
||||
$ cd $srcdir/packaging/msys2/mingw-w64-libsmi
|
||||
$ makepkg-mingw -si
|
||||
|
||||
$ makepkg-mingw -sCLf
|
||||
$ cd $srcdir/packaging/msys2/mingw-w64-sbc
|
||||
$ makepkg-mingw -si
|
||||
|
||||
4. Install it:
|
||||
3. Build and install Wireshark
|
||||
|
||||
$ pacman -U mingw-w64-*-wireshark-*-any.pkg.tar.zst
|
||||
$ cd $srcdir/packaging/msys2/mingw-w64-wireshark-git
|
||||
$ makepkg-mingw -si
|
||||
|
||||
The application must be run from the MINGW64 shell.
|
||||
The application should be launched using the same shell (UCRT64 in this case).
|
||||
|
||||
Currently the MinGW-w64 build has the following limitations compared to
|
||||
the MSVC build:
|
||||
Currently the MSYS2 build has the following limitations compared to
|
||||
the build using Visual Studio (MSVC):
|
||||
|
||||
* The Event Tracing for Windows (ETW) extcap is not supported.
|
||||
* The Event Tracing for Windows (ETW) extcap cannot be compiled using MinGW-w64.
|
||||
|
||||
* Lua version is 5.1 (MSVC uses Lua 5.2) and does not have UTF-8 patches[1].
|
||||
|
||||
* Some optional dependencies are not available in the official MSYS2
|
||||
repositories. These are:
|
||||
* Kerberos dependency for enhanced Kerberos dissection is not available
|
||||
in the repositories.
|
||||
|
||||
- AirPcap
|
||||
- libsmi
|
||||
- Kerberos
|
||||
- SBC codec
|
||||
- BCG729 codec
|
||||
* AirPcap is not available and there is no plan to support it.
|
||||
|
||||
* There is currently no way to build a stand-alone distributable binary
|
||||
package, similar to the Wireshark NSIS installer built using Visual Studio.
|
||||
installer, similar to the Wireshark NSIS installer using MSVC.
|
||||
|
||||
References:
|
||||
|
||||
|
|
|
@ -213,11 +213,11 @@ extern void oid_add_from_encoded(const char* name, const guint8 *oid, gint oid_l
|
|||
|
||||
static void smi_free(void *ptr) {
|
||||
|
||||
#if (SMI_VERSION_MAJOR >= 0) && (SMI_VERSION_MINOR >= 4) && (SMI_VERSION_PATCHLEVEL >= 8)
|
||||
#if (SMI_VERSION_MAJOR > 0) || (SMI_VERSION_MINOR > 4) || (SMI_VERSION_PATCHLEVEL >= 8)
|
||||
smiFree(ptr);
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#error Invalid Windows libsmi version ?? !!
|
||||
#error Unsupported Windows libsmi version < 0.4.8
|
||||
#endif
|
||||
#define xx_free free /* hack so checkAPIs.pl doesn't complain */
|
||||
xx_free(ptr);
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
# Maintainer: Wireshark Core Team <wireshark-dev@wireshark.org>
|
||||
|
||||
_realname=bcg729
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.1.1
|
||||
pkgrel=1
|
||||
pkgdesc="Encoder and decoder of the ITU G.729 Annex A/B speech codec (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
url='https://www.linphone.org/technical-corner/bcg729/overview'
|
||||
license=('GPL2')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("https://github.com/BelledonneCommunications/bcg729/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||
sha256sums=('68599a850535d1b182932b3f86558ac8a76d4b899a548183b062956c5fdc916d')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
"${MINGW_PREFIX}"/bin/cmake.exe \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
|
||||
"${extra_config[@]}" \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
"${MINGW_PREFIX}"/bin/cmake.exe --build .
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install .
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Wireshark Core Team <wireshark-dev@wireshark.org>
|
||||
|
||||
_realname=libsmi
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=0.5.0
|
||||
pkgrel=1
|
||||
pkgdesc="C library allowing NM apps and MIB and PIB authoring tools to access SMI MIB info (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
url='http://www.ibr.cs.tu-bs.de/projects/libsmi/'
|
||||
license=('Custom')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("https://www.ibr.cs.tu-bs.de/projects/${_realname}/download/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c725754d3')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
../"${_realname}-${pkgver}"/configure \
|
||||
--prefix="${MINGW_PREFIX}" \
|
||||
--build="${MINGW_CHOST}" \
|
||||
--host="${MINGW_CHOST}" \
|
||||
--target="${MINGW_CHOST}" \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
make install DESTDIR="${pkgdir}"
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/sbc/sbc_math.h b/sbc/sbc_math.h
|
||||
index 5476860..97de2dd 100644
|
||||
--- a/sbc/sbc_math.h
|
||||
+++ b/sbc/sbc_math.h
|
||||
@@ -23,6 +23,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
+#include <stdint.h>
|
||||
|
||||
#define fabs(x) ((x) < 0 ? -(x) : (x))
|
||||
/* C does not provide an explicit arithmetic shift right but this will
|
|
@ -0,0 +1,48 @@
|
|||
# Maintainer: Wireshark Core Team <wireshark-dev@wireshark.org>
|
||||
|
||||
_realname=sbc
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=2.0
|
||||
pkgrel=1
|
||||
pkgdesc="Bluetooth Subband Codec (SBC) library (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
url='http://www.bluez.org'
|
||||
license=('LGPL')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("https://mirrors.edge.kernel.org/pub/linux/bluetooth/${_realname}-${pkgver}.tar.gz"
|
||||
"0001-include-stdint-h.patch")
|
||||
sha256sums=('897c1463fc6ad25a7822dfa2ce53c340c4ac8054eab381f72aa7d3bf16517738'
|
||||
'e4960a21717a068e33452bec96cdd7626939dc0a6455a7035d4de7dfe72e7948')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
patch -p1 -i "${srcdir}/0001-include-stdint-h.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
../"${_realname}-${pkgver}"/configure \
|
||||
--prefix="${MINGW_PREFIX}" \
|
||||
--build="${MINGW_CHOST}" \
|
||||
--host="${MINGW_CHOST}" \
|
||||
--target="${MINGW_CHOST}" \
|
||||
--enable-static \
|
||||
--enable-shared \
|
||||
--disable-tester \
|
||||
--disable-tools
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
make install DESTDIR="${pkgdir}"
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
|
@ -10,7 +10,9 @@ arch=('any')
|
|||
mingw_arch=('mingw64' 'ucrt64' 'clang64')
|
||||
url="https://www.wireshark.org"
|
||||
license=('GPL2')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-brotli"
|
||||
depends=(
|
||||
# "${MINGW_PACKAGE_PREFIX}-bcg729"
|
||||
"${MINGW_PACKAGE_PREFIX}-brotli"
|
||||
"${MINGW_PACKAGE_PREFIX}-c-ares"
|
||||
"${MINGW_PACKAGE_PREFIX}-glib2"
|
||||
"${MINGW_PACKAGE_PREFIX}-gnutls"
|
||||
|
@ -18,6 +20,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-brotli"
|
|||
"${MINGW_PACKAGE_PREFIX}-libilbc"
|
||||
"${MINGW_PACKAGE_PREFIX}-libmaxminddb"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpcap"
|
||||
# "${MINGW_PACKAGE_PREFIX}-libsmi"
|
||||
"${MINGW_PACKAGE_PREFIX}-libssh"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2"
|
||||
"${MINGW_PACKAGE_PREFIX}-lua51"
|
||||
|
@ -29,6 +32,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-brotli"
|
|||
"${MINGW_PACKAGE_PREFIX}-qt6-base"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt6-multimedia"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt6-5compat"
|
||||
# "${MINGW_PACKAGE_PREFIX}-sbc"
|
||||
"${MINGW_PACKAGE_PREFIX}-snappy"
|
||||
"${MINGW_PACKAGE_PREFIX}-spandsp"
|
||||
"${MINGW_PACKAGE_PREFIX}-speexdsp"
|
||||
|
|
Loading…
Reference in New Issue