ci: add clang builder for windows

This commit is contained in:
gnattu
2024-07-08 16:09:04 +08:00
parent beafe65987
commit a1dcffb7ac
104 changed files with 5887 additions and 28 deletions
@@ -0,0 +1,126 @@
on:
workflow_call:
inputs:
release:
required: false
default: false
type: boolean
secrets:
deploy-host:
required: false
deploy-user:
required: false
deploy-key:
required: false
jobs:
build:
name: 'Build Portable FFmpeg'
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
os:
- name: CLANG64
arch: win64
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: CLANG64
install: >-
git
curl
wget
mingw-w64-clang-x86_64-toolchain
quilt
diffstat
mingw-w64-clang-x86_64-nasm
- run: git config --global core.autocrlf input # Disable autoclr for windows
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Prepare prefix dir
run: |
mkdir /clang64/ffbuild
- name: Build Portable
run: ./msys2/build.sh
- name: Upload Artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: win-clang-${{ matrix.os.arch }}-portable
path: ./builder/artifacts
publish:
name: Publish Portable Release
if: ${{ inputs.release }}
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: true
matrix:
arch: [win64]
steps:
- name: Set Versions
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: set_version
with:
script: |
const tag = context.ref.substring(10)
const no_v = tag.replace('v', '')
const dash_index = no_v.lastIndexOf('-')
const major_index = no_v.indexOf('.')
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
const major = (major_index > -1) ? no_v.substring(0, major_index) : no_v
core.setOutput('tag', tag)
core.setOutput('no-v', no_v)
core.setOutput('no-dash', no_dash)
core.setOutput('major', major)
- name: Download Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: win-clang-${{ matrix.arch }}-portable
path: artifact
- name: Upload GH Release Assets
uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5
with:
upload_url: ${{ github.event.release.upload_url }}
overwrite: true
asset_path: |
./artifact/**/*.zip
- name: Upload release archive to repo.jellyfin.org
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
with:
host: ${{ secrets.deploy-host }}
username: ${{ secrets.deploy-user }}
key: ${{ secrets.deploy-key }}
source: artifact/*
strip_components: 1
target: /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/windows/${{ matrix.arch }}
- name: Move incoming release into repository
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: ${{ secrets.deploy-host }}
username: ${{ secrets.deploy-user }}
key: ${{ secrets.deploy-key }}
envs: JELLYFIN_VERSION
script_stop: true
script: |
# Create the target folder and move arch directory into it
sudo mkdir -p /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}
sudo mv -t /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}/ /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/windows/${{ matrix.arch }}/*
sudo chown -R root:root /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}
# Update symlink for latest-X.x
sudo rm -f /srv/repository/main/ffmpeg/windows/latest-${{ steps.set_version.outputs.major }}.x || true
sudo ln -s /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }} /srv/repository/main/ffmpeg/windows/latest-${{ steps.set_version.outputs.major }}.x || true
+43 -28
View File
@@ -18,37 +18,52 @@ on:
- '**/*.md'
jobs:
build_debian:
uses: ./.github/workflows/_meta.yaml
with:
distro: 'debian'
codenames: '["bullseye", "bookworm"]'
architectures: '["amd64", "arm64", "armhf"]'
release: false
build_ubuntu:
uses: ./.github/workflows/_meta.yaml
with:
distro: 'ubuntu'
codenames: '["focal", "jammy", "noble"]'
architectures: '["amd64", "arm64", "armhf"]'
release: false
# build_debian:
# uses: ./.github/workflows/_meta.yaml
# with:
# distro: 'debian'
# codenames: '["bullseye", "bookworm"]'
# architectures: '["amd64", "arm64", "armhf"]'
# release: false
#
# build_ubuntu:
# uses: ./.github/workflows/_meta.yaml
# with:
# distro: 'ubuntu'
# codenames: '["focal", "jammy", "noble"]'
# architectures: '["amd64", "arm64", "armhf"]'
# release: false
#
# build_portable_windows:
# uses: ./.github/workflows/_meta_portable.yaml
# with:
# os: 'windows'
# architectures: '["win64"]'
# release: false
build_portable_windows:
uses: ./.github/workflows/_meta_portable.yaml
strategy:
fail-fast: true
matrix:
cc:
- name: gcc
profile: _meta_portable
- name: clang
profile: _meta_win_clang_portable
uses: ./.github/workflows/${{ matrix.cc.profile }}.yaml
with:
os: 'windows'
architectures: '["win64"]'
release: false
build_portable_linux:
uses: ./.github/workflows/_meta_portable.yaml
with:
os: 'linux'
architectures: '["amd64", "arm64"]'
release: false
build_portable_mac:
uses: ./.github/workflows/_meta_mac_portable.yaml
with:
release: false
#
# build_portable_linux:
# uses: ./.github/workflows/_meta_portable.yaml
# with:
# os: 'linux'
# architectures: '["amd64", "arm64"]'
# release: false
#
# build_portable_mac:
# uses: ./.github/workflows/_meta_mac_portable.yaml
# with:
# release: false
@@ -0,0 +1,84 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=brotli
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=1.1.0
pkgrel=1
pkgdesc="Brotli compression library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/google/brotli'
msys2_references=(
"pypi: brotli"
"cpe: cpe:/a:google:brotli"
)
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-wheel"
)
license=('spdx:MIT')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/brotli/archive/v${pkgver}.tar.gz")
sha256sums=('e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
}
build() {
cd "${srcdir}/${_realname}-${pkgver}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}/ffbuild/ \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_STATIC=ON \
-DBUILD_STATIC_LIBS=ON \
../${_realname}-${pkgver}
${MINGW_PREFIX}/bin/cmake --build .
}
check() {
cd "${srcdir}"/build-${MSYSTEM}-static
${MINGW_PREFIX}/bin/ctest . || warning "Tests failed"
}
package_brotli() {
cd "${srcdir}"/build-${MSYSTEM}-static
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
install -D -m644 "${srcdir}"/brotli-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/ffbuild/share/licenses/${_realname}/LICENSE"
# Let ffmpeg also statically link to brotlicommon
sed -s "s|-lbrotlidec|-lbrotlidec\ -lbrotlicommon|g" -i "${pkgdir}"${MINGW_PREFIX}/ffbuild/lib/pkgconfig/libbrotlidec.pc
sed -s "s|-lbrotlidec|-lbrotlidec\ -lbrotlicommon|g" -i "${pkgdir}"${MINGW_PREFIX}/ffbuild/lib/pkgconfig/libbrotlienc.pc
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,71 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=bzip2
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.0.8
pkgrel=3
pkgdesc="A high-quality data compression program (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://sourceware.org/bzip2/"
msys2_references=(
"cpe: cpe:/a:bzip:bzip2"
)
license=("custom")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools")
options=('strip' 'staticlibs')
source=("https://sourceware.org/pub/bzip2/bzip2-${pkgver}.tar.gz"
"bzip2-cygming-1.0.6.src.all.patch"
"bzip2-buildsystem.all.patch"
"bzip2-1.0.6-progress.all.patch")
sha256sums=('ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269'
'7e67f77172b19f3e6c1f0875b1d3e9cb79211f8e1c752794ef9afd3704f928cf'
'e519a50a4adaf05b18650d3e9d644badc66e80ca86063681ffe9a2c2226319d0'
'f93e6b50082a8e880ee8436c7ec6a65a8f01e9282436af77f95bb259b1c7f7f7')
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
# remove files that are created by patches.
rm -rf README.CYGMING | true
rm -rf aclocal.m4 | true
rm -rf configure.ac | true
rm -rf libbz2.def.in | true
rm -rf bzip2.pc.in | true
rm -rf Makefile.in | true
patch -p1 -i "$srcdir/"bzip2-cygming-1.0.6.src.all.patch
patch -p1 -i "$srcdir/"bzip2-buildsystem.all.patch
patch -p1 -i "$srcdir/"bzip2-1.0.6-progress.all.patch
autoreconf -fi
}
build() {
mkdir -p "${srcdir}/build-${CARCH}"
cd "${srcdir}/build-${CARCH}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-shared
make all-libs
}
check() {
cd "${srcdir}/build-${CARCH}"
make -k check
}
package() {
cd "${srcdir}/build-${CARCH}"
make DESTDIR="${pkgdir}" install
# rm "${pkgdir}${MINGW_PREFIX}/bin/bz"{diff,grep,more}
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
@@ -0,0 +1,163 @@
Ripped from Mandrake
http://bugs.gentoo.org/82192
--- bzip2-1.0.6/bzip2.1
+++ bzip2-1.0.6/bzip2.1
@@ -235,6 +235,10 @@
Suppress non-essential warning messages. Messages pertaining to
I/O errors and other critical events will not be suppressed.
.TP
+.B \-p \-\-show\-progress
+Show percentage of input\-file done and while compressing show the percentage
+of the original file the new file is.
+.TP
.B \-v --verbose
Verbose mode -- show the compression ratio for each file processed.
Further \-v's increase the verbosity level, spewing out lots of
--- bzip2-1.0.6/bzip2.c
+++ bzip2-1.0.6/bzip2.c
@@ -145,6 +145,7 @@
#include <signal.h>
#include <math.h>
#include <errno.h>
+#include <time.h>
#include <ctype.h>
#include "bzlib.h"
@@ -301,6 +302,7 @@
Char progNameReally[FILE_NAME_LEN];
FILE *outputHandleJustInCase;
Int32 workFactor;
+Char showProgress;
static void panic ( Char* ) NORETURN;
static void ioError ( void ) NORETURN;
@@ -425,6 +427,12 @@
UInt32 nbytes_in_lo32, nbytes_in_hi32;
UInt32 nbytes_out_lo32, nbytes_out_hi32;
Int32 bzerr, bzerr_dummy, ret;
+ double fileSize = 0; /* initialized to make the compiler stop crying */
+ /* double because big files might otherwhise give
+ * overflows. not long long since not all compilers
+ * support that one
+ */
+ time_t startTime, currentTime;
SET_BINARY_MODE(stream);
SET_BINARY_MODE(zStream);
@@ -432,12 +440,21 @@
if (ferror(stream)) goto errhandler_io;
if (ferror(zStream)) goto errhandler_io;
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ (void)fseek(stream, 0, SEEK_END);
+ fileSize = ftello(stream);
+ rewind(stream);
+ if (verbosity >= 1)
+ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
+ }
+
bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
blockSize100k, verbosity, workFactor );
if (bzerr != BZ_OK) goto errhandler;
if (verbosity >= 2) fprintf ( stderr, "\n" );
+ time(&startTime);
while (True) {
if (myfeof(stream)) break;
@@ -446,6 +463,22 @@
if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
if (bzerr != BZ_OK) goto errhandler;
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ time(&currentTime);
+
+ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
+ double curInPos = ftello(stream);
+ double curOutPos = ftello(zStream);
+
+ startTime = currentTime;
+
+ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
+ if (srcMode == SM_F2F)
+ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
+
+ fprintf(stderr, " \r");
+ }
+ }
}
BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
@@ -526,6 +559,8 @@
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
UChar* unusedTmp;
+ double fileSize = 0; /* initialized to make the compiler stop crying */
+ time_t startTime, currentTime;
nUnused = 0;
streamNo = 0;
@@ -533,9 +568,19 @@
SET_BINARY_MODE(stream);
SET_BINARY_MODE(zStream);
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ off_t dummy = ftello(zStream);
+ (void)fseeko(zStream, 0, SEEK_END);
+ fileSize = ftello(zStream);
+ (void)fseeko(zStream, dummy, SEEK_SET);
+ if (verbosity >= 1)
+ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
+ }
+
if (ferror(stream)) goto errhandler_io;
if (ferror(zStream)) goto errhandler_io;
+ time(&startTime);
while (True) {
bzf = BZ2_bzReadOpen (
@@ -551,6 +596,16 @@
if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
fwrite ( obuf, sizeof(UChar), nread, stream );
if (ferror(stream)) goto errhandler_io;
+
+ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
+ time(&currentTime);
+ if ((currentTime - startTime) >= 2) {
+ double curInPos = ftello(zStream);
+ startTime = currentTime;
+
+ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
+ }
+ }
}
if (bzerr != BZ_STREAM_END) goto errhandler;
@@ -1872,6 +1927,7 @@
deleteOutputOnInterrupt = False;
exitValue = 0;
i = j = 0; /* avoid bogus warning from egcs-1.1.X */
+ showProgress = False;
/*-- Set up signal handlers for mem access errors --*/
signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
@@ -1949,6 +2005,7 @@
case 'k': keepInputFiles = True; break;
case 's': smallMode = True; break;
case 'q': noisy = False; break;
+ case 'p': showProgress = True; break;
case '1': blockSize100k = 1; break;
case '2': blockSize100k = 2; break;
case '3': blockSize100k = 3; break;
@@ -1985,6 +2042,7 @@
if (ISFLAG("--keep")) keepInputFiles = True; else
if (ISFLAG("--small")) smallMode = True; else
if (ISFLAG("--quiet")) noisy = False; else
+ if (ISFLAG("--show-progress")) showProgress = True; else
if (ISFLAG("--version")) license(); else
if (ISFLAG("--license")) license(); else
if (ISFLAG("--exponential")) workFactor = 1; else
@@ -0,0 +1,645 @@
--- bzip2-1.0.6/Makefile.in 1970-01-01 04:00:00 +0400
+++ bzip2-1.0.6/Makefile.in 2011-05-21 23:10:44 +0400
@@ -0,0 +1,386 @@
+# @configure_input@
+# ------------------------------------------------------------------
+# This file is part of bzip2/libbzip2, a program and library for
+# lossless, block-sorting data compression.
+#
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+#
+# File: Makefile.in for autoconf configuration
+# Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
+#
+# Please read the WARNING, DISCLAIMER and PATENTS sections in the
+# README file.
+#
+# This program is released under the terms of the license contained
+# in the file LICENSE.
+# ------------------------------------------------------------------
+
+PACKAGE = @PACKAGE_TARNAME@
+VERSION = @PACKAGE_VERSION@
+
+# If building libbz2 as a shared library, we use these version tags,
+SO_VER = 1
+SO_AGE = 0
+SO_REV = 6
+#
+# This yields a shared object library name below, following the
+# normal naming rules -- most linux distributions patch Julian's
+# original makefile to do something similar.
+#
+SO_MAJOR := $(shell expr $(SO_VER) - $(SO_AGE))
+SONAME = libbz2.so.$(SO_MAJOR)
+SOFULL = $(SONAME).$(SO_AGE).$(SO_REV)
+
+# For MS-Windows hosts, Julian's original build strategy, (and that
+# still adopted for building with MSVC), creates an unversioned DLL,
+# exporting functions using the __stdcall (WINAPI) calling convention.
+# Conversly, MinGW developers have chosen to sanitise the libbz2 ABI,
+# avoiding the use of the __stdcall calling convention, in favour of
+# the more GNU/Linux-alike __cdecl convention.
+#
+# To permit MinGW builds of libbz2.dll to co-exist, in the developer
+# universe, with MSVC builds, the MinGW Project has specified a scheme
+# for distribution of versioned DLLs, unambiguously named libbz2-N.dll,
+# where N is an ABI version number, nominally computed as:
+#
+# SO_VER - SO_AGE (ignoring SO_REV)
+#
+# Unfortunately, at an early stage in the evolution of the MinGW
+# versioned libbz2-N.dll, at a time when this version paradigm would
+# have yielded N = 1, a libbz2-1.dll was released, which employed the
+# __stdcall calling convention. Thus, to avoid potential confusion
+# with this early release, and specific to the case of libbz2-N.dll,
+# the DLLVER for the __cdecl releases, as computed by the configure
+# script will lead the nominal value by one, becoming effectively:
+#
+# 1 + SO_VER - SO_AGE
+#
+# Note that for cygwin, a similar scheme (SO_VER - SO_AGE) is used,
+# but on that platform the extra +1 is not needed.
+DLLVER = @DLLVER@
+DLLNAME = @DLLNAME@
+LIBNAME = libbz2
+
+
+# Shell used by make...
+#
+SHELL = @SHELL@
+
+# Where to find the sources...
+#
+VPATH = ${srcdir}
+srcdir = @srcdir@
+
+# To assist in cross-compiling...
+#
+CC = @CC@
+AR = @AR@
+RANLIB = @RANLIB@
+LN_S = @LN_S@
+
+OBJEXT = @OBJEXT@
+EXEEXT = @EXEEXT@
+
+BIGFILES = -D_FILE_OFFSET_BITS=64
+CFLAGS = @CFLAGS@ $(BIGFILES)
+LDFLAGS = @LDFLAGS@
+ARFLAGS = @ARFLAGS@
+
+# Where you want it installed when you do 'make install'
+#
+PREFIX = @prefix@
+
+OBJS= blocksort.$(OBJEXT) \
+ huffman.$(OBJEXT) \
+ crctable.$(OBJEXT) \
+ randtable.$(OBJEXT) \
+ compress.$(OBJEXT) \
+ decompress.$(OBJEXT) \
+ bzlib.$(OBJEXT)
+
+# Default build goals...
+#
+all: all-libs bzip2$(EXEEXT) bzip2recover$(EXEEXT)
+all-libs: libbz2.a @enable_shared@
+
+bzip2$(EXEEXT): libbz2.a bzip2.$(OBJEXT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ bzip2.$(OBJEXT) -L. -lbz2
+
+bzip2recover$(EXEEXT): bzip2recover.$(OBJEXT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+libbz2.a: $(OBJS)
+ rm -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(RANLIB) $@
+
+blocksort.$(OBJEXT): blocksort.c
+ @cat ${srcdir}/words0
+ $(CC) $(CFLAGS) -c -o $@ $^
+
+%.$(OBJEXT): %.c
+ $(CC) $(CFLAGS) -c -o$@ $<
+
+# Building using a shared library, for dynamic linking on GNU/Linux...
+# (Invoked when configured with `--enable-shared' for a non-Win32 host).
+#
+# This is incorporated from Julian's original Makefile-libbz2_so.
+# It is reported to work successfully on x86-Linux (Red Hat 7.2), with
+# gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98); YMMV.
+#
+# Please refer to README, for important information regarding building
+# libbz2 as a shared library, in this manner.
+#
+PICFLAGS = -fpic -fPIC -Wall -Winline $(CFLAGS)
+
+all-bzip2-shared: bzip2-shared$(EXEEXT)
+bzip2-shared$(EXEEXT): bzip2.c $(SOFULL)
+ $(CC) $(PICFLAGS) -o $@ $^
+
+$(SOFULL): $(OBJS:.$(OBJEXT)=-pic.$(OBJEXT))
+ $(CC) -shared -Wl,-soname -Wl,$(SONAME) -o $@ $^
+ rm -f $(SONAME); $(LN_S) $@ $(SONAME)
+ rm -f $(SONAME).$(SO_AGE); $(LN_S) $@ $(SONAME).$(SO_AGE)
+
+%-pic.$(OBJEXT): %.c
+ $(CC) $(PICFLAGS) -c -o $@ $<
+
+# Building using a shared library, for dynamic linking on MS-Windows
+# and cygwin...
+# (Invoked when configured with `--enable-shared' for a Win32/cygwin host)
+
+all-dll-shared: $(LIBNAME).dll.a
+
+$(LIBNAME).dll.a: $(DLLNAME)-$(DLLVER).dll
+
+$(DLLNAME)-$(DLLVER).dll: libbz2.def $(OBJS)
+ $(CC) -shared -o $@ $(LDFLAGS) -Wl,--out-implib=$(LIBNAME).dll.a $(OBJS)
+
+libbz2.def: libbz2.def.in
+ sed -e s,%DLLNAME%,$(DLLNAME), -e s,%DLLVER%,$(DLLVER), $^ > $@
+
+# Build validation...
+#
+check: test
+test: bzip2$(EXEEXT)
+ @cat ${srcdir}/words1
+ ./bzip2$(EXEEXT) -1 < ${srcdir}/sample1.ref > sample1.rb2
+ ./bzip2$(EXEEXT) -2 < ${srcdir}/sample2.ref > sample2.rb2
+ ./bzip2$(EXEEXT) -3 < ${srcdir}/sample3.ref > sample3.rb2
+ ./bzip2$(EXEEXT) -d < ${srcdir}/sample1.bz2 > sample1.tst
+ ./bzip2$(EXEEXT) -d < ${srcdir}/sample2.bz2 > sample2.tst
+ ./bzip2$(EXEEXT) -ds < ${srcdir}/sample3.bz2 > sample3.tst
+ cmp ${srcdir}/sample1.bz2 sample1.rb2
+ cmp ${srcdir}/sample2.bz2 sample2.rb2
+ cmp ${srcdir}/sample3.bz2 sample3.rb2
+ cmp sample1.tst ${srcdir}/sample1.ref
+ cmp sample2.tst ${srcdir}/sample2.ref
+ cmp sample3.tst ${srcdir}/sample3.ref
+ @cat ${srcdir}/words3
+
+# GNU Standard Specifications for Installation Directories...
+#
+prefix = $(PREFIX)
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+datarootdir = @datarootdir@
+includedir = @includedir@
+libdir = @libdir@
+
+# `man' Documentation Hierarchy, in Terms of GNU Standards...
+#
+# FIXME: Julian's original distribution wasn't fully compliant
+# with current GNU Standards; to achieve compliance, we must use
+# this autotool standard definition:
+#
+# mandir = @mandir@
+#
+# in place of:
+#
+# mandir = $(PREFIX)/man
+#
+# which preserves Julian's original configuration.
+#
+mandir = $(PREFIX)/share/man
+man1dir = ${mandir}/man1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bzip2.pc
+
+# Installation...
+#
+FORCE:
+${bindir} ${includedir} ${libdir} ${man1dir} ${pkgconfigdir}: FORCE
+ test -d ${DESTDIR}$@ || mkdir -p ${DESTDIR}$@
+
+install: all ${bindir} ${includedir} ${libdir} ${man1dir} ${pkgconfigdir}
+ cp -f ${pkgconfig_DATA} ${DESTDIR}${pkgconfigdir}/${pkgconfig_DATA}
+ cp -f bzip2$(EXEEXT) ${DESTDIR}${bindir}/bzip2$(EXEEXT)
+ cp -f bzip2$(EXEEXT) ${DESTDIR}${bindir}/bunzip2$(EXEEXT)
+ cp -f bzip2$(EXEEXT) ${DESTDIR}${bindir}/bzcat$(EXEEXT)
+ cp -f bzip2recover$(EXEEXT) ${DESTDIR}${bindir}/bzip2recover$(EXEEXT)
+ if test -f $(DLLNAME)-$(DLLVER).dll; \
+ then \
+ cp -f $(DLLNAME)-$(DLLVER).dll ${DESTDIR}${bindir}/$(DLLNAME)-$(DLLVER).dll; \
+ chmod a+rx ${DESTDIR}${bindir}/$(DLLNAME)-$(DLLVER).dll; \
+ fi
+ chmod a+x ${DESTDIR}${bindir}/bzip2$(EXEEXT)
+ chmod a+x ${DESTDIR}${bindir}/bunzip2$(EXEEXT)
+ chmod a+x ${DESTDIR}${bindir}/bzcat$(EXEEXT)
+ chmod a+x ${DESTDIR}${bindir}/bzip2recover$(EXEEXT)
+ cp -f ${srcdir}/bzlib.h ${DESTDIR}${includedir}
+ chmod a+r ${DESTDIR}${includedir}/bzlib.h
+ cp -f libbz2.a ${DESTDIR}${libdir}
+ if test -f $(LIBNAME).dll.a; \
+ then \
+ cp -f $(LIBNAME).dll.a ${DESTDIR}${libdir}/$(LIBNAME).dll.a; \
+ chmod a+r ${DESTDIR}${libdir}/$(LIBNAME).dll.a; \
+ fi
+ chmod a+r ${DESTDIR}${libdir}/libbz2.a
+ if test -f $(SOFULL); \
+ then \
+ cp -f $(SOFULL) ${DESTDIR}${libdir}; \
+ cd ${DESTDIR}${libdir}; rm -f $(SO_NAME).$(SO_AGE) $(SONAME); \
+ $(LN_S) $(SOFULL) $(SONAME).$(SO_AGE); \
+ $(LN_S) $(SOFULL) $(SONAME); \
+ chmod a+r $(SOFULL); \
+ fi
+ cp -f ${srcdir}/bzgrep ${DESTDIR}${bindir}/bzgrep
+ cd ${DESTDIR}${bindir}; $(LN_S) -f bzgrep bzegrep
+ cd ${DESTDIR}${bindir}; $(LN_S) -f bzgrep bzfgrep
+ chmod a+x ${DESTDIR}${bindir}/bzgrep
+ cp -f ${srcdir}/bzmore ${DESTDIR}${bindir}/bzmore
+ cd ${DESTDIR}${bindir}; $(LN_S) -f bzmore bzless
+ chmod a+x ${DESTDIR}${bindir}/bzmore
+ cp -f ${srcdir}/bzdiff ${DESTDIR}${bindir}/bzdiff
+ cd ${DESTDIR}${bindir}; $(LN_S) -f bzdiff bzcmp
+ chmod a+x ${DESTDIR}${bindir}/bzdiff
+ cd ${srcdir}; cp -f bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 ${DESTDIR}${man1dir}
+ chmod a+r ${DESTDIR}${man1dir}/bzip2.1
+ chmod a+r ${DESTDIR}${man1dir}/bzgrep.1
+ chmod a+r ${DESTDIR}${man1dir}/bzmore.1
+ chmod a+r ${DESTDIR}${man1dir}/bzdiff.1
+ echo ".so man1/bzgrep.1" > ${DESTDIR}${man1dir}/bzegrep.1
+ echo ".so man1/bzgrep.1" > ${DESTDIR}${man1dir}/bzfgrep.1
+ echo ".so man1/bzmore.1" > ${DESTDIR}${man1dir}/bzless.1
+ echo ".so man1/bzdiff.1" > ${DESTDIR}${man1dir}/bzcmp.1
+
+ldconfig:
+ ldconfig -n ${DESTDIR}${libdir}
+
+# Housekeeping...
+#
+clean:
+ cmp > /dev/null 2>&1 ${srcdir}/libbz2.def libbz2.def \
+ || rm -f libbz2.def
+ rm -f *.$(OBJEXT) libbz2*.a $(DLLNAME)*.dll \
+ bzip2$(EXEEXT) bzip2recover$(EXEEXT) \
+ sample1.rb2 sample2.rb2 sample3.rb2 \
+ sample1.tst sample2.tst sample3.tst
+
+distclean: clean
+ rm -f config.status config.log Makefile
+
+# NOTE: Julian's original Makefile had these in `distclean'.
+# Since they are `distributables', that might have surprised
+# users expecting GNU standard behaviour; they rightfully
+# belong in `maintainer-clean'.
+#
+maintainer-clean: clean
+ rm -f manual.ps manual.html manual.pdf
+
+# Distribution...
+#
+DISTNAME = $(PACKAGE)-$(VERSION)
+#
+# FIXME: this method of creating a source distribution works fine
+# on systems which fully support symbolic links between directories;
+# it cannot be used reliably, on MS-Windows hosts running MSYS.
+#
+dist: manual
+ rm -f $(DISTNAME) $(DISTNAME)$(SNAPSHOT).*
+ $(LN_S) -f ${srcdir} $(DISTNAME)
+ tar cvf $(DISTNAME)$(SNAPSHOT).tar \
+ $(DISTNAME)/aclocal.m4 \
+ $(DISTNAME)/configure \
+ $(DISTNAME)/configure.ac \
+ $(DISTNAME)/Makefile.in \
+ $(DISTNAME)/blocksort.c \
+ $(DISTNAME)/huffman.c \
+ $(DISTNAME)/crctable.c \
+ $(DISTNAME)/randtable.c \
+ $(DISTNAME)/compress.c \
+ $(DISTNAME)/decompress.c \
+ $(DISTNAME)/bzlib.c \
+ $(DISTNAME)/bzip2.c \
+ $(DISTNAME)/bzip2recover.c \
+ $(DISTNAME)/bzlib.h \
+ $(DISTNAME)/bzlib_private.h \
+ $(DISTNAME)/LICENSE \
+ $(DISTNAME)/bzip2.1 \
+ $(DISTNAME)/bzip2.1.preformatted \
+ $(DISTNAME)/bzip2.pc.in \
+ $(DISTNAME)/bzip2.txt \
+ $(DISTNAME)/words0 \
+ $(DISTNAME)/words1 \
+ $(DISTNAME)/words2 \
+ $(DISTNAME)/words3 \
+ $(DISTNAME)/sample1.ref \
+ $(DISTNAME)/sample2.ref \
+ $(DISTNAME)/sample3.ref \
+ $(DISTNAME)/sample1.bz2 \
+ $(DISTNAME)/sample2.bz2 \
+ $(DISTNAME)/sample3.bz2 \
+ $(DISTNAME)/dlltest.c \
+ $(DISTNAME)/manual.html \
+ $(DISTNAME)/manual.pdf \
+ $(DISTNAME)/manual.ps \
+ $(DISTNAME)/README \
+ $(DISTNAME)/README.COMPILATION.PROBLEMS \
+ $(DISTNAME)/README.XML.STUFF \
+ $(DISTNAME)/CHANGES \
+ $(DISTNAME)/libbz2.def \
+ $(DISTNAME)/libbz2.def.in \
+ $(DISTNAME)/libbz2.dsp \
+ $(DISTNAME)/dlltest.dsp \
+ $(DISTNAME)/makefile.msc \
+ $(DISTNAME)/unzcrash.c \
+ $(DISTNAME)/spewG.c \
+ $(DISTNAME)/mk251.c \
+ $(DISTNAME)/bzdiff \
+ $(DISTNAME)/bzdiff.1 \
+ $(DISTNAME)/bzmore \
+ $(DISTNAME)/bzmore.1 \
+ $(DISTNAME)/bzgrep \
+ $(DISTNAME)/bzgrep.1 \
+ $(DISTNAME)/Makefile-libbz2_so \
+ $(DISTNAME)/bz-common.xsl \
+ $(DISTNAME)/bz-fo.xsl \
+ $(DISTNAME)/bz-html.xsl \
+ $(DISTNAME)/bzip.css \
+ $(DISTNAME)/entities.xml \
+ $(DISTNAME)/manual.xml \
+ $(DISTNAME)/format.pl \
+ $(DISTNAME)/xmlproc.sh
+ gzip -v $(DISTNAME)$(SNAPSHOT).tar
+ rm -f $(DISTNAME)
+
+# For rebuilding the manual from sources on Julian's SuSE 9.1 box
+#
+MANUAL_SRCS = bz-common.xsl bz-fo.xsl bz-html.xsl bzip.css \
+ entities.xml manual.xml
+
+manual: manual.html manual.ps manual.pdf
+
+manual.ps: $(MANUAL_SRCS)
+ ${srcdir}/xmlproc.sh -ps manual.xml
+
+manual.pdf: $(MANUAL_SRCS)
+ ${srcdir}/xmlproc.sh -pdf manual.xml
+
+manual.html: $(MANUAL_SRCS)
+ ${srcdir}/xmlproc.sh -html manual.xml
+
+# Makefile: end of file
--- bzip2-1.0.6/README.CYGMING 1970-01-01 04:00:00 +0400
+++ bzip2-1.0.6/README.CYGMING 2011-09-02 05:22:32 +0400
@@ -0,0 +1,49 @@
+This distribution was built using an alternate build system. The original
+distribution used a simple Makefile, which had to be heavily customized to
+meet the needs of modern cygwin and MinGW systems. Furthermore, it was
+wholly unsuited for building the distribution in a cross-hosted environment.
+
+Keith Marshall <keithmarshall@users.sf.net> implemented an autoconf-based
+build system, to facilitate cross-hosted building for use with MinGW. This
+build system consists of the following original files:
+ configure.ac
+ Makefile.in
+ aclocal.m4
+ libbz2.def.in
+found in the 'cygming-autotools-buildfiles.tar.gz' tarball included within
+the bzip2-$VER-$REL-mingw-src tarball.
+
+The source preparation phase of the build runs autoconf, which creates the
+following file(s):
+ configure
+In addition, the source preparation phase explicitly removes the original
+Makefile from the $srcdir, as a new Makefile will be generated in the
+$builddir by the configure phase of the build.
+
+This configure script is NOT distributed in this package; it is assumed that
+the 'autoconf' tool is available. The proper (non-automated) procedure is:
+
+ unpack bzip2-$VER-$REL-mingw-src.tar.gz
+
+This will create a number of new files, included several additional
+tarballs and patches.
+
+ unpack the upstream source tarball bzip2-$VER.tar.gz
+ unpack the extra 'cygming-autotools-buildfiles.tar.gz' tarball
+ cd bzip2-$VER
+ autoconf
+ mkdir ../build
+ cd ../build
+ ../bzip2-$VER/configure [various options]
+ make
+
+However, the automated procedure, which can be used to exactly reproduce
+the official mingw package, is:
+
+ mgwport bzip2-${VER}-${REL}.mgwport all
+
+which performs all of the above steps, as well as applying various additional
+patches (from Debian and elsewhere), installing into a local staging area,
+and generating the mingw-get compatible installation packages. See
+MINGW-PATCHES/bzip2.README for more information.
+
--- bzip2-1.0.6/aclocal.m4 1970-01-01 04:00:00 +0400
+++ bzip2-1.0.6/aclocal.m4 2011-05-21 22:21:23 +0400
@@ -0,0 +1,115 @@
+# aclocal.m4 -*- Autoconf -*- vim: filetype=config
+# ------------------------------------------------------------------
+# This file is part of bzip2/libbzip2, a program and library for
+# lossless, block-sorting data compression.
+#
+# bzip2/libbzip2 version 1.0.5 of 10 December 2007
+# Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+#
+# File: aclocal.m4 for autoconf configuration
+# Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
+#
+# Please read the WARNING, DISCLAIMER and PATENTS sections in the
+# README file.
+#
+# This program is released under the terms of the license contained
+# in the file LICENSE.
+# ------------------------------------------------------------------
+
+# BZIP2_AC_WINDOWS_HOST
+# ---------------------
+# Check if the runtime platform is a native MS-Windows host.
+# FIXME: is checking _WIN64 an appropriate choice, for 64-bit Windows?
+# Because we only need to know whether the host is (native) win32
+# or not, we can avoid the expensive AC_CANONICAL_HOST checks.
+#
+AC_DEFUN([BZIP2_AC_WINDOWS_HOST],
+[AC_CACHE_CHECK([whether we are building for an MS-Windows host],
+ [bzip2_cv_windows_host],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+@%:@if defined _WIN32 || defined _WIN64
+ choke me
+@%:@endif]])],
+[bzip2_cv_windows_host=no], [bzip2_cv_windows_host=yes]))dnl
+])# BZIP2_AC_WINDOWS_HOST
+
+# BZIP2_AC_CYGWIN_HOST
+# ---------------------
+# Check if the runtime platform is a cygwin host.
+# Because we only need to know whether the host is cygwin
+# or not, we can avoid the expensive AC_CANONICAL_HOST checks.
+#
+AC_DEFUN([BZIP2_AC_CYGWIN_HOST],
+[AC_CACHE_CHECK([whether we are building for a cygwin host],
+ [bzip2_cv_cygwin_host],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+@%:@if defined __CYGWIN__
+ choke me
+@%:@endif]])],
+[bzip2_cv_cygwin_host=no], [bzip2_cv_cygwin_host=yes]))dnl
+])# BZIP2_AC_CYGWIN_HOST
+
+# BZIP2_AC_ENABLE_SHARED
+# ----------------------
+# Check if the user is configuring with `--enable-shared';
+# if yes, activate shared library build support as appropriate,
+# for the host on which this build is to be deployed.
+#
+AC_DEFUN([BZIP2_AC_ENABLE_SHARED],
+[AC_REQUIRE([BZIP2_AC_WINDOWS_HOST])dnl
+ AC_REQUIRE([BZIP2_AC_CYGWIN_HOST])dnl
+ AC_MSG_CHECKING([for make goal to build shared libraries])
+ AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared],
+ [enable building as a shared library @<:@default=no@:>@])],
+ [if test "x$enable_shared" = xyes
+ then
+ if test "x${bzip2_cv_windows_host}" = xyes ||
+ test "x${bzip2_cv_cygwin_host}" = xyes
+ then
+ enable_shared="all-dll-shared"
+ else
+ enable_shared="all-bzip2-shared"
+ fi
+ else
+ enable_shared="none"
+ fi
+ ], [enable_shared="none"])dnl
+ AC_MSG_RESULT([${enable_shared}])
+ [test "x$enable_shared" = xnone && enable_shared=""]
+ AC_SUBST([enable_shared])dnl
+])# BZIP2_AC_ENABLE_SHARED
+
+# BZIP2_AC_SUBST_DLLVER
+# ---------------------
+# Establish the ABI version number for MS-Windows shared libraries;
+# this is derived from the universal SO_VER and SO_AGE properties, as
+# specified in `Makefile.in'; (nominally, it is SO_VER - SO_AGE, but
+# see the note in `Makefile.in', explaining why, in this instance,
+# we use one more than that nominal value for $host = mingw32)
+#
+AC_DEFUN([BZIP2_AC_SUBST_DLLVER],
+[AC_REQUIRE([BZIP2_AC_WINDOWS_HOST])dnl
+ AC_MSG_CHECKING([for API version of DLL shared libraries])
+ [SO_VER=`FS=' ';sed -n "/^[$FS]*SO_VER[$FS]*=[$FS]*/s///p" ${srcdir}/Makefile.in`]
+ [SO_AGE=`FS=' ';sed -n "/^[$FS]*SO_AGE[$FS]*=[$FS]*/s///p" ${srcdir}/Makefile.in`]
+ [dllver=`expr ${SO_VER} - ${SO_AGE}`
+ test "x$bzip2_cv_windows_host" = xyes && dllver=`expr ${SO_VER} - ${SO_AGE}`]
+ AC_SUBST([DLLVER], [${dllver}])
+ AC_MSG_RESULT([${dllver}])dnl
+])# BZIP2_AC_SUBST_DLLVER
+
+# BZIP2_AC_SUBST_DLLNAME
+# ----------------------
+# Establish the base name MS-Windows or cygwin shared libraries;
+#
+AC_DEFUN([BZIP2_AC_SUBST_DLLNAME],
+[AC_REQUIRE([BZIP2_AC_WINDOWS_HOST])dnl
+ AC_MSG_CHECKING([for base name of DLL shared libraries])
+ [dllname=cygbz2
+ test "x$bzip2_cv_windows_host" = xyes && dllname=libbz2]
+ AC_SUBST([DLLNAME], [${dllname}])
+ AC_MSG_RESULT([${dllname}])dnl
+])# BZIP2_AC_SUBST_DLLNAME
+
+# aclocal.m4: end of file
--- bzip2-1.0.6/configure.ac 1970-01-01 04:00:00 +0400
+++ bzip2-1.0.6/configure.ac 2011-05-21 08:35:18 +0400
@@ -0,0 +1,39 @@
+AC_INIT([bzip2],[1.0.6])
+# ------------------------------------------------------------------
+# This file is part of bzip2/libbzip2, a program and library for
+# lossless, block-sorting data compression.
+#
+# bzip2/libbzip2 version 1.0.6 of 6 September 2010
+# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+#
+# File: configure.ac for autoconf configuration
+# Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
+#
+# Please read the WARNING, DISCLAIMER and PATENTS sections in the
+# README file.
+#
+# This program is released under the terms of the license contained
+# in the file LICENSE.
+# ------------------------------------------------------------------
+AC_PROG_CC
+AC_PROG_LN_S
+
+BZIP2_AC_ENABLE_SHARED
+BZIP2_AC_SUBST_DLLVER
+BZIP2_AC_SUBST_DLLNAME
+
+AC_ARG_VAR([AR],[Archive librarian command])
+AC_ARG_VAR([ARFLAGS],[Archive librarian control flags, e.g. cq])
+AC_ARG_VAR([RANLIB],[Archive library indexing command])
+
+AC_CHECK_TOOL([AR],[ar],[ar])
+AC_CHECK_TOOL([RANLIB],[ranlib],[true])
+
+AC_MSG_CHECKING([for flags to pass to ${AR}])
+AC_SUBST([ARFLAGS],[${ARFLAGS-cq}])
+AC_MSG_RESULT([${ARFLAGS}])
+
+AC_CONFIG_FILES([Makefile bzip2.pc])
+AC_OUTPUT
+
+# configure.ac: end of file
--- bzip2-1.0.6/libbz2.def.in 1970-01-01 04:00:00 +0400
+++ bzip2-1.0.6/libbz2.def.in 2011-05-21 08:35:45 +0400
@@ -0,0 +1,27 @@
+LIBRARY %DLLNAME%-%DLLVER%
+DESCRIPTION "libbzip2: library for data compression"
+EXPORTS
+ BZ2_bzCompressInit
+ BZ2_bzCompress
+ BZ2_bzCompressEnd
+ BZ2_bzDecompressInit
+ BZ2_bzDecompress
+ BZ2_bzDecompressEnd
+ BZ2_bzReadOpen
+ BZ2_bzReadClose
+ BZ2_bzReadGetUnused
+ BZ2_bzRead
+ BZ2_bzWriteOpen
+ BZ2_bzWrite
+ BZ2_bzWriteClose
+ BZ2_bzWriteClose64
+ BZ2_bzBuffToBuffCompress
+ BZ2_bzBuffToBuffDecompress
+ BZ2_bzlibVersion
+ BZ2_bzopen
+ BZ2_bzdopen
+ BZ2_bzread
+ BZ2_bzwrite
+ BZ2_bzflush
+ BZ2_bzclose
+ BZ2_bzerror
--- bzip2-1.0.6/bzip2.pc.in.orig 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.6/bzip2.pc.in 2009-11-03 18:48:28.000000000 +0100
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bzip2
+Description: Lossless, block-sorting data compression
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}
@@ -0,0 +1,171 @@
diff -urN bzip2-1.0.6/bzip2.c bzip2-1.0.6/bzip2.c
--- bzip2-1.0.6/bzip2.c 2010-09-10 19:04:53.000000000 -0400
+++ bzip2-1.0.6/bzip2.c 2011-05-20 21:22:16.853325100 -0400
@@ -1132,8 +1132,8 @@
static
void compress ( Char *name )
{
- FILE *inStr;
- FILE *outStr;
+ FILE *inStr = NULL;
+ FILE *outStr = NULL;
Int32 n, i;
struct MY_STAT statBuf;
@@ -1313,8 +1313,8 @@
static
void uncompress ( Char *name )
{
- FILE *inStr;
- FILE *outStr;
+ FILE *inStr = NULL;
+ FILE *outStr = NULL;
Int32 n, i;
Bool magicNumberOK;
Bool cantGuess;
@@ -1511,7 +1511,7 @@
static
void testf ( Char *name )
{
- FILE *inStr;
+ FILE *inStr = NULL;
Bool allOK;
struct MY_STAT statBuf;
diff -urN bzip2-1.0.6/bzip2recover.c bzip2-1.0.6/bzip2recover.c
--- bzip2-1.0.6/bzip2recover.c 2010-09-10 19:18:40.000000000 -0400
+++ bzip2-1.0.6/bzip2recover.c 2011-05-20 21:21:39.518325100 -0400
@@ -24,6 +24,8 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
/* This program records bit locations in the file to be recovered.
@@ -269,6 +271,19 @@
name[n-1] == '2');
}
+/*---------------------------------------------*/
+/* Open an output file safely with O_EXCL and good permissions */
+FILE* fopen_output( Char* name, const char* mode )
+{
+ FILE *fp;
+ int fh;
+
+ fh = open(name, O_WRONLY|O_CREAT|O_EXCL, 0600);
+ if (fh == -1) return NULL;
+ fp = fdopen(fh, mode);
+ if (fp == NULL) close(fh);
+ return fp;
+}
/*---------------------------------------------------*/
/*--- ---*/
@@ -306,6 +321,7 @@
Int32 b, wrBlock, currBlock, rbCtr;
MaybeUInt64 bitsRead;
+
UInt32 buffHi, buffLo, blockCRC;
Char* p;
@@ -486,7 +502,7 @@
fprintf ( stderr, " writing block %d to `%s' ...\n",
wrBlock+1, outFileName );
- outFile = fopen ( outFileName, "wb" );
+ outFile = fopen_output ( outFileName, "wb" );
if (outFile == NULL) {
fprintf ( stderr, "%s: can't write `%s'\n",
progName, outFileName );
diff -urN bzip2-1.0.6/bzlib.c bzip2-1.0.6/bzlib.c
--- bzip2-1.0.6/bzlib.c 2010-09-10 18:38:23.000000000 -0400
+++ bzip2-1.0.6/bzlib.c 2011-05-20 21:21:39.524325100 -0400
@@ -1372,7 +1372,7 @@
#ifndef BZ_NO_STDIO
/*---------------------------------------------------*/
-#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
+#if defined(_WIN32) || defined(OS2) || defined(MSDOS) || defined(__CYGWIN__)
# include <fcntl.h>
# include <io.h>
# define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
diff -urN bzip2-1.0.6/bzlib.h bzip2-1.0.6/bzlib.h
--- bzip2-1.0.6/bzlib.h 2010-09-10 19:08:42.000000000 -0400
+++ bzip2-1.0.6/bzlib.h 2011-05-20 22:38:02.807325100 -0400
@@ -75,21 +75,39 @@
#include <stdio.h>
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__CYGWIN__)
# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# ifndef __GNUC__
+ /* Use these rules only for non-gcc native win32 */
+# ifdef BZ_EXPORT
+# define BZ_API(func) WINAPI func
+# define BZ_EXTERN extern
+# else
+ /* import windows dll dynamically */
+# define BZ_API(func) (WINAPI * func)
+# define BZ_EXTERN
+# endif
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+ /* For gcc on native win32, use import library trampoline */
+ /* functions on DLL import. This avoids requiring clients to */
+ /* use special compilation flags depending on whether eventual */
+ /* link will be against static libbz2 or against DLL, at the */
+ /* expense of a small loss of efficiency. */
+
+ /* Because libbz2 does not export any DATA items, GNU ld's */
+ /* "auto-import" is not a factor; the MinGW-built DLL can be */
+ /* used by other compilers, provided an import library suitable */
+ /* for that compiler is (manually) constructed using the .def */
+ /* file and the appropriate tool. */
+# define BZ_API(func) func
+# define BZ_EXTERN extern
# endif
#else
+ /* non-win32 platforms, and cygwin */
# define BZ_API(func) func
# define BZ_EXTERN extern
#endif
diff -urN bzip2-1.0.6/bzmore bzip2-1.0.6/bzmore
--- bzip2-1.0.6/bzmore 2007-01-02 21:00:55.000000000 -0500
+++ bzip2-1.0.6/bzmore 2011-05-20 21:21:39.540325100 -0400
@@ -24,10 +24,10 @@
# 'stty min 1' resets eof to ^a on both SunOS and SysV!
cb='min 1 -icanon'; ncb='icanon eof ^d'
fi
-if test $? -eq 0 -a -n "$oldtty"; then
- trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
+if test $? -eq 0 && test -n "$oldtty"; then
+ trap 'stty $oldtty 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
else
- trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
+ trap 'stty $ncb echo 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
fi
if test $# = 0; then
@@ -46,7 +46,7 @@
ANS=`dd bs=1 count=1 2>/dev/null`
stty $ncb echo 2>/dev/null
echo " "
- if test "$ANS" = 'e' -o "$ANS" = 'q'; then
+ if test "$ANS" = 'e' || test "$ANS" = 'q'; then
exit
fi
fi
@@ -0,0 +1,12 @@
diff -urN libiconv-1.17/configure.orig libiconv-1.17/configure
--- libiconv-1.17/configure.orig 2022-06-09 17:17:33.325129700 +0200
+++ libiconv-1.17/configure 2022-06-09 17:41:31.158194700 +0200
@@ -31929,7 +31929,7 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
+ ac_cs_awk_cr='\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -0,0 +1,12 @@
diff -urN a/lib/encodings.def b/lib/encodings.def
--- a/lib/encodings.def 2021-06-06 17:50:48.000000000 +0800
+++ b/lib/encodings.def 2023-01-12 21:17:32.598803000 +0800
@@ -59,7 +59,7 @@
DEFENCODING(( "UTF-8", /* IANA, RFC 2279 */
/*"UTF8", JDK 1.1 */
- /*"CP65001", Windows */
+ "CP65001", /* Windows */
),
utf8,
{ utf8_mbtowc, NULL }, { utf8_wctomb, NULL })
@@ -0,0 +1,12 @@
diff -urN a/Makefile.devel b/Makefile.devel
--- a/Makefile.devel 2022-01-24 04:49:47 +0000
+++ b/Makefile.devel 2023-01-14 18:28:46 +0000
@@ -9,7 +9,7 @@
AUTOMAKE = automake-1.16
ACLOCAL = aclocal-1.16
GPERF = gperf
-CC = gcc -Wall
+CC = cc -Wall
CFLAGS = -O
MAN2HTML = groff -mandoc -Thtml
CP = cp
@@ -0,0 +1,139 @@
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=libiconv
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=(${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname} ${MINGW_PACKAGE_PREFIX}-jellyfin-iconv)
license=('spdx:GPL-3.0-or-later')
pkgdesc='Character encoding conversion library and utility (mingw-w64)'
pkgver=1.17
pkgrel=4
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://www.gnu.org/software/libiconv/'
source=("https://mirrors.kernel.org/gnu/${_realname}/${_realname}-${pkgver}.tar.gz"{,.sig}
0004-fix-makefile-devel-assuming-gcc.patch
0003-add-cp65001-as-utf8-alias.patch
0002-fix-cr-for-awk-in-configure.all.patch
fix-pointer-buf.patch
iconv.pc)
sha256sums=('8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313'
'SKIP'
'2f08ca8681e4c85cdb2e6835921a502fd623dee4bf8ca10aa3c66747ede58a47'
'cb2b1cca44c9b9bd11c3bd33997c10d22dff263542275324c88f34b59910ef87'
'89d5c0f666e50a0186cfb142ba7b77e8fe1ac4d65bdfd9ae14ae8d2f0045a87c'
'6b6e2393840f4dc6067587165777b1a07978f4c05247d7c1010a45ad251bbeeb'
'SKIP')
validpgpkeys=('SKIP') # "Bruno Haible (Open Source Development) <bruno@clisp.org>"
options=('!libtool' 'staticlibs')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
"${MINGW_PACKAGE_PREFIX}-gperf")
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
regenerate_files() {
msg2 "Regenerating autogenerated files"
make -f Makefile.devel all
}
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
apply_patch_with_msg \
0002-fix-cr-for-awk-in-configure.all.patch \
fix-pointer-buf.patch \
0003-add-cp65001-as-utf8-alias.patch \
0004-fix-makefile-devel-assuming-gcc.patch
regenerate_files
}
build() {
[[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}"
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--docdir=${MINGW_PREFIX}/share/doc/libiconv \
--enable-static \
--disable-shared \
--enable-extra-encodings \
--enable-relocatable \
--disable-rpath \
--enable-silent-rules \
--enable-nls
make
}
check() {
cd "${srcdir}/build-${MSYSTEM}"
make check || msg2 "tests failed"
}
package_libiconv() {
pkgdesc='Character encoding conversion library (mingw-w64)'
license=('spdx:LGPL-2.1-or-later' documentation:'spdx:GPL-3.0-or-later') # This is LGPL except for documentation, see README
cd "${srcdir}/build-${MSYSTEM}"
make install DESTDIR="${pkgdir}"
rm -fr "${pkgdir}${MINGW_PREFIX}"/bin/*.exe
rm -f "${pkgdir}${MINGW_PREFIX}"/lib/charset.alias
rm -fr "${pkgdir}${MINGW_PREFIX}"/share/locale
rm -f "${pkgdir}${MINGW_PREFIX}"/share/doc/libiconv/*.1.*
rm -fr "${pkgdir}${MINGW_PREFIX}"/share/man/man1
# Pkg-config file
install -Dm644 "${srcdir}/iconv.pc" "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/iconv.pc"
sed -e "s|@PREFIX@|${MINGW_PREFIX}|g" \
-e "s|@VERSION@|${pkgver}|g" \
-i "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/iconv.pc"
# Licenses
install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/README"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/libcharset/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/libcharset/COPYING.LIB"
}
package_iconv() {
pkgdesc='Character encoding conversion utility (mingw-w64)'
depends=("${MINGW_PACKAGE_PREFIX}-libiconv=${pkgver}-${pkgrel}"
"${MINGW_PACKAGE_PREFIX}-gettext-runtime")
license=('spdx:GPL-3.0-or-later')
cd "${srcdir}/build-${MSYSTEM}"
make install DESTDIR="${pkgdir}"
rm -f "${pkgdir}${MINGW_PREFIX}"/bin/*.dll
rm -fr "${pkgdir}${MINGW_PREFIX}"/include
rm -fr "${pkgdir}${MINGW_PREFIX}"/lib
rm -f "${pkgdir}${MINGW_PREFIX}"/share/doc/libiconv/*.3.*
rm -fr "${pkgdir}${MINGW_PREFIX}"/share/man/man3
# Licenses
install -Dm644 "${srcdir}/${_realname}-${pkgver}/README" "${pkgdir}${MINGW_PREFIX}/share/licenses/iconv/README"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/iconv/COPYING"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,37 @@
--- a/lib/iconv.c 2018-05-03 23:18:55.997221700 -0400
+++ b/lib/iconv.c 2018-05-03 23:26:47.611682700 -0400
@@ -170,12 +170,12 @@ static const struct stringpool2_t string
#include "aliases2.h"
#undef S
};
#define stringpool2 ((const char *) &stringpool2_contents)
static const struct alias sysdep_aliases[] = {
-#define S(tag,name,encoding_index) { (int)(long)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index },
+#define S(tag,name,encoding_index) { (int)(intptr_t)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index },
#include "aliases2.h"
#undef S
};
#ifdef __GNUC__
__inline
#else
--- a/lib/genaliases.c 2023-01-14 00:00:00.000000000 +0000
+++ b/lib/genaliases.c 2023-01-14 10:18:00.000000000 +0000
@@ -50,7 +50,7 @@
putc(c, out2);
}
}
- fprintf(out2,"\")' tmp.h | sed -e 's|^.*\\(stringpool_str[0-9]*\\).*$| (int)(long)\\&((struct stringpool_t *)0)->\\1,|'\n");
+ fprintf(out2,"\")' tmp.h | sed -e 's|^.*\\(stringpool_str[0-9]*\\).*$| (int)(intptr_t)\\&((struct stringpool_t *)0)->\\1,|'\n");
for (; n > 0; names++, n--)
emit_alias(out1, *names, c_name);
}
--- a/lib/genaliases2.c 2023-01-14 00:00:00.000000000 +0000
+++ b/lib/genaliases2.c 2023-01-14 10:18:00.000000000 +0000
@@ -44,6 +44,6 @@
static void emit_encoding (FILE* out1, FILE* out2, const char* tag, const char* const* names, size_t n, const char* c_name)
{
- fprintf(out2," (int)(long)&((struct stringpool2_t *)0)->stringpool_%s_%u,\n",tag,counter);
+ fprintf(out2," (int)(intptr_t)&((struct stringpool2_t *)0)->stringpool_%s_%u,\n",tag,counter);
for (; n > 0; names++, n--)
emit_alias(out1, tag, *names, c_name);
}
@@ -0,0 +1,11 @@
prefix=@PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: iconv
Description: libiconv
URL: https://www.gnu.org/software/libiconv/
Version: @VERSION@
Libs: -L${libdir} -liconv
Cflags: -I${includedir}
@@ -0,0 +1,92 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libpng
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.6.43
_apngver=1.6.40
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
pkgdesc="A collection of routines used to create PNG format graphics (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-jellyfin-zlib")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools")
license=('custom')
url="http://www.libpng.org/pub/png/libpng.html"
msys2_repository_url='https://github.com/pnggroup/libpng'
msys2_references=(
"cpe: cpe:/a:greg_roelofs:libpng"
"cpe: cpe:/a:libpng:libpng"
)
options=('strip' '!libtool' 'staticlibs')
# apng: https://github.com/mozilla/gecko-dev/commits/master/media/libpng/apng.patch
source=("https://downloads.sourceforge.net/sourceforge/libpng/${_realname}-${pkgver}.tar.xz"
"https://raw.githubusercontent.com/mozilla/gecko-dev/ee4f298265cc851314bf431fb0efccba6af15f74/media/libpng/apng.patch")
sha256sums=('6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c'
'2a65fa19b126e85ad14ef1d1d9fc5079193e92af6b8db4454e3a875da5fdb79d')
validpgpkeys=('8048643BA2C840F4F92A195FF54984BFA16C640F') # Glenn Randers-Pehrson (mozilla) <glennrp+bmo@gmail.com>
export MINGW_FFBUILD_PREFIX="${MINGW_PREFIX}/ffbuild/"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
# Add animated PNG (apng) support
# Some context as to why this is here: https://bugs.gentoo.org/824018
# Arch dropped it some time ago:
# https://gitlab.archlinux.org/archlinux/packaging/packages/libpng/-/commit/bc95b152de9709a21c2938d5a
# Maybe we should too?
patch -p1 -i "${srcdir}/apng.patch"
# autoreconf to get updated libtool files with clang support
autoreconf -fiv
}
build() {
[[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}"
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
../"${_realname}-${pkgver}"/configure \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--prefix=${MINGW_FFBUILD_PREFIX} \
--disable-shared --enable-static \
as_ln_s="cp -pR"
make
msg2 "Build contributed programs"
mkdir -p ".libs/contrib/pngminus" && cd ".libs/contrib/pngminus"
cp -r "${srcdir}/${_realname}-${pkgver}/contrib/pngminus"/* .
# libpng.a and libpng.dll.a are basically symlinks to libpng16.a
# and libpng16.dll.a that are created at "make install" but we are
# building the contributed programs before the "make install" so
# we have to link to libpng16.dll.a or libpng16.a if building
# statically. When building the static programs, we might also
# want to build with the static version of zlib.
make PNGINC="-I${srcdir}/${_realname}-${pkgver} -I${srcdir}/build-${MSYSTEM}" \
CC="${MINGW_PREFIX}/bin/cc" \
PNGLIB_SHARED="-L../.. -lpng16" \
PNGLIB_STATIC="../../libpng16.a" \
ZLIB_STATIC="${MINGW_FFBUILD_PREFIX}/lib/libz.a" \
CFLAGS="$CFLAGS" \
LDFLAGS="-L../.. $LDFLAGS" \
png2pnm pnm2png png2pnm-static pnm2png-static
}
check() {
:
}
package () {
cd "${srcdir}/build-${MSYSTEM}"
make install DESTDIR="${pkgdir}"
install -D -m644 "${srcdir}/libpng-${pkgver}/LICENSE" "${pkgdir}${MINGW_FFBUILD_PREFIX}/share/licenses/${_realname}/LICENSE"
msg2 "Install contributed programs"
cd ".libs/contrib/pngminus"
}
+60
View File
@@ -0,0 +1,60 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=xz
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=5.6.2
pkgrel=2
pkgdesc="Library and command line tools for XZ and LZMA compressed files (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://tukaani.org/xz"
msys2_repository_url="https://github.com/tukaani-project/xz/"
msys2_references=(
'archlinux: xz'
"cpe: cpe:/a:tukaani:xz"
)
# TODO: check situation with getopt_long mentioned in COPYING for possible
# removal of LGPL from this field
license=('spdx:0BSD AND LGPL-2.1-or-later AND GPL-2.0-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-gettext-runtime")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
"${MINGW_PACKAGE_PREFIX}-doxygen"
"po4a")
source=("https://github.com/tukaani-project/xz/releases/download/v${pkgver}/xz-${pkgver}.tar.xz")
sha256sums=('a9db3bb3d64e248a0fae963f8fb6ba851a26ba1822e504dc0efd18a80c626caf')
validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620') # Lasse Collin <lasse.collin@tukaani.org>
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
prepare() {
cd "${_realname}-${pkgver}"
./autogen.sh
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--disable-rpath \
--disable-lzma-links \
--disable-symbol-versions \
--disable-shared \
--enable-static \
--enable-doxygen
make
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING* -t ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}
}
@@ -0,0 +1,256 @@
--- a/configure
+++ b/configure
@@ -38,6 +38,7 @@
# destination name for static library
STATICLIB=libz.a
+IMPORTLIB=
# extract zlib version numbers from zlib.h
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h`
@@ -74,7 +75,7 @@
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
-sharedlibdir=${sharedlibdir-'${libdir}'}
+sharedlibdir=${sharedlibdir-'${exec_prefix}/bin'}
includedir=${includedir-'${prefix}/include'}
mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
@@ -90,6 +91,7 @@
sanitize=0
old_cc="$CC"
old_cflags="$CFLAGS"
+old_ldflags="$LDFLAGS"
OBJC='$(OBJZ) $(OBJG)'
PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)'
@@ -224,12 +226,23 @@
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
LDCONFIG="ldconfig -m" ;;
CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
+ CFLAGS="${CFLAGS} -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
+ SFLAGS="${CFLAGS}"
+ LDFLAGS="-L. ${old_ldflags}"
+ shared_ext=".dll"
+ SHAREDLIB='cygz.dll'
+ IMPORTLIB='libz.dll.a'
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,--export-all-symbols -Wl,--enable-auto-image-base -Wl,--out-implib=${IMPORTLIB}"}
+ LDSHAREDLIBC=''
EXE='.exe' ;;
MINGW* | mingw* | *-mingw*)
- rm -f $test.[co] $test $test$shared_ext
- echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log
- LDSHARED=${LDSHARED-"$cc -shared"}
- LDSHAREDLIBC=""
+ SFLAGS="${CFLAGS}"
+ LDFLAGS="-L. ${old_ldflags}"
+ shared_ext=".dll"
+ SHAREDLIB='zlib1.dll'
+ IMPORTLIB='libz.dll.a'
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,--export-all-symbols -Wl,--enable-auto-image-base -Wl,--out-implib=${IMPORTLIB}"}
+ LDSHAREDLIBC=''
EXE='.exe' ;;
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
# (alain.bonnefoy@icbt.com)
@@ -355,11 +367,32 @@
esac
fi
+case "$uname" in
+ *CYGWIN* | *Cygwin* | *cygwin* )
+ # On cygwin, we always build both shared and static libs
+ ALL="static shared"
+ SHAREDLIBPOST='/bin/true'
+ SHAREDTARGET=${SHAREDLIB}
+ TEST="all teststatic testshared"
+ ;;
+ *MINGW* | *Mingw* | *mingw* )
+ # On Mingw, we always build both shared and static libs
+ ALL="static shared"
+ SHAREDLIBPOST='/bin/true'
+ SHAREDTARGET=${SHAREDLIB}
+ TEST="all teststatic testshared"
+ ;;
+ *)
+
# destination names for shared library if not defined above
SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
-
+SHAREDLIBPOST='(rm -f $(SHAREDLIB) $(SHAREDLIBM); ln -s $@ $(SHAREDLIB) ; ln -s $@ $(SHAREDLIBM) )'
+SHAREDTARGET='$(SHAREDLIBV)'
+ ;;
+esac
+
echo >> configure.log
# define functions for testing compiler and library characteristics and logging the results
@@ -854,6 +887,9 @@
echo SHAREDLIBM = $SHAREDLIBM >> configure.log
echo SHAREDLIBV = $SHAREDLIBV >> configure.log
echo STATICLIB = $STATICLIB >> configure.log
+echo IMPORTLIB = $IMPORTLIB >> configure.log
+echo SHAREDLIBPOST = $SHAREDLIBPOST >> configure.log
+echo SHAREDTARGET = $SHAREDTARGET >> configure.log
echo TEST = $TEST >> configure.log
echo VER = $VER >> configure.log
echo SRCDIR = $SRCDIR >> configure.log
@@ -874,9 +910,12 @@
/^LDSHARED *=/s#=.*#=$LDSHARED#
/^CPP *=/s#=.*#=$CPP#
/^STATICLIB *=/s#=.*#=$STATICLIB#
+/^IMPORTLIB *=/s#=.*#=$IMPORTLIB#
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
+/^SHAREDLIBPOST *=/s#=.*#=$SHAREDLIBPOST#
+/^SHAREDTARGET *=/s#=.*#=$SHAREDTARGET#
/^AR *=/s#=.*#=$AR#
/^ARFLAGS *=/s#=.*#=$ARFLAGS#
/^RANLIB *=/s#=.*#=$RANLIB#
@@ -905,9 +944,12 @@
/^CPP *=/s#=.*#=$CPP#
/^LDSHARED *=/s#=.*#=$LDSHARED#
/^STATICLIB *=/s#=.*#=$STATICLIB#
+/^IMPORTLIB *=/s#=.*#=$IMPORTLIB#
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
+/^SHAREDLIBPOST *=/s#=.*#=$SHAREDLIBPOST#
+/^SHAREDTARGET *=/s#=.*#=$SHAREDTARGET#
/^AR *=/s#=.*#=$AR#
/^ARFLAGS *=/s#=.*#=$ARFLAGS#
/^RANLIB *=/s#=.*#=$RANLIB#
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,6 +34,9 @@
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.12
SHAREDLIBM=libz.so.1
+IMPORTLIB=
+SHAREDLIBPOST='(rm -f $(SHAREDLIB) $(SHAREDLIBM); ln -s $@ $(SHAREDLIB) ; ln -s $@ $(SHAREDLIBM) )'
+SHAREDTARGET=$(SHAREDLIBV)
LIBS=$(STATICLIB) $(SHAREDLIBV)
AR=ar
@@ -48,7 +51,7 @@
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
-sharedlibdir = ${libdir}
+sharedlibdir = ${exec_prefix}/bin
includedir = ${prefix}/include
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
@@ -127,7 +130,7 @@
./infcover
gcov inf*.c
-libz.a: $(OBJS)
+$(STATICLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
@@ -278,11 +281,9 @@
-@mv objs/gzwrite.o $@
-placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a
+placebo $(SHAREDTARGET): $(PIC_OBJS) $(STATICLIB)
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
+ $(SHAREDLIBPOST)
-@rmdir objs
example$(EXE): example.o $(STATICLIB)
@@ -291,11 +292,11 @@
minigzip$(EXE): minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
-examplesh$(EXE): example.o $(SHAREDLIBV)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
+examplesh$(EXE): example.o $(SHAREDTARGET)
+ $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(IMPORTLIB)
-minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
+minigzipsh$(EXE): minigzip.o $(SHAREDTARGET)
+ $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(IMPORTLIB)
example64$(EXE): example64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
@@ -309,20 +310,34 @@
-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
- rm -f $(DESTDIR)$(libdir)/$(STATICLIB)
cp $(STATICLIB) $(DESTDIR)$(libdir)
- chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
- -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1
- -@if test -n "$(SHAREDLIBV)"; then \
- rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \
- echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \
- chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
- echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
- rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ($(LDCONFIG) || true) >/dev/null 2>&1; \
+ -@(chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB))
+ -@($(RANLIB) $(DESTDIR)$(libdir)/$(STATICLIB) || true) >/dev/null 2>&1
+ -@if test -n "$(IMPORTLIB)" ; then \
+ cp $(IMPORTLIB) $(DESTDIR)$(libdir); \
+ echo "cp $(IMPORTLIB) $(DESTDIR)$(libdir)"; \
+ chmod 644 $(DESTDIR)$(libdir)/$(IMPORTLIB); \
+ if test -n "$(SHAREDTARGET)" ; then \
+ if test -f "$(SHAREDTARGET)" ; then \
+ cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir); \
+ echo "cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir)"; \
+ chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET); \
+ echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)"; \
+ fi; \
+ fi; \
+ if test -n "$(SHAREDLIBV)"; then \
+ if test -f "$(SHAREDLIBV)"; then \
+ rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
+ ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
+ ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
+ ($(LDCONFIG) || true) >/dev/null 2>&1; \
+ fi; \
+ fi; \
+ else \
+ cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir); \
+ echo "cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir)"; \
+ chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET); \
+ echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)"; \
fi
rm -f $(DESTDIR)$(man3dir)/zlib.3
cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
@@ -341,12 +356,13 @@
uninstall:
cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h
- cd $(DESTDIR)$(libdir) && rm -f libz.a; \
+ cd $(DESTDIR)$(libdir) && rm -f $(STATCILIB) $(IMPORTLIB); \
if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
fi
cd $(DESTDIR)$(man3dir) && rm -f zlib.3
cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc
+ cd $(DESTDIR)$(sharedlibdir) && (rm -f $(SHAREDTARGET) || true) > /dev/null 2>&1
docs: zlib.3.pdf
@@ -369,6 +385,7 @@
example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
example64$(EXE) minigzip64$(EXE) \
infcover \
+ $(STATICLIB) $(IMPORTLIB) $(SHAREDTARGET) $(SHAREDLIBV) $(SHAREDLIBV) $(SHAREDLIBM) \
libz.* foo.gz so_locations \
_match.s maketree contrib/infback9/*.o
rm -rf objs
@@ -0,0 +1,9 @@
--- a/zlib.pc.in
+++ b/zlib.pc.in
@@ -9,5 +9,5 @@
Version: @VERSION@
Requires:
-Libs: -L${libdir} -L${sharedlibdir} -lz
+Libs: -L${libdir} -lz
Cflags: -I${includedir}
@@ -0,0 +1,22 @@
--- a/zconf.h.in
+++ b/zconf.h.in
@@ -504,7 +504,7 @@
# define z_off_t long
#endif
-#if !defined(_WIN32) && defined(Z_LARGE64)
+#if (defined(_WIN32) && defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)) || defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -506,7 +506,7 @@
# define z_off_t long
#endif
-#if !defined(_WIN32) && defined(Z_LARGE64)
+#if (defined(_WIN32) && defined(__GNUC__) && defined(_LARGEFILE64_SOURCE)) || defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
@@ -0,0 +1,25 @@
From 6fcaf7683d06488f451107fe0466ec8f91572096 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Mon, 13 Oct 2014 07:23:44 +0400
Subject: [PATCH 2/3] Add -no-undefined to link to enable build shared version
with mingw.
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index e2958e6..9a6ab44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ libminizip_la_SOURCES = \
ioapi_mem.c \
${iowin32_src}
-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
+libminizip_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0 -lz
minizip_includedir = $(includedir)/minizip
minizip_include_HEADERS = \
--
2.1.2
@@ -0,0 +1,22 @@
From d6c5f14af2f9368032efbcfd0928b73d98379c92 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexey.pawlow@gmail.com>
Date: Tue, 28 Oct 2014 14:15:56 +0300
Subject: [PATCH 3/3] Add bzip2 library to pkg-config file.
---
minizip.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/minizip.pc.in b/minizip.pc.in
index 69b5b7f..2cc4787 100644
--- a/minizip.pc.in
+++ b/minizip.pc.in
@@ -8,5 +8,5 @@ Description: Minizip zip file manipulation library
Requires:
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lminizip
-Libs.private: -lz
+Libs.private: -lz -lbz2
Cflags: -I${includedir}
--
2.1.2
+97
View File
@@ -0,0 +1,97 @@
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
# Contributor: Martell Malone <martellmalone@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
# Contributor: Ray Donnelly <mingw.android@gmail.com>
_realname=zlib
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=1.3.1
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:Zlib')
url="https://www.zlib.net/"
msys2_repository_url="https://github.com/madler/zlib"
msys2_references=(
"cpe: cpe:/a:gnu:zlib"
"cpe: cpe:/a:zlib:zlib"
)
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-bzip2")
source=("https://github.com/madler/zlib/releases/download/v${pkgver}/zlib-${pkgver}.tar.xz"{,.asc}
01-zlib-1.2.11-1-buildsys.mingw.patch
03-dont-put-sodir-into-L.mingw.patch
04-fix-largefile-support.patch
07-Add-no-undefined-to-link-to-enable-build-shared-vers.patch
08-Add-bzip2-library-to-pkg-config-file.patch)
sha256sums=('38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32'
'SKIP'
'8175e70c980ffc48a2e90c6f0431ddb80ef6ff690f9e8906dd6a756238552fa5'
'7287d12db57dcf0f66964c861100bf06ebe1ddcb243e7ee0773fcab1b2935596'
'4d8ebda55b95d19cd7c467c486d4c42d2bad6db9ff5dca361f6d8c24120e5f30'
'fb83292f494f649ea7f1835aa4abea61acc593d7f90625741d42cd99cac0e075'
'0be98a7e660e7c068856f08b9e92d6c73a6b0d88c3e29a9716140b147f7c23c5')
validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
apply_patch_with_msg \
01-zlib-1.2.11-1-buildsys.mingw.patch \
03-dont-put-sodir-into-L.mingw.patch \
04-fix-largefile-support.patch
cd ${srcdir}/${_realname}-${pkgver}/contrib/minizip
apply_patch_with_msg \
07-Add-no-undefined-to-link-to-enable-build-shared-vers.patch \
08-Add-bzip2-library-to-pkg-config-file.patch
autoreconf -fi
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
CHOST=${MINGW_CHOST} \
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--static
make
}
check() {
cd "${srcdir}/build-${MSYSTEM}"
make test
}
package_zlib() {
pkgdesc="Compression library implementing the deflate compression method found in gzip and PKZIP (mingw-w64)"
cd "${srcdir}/build-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,22 @@
--- a/kernel/cycle.h 2020-12-10 05:02:44.000000000 -0700
+++ b/kernel/cycle.h 2022-07-01 20:16:52.642814700 -0600
@@ -539,6 +539,10 @@
#define HAVE_TICK_COUNTER
#endif
+/*----------------------------------------------------------------*/
+/*
+ * ARMv8 cycle counter
+ */
#if defined(__aarch64__) && defined(HAVE_ARMV8_CNTVCT_EL0) && !defined(HAVE_ARMV8_PMCCNTR_EL0)
typedef uint64_t ticks;
static inline ticks getticks(void)
@@ -551,7 +555,7 @@
#define HAVE_TICK_COUNTER
#endif
-#if defined(__aarch64__) && defined(HAVE_ARMV8_PMCCNTR_EL0)
+#if (defined(__aarch64__) && defined(HAVE_ARMV8_PMCCNTR_EL0)) || (defined(_M_ARM64) && defined(__clang__))
typedef uint64_t ticks;
static inline ticks getticks(void)
{
@@ -0,0 +1,28 @@
Some functions are missing the dllexport attribute. That means they aren't
exported. To work around that, don't add the dllexport attribute to any
functions because that is not necessary with MinGW64.
diff -urN fftw-3.3.10/api/api.h.orig fftw-3.3.10/api/api.h
--- fftw-3.3.10/api/api.h.orig 2020-12-10 13:02:44.000000000 +0100
+++ fftw-3.3.10/api/api.h 2023-02-28 14:18:43.815688000 +0100
@@ -40,7 +40,7 @@
linking bench.exe will fail. This has the advantage of forcing
us to mark things correctly, which is necessary for other compilers
(such as MS VC++). */
-#ifdef DLL_EXPORT
+#if defined (DLL_EXPORT) && defined (_MSC_VER)
# define FFTW_DLL
#endif
diff -urN fftw-3.3.10/kernel/ifftw.h.orig fftw-3.3.10/kernel/ifftw.h
--- fftw-3.3.10/kernel/ifftw.h.orig 2020-12-10 13:02:44.000000000 +0100
+++ fftw-3.3.10/kernel/ifftw.h 2023-02-28 14:10:07.971862800 +0100
@@ -52,7 +52,7 @@
under Windows when compiling as a DLL (see api/fftw3.h). */
#if defined(FFTW_EXTERN)
# define IFFTW_EXTERN FFTW_EXTERN
-#elif (defined(FFTW_DLL) || defined(DLL_EXPORT)) \
+#elif defined(FFTW_DLL) \
&& (defined(_WIN32) || defined(__WIN32__))
# define IFFTW_EXTERN extern __declspec(dllexport)
#else
@@ -0,0 +1,52 @@
Add "-no-undefined" to linker flags of threading libraries to allow building
shared libraries on Windows.
diff -urN fftw-3.3.10/threads/Makefile.am.orig fftw-3.3.10/threads/Makefile.am
--- fftw-3.3.10/threads/Makefile.am.orig 2020-12-10 13:02:44.000000000 +0100
+++ fftw-3.3.10/threads/Makefile.am 2023-03-02 12:09:54.323824700 +0100
@@ -21,7 +21,9 @@
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
-libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = \
+@QUAD_FALSE@@COMBINED_THREADS_FALSE@ -no-undefined \
+ -version-info @SHARED_VERSION_INFO@
if !COMBINED_THREADS
libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
endif
@@ -30,7 +32,9 @@
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS)
-libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = \
+@QUAD_FALSE@@COMBINED_THREADS_FALSE@ -no-undefined \
+ -version-info @SHARED_VERSION_INFO@
if !COMBINED_THREADS
libfftw3@PREC_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
endif
diff -urN fftw-3.3.10/threads/Makefile.in.orig fftw-3.3.10/threads/Makefile.in
--- fftw-3.3.10/threads/Makefile.in.orig 2021-09-14 16:43:46.000000000 +0200
+++ fftw-3.3.10/threads/Makefile.in 2023-03-02 12:12:36.736513100 +0100
@@ -414,14 +414,18 @@
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
-libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = \
+@QUAD_FALSE@@COMBINED_THREADS_FALSE@ -no-undefined \
+ -version-info @SHARED_VERSION_INFO@
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS)
-libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = \
+@QUAD_FALSE@@COMBINED_THREADS_FALSE@ -no-undefined \
+ -version-info @SHARED_VERSION_INFO@
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
all: all-am
+161
View File
@@ -0,0 +1,161 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=fftw
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
_pkgver=3.3.10
pkgver=${_pkgver//-/.}
pkgrel=5
pkgdesc="A library for computing the discrete Fourier transform (DFT) (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://www.fftw.org/"
license=("spdx:GPL-2.0-or-later")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \
echo "${MINGW_PACKAGE_PREFIX}-gcc-fortran"))
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=('staticlibs' 'strip')
source=("https://www.fftw.org/${_realname}-${_pkgver}.tar.gz"
"0001-detect-arm64-counter.patch"
"0002-no-dllexport.patch"
"0003-shared-lib.patch")
sha256sums=('56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467'
'f8be1bef7df7438328d0aabefd51a7043a6f9f569b646e0e3151db9cdc9ff05e'
'd44e0b25fee59bee3b2fa81ce86762b66158d5e2be7f350d8cf937691aa72b5b'
'd82e96c8545515b9c83d54356209ee9c4a45bedc3859cb01cf3966dc38fc7a33')
precision="double float \
$( [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || echo "quad" )"
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
apply_patch_with_msg \
0001-detect-arm64-counter.patch \
0002-no-dllexport.patch \
0003-shared-lib.patch
}
build() {
# clang complains when trying to use an sse2 intrinsic if sse2 is not enabled
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-i686* ]]; then
CFLAGS+=" -msse2"
fi
for cur in ${precision}; do
[[ -d "${srcdir}"/build-${MSYSTEM}-${cur} ]] && rm -rf "${srcdir}"/build-${MSYSTEM}-${cur}
mkdir -p "${srcdir}"/build-${MSYSTEM}-${cur} && cd "${srcdir}"/build-${MSYSTEM}-${cur}
msg "Building ${_realname} for ${cur} precision ..."
# create FFTW3LibraryDepends.cmake by configuring (but not building) with cmake
local -a _config_cmake=""
if [ "${cur}" = "float" ]; then
_config_cmake="-DENABLE_FLOAT=ON"
elif [ "${cur}" = "long_double" ]; then
_config_cmake="-DENABLE_LONG_DOUBLE=ON"
elif [ "${cur}" = "quad" ]; then
_config_cmake="-DENABLE_QUAD_PRECISION=ON"
fi
if [[ $CARCH != aarch64 ]]; then
_config_cmake+=" -DENABLE_SSE=ON -DENABLE_SSE2=ON -DENABLE_AVX=ON -DENABLE_AVX2=ON"
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe \
-Wno-dev \
-GNinja \
${_config_cmake} \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_OPENMP=ON \
-DENABLE_THREADS=ON \
../${_realname}-${_pkgver}
# build library using autotools
local -a _config=""
if [[ $CARCH != aarch64 ]]; then
_config+="--enable-sse2 --enable-avx --enable-avx-128-fma --enable-avx2"
fi
if [ $CARCH = x86_64 ]; then
_config+=" --enable-avx512"
fi
if [ "${cur}" = "float" ]; then
_config+=" --enable-float"
elif [ "${cur}" = "long_double" ]; then
_config="--enable-long-double"
elif [ "${cur}" = "quad" ]; then
_config="--enable-quad-precision"
fi
../${_realname}-${_pkgver}/configure \
--prefix="${MINGW_PREFIX}" \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
${_config} \
--enable-static \
--enable-single \
--disable-shared \
--disable-doc \
--disable-fortran \
--enable-threads \
--with-our-malloc \
--with-g77-wrappers \
--with-windows-f77-mangling \
--with-combined-threads \
--with-incoming-stack-boundary=2
make
done
}
package() {
for cur in ${precision}; do
msg "Installing ${_realname} for ${cur} precision ..."
cd "${srcdir}"/build-${MSYSTEM}-${cur}
make DESTDIR="${pkgdir}" install -C "${srcdir}"/build-${MSYSTEM}-${cur}
# move .cmake files to correct directory
local _prec_prefix
local _file_prefix
case "${cur}" in
double)
_prec_prefix=fftw3
_file_prefix=FFTW3
;;
float)
_prec_prefix=fftw3f
_file_prefix=FFTW3f
;;
long_double)
_prec_prefix=fftw3l
_file_prefix=FFTW3l
;;
quad)
_prec_prefix=fftw3q
_file_prefix=FFTW3q
;;
esac
local _staging_prefix=$(cygpath -am ${srcdir}/build-${MSYSTEM}-${cur})
sed -e "s|IMPORTED_IMPLIB_RELEASE \"${_staging_prefix}|IMPORTED_IMPLIB_RELEASE \"${MINGW_PREFIX}/lib|g" -i ./FFTW3LibraryDepends.cmake
sed -e "s|IMPORTED_LOCATION_RELEASE \"${_staging_prefix}|IMPORTED_LOCATION_RELEASE \"${MINGW_PREFIX}/bin|g" -i ./FFTW3LibraryDepends.cmake
install -Dm644 ./FFTW3LibraryDepends.cmake "${pkgdir}"${MINGW_PREFIX}/lib/cmake/${_prec_prefix}/FFTW3LibraryDepends.cmake
mv "${pkgdir}"${MINGW_PREFIX}/lib/cmake/fftw3/${_file_prefix}*.cmake "${pkgdir}"${MINGW_PREFIX}/lib/cmake/${_prec_prefix}/
done
}
@@ -0,0 +1,94 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_with_harfbuzz="no"
_realname=freetype
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=2.13.2
pkgrel=1
pkgdesc="TrueType font rendering library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
msys2_references=(
'archlinux: freetype2'
"cpe: cpe:/a:freetype:freetype"
)
url="https://www.freetype.org/"
license=('spdx:GPL-2.0-or-later OR FTL')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-jellyfin-brotli"
"${MINGW_PACKAGE_PREFIX}-jellyfin-bzip2"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libpng"
"${MINGW_PACKAGE_PREFIX}-jellyfin-zlib")
if [ "${_with_harfbuzz}" == "yes" ]; then
depends+=("${MINGW_PACKAGE_PREFIX}-harfbuzz")
fi
makedepends=("${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-cc")
source=(https://sourceforge.net/projects/freetype/files/freetype2/${pkgver}/freetype-${pkgver}.tar.xz{,.sig}
freetype-2.10.0-enable-valid.patch
freetype-2.10.0-enable-spr.patch)
sha256sums=('12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d'
'SKIP'
'30e84993f899b66c31451992667f7ac6cc9e0b19dfe2f47ccb546d77bbc77ef5'
'0571f18d97834df020e4cbdb1338b14f9160669f868237080951e01f5b86727c')
validpgpkeys=('E30674707856409FF1948010BE6C3AAC63AD8E3F') # Werner Lemberg <wl@gnu.org>
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}/freetype-${pkgver}"
apply_patch_with_msg \
freetype-2.10.0-enable-valid.patch \
freetype-2.10.0-enable-spr.patch
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("--buildtype=release")
else
extra_config+=("--buildtype=debug")
fi
if [ "${_with_harfbuzz}" != "yes" ]; then
extra_config+=("-Dharfbuzz=disabled")
fi
MSYS2_ARG_CONV_EXCL="--prefix=" \
meson setup \
--prefix="${MINGW_PREFIX}" \
--wrap-mode=nodownload \
--auto-features=enabled \
--default-library=static \
"${extra_config[@]}" \
../${_realname}-${pkgver}
meson compile
}
package () {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR="${pkgdir}" meson install
# Licenses
install -Dm644 "${srcdir}/${_realname}-${pkgver}/docs/GPLv2.TXT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/GPLv2.TXT"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/docs/FTL.TXT" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/FTL.TXT"
}
@@ -0,0 +1,12 @@
diff -Naur freetype-2.10.0.orig/include/freetype/config/ftoption.h freetype-2.10.0/include/freetype/config/ftoption.h
--- freetype-2.10.0.orig/include/freetype/config/ftoption.h 2019-03-15 18:09:32.842668200 -0400
+++ freetype-2.10.0/include/freetype/config/ftoption.h 2019-03-15 18:20:57.389665500 -0400
@@ -126,7 +126,7 @@
* macro is not defined, FreeType offers alternative LCD rendering
* technology that produces excellent output without LCD filtering.
*/
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/**************************************************************************
@@ -0,0 +1,21 @@
diff -Naur freetype-2.10.0.orig/modules.cfg freetype-2.10.0/modules.cfg
--- freetype-2.10.0.orig/modules.cfg 2019-03-15 18:09:32.780172700 -0400
+++ freetype-2.10.0/modules.cfg 2019-03-15 18:10:26.450039100 -0400
@@ -111,7 +111,7 @@
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
#
-# AUX_MODULES += gxvalid
+AUX_MODULES += gxvalid
# Support for streams compressed with gzip (files with suffix .gz).
#
@@ -130,7 +130,7 @@
# OpenType table validation. Needs `ftotval.c' below.
#
-# AUX_MODULES += otvalid
+AUX_MODULES += otvalid
# Auxiliary PostScript driver component to share common code.
#
@@ -0,0 +1,48 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=fribidi
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.0.15
pkgrel=1
pkgdesc="A Free Implementation of the Unicode Bidirectional Algorithm (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:LGPL-2.1-or-later')
url="https://github.com/fribidi/fribidi/"
msys2_references=(
"cpe: cpe:/a:gnu:fribidi"
)
depends=()
makedepends=("${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/fribidi/fribidi/releases/download/v${pkgver}/fribidi-${pkgver}.tar.xz")
sha256sums=('0bbc7ff633bfa208ae32d7e369cf5a7d20d5d2557a0b067c9aa98bcbf9967587')
export MINGW_FFBUILD_PREFIX="${MINGW_PREFIX}/ffbuild/"
build() {
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/meson.exe setup \
--prefix=${MINGW_FFBUILD_PREFIX} \
--buildtype plain \
--prefix=${MINGW_FFBUILD_PREFIX} \
-Ddocs=false \
--default-library static \
build-${MSYSTEM}-static \
${_realname}-${pkgver}
${MINGW_PREFIX}/bin/meson.exe compile -C build-${MSYSTEM}-static
}
check() {
meson test -C build-${MSYSTEM}-static
}
package() {
meson install -C build-${MSYSTEM}-static --destdir="${pkgdir}"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_FFBUILD_PREFIX}/share/licenses/${_realname}/COPYING"
}
+72
View File
@@ -0,0 +1,72 @@
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
_realname=gmp
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=6.3.0
pkgrel=2
pkgdesc="A free library for arbitrary precision arithmetic (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://gmplib.org/"
msys2_references=(
"cpe: cpe:/a:gmplib:gmp"
)
license=('LGPL3' 'GPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc")
source=(https://mirrors.kernel.org/gnu/gmp/${_realname}-${pkgver}.tar.xz{,.sig}
do-not-use-dllimport.diff
gmp-staticlib.diff)
sha256sums=('a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898'
'SKIP'
'385ab704f82c47f3aecc9141f43c96e7b8de2bf0e654dc457ce0f1a039db2c68'
'7c3cde2634baa2cb1c31404bbfed2d8d7ba33556971ac842a08f2e87667849ab')
validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') # Niels Möller <nisse@lysator.liu.se>"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
[[ -d ../stash ]] && rm -rf ../stash
mkdir ../stash
cp config.{guess,sub} ../stash
patch -p2 -i ${srcdir}/do-not-use-dllimport.diff
patch -p1 -i ${srcdir}/gmp-staticlib.diff
autoreconf -fiv
cp -f ../stash/config.{guess,sub} .
}
build() {
local -a extra_config
case "$CARCH" in
i?86|x86_64)
extra_config+=(--enable-fat)
;;
*)
extra_config+=(--disable-assembly)
;;
esac
CFLAGS+=" -Wno-attributes -Wno-ignored-attributes"
# Build static version
mkdir -p "${srcdir}/static-${MSYSTEM}" && cd "${srcdir}/static-${MSYSTEM}"
../${_realname}-${pkgver}/configure \
--build=${MINGW_CHOST} \
--prefix=${MINGW_PREFIX} \
--enable-cxx \
"${extra_config[@]}" \
--enable-static \
--disable-shared
make
}
check() {
cd "${srcdir}/static-${MSYSTEM}"
make check
}
package() {
cd "${srcdir}/static-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
}
@@ -0,0 +1,13 @@
diff --git a/gmp-6.2.1.orig/gmp-h.in b/gmp-6.2.1/gmp-h.in
index 3d449d427..942fab4b1 100644
--- a/gmp-6.2.1.orig/gmp-h.in
+++ b/gmp-6.2.1/gmp-h.in
@@ -101,7 +101,7 @@ see https://www.gnu.org/licenses/. */
#if defined (__GNUC__)
#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__)
-#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__)
+#define __GMP_DECLSPEC_IMPORT
#endif
#if defined (_MSC_VER) || defined (__BORLANDC__)
#define __GMP_DECLSPEC_EXPORT __declspec(dllexport)
@@ -0,0 +1,25 @@
diff -aurp gmp-6.3.0-orig/gmp-h.in gmp-6.3.0/gmp-h.in
--- gmp-6.3.0-orig/gmp-h.in 2023-09-13 19:30:34.000000000 +0200
+++ gmp-6.3.0/gmp-h.in 2023-09-13 19:32:29.000000000 +0200
@@ -59,8 +59,12 @@ see https://www.gnu.org/licenses/. */
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
@DEFN_LONG_LONG_LIMB@
+#ifdef GMP_STATICLIB
+#define __GMP_LIBGMP_DLL 0
+#else
#define __GMP_LIBGMP_DLL @LIBGMP_DLL@
#endif
+#endif
/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in
diff -aurp gmp-6.3.0-orig/gmp.pc.in gmp-6.3.0/gmp.pc.in
--- gmp-6.3.0-orig/gmp.pc.in 2023-09-13 19:30:34.000000000 +0200
+++ gmp-6.3.0/gmp.pc.in 2023-09-14 00:10:14.000000000 +0200
@@ -8,4 +8,5 @@ Description: GNU Multiple Precision Arit
URL: https://gmplib.org
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
+Cflags.private: -DGMP_STATICLIB
Libs: -L${libdir} -lgmp
@@ -0,0 +1,31 @@
From 07b1c4c8a736a31ac4b8ae13ea25d50793dfea83 Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@alum.wpi.edu>
Date: Fri, 25 Jan 2019 12:55:52 -0600
Subject: [PATCH] python: return None if PY_IMPORT_STRING returns NULL
PY_IMPORT_STRING might return NULL on python 3 if, ie, a string can't be
encoded. We should check for this and return None, rather than returning
NULL. Fixes a NULL pointer dereference when reporting an error with an
invalid string.
---
python/types.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/python/types.c b/python/types.c
index 124af565..50951ba3 100644
--- a/python/types.c
+++ b/python/types.c
@@ -150,6 +150,10 @@ libxml_charPtrConstWrap(const char *str)
return (Py_None);
}
ret = PY_IMPORT_STRING(str);
+ if (ret == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
return (ret);
}
--
GitLab
@@ -0,0 +1,10 @@
--- a/xml2-config.in
+++ b/xml2-config.in
@@ -1,6 +1,6 @@
#! /bin/sh
-prefix=@prefix@
+prefix="$(cygpath -m "@prefix@")"
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
@@ -0,0 +1,7 @@
--- a/libxml-2.0.pc.in
+++ b/libxml-2.0.pc.in
@@ -11,3 +11,4 @@
Libs: -L${libdir} -lxml2
Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
+Cflags.private: -DLIBXML_STATIC
@@ -0,0 +1,39 @@
--- a/catalog.c
+++ b/catalog.c
@@ -74,7 +74,7 @@
#define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR "/sgml/catalog"
#endif
-#if defined(_WIN32) && defined(_MSC_VER)
+#if defined(_WIN32)
#undef XML_XML_DEFAULT_CATALOG
static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR "/xml/catalog";
#if !defined(_WINDOWS_)
@@ -3117,10 +3117,14 @@
catalogs = (const char *) getenv("XML_CATALOG_FILES");
if (catalogs == NULL)
-#if defined(_WIN32) && defined(_MSC_VER)
+#if defined(_WIN32)
{
void* hmodule;
+#ifdef _MSC_VER
hmodule = GetModuleHandleA("libxml2.dll");
+#else
+ hmodule = GetModuleHandleA("libxml2-2.dll");
+#endif
if (hmodule == NULL)
hmodule = GetModuleHandleA(NULL);
if (hmodule != NULL) {
@@ -3136,7 +3136,11 @@
p--;
if (p != buf) {
xmlChar* uri;
+#ifdef _MSC_VER
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
+#else
+ strncpy(p, "\\..\\etc\\xml\\catalog", 255 - (p - buf));
+#endif
uri = xmlCanonicPath((const xmlChar*)buf);
if (uri != NULL) {
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
@@ -0,0 +1,127 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=libxml2
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
"${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}-docs")
pkgver=2.12.8
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
pkgdesc="XML parsing library, version 2 (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-libiconv"
"${MINGW_PACKAGE_PREFIX}-jellyfin-xz"
"${MINGW_PACKAGE_PREFIX}-jellyfin-zlib")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-python")
optdepends=("${MINGW_PACKAGE_PREFIX}-python: Python bindings")
license=('spdx:MIT')
url="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home"
msys2_repository_url="https://gitlab.gnome.org/GNOME/libxml2"
msys2_references=(
"cpe: cpe:/a:xmlsoft:libxml2"
)
install=${_realname}-${MSYSTEM}.install
source=("https://download.gnome.org/sources/libxml2/${pkgver%.*}/${_realname}-${pkgver}.tar.xz"
https://www.w3.org/XML/Test/xmlts20130923.tar.gz
0027-decoding-segfault.patch
0029-xml2-config-win-paths.patch
0030-pkgconfig-add-Cflags-private.patch
0031-apply-msvc-relocation.patch)
sha256sums=('43ad877b018bc63deb2468d71f95219c2fac196876ef36d1bee51d226173ec93'
'9b61db9f5dbffa545f4b8d78422167083a8568c59bd1129f94138f936cf6fc1f'
'0391a4b267ba7251ca74ff2e98bf4c0332a14b618e8147a9341ec5617e45d9d9'
'278b4531da3d2aabda080c412c5122b471202dd6df67768b38bb0c31c7a0e508'
'06c0afaf1b8dec10d6f23dec983026cddf992528ffbc1cc50418302fabf9dee0'
'b4e3cf5faf0ba1100e2ae6b632dc429c0b25c8caca327e0888b41341d6ddbf9a')
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild/"
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _fname in "$@"
do
msg2 "Applying ${_fname}"
patch -Nbp1 -i "${srcdir}"/${_fname}
done
}
# =========================================== #
prepare() {
cd ${_realname}-${pkgver}
apply_patch_with_msg \
0030-pkgconfig-add-Cflags-private.patch \
0031-apply-msvc-relocation.patch
# https://gitlab.gnome.org/GNOME/libxml2/-/issues/64
# https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/15
# https://github.com/msys2/MINGW-packages/issues/7955
apply_patch_with_msg \
0027-decoding-segfault.patch
# https://github.com/msys2/MINGW-packages/issues/10577
apply_patch_with_msg \
0029-xml2-config-win-paths.patch
NOCONFIGURE=1 ./autogen.sh
}
build() {
# Static build
msg2 "Building static for ${MSYSTEM}"
[[ -d "${srcdir}"/build-static-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-static-${MSYSTEM}
mkdir -p ${srcdir}/build-static-${MSYSTEM} && cd ${srcdir}/build-static-${MSYSTEM}
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--build="${MINGW_CHOST}" \
--without-python \
--with-modules \
--enable-static \
--disable-shared \
--with-threads=win32 \
CFLAGS="${CFLAGS} -DLIBXML_STATIC_FOR_DLL -DNOLIBTOOL"
make
}
check() {
:
}
package_libxml2() {
# First install shared
make -C ${srcdir}/build-static-${MSYSTEM} install DESTDIR="${pkgdir}"
# License
install -Dm644 "${srcdir}/${_realname}-${pkgver}/Copyright" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
# Remove hard coded library path from xlm2-config and libxml-2.0.pc files
local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX})
sed -s "s|${PREFIX_DEPS}\/lib|\${libdir}|g" -i "${pkgdir}"${MINGW_PREFIX}/bin/xml2-config
sed -s "s|${PREFIX_DEPS}\/lib|\${libdir}|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/libxml-2.0.pc
mkdir -p dest${MINGW_PREFIX}/share
mv "${pkgdir}${MINGW_PREFIX}"/share/{doc,gtk-doc} dest${MINGW_PREFIX}/share
}
package_libxml2-docs() {
pkgdesc+=" (documentation)"
depends=()
mv dest/* "${pkgdir}"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,12 @@
MINGW_INSTALL=clang32
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,12 @@
MINGW_INSTALL=clang64
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,12 @@
MINGW_INSTALL=clangarm64
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,12 @@
MINGW_INSTALL=mingw32
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,12 @@
MINGW_INSTALL=mingw64
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,12 @@
MINGW_INSTALL=ucrt64
post_install() {
if test ! -f ${MINGW_INSTALL}/etc/xml/catalog; then
usr/bin/mkdir -p ${MINGW_INSTALL}/etc/xml
${MINGW_INSTALL}/bin/xmlcatalog.exe --noout --create ${MINGW_INSTALL}/etc/xml/catalog
fi
}
post_upgrade() {
post_install
}
@@ -0,0 +1,64 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=chromaprint
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.5.1
pkgrel=2
pkgdesc="Library that implements a custom algorithm for extracting fingerprints from any audio source (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://acoustid.org/chromaprint"
license=("LGPL")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-jellyfin-fftw")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-ninja")
options=('strip' 'staticlibs')
source=("https://github.com/acoustid/${_realname}/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig/:${PKG_CONFIG_PATH}"
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
}
build() {
_common_opts=(
-G"Ninja"
-DCMAKE_BUILD_TYPE=Release \
-DFFT_LIB=fftw3f \
-DBUILD_TESTS=off \
-DBUILD_TOOLS=off \
)
msg "Build static version"
[[ -d "${srcdir}/static-${MSYSTEM}" ]] && rm -r "${srcdir}/static-${MSYSTEM}"
mkdir -p "${srcdir}/static-${MSYSTEM}" && cd "${srcdir}/static-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBUILD_SHARED_LIBS=off \
"${_common_opts[@]}" \
../${_realname}-${pkgver}
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --build ./
}
package() {
# static
cd "${srcdir}/static-${MSYSTEM}"
DESTDIR="${pkgdir}" ${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --install ./
# Let ffmpeg also statically link to fftw3 and stdc++
# sed -s "s|-lchromaprint|-lchromaprint\ -lfftw3f -lstdc++|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/libchromaprint.pc
# sed -s "s|Cflags\:|Cflags\:\ -DCHROMAPRINT_NODLL|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/libchromaprint.pc
echo "Libs.private: -lfftw3f -lstdc++" >> "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/libchromaprint.pc
echo "Cflags.private: -DCHROMAPRINT_NODLL" >> "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/libchromaprint.pc
}
@@ -0,0 +1,12 @@
--- fontconfig-2.13.93/test/test-migration.c.orig 2020-12-05 10:40:30.302459200 +0100
+++ fontconfig-2.13.93/test/test-migration.c 2020-12-05 10:42:21.727935600 +0100
@@ -30,6 +30,9 @@
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
+#ifdef _WIN32
+#define mkdir(path,mode) _mkdir(path)
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -0,0 +1,216 @@
--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 12:24:45.529605800 +0000
+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:43:19.691870300 +0000
@@ -9,6 +9,213 @@
#endif
#include <fontconfig/fontconfig.h>
+#if defined(_WIN32)
+#include <time.h>
+#include <math.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <windows.h>
+#include <accctrl.h>
+#include <aclapi.h>
+
+static PSECURITY_DESCRIPTOR
+create_sd (int permissions)
+{
+ PSECURITY_DESCRIPTOR pSD = NULL;
+ int i;
+ int j;
+ EXPLICIT_ACCESS ea[3];
+ PSID sids[3] = { NULL, NULL, NULL };
+ WELL_KNOWN_SID_TYPE sidtypes[3] = { WinCreatorOwnerSid, WinCreatorGroupSid, WinWorldSid };
+ int ea_len = 0;
+ DWORD dwRes, dwDisposition;
+ PACL pACL = NULL;
+
+ /* Initialize a security descriptor. */
+ pSD = (PSECURITY_DESCRIPTOR) LocalAlloc (LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
+ if (NULL == pSD)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ if (!InitializeSecurityDescriptor (pSD, SECURITY_DESCRIPTOR_REVISION))
+ {
+ LocalFree (pSD);
+ errno = EIO;
+ return NULL;
+ }
+
+ for (i = 0; i < 3; i++)
+ {
+ BOOL b;
+ DWORD bytes;
+ int imasked = permissions & (07 << (2 - i));
+ if (!imasked)
+ continue;
+
+ bytes = SECURITY_MAX_SID_SIZE;
+ sids[ea_len] = (PSID) LocalAlloc (LMEM_FIXED, bytes);
+ if (NULL == sids[ea_len])
+ {
+ errno = ENOMEM;
+ LocalFree (pSD);
+ for (j = 0; j < ea_len; j++)
+ {
+ if (sids[j] != NULL)
+ {
+ LocalFree (sids[j]);
+ sids[j] = NULL;
+ }
+ }
+ return NULL;
+ }
+
+ b = CreateWellKnownSid (sidtypes[i], NULL, sids[ea_len], &bytes);
+ if (!b)
+ {
+ errno = EINVAL;
+ LocalFree (pSD);
+ for (j = 0; j < ea_len; j++)
+ {
+ if (sids[j] != NULL)
+ {
+ LocalFree (sids[j]);
+ sids[j] = NULL;
+ }
+ }
+ return NULL;
+ }
+
+ /* Initialize an EXPLICIT_ACCESS structure for an ACE. */
+ ZeroMemory (&ea[ea_len], sizeof(EXPLICIT_ACCESS));
+ bytes = 0;
+ if (01 & imasked)
+ bytes = bytes | GENERIC_READ;
+ if (02 & imasked)
+ bytes = bytes | GENERIC_WRITE;
+ if (04 & imasked)
+ bytes = bytes | GENERIC_EXECUTE;
+ ea[ea_len].grfAccessPermissions = bytes;
+ ea[ea_len].grfAccessMode = SET_ACCESS;
+ ea[ea_len].grfInheritance= NO_INHERITANCE;
+ ea[ea_len].Trustee.TrusteeForm = TRUSTEE_IS_SID;
+ ea[ea_len].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
+ ea[ea_len].Trustee.ptstrName = (LPTSTR) sids[ea_len];
+ ea_len = ea_len + 1;
+ }
+
+ /* Create a new ACL that contains the new ACEs. */
+ dwRes = SetEntriesInAcl (ea_len, ea, NULL, &pACL);
+ if (ERROR_SUCCESS != dwRes)
+ {
+ errno = EIO;
+ LocalFree (pSD);
+ for (j = 0; j < ea_len; j++)
+ {
+ if (sids[j] != NULL)
+ {
+ LocalFree (sids[j]);
+ sids[j] = NULL;
+ }
+ }
+ return NULL;
+ }
+
+ for (j = 0; j < ea_len; j++)
+ {
+ if (sids[j] != NULL)
+ {
+ LocalFree (sids[j]);
+ sids[j] = NULL;
+ }
+ }
+
+ /* Add the ACL to the security descriptor. */
+ if (!SetSecurityDescriptorDacl (pSD,
+ TRUE, // bDaclPresent flag
+ pACL,
+ FALSE)) // not a default DACL
+ {
+ errno = EIO;
+ LocalFree (pSD);
+ LocalFree (pACL);
+ return NULL;
+ }
+
+ return pSD;
+}
+
+static void
+free_sd (PSECURITY_DESCRIPTOR sd)
+{
+ BOOL b, present, defaulted;
+ PACL pACL = NULL;
+ present = FALSE;
+ b = GetSecurityDescriptorDacl (sd, &present, &pACL, &defaulted);
+ if (b && present && !defaulted && pACL)
+ LocalFree (pACL);
+ LocalFree (sd);
+}
+
+static void
+randtemplate (char *template, size_t l)
+{
+ int i;
+ for (i = l - 6; i < l; i++)
+ {
+ int r = rand ();
+ if ((r / (RAND_MAX + 1)) > ((RAND_MAX + 1) / 2))
+ template[i] = 'A' + (double) rand () / (RAND_MAX + 1) * ('Z' - 'A');
+ else
+ template[i] = 'a' + (double) rand () / (RAND_MAX + 1) * ('z' - 'a');
+ }
+}
+
+static char *
+mkdtemp (char *template)
+{
+ int i;
+ size_t l;
+ BOOL b;
+ SECURITY_ATTRIBUTES sa;
+
+ if (template == NULL)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+ l = strlen (template);
+ if (l < 6 || strcmp (&template[l - 6], "XXXXXX") != 0)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+ srand(time (NULL));
+ sa.nLength = sizeof (sa);
+ sa.lpSecurityDescriptor = create_sd (0700);
+ sa.bInheritHandle = FALSE;
+ do
+ {
+ randtemplate (template, l);
+ SetLastError (0);
+ b = CreateDirectoryA (template, &sa);
+ } while (!b && GetLastError () == ERROR_ALREADY_EXISTS);
+ free_sd (sa.lpSecurityDescriptor);
+ if (!b)
+ {
+ errno = EIO;
+ return NULL;
+ }
+ else
+ {
+ errno = 0;
+ return template;
+ }
+}
+#endif
+
FcBool
mkdir_p(const char *dir)
{
@@ -0,0 +1,27 @@
--- fontconfig-2.11.0/test/test-migration.c.orig 2014-02-06 14:43:19.691870300 +0000
+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 14:48:25.336182200 +0000
@@ -214,6 +214,24 @@
return template;
}
}
+
+static int
+setenv (const char *var, const char *val, int ovr)
+{
+ BOOL b;
+ char c[2];
+ if (!ovr)
+ {
+ DWORD d;
+ d = GetEnvironmentVariableA (var, c, 2);
+ if (0 != d && GetLastError () != ERROR_ENVVAR_NOT_FOUND)
+ return;
+ }
+ b = SetEnvironmentVariableA (var, val);
+ if (b)
+ return 0;
+ return 1;
+}
#endif
FcBool
@@ -0,0 +1,22 @@
--- fontconfig-2.11.93/m4/pkg.m4.orig 2015-03-09 02:54:03.000000000 +0000
+++ fontconfig-2.11.93/m4/pkg.m4 2015-04-06 11:04:21.862416100 +0000
@@ -111,8 +111,8 @@
pkg_failed=no
AC_MSG_CHECKING([for $1])
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+_PKG_CONFIG([$1][_CFLAGS], [cflags --dont-define-prefix], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs --dont-define-prefix], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
@@ -207,7 +207,7 @@
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
-_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+_PKG_CONFIG([$1], [variable="][$3][" --dont-define-prefix], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
@@ -0,0 +1,100 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=fontconfig
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=2.15.0
pkgrel=1
pkgdesc="A library for configuring and customizing font access (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://wiki.freedesktop.org/www/Software/fontconfig/"
msys2_repository_url="https://gitlab.freedesktop.org/fontconfig/fontconfig"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-python-lxml"
"${MINGW_PACKAGE_PREFIX}-gperf"
"${MINGW_PACKAGE_PREFIX}-gettext-runtime"
"python")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-jellyfin-freetype"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libxml2"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libiconv")
options=('staticlibs' 'strip')
install=${_realname}-${MSYSTEM}.install
source=("https://www.freedesktop.org/software/fontconfig/release/fontconfig-${pkgver}.tar.xz"
0002-fix-mkdir.mingw.patch
0004-fix-mkdtemp.mingw.patch
0005-fix-setenv.mingw.patch
0007-pkgconfig.mingw.patch
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/a76b95105ca26c600279b2daf4bd43b37a918823.patch)
sha256sums=('63a0658d0e06e0fa886106452b58ef04f21f58202ea02a94c39de0d3335d7c0e'
'9e5700b9c555e60cd8116fdc2e24cf0a01de01e83373dbbe78cef1e32b91da3b'
'57ff8420dbf62873b6fcb38b52fb7b37e0e278425a9125e15dccba54668c8ab9'
'552b54010f9fe4097f332cf2397bbd3e78489542d3bbf07792ed1cfe9381796e'
'af373531873da46d0356305da5444c1ec74f443cd2635ea2db6b7dadd1561f5b'
'c225c156c4732a492c9588c8d33705ca29af6f3195f201f4012b09ff012f1831')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
patch -p1 -i ${srcdir}/0002-fix-mkdir.mingw.patch
patch -p1 -i ${srcdir}/0004-fix-mkdtemp.mingw.patch
patch -p1 -i ${srcdir}/0005-fix-setenv.mingw.patch
patch -p1 -i ${srcdir}/0007-pkgconfig.mingw.patch
# backport because it seems relevant for us
patch -p1 -i ${srcdir}/a76b95105ca26c600279b2daf4bd43b37a918823.patch
autoreconf -fiv
}
build() {
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
# Use msys python for link_confs.py, so we don't have to fixup the path conversion
# and patch out symlinking
PYTHON=/usr/bin/python \
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--disable-shared \
--enable-static \
--enable-iconv \
--with-libiconv=${MINGW_PREFIX} \
--enable-libxml2 \
--with-libxml2=${MINGW_PREFIX} \
--disable-docs \
--with-arch=${CARCH} \
as_ln_s="cp -pR"
sed -i 's,all-am: Makefile $(PROGRAMS),all-am:,' test/Makefile
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make -j1 DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
# Also install libintl lib
cp "${MINGW_TOOLCHAIN_PREFIX}"/lib/libintl.a "${pkgdir}${MINGW_PREFIX}/lib/"
# Convert MSYS2-specific paths to pkg-config variables (see issue #872)
sed -i "s#${MINGW_PREFIX}/lib#\${libdir}#g" "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/fontconfig.pc
sed -i "s#${MINGW_PREFIX}/include#\${includedir}#g" "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/fontconfig.pc
# Also statically link to libintl
sed -s "s|-liconv|-liconv\ -lintl|g" -i "${pkgdir}"${MINGW_PREFIX}/lib/pkgconfig/fontconfig.pc
}
@@ -0,0 +1,30 @@
MINGW_INSTALL=clang32
post_install() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_upgrade() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,18 @@
MINGW_INSTALL=clang64
post_install() {
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
}
post_upgrade() {
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,30 @@
MINGW_INSTALL=clangarm64
post_install() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_upgrade() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,30 @@
MINGW_INSTALL=mingw32
post_install() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_upgrade() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,30 @@
MINGW_INSTALL=mingw64
post_install() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_upgrade() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,30 @@
MINGW_INSTALL=ucrt64
post_install() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_upgrade() {
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
else
echo -n "updating font cache... "
${MINGW_INSTALL}/bin/fc-cache -f
echo "done."
fi
}
post_remove() {
cat << _EOF
Check for dead symlinks and leftover files
in ${MINGW_INSTALL}/etc/fonts/conf.d/
_EOF
}
@@ -0,0 +1,14 @@
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = @MINGW_HOOK_TARGET_PREFIX@/share/fonts/*
Target = @MINGW_HOOK_TARGET_PREFIX@/etc/fonts/conf.d/*
Target = @MINGW_HOOK_TARGET_PREFIX@/share/fontconfig/conf.avail/*
Target = @MINGW_HOOK_TARGET_PREFIX@/share/fontconfig/conf.default/*
[Action]
Description = Updating fontconfig cache...
When = PostTransaction
Exec = @MINGW_PREFIX@/bin/fc-cache -s
@@ -0,0 +1,13 @@
--- a/util/hb-info.cc
+++ b/util/hb-info.cc
@@ -35,6 +35,10 @@
# include <chafa.h>
#endif
+#ifdef environ
+#undef environ
+#endif
+
const unsigned DEFAULT_FONT_SIZE = FONT_SIZE_UPEM;
const unsigned SUBPIXEL_BITS = 0;
@@ -0,0 +1,106 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
_realname=harfbuzz
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=9.0.0
pkgrel=1
pkgdesc="OpenType text shaping engine"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://github.com/harfbuzz/harfbuzz"
msys2_references=(
"archlinux: harfbuzz"
"cpe: cpe:/a:harfbuzz_project:harfbuzz"
)
license=('spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
"${MINGW_PACKAGE_PREFIX}-ragel")
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-freetype"
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-gettext-runtime")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-fonttools"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
source=("https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz"
"001-fix-build-with-chafa.patch")
sha256sums=('a41b272ceeb920c57263ec851604542d9ec85ee3030506d94662067c7b6ab89e'
'26b37a1ca9872973905ecb96bcbe3f054472252320956faa74428206900d360e')
noextract=("harfbuzz-${pkgver}.tar.xz")
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
echo "Extracting harfbuzz-${pkgver}.tar.xz..."
tar -xJf harfbuzz-${pkgver}.tar.xz || true
cd ${_realname}-${pkgver}
patch -p1 -i "${srcdir}"/001-fix-build-with-chafa.patch
}
build() {
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
local -a _static_flags=(
-DGIO_STATIC_COMPILATION
-DGLIB_STATIC_COMPILATION
-DGMODULE_STATIC_COMPILATION
-DGOBJECT_STATIC_COMPILATION
-DGRAPHITE2_STATIC
)
CFLAGS+=" ${_static_flags[@]}" \
CXXFLAGS+=" ${_static_flags[@]}" \
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/meson setup \
--prefix="${MINGW_PREFIX}" \
--buildtype plain \
--prefer-static \
--wrap-mode=nofallback \
--default-library=static \
-Dauto_features=enabled \
-Dintrospection=disabled \
-Dgobject=disabled \
-Dicu=disabled \
-Dcpp_std=c++17 \
-Dgdi=disabled \
-Dgraphite=disabled \
-Ddirectwrite=disabled \
-Dtests=disabled \
-Ddocs=disabled \
-Dchafa=disabled \
-Dcairo=disabled \
-Dglib=disabled \
"build-${MSYSTEM}-static" \
"${_realname}-${pkgver}"
${MINGW_TOOLCHAIN_PREFIX}/bin/meson compile -C "build-${MSYSTEM}-static"
}
check(){
:
}
package_harfbuzz() {
pkgdesc+=" (mingw-w64)"
${MINGW_TOOLCHAIN_PREFIX}/bin/meson install -C "build-${MSYSTEM}-static" --destdir "${pkgdir}"
install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING \
"${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,25 @@
Description: Fix warning on 64 bit machines. Explicitely set variables as
unsigned ints.
Origin: http://git.debian.org/?p=pkg-multimedia/lame.git;a=blob;f=debian/patches/07-field-width-fix.patch
Forwarded: commit:1.282
Applied-Upstream: commit:1.282
--- a/frontend/parse.c
+++ b/frontend/parse.c
@@ -372,11 +372,11 @@
const char *b = get_lame_os_bitness();
const char *v = get_lame_version();
const char *u = get_lame_url();
- const size_t lenb = strlen(b);
- const size_t lenv = strlen(v);
- const size_t lenu = strlen(u);
- const size_t lw = 80; /* line width of terminal in characters */
- const size_t sw = 16; /* static width of text */
+ const unsigned int lenb = strlen(b);
+ const unsigned int lenv = strlen(v);
+ const unsigned int lenu = strlen(u);
+ const unsigned int lw = 80; /* line width of terminal in characters */
+ const unsigned int sw = 16; /* static width of text */
if (lw >= lenb + lenv + lenu + sw || lw < lenu + 2)
/* text fits in 80 chars per line, or line even too small for url */
@@ -0,0 +1,11 @@
--- lame-3.99.5/configure.in.orig 2014-04-30 16:21:08.328453700 +0000
+++ lame-3.99.5/configure.in 2014-04-30 16:21:39.141366400 +0000
@@ -392,7 +392,7 @@
dnl configure use of features
-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
+AC_SUBST(GTK_CFLAGS,[])
dnl ElectricFence malloc debugging
AC_MSG_CHECKING(use of ElectricFence malloc debugging)
@@ -0,0 +1,10 @@
--- lame-3.100/libmp3lame/Makefile.am.orig 2016-01-29 22:06:26.000000000 +0100
+++ lame-3.100/libmp3lame/Makefile.am 2017-10-15 11:40:06.357621100 +0200
@@ -22,7 +22,6 @@
libmp3lame_la_LIBADD = $(cpu_ldadd) $(vector_ldadd) $(decoder_ldadd) \
$(CONFIG_MATH_LIB)
libmp3lame_la_LDFLAGS = -version-info @LIB_MAJOR_VERSION@:@LIB_MINOR_VERSION@ \
- -export-symbols $(top_srcdir)/include/libmp3lame.sym \
-no-undefined
INCLUDES = @INCLUDES@ -I$(top_srcdir)/mpglib -I$(top_builddir)
@@ -0,0 +1,76 @@
--- lame-3.100/frontend/parse.c.orig 2017-10-15 11:49:51.389922000 +0200
+++ lame-3.100/frontend/parse.c 2017-10-15 11:56:02.377439500 +0200
@@ -70,8 +70,6 @@
#ifdef HAVE_ICONV
#include <iconv.h>
#include <errno.h>
-#include <locale.h>
-#include <langinfo.h>
#endif
#if defined _ALLOW_INTERNAL_OPTIONS
@@ -153,7 +151,9 @@
size_t n = 1;
char dst[32];
char* src = "A";
- char* cur_code = nl_langinfo(CODESET);
+ char* env_lang = getenv("LANG");
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
iconv_t xiconv = iconv_open(cur_code, "ISO_8859-1");
if (xiconv != (iconv_t)-1) {
for (n = 0; n < 32; ++n) {
@@ -181,7 +181,9 @@
size_t const n = l*4;
dst = calloc(n+4, 4);
if (dst != 0) {
- char* cur_code = nl_langinfo(CODESET);
+ char* env_lang = getenv("LANG");
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
iconv_t xiconv = iconv_open(cur_code, "ISO_8859-1");
if (xiconv != (iconv_t)-1) {
char* i_ptr = src;
@@ -205,7 +207,9 @@
size_t const n = l*4;
dst = calloc(n+4, 4);
if (dst != 0) {
- char* cur_code = nl_langinfo(CODESET);
+ char* env_lang = getenv("LANG");
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
iconv_t xiconv = iconv_open(cur_code, "UTF-16LE");
if (xiconv != (iconv_t)-1) {
char* i_ptr = (char*)src;
@@ -231,7 +235,9 @@
size_t const n = l*4;
dst = calloc(n+4, 4);
if (dst != 0) {
- char* cur_code = nl_langinfo(CODESET);
+ char* env_lang = getenv("LANG");
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
iconv_t xiconv = iconv_open("ISO_8859-1//TRANSLIT", cur_code);
if (xiconv != (iconv_t)-1) {
char* i_ptr = (char*)src;
@@ -257,7 +263,9 @@
size_t const n = (l+1)*4;
dst = calloc(n+4, 4);
if (dst != 0) {
- char* cur_code = nl_langinfo(CODESET);
+ char* env_lang = getenv("LANG");
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
iconv_t xiconv = iconv_open("UTF-16LE//TRANSLIT", cur_code);
dst[0] = 0xff;
dst[1] = 0xfe;
@@ -1513,9 +1521,6 @@
enum TextEncoding id3_tenc = TENC_LATIN1;
#endif
-#ifdef HAVE_ICONV
- setlocale(LC_CTYPE, "");
-#endif
inPath[0] = '\0';
outPath[0] = '\0';
/* turn on display options. user settings may turn them off below */
@@ -0,0 +1,11 @@
--- lame-3.100/frontend/console.c.orig 2017-10-15 12:56:52 +0200
+++ lame-3.100/frontend/console.c 2017-10-15 12:57:16 +0200
@@ -145,7 +145,7 @@
strcpy(mfp->str_up, "\033[A");
-#ifdef HAVE_TERMCAP
+#if defined(HAVE_TERMCAP) && !defined(_WIN32)
apply_termcap_settings(mfp);
#endif /* TERMCAP_AVAILABLE */
@@ -0,0 +1,64 @@
From: Nicolas Boulenguez <nicolas@debian.org>
Date: Tue, 27 Sep 2022 20:15:44 +0200
Subject: Generate and install a pkg-config file for user convenience
This has been an upstream feature request for a while, and should be
forwarded to https://sourceforge.net/p/lame/feature-requests/42/.
Bug-Debian: https://bugs.debian.org/829326
---
configure.in | 1 +
libmp3lame/Makefile.am | 6 ++++++
libmp3lame/lame.pc.in | 10 ++++++++++
3 files changed, 17 insertions(+)
create mode 100644 libmp3lame/lame.pc.in
diff --git a/configure.in b/configure.in
index 3f9fddb..073139a 100644
--- a/configure.in
+++ b/configure.in
@@ -1241,6 +1241,7 @@ AC_SUBST(CONFIG_DEFS)
AC_CONFIG_FILES([Makefile \
libmp3lame/Makefile \
libmp3lame/i386/Makefile \
+ libmp3lame/lame.pc \
libmp3lame/vector/Makefile \
frontend/Makefile \
mpglib/Makefile \
diff --git a/libmp3lame/Makefile.am b/libmp3lame/Makefile.am
index 50cef75..126a675 100644
--- a/libmp3lame/Makefile.am
+++ b/libmp3lame/Makefile.am
@@ -30,6 +30,7 @@ INCLUDES = @INCLUDES@ -I$(top_srcdir)/mpglib -I$(top_builddir)
DEFS = @DEFS@ @CONFIG_DEFS@
EXTRA_DIST = \
+ lame.pc.in \
lame.rc \
vbrquantize.h \
logoe.ico
@@ -100,3 +101,8 @@ lclint: lclint.txt
#$(OBJECTS): libtool
#libtool: $(LIBTOOL_DEPS)
# $(SHELL) $(top_builddir)/config.status --recheck
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lame.pc
+
+DISTCLEANFILES = $(pkgconfig_DATA)
diff --git a/libmp3lame/lame.pc.in b/libmp3lame/lame.pc.in
new file mode 100644
index 0000000..22ddd7a
--- /dev/null
+++ b/libmp3lame/lame.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: high quality MPEG Audio Layer III (MP3) encoder library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lmp3lame
+Cflags: -I${includedir}/lame
+81
View File
@@ -0,0 +1,81 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=lame
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=3.100
pkgrel=3
pkgdesc="A high quality MPEG Audio Layer III (MP3) encoder (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://lame.sourceforge.io/"
msys2_references=(
"cpe: cpe:/a:lame_project:lame"
)
license=("LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-mpg123"
"${MINGW_PACKAGE_PREFIX}-ncurses"
"${MINGW_PACKAGE_PREFIX}-autotools"
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "${MINGW_PACKAGE_PREFIX}-nasm" ))
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-libiconv")
options=('strip' 'staticlibs')
source=("https://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz"
0002-07-field-width-fix.all.patch
0005-no-gtk.all.patch
0006-dont-use-outdated-symbol-list.patch
0007-revert-posix-code.patch
0008-skip-termcap.patch
0009-lame-add-pkgconfig.patch)
sha256sums=('ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e'
'd3ba595816761706d1e5dcf432f0b3ad8c9c6b37584032e21bf24c89e4fd0fc8'
'cd3c8807de5b435b8e97200e369e7e8f93f7fc0eba7d44b393ede925e42d3b00'
'21c7ee85854be00a3e8e6790911292837676f083a5c1085718bed899096d3679'
'1e7f61456b15ceea613de8fd982b3f892340b851393d4ca4aff44395ae237ae9'
'8fddeebd0ccdec62ede2932ce3bbe767af6ed6f06018f7f13113401d4ce06179'
'65edcb5090417f822227b4a43f2f0c0224ceca7486fb3fd01aa9a6cf153ad714')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/0002-07-field-width-fix.all.patch
patch -p1 -i ${srcdir}/0005-no-gtk.all.patch
patch -p1 -i ${srcdir}/0006-dont-use-outdated-symbol-list.patch
patch -p1 -i ${srcdir}/0007-revert-posix-code.patch
# tgetent() crashes under mingw64, not sure why
patch -p1 -i ${srcdir}/0008-skip-termcap.patch
# https://salsa.debian.org/multimedia-team/lame
# https://sourceforge.net/p/lame/mailman/message/37616009/
patch -p1 -i ${srcdir}/0009-lame-add-pkgconfig.patch
autoreconf -fi
}
build() {
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-{shared,gtktest,cpml,frontend} \
--enable-static \
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "--enable-nasm")
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="${pkgdir}" install
}
@@ -0,0 +1,61 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libbluray
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.3.4
pkgrel=1
pkgdesc="Library to access Blu-Ray disks for video playback (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://www.videolan.org/developers/libbluray.html'
msys2_references=(
"cpe: cpe:/a:videolan:libbluray"
)
license=('spdx:LGPL-2.1-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-libxml2"
"${MINGW_PACKAGE_PREFIX}-jellyfin-freetype")
makedepends=(
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc")
source=(https://download.videolan.org/pub/videolan/libbluray/${pkgver}/${_realname}-${pkgver}.tar.bz2)
sha256sums=('478ffd68a0f5dde8ef6ca989b7f035b5a0a22c599142e5cd3ff7b03bbebe5f2b')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
}
build() {
export lt_cv_deplibs_check_method='pass_all'
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[[ -d "${srcdir}/build-static-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-static-${MSYSTEM}"
mkdir -p "${srcdir}/build-static-${MSYSTEM}" && cd "${srcdir}/build-static-${MSYSTEM}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--enable-examples \
--disable-bdjava-jar \
--enable-shared=no \
--enable-static=yes \
LIBXML2_CFLAGS="$("${MINGW_PREFIX}"/bin/xml2-config --cflags) -DLIBXML_STATIC" \
LIBXML2_LIBS="$("${MINGW_PREFIX}"/bin/xml2-config --libs)"
make
}
package() {
cd "${srcdir}/build-static-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
local _prefix_win="$(cygpath -m "${MINGW_PREFIX}")"
sed -s "s|${_prefix_win}|${MINGW_PREFIX}|g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libbluray.pc
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}
@@ -0,0 +1,65 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libogg
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.3.5
pkgrel=1
pkgdesc="Ogg bitstream and framing library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://xiph.org/"
license=('BSD')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-cc")
options=('staticlibs' 'strip')
source=("https://downloads.xiph.org/releases/ogg/${_realname}-${pkgver}.tar.gz"
"libogg-1.3.4-versioned-dll-cmake.patch")
sha256sums=('0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664'
'7f635d4ca41c75dc52206749b6346c174c6a028de09604c6d66929bcdabf6c33')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
patch -Np1 -i "${srcdir}/libogg-1.3.4-versioned-dll-cmake.patch"
}
build() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig/:${PKG_CONFIG_PATH}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
# Static
[[ -d "${srcdir}/build-${MINGW_CHOST}-static" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}-static"
mkdir -p "${srcdir}/build-${MINGW_CHOST}-static" && cd "${srcdir}/build-${MINGW_CHOST}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-G'MSYS Makefiles' \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
../${_realname}-${pkgver}
make
}
package() {
# Static
cd "${srcdir}/build-${MINGW_CHOST}-static"
make DESTDIR="${pkgdir}" install
# m4
install -Dm644 ${srcdir}/${_realname}-${pkgver}/ogg.m4 ${pkgdir}${MINGW_PREFIX}/share/aclocal/ogg.m4
# License
install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
}
@@ -0,0 +1,58 @@
diff -Naur libogg-1.3.4.orig/CMakeLists.txt libogg-1.3.4/CMakeLists.txt
--- libogg-1.3.4.orig/CMakeLists.txt 2019-09-02 15:05:06.093041600 -0400
+++ libogg-1.3.4/CMakeLists.txt 2019-09-02 15:08:44.811923200 -0400
@@ -103,6 +103,14 @@
VERSION ${LIB_VERSION}
PUBLIC_HEADER "${OGG_HEADERS}"
)
+if(WIN32)
+ set_target_properties(ogg
+ PROPERTIES
+ OUTPUT_NAME ogg
+ RUNTIME_OUTPUT_NAME ogg-${LIB_SOVERSION}
+ ARCHIVE_OUTPUT_NAME ogg
+ )
+endif()
if(BUILD_FRAMEWORK)
set_target_properties(ogg PROPERTIES
diff -Naur libogg-1.3.4.orig/win32/ogg.def libogg-1.3.4/win32/ogg.def
--- libogg-1.3.4.orig/win32/ogg.def 2019-09-02 15:05:06.093041600 -0400
+++ libogg-1.3.4/win32/ogg.def 2019-09-02 15:08:44.811923200 -0400
@@ -2,10 +2,11 @@
; ogg.def
; List of exported functions for Windows builds.
;
-LIBRARY ogg
+LIBRARY "libogg-0"
EXPORTS
;
oggpack_writeinit
+oggpack_writecheck
oggpack_writetrunc
oggpack_writealign
oggpack_writecopy
@@ -24,6 +25,7 @@
oggpack_get_buffer
;
oggpackB_writeinit
+oggpackB_writecheck
oggpackB_writetrunc
oggpackB_writealign
oggpackB_writecopy
@@ -49,6 +51,7 @@
ogg_sync_clear
ogg_sync_reset
ogg_sync_destroy
+ogg_sync_check
ogg_sync_buffer
ogg_sync_wrote
ogg_sync_pageseek
@@ -62,6 +65,7 @@
ogg_stream_reset
ogg_stream_reset_serialno
ogg_stream_destroy
+ogg_stream_check
ogg_stream_eos
ogg_stream_pageout_fill
ogg_stream_flush_fill
@@ -0,0 +1,168 @@
diff -aur libvpx-1.6.0-orig/build/make/configure.sh libvpx-1.6.0/build/make/configure.sh
--- libvpx-1.6.0-orig/build/make/configure.sh 2016-07-21 04:15:41.000000000 +0300
+++ libvpx-1.6.0/build/make/configure.sh 2016-07-28 18:34:25.287546800 +0300
@@ -647,7 +647,10 @@
--libdir=*)
libdir="${optval}"
;;
- --libc|--as|--prefix|--libdir)
+ --bindir=*)
+ bindir="${optval}"
+ ;;
+ --libc|--as|--prefix|--libdir|--bindir)
die "Option ${opt} requires argument"
;;
--help|-h)
@@ -618,9 +621,14 @@
prefix="${prefix%/}"
libdir="${libdir:-${prefix}/lib}"
libdir="${libdir%/}"
+ bindir="${bindir:-${prefix}/bin}"
+ bindir="${bindir%/}"
if [ "${libdir#${prefix}}" = "${libdir}" ]; then
die "Libdir ${libdir} must be a subdirectory of ${prefix}"
fi
+ if [ "${bindir#${prefix}}" = "${bindir}" ]; then
+ die "Bindir ${bindir} must be a subdirectory of ${prefix}"
+ fi
}
post_process_cmdline() {
diff -aur libvpx-1.6.0-orig/build/make/Makefile libvpx-1.6.0/build/make/Makefile
--- libvpx-1.6.0-orig/build/make/Makefile 2016-07-21 04:15:41.000000000 +0300
+++ libvpx-1.6.0/build/make/Makefile 2016-07-28 18:34:25.287546800 +0300
@@ -300,6 +300,20 @@
$$(filter %.o,$$^) $$(extralibs)
endef
+define dll_gnu_template
+# Not using a pattern rule here because we don't want to generate empty
+# archives when they are listed as a dependency in files not responsible
+# for creating them.
+#
+# This needs further abstraction for dealing with non-GNU linkers.
+$(1):
+ $(if $(quiet),@echo " [LD] $$@")
+ $(qexec)$$(LD) -shared $$(LDFLAGS) \
+ -Wl,--no-undefined \
+ -o $$@ \
+ -Wl,--out-implib=$$(subst $(2),.dll.a,$(1)) $$(filter %.o,$$^) $$(extralibs)
+endef
+
define dl_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
@@ -383,6 +397,7 @@
$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
+$(foreach lib,$(filter %-$(VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_gnu_template,$(lib),-$(VERSION_MAJOR).dll)))
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
ifeq ($(MAKECMDGOALS),dist)
Only in libvpx-1.6.0/build/make: Makefile.orig
diff -aur libvpx-1.6.0-orig/configure libvpx-1.6.0/configure
--- libvpx-1.6.0-orig/configure 2016-07-21 04:15:41.000000000 +0300
+++ libvpx-1.6.0/configure 2016-07-28 18:37:36.879364800 +0300
@@ -473,6 +473,7 @@
DIST_DIR?=\$(DESTDIR)${prefix}
endif
LIBSUBDIR=${libdir##${prefix}/}
+BINSUBDIR=${bindir##${prefix}/}
VERSION_STRING=${VERSION_STRING}
@@ -510,9 +511,13 @@
;;
*)
if enabled gnu; then
- echo "--enable-shared is only supported on ELF; assuming this is OK"
+ echo "--enable-shared is only supported on ELF and PE; assuming this is OK"
+ elif enabled win32; then
+ echo "--enable-shared is only supported on ELF and PE; assuming this is OK"
+ elif enabled win64; then
+ echo "--enable-shared is only supported on ELF and PE; assuming this is OK"
else
- die "--enable-shared only supported on ELF, OS/2, and Darwin for now"
+ die "--enable-shared only supported on ELF, OS/2, Darwin and PE for now"
fi
;;
esac
diff -aur libvpx-1.6.0-orig/examples.mk libvpx-1.6.0/examples.mk
--- libvpx-1.6.0-orig/examples.mk 2016-07-21 04:15:41.000000000 +0300
+++ libvpx-1.6.0/examples.mk 2016-07-28 18:34:25.303172800 +0300
@@ -302,9 +302,13 @@
ifneq ($(filter os2%,$(TGT_OS)),)
SHARED_LIB_SUF=_dll.a
else
+ifneq ($(filter win%,$(TGT_OS)),)
+SHARED_LIB_SUF=.dll.a
+else
SHARED_LIB_SUF=.so
endif
endif
+endif
CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
$(foreach bin,$(BINS-yes),\
$(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\
diff -aur libvpx-1.6.0-orig/libs.mk libvpx-1.6.0/libs.mk
--- libvpx-1.6.0-orig/libs.mk 2016-07-21 04:15:41.000000000 +0300
+++ libvpx-1.6.0/libs.mk 2016-07-28 18:34:25.303172800 +0300
@@ -130,6 +130,7 @@
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx/%
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx_ports/%
INSTALL_MAPS += $(LIBSUBDIR)/% %
+INSTALL_MAPS += $(BINSUBDIR)/% %
INSTALL_MAPS += src/% $(SRC_PATH_BARE)/%
ifeq ($(CONFIG_MSVS),yes)
INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/% $(p)/Release/%)
@@ -252,6 +253,13 @@
LIBVPX_SO_SYMLINKS :=
LIBVPX_SO_IMPLIB := libvpx_dll.a
else
+ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS))
+LIBVPX_SO := libvpx-$(VERSION_MAJOR).dll
+SHARED_LIB_SUF := .dll.a
+EXPORT_FILE :=
+LIBVPX_SO_SYMLINKS :=
+LIBVPX_SO_IMPLIB := libvpx.dll.a
+else
LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
SHARED_LIB_SUF := .so
EXPORT_FILE := libvpx.ver
@@ -261,13 +269,14 @@
endif
endif
endif
+endif
LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
$(notdir $(LIBVPX_SO_SYMLINKS)) \
$(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB))
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
-$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
+$(BUILD_PFX)$(LIBVPX_SO): SONAME = $(LIBVPX_SO)
$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
libvpx.ver: $(call enabled,CODEC_EXPORTS)
@@ -295,6 +304,10 @@
$(qexec)emximp -o $@ $<
CLEAN-OBJS += libvpx_dll.a
+libvpx.dll.a: $(LIBVPX_SO)
+ @echo " [IMPLIB] $@"
+CLEAN-OBJS += libvpx.dll.a
+
define libvpx_symlink_template
$(1): $(2)
@echo " [LN] $(2) $$@"
@@ -311,7 +324,7 @@
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
-INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
+INSTALL-LIBS-$(CONFIG_SHARED) += $(BINSUBDIR)/$(LIBVPX_SO)
INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB))
@@ -0,0 +1,23 @@
--- libvpx-1.6.1/build/make/configure.sh.orig 2017-04-18 07:55:35.521235500 -0400
+++ libvpx-1.6.1/build/make/configure.sh 2017-04-18 08:03:57.773345200 -0400
@@ -636,13 +636,13 @@ post_process_cmdline() {
}
setup_gnu_toolchain() {
- CC=${CC:-${CROSS}gcc}
- CXX=${CXX:-${CROSS}g++}
- AR=${AR:-${CROSS}ar}
- LD=${LD:-${CROSS}${link_with_cc:-ld}}
- AS=${AS:-${CROSS}as}
- STRIP=${STRIP:-${CROSS}strip}
- NM=${NM:-${CROSS}nm}
+ CC=${CC:-gcc}
+ CXX=${CXX:-g++}
+ AR=${AR:-ar}
+ LD=${LD:-${link_with_cc:-ld}}
+ AS=${AS:-as}
+ STRIP=${STRIP:-strip}
+ NM=${NM:-nm}
AS_SFX=.S
EXE_SFX=
}
@@ -0,0 +1,11 @@
diff -Naur libvpx-1.4.0-orig/vpx/exports_enc libvpx-1.4.0/vpx/exports_enc
--- libvpx-1.4.0-orig/vpx/exports_enc 2015-04-03 21:49:19.000000000 +0300
+++ libvpx-1.4.0/vpx/exports_enc 2015-04-07 09:41:36.904200000 +0300
@@ -2,6 +2,7 @@
text vpx_codec_enc_config_set
text vpx_codec_enc_init_multi_ver
text vpx_codec_enc_init_ver
+text vpx_codec_enc_init_multi_ver
text vpx_codec_encode
text vpx_codec_get_cx_data
text vpx_codec_get_global_headers
+116
View File
@@ -0,0 +1,116 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libvpx
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.14.0
pkgrel=1
pkgdesc="The VP8/VP9 Codec SDK (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-libwinpthread-git")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-winpthreads-git"
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "${MINGW_PACKAGE_PREFIX}-yasm" ))
url="https://www.webmproject.org/"
msys2_repository_url="https://github.com/webmproject/libvpx"
msys2_references=(
"cpe: cpe:/a:webmproject:libvpx"
)
source=(${_realname}-${pkgver}.tar.gz::https://github.com/webmproject/libvpx/archive/v${pkgver}.tar.gz
0001-enable-shared-on.mingw.patch
0003-cross-with-native-binutils.mingw.patch
0005-fix-exports.mingw.patch)
options=('strip' 'staticlibs')
sha256sums=('5f21d2db27071c8a46f1725928a10227ae45c5cd1cad3727e4aafbe476e321fa'
'f37a24525725cad215d73c538c0b06343b043f2b07553e7dc25835bd68af0695'
'fabe7d4a756b33016947f741b1b5d8cbbf9aefd8862240645d0ed7bf7b4a3739'
'7c511b5df935278da2cba32b03b90582f360ab6786a5e32028bc82025193fabd')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
msg2 "Applying $1"
patch -Np1 -i "${srcdir}"/$1
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
apply_patch_with_msg 0001-enable-shared-on.mingw.patch
apply_patch_with_msg 0003-cross-with-native-binutils.mingw.patch
apply_patch_with_msg 0005-fix-exports.mingw.patch
}
build() {
[[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM}
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
case "${MINGW_CHOST}" in
"i686-w64-mingw32")
_targetarch="x86-win32-gcc"
EXTRA_CFLAGS="-mstackrealign"
;;
"x86_64-w64-mingw32")
_targetarch="x86_64-win64-gcc"
;;
"aarch64-w64-mingw32")
_targetarch="arm64-win64-gcc"
;;
esac
LD=cc CFLAGS="$EXTRA_CFLAGS $CFLAGS -fno-asynchronous-unwind-tables" \
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--target=${_targetarch} \
--enable-vp8 \
--enable-vp9 \
--enable-vp9-highbitdepth \
--enable-vp9-temporal-denoising \
--enable-runtime-cpu-detect \
--enable-postproc \
--enable-pic \
--disable-shared \
--enable-static \
--enable-experimental \
--disable-examples \
--disable-docs \
--disable-install-docs \
--disable-install-srcs \
--disable-unit-tests
for _ff in *.mk; do
sed -i "s/HAVE_GNU_STRIP=yes/HAVE_GNU_STRIP=no/g" $_ff
done
make #-j1
}
#These tests seem to take a lot of time
#check() {
# cd "${srcdir}/build-$MSYSTEM"
# make test
#}
package() {
cd "${srcdir}/build-${MSYSTEM}"
make DIST_DIR="${pkgdir}${MINGW_PREFIX}" install
# Also install pthread
cp "${MINGW_TOOLCHAIN_PREFIX}"/lib/libpthread.a "${pkgdir}${MINGW_PREFIX}/lib/"
}
@@ -0,0 +1,11 @@
--- libwebp-1.3.0/CMakeLists.txt.orig 2023-01-13 12:49:52.571844700 +0100
+++ libwebp-1.3.0/CMakeLists.txt 2023-01-13 12:52:53.077790900 +0100
@@ -713,7 +713,7 @@
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-set(ConfigPackageLocation ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/)
install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME}::
DESTINATION ${ConfigPackageLocation})
@@ -0,0 +1,76 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Andrew Sun <adsun701@gmail.com>
_realname=libwebp
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=1.4.0
pkgrel=1
pkgdesc="A library to encode and decode images in WebP format (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://developers.google.com/speed/webp/'
msys2_references=(
"cpe: cpe:/a:webmproject:libwebp"
)
license=('spdx:BSD-3-Clause')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja")
provides=("${MINGW_PACKAGE_PREFIX}-libsharpyuv")
source=(${_realname}-${pkgver}.tar.gz::https://github.com/webmproject/libwebp/archive/v${pkgver}.tar.gz
0001-mingw-cmake-output.patch)
sha256sums=('12af50c45530f0a292d39a88d952637e43fb2d4ab1883c44ae729840f7273381'
'30ed42b782af427f57049abada30ce6d4d62318ee13014585cb352b570c68e3d')
validpgpkeys=('6B0E6B70976DE303EDF2F601F9C3D6BDB8232B5D')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -Np1 -i "${srcdir}"/0001-mingw-cmake-output.patch
}
build() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
cd "${srcdir}/${_realname}-${pkgver}"
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-DWEBP_ENABLE_SWAP_16BIT_CSP=ON \
-DWEBP_BUILD_ANIM_UTILS=OFF \
-DWEBP_BUILD_CWEBP=OFF \
-DWEBP_BUILD_DWEBP=OFF \
-DWEBP_BUILD_GIF2WEBP=OFF \
-DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF \
-DWEBP_BUILD_WEBPINFO=OFF \
-DWEBP_BUILD_WEBPMUX=OFF \
-DWEBP_BUILD_EXTRAS=OFF \
../${_realname}-${pkgver}
"${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe --build .
}
package() {
cd "${srcdir}/build-${MSYSTEM}-static"
DESTDIR="${pkgdir}" "${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe --install .
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}
@@ -0,0 +1,35 @@
diff -bur opus-1.5.1-orig/celt/arm/armcpu.c opus-1.5.1/celt/arm/armcpu.c
--- opus-1.5.1-orig/celt/arm/armcpu.c 2024-03-09 21:13:23.646469400 -0700
+++ opus-1.5.1/celt/arm/armcpu.c 2024-03-09 22:51:55.794039700 -0700
@@ -191,6 +191,31 @@
return flags;
}
+#elif !defined(_MSC_VER) && defined(_WIN32)
+# define WIN32_LEAN_AND_MEAN
+# define WIN32_EXTRA_LEAN
+# include <windows.h>
+
+static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){
+ opus_uint32 flags;
+ flags=0;
+
+# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_MEDIA) \
+ || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
+
+ flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG;
+
+# if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
+
+ if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
+ {
+ flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
+ }
+# endif
+# endif
+ return flags;
+}
+
#else
/* The feature registers which can tell us what the processor supports are
* accessible in priveleged modes only, so we can't have a general user-space
+85
View File
@@ -0,0 +1,85 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=opus
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=1.5.2
pkgrel=1
pkgdesc="Codec designed for interactive speech and audio transmission over the Internet (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://www.opus-codec.org/"
msys2_repository_url="https://github.com/xiph/opus"
msys2_references=(
"cpe: cpe:2.3:a:opus-codec:opus"
)
license=('spdx:BSD-3-Clause')
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-doxygen"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
)
source=("https://downloads.xiph.org/releases/opus/opus-${pkgver}.tar.gz"
001-aarch64-features.patch)
sha256sums=('65c1d2f78b9f2fb20082c38cbe47c951ad5839345876e46941612ee87f9a7ce1'
'5fb0f28264492d6512acb6eec7b5e147c922751f6df30d1317114048eca01516')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
apply_patch_with_msg \
001-aarch64-features.patch
}
build() {
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
# -Dasm is for ARM fixed point, not neon or x86 avx/sse
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/meson.exe setup \
--prefix="${MINGW_PREFIX}" \
--wrap-mode=nodownload \
--auto-features=enabled \
--buildtype=plain \
--default-library=static \
-Dasm=disabled \
-Dcustom-modes=true \
../${_realname}-${pkgver}
${MINGW_TOOLCHAIN_PREFIX}/bin/meson.exe compile
}
check() {
cd "${srcdir}/build-${MSYSTEM}"
${MINGW_TOOLCHAIN_PREFIX}/bin/meson.exe test
}
package_opus() {
${MINGW_TOOLCHAIN_PREFIX}/bin/meson.exe install -C "${srcdir}/build-${MSYSTEM}" --destdir "${pkgdir}"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/opus.m4" "${pkgdir}${MINGW_PREFIX}/share/aclocal/opus.m4"
install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
@@ -0,0 +1,45 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libvorbis
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.3.7
pkgrel=2
pkgdesc="Vorbis codec library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://xiph.org/"
msys2_references=(
"cpe: cpe:/a:xiph.org:libvorbis"
)
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-libogg"
"${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools")
options=('strip' 'staticlibs')
source=(https://downloads.xiph.org/releases/vorbis/${_realname}-${pkgver}.tar.gz)
sha256sums=('0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
build() {
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-shared \
--enable-static
make
}
package() {
cd ${srcdir}/build-${MINGW_CHOST}
make DESTDIR="${pkgdir}" install
}
@@ -0,0 +1,11 @@
--- dav1d-1.3.0/src/meson.build.orig 2023-10-03 17:36:52.000000000 +0200
+++ dav1d-1.3.0/src/meson.build 2023-10-06 08:30:26.038159600 +0200
@@ -304,7 +304,7 @@
endforeach
# The final dav1d library
-if host_machine.system() == 'windows'
+if host_machine.system() == 'windows' and cc.get_id() == 'msvc'
dav1d_soversion = ''
else
dav1d_soversion = dav1d_api_version_major
@@ -0,0 +1,70 @@
# Maintainer: Christopher Degawa <ccom@randomderp.com>
_realname=dav1d
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=1.4.3
pkgrel=1
pkgdesc="AV1 cross-platform decoder focused on speed and correctness (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://code.videolan.org/videolan/dav1d'
msys2_references=(
"cpe: cpe:/a:videolan:dav1d"
)
license=('spdx:BSD-2-Clause')
makedepends=("${MINGW_PACKAGE_PREFIX}-pkgconf"
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "${MINGW_PACKAGE_PREFIX}-nasm" )
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-xxhash")
source=("https://downloads.videolan.org/pub/videolan/dav1d/${pkgver}/dav1d-${pkgver}.tar.xz"{,.asc}
"0001-dll-version.patch")
sha256sums=('42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19'
'SKIP'
'7fc584e69c156d7d9805b38912f07f417ccd1cce5fe4ee457761e8bea9128d04')
validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${_realname}-${pkgver}"
patch -Np1 -i "${srcdir}/0001-dll-version.patch"
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/meson setup \
--prefix=${MINGW_PREFIX} \
--default-library static \
--buildtype plain \
-Denable_tests=false \
-Denable_asm=true \
../${_realname}-${pkgver}
${MINGW_TOOLCHAIN_PREFIX}/bin/meson compile
}
check() {
cd "${srcdir}/build-${MSYSTEM}"
${MINGW_PREFIX}/bin/meson test
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR="${pkgdir}" ${MINGW_TOOLCHAIN_PREFIX}/bin/meson install
# License
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/doc/PATENTS" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/PATENTS"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/README.md" "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/README.md"
}
@@ -0,0 +1,53 @@
# Contributor: Alexander Georgievskiy <galeksandrp@gmail.com>
# Contributor: Andrew Sun <adsun701@gmail.com>
_realname=fdk-aac-stripped
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=git
pkgrel=1
pkgdesc="Fraunhofer FDK AAC stripped from parts with patent concerns (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
msys2_references=(
'archlinux: libfdk-aac'
)
license=('custom')
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc")
_commit="529b87452cd33d45e1d0a5066d20b64f10b38845"
source=("${_realname}"::"git+https://gitlab.freedesktop.org/wtaymans/${_realname}.git#commit=${_commit}")
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd ${srcdir}/${_realname}
./autogen.sh
}
build() {
cd "${srcdir}"/${_realname}
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
../${_realname}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--enable-static \
--disable-shared \
--disable-example
make
}
package() {
cd ${srcdir}/build-${CARCH}
make DESTDIR=${pkgdir} install
# Install license
install -dm 755 "${pkgdir}${MINGW_PREFIX}"/share/licenses/libfdk-aac
install -m 644 "${srcdir}"/${_realname}/NOTICE "${pkgdir}${MINGW_PREFIX}"/share/licenses/libfdk-aac/
}
@@ -0,0 +1,63 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libass
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.17.3
pkgrel=1
pkgdesc="A portable library for SSA/ASS subtitles rendering (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/libass/libass'
msys2_references=(
"cpe: cpe:/a:libass_project:libass"
)
license=('spdx:ISC')
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc"
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "${MINGW_PACKAGE_PREFIX}-nasm" ))
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-fribidi"
"${MINGW_PACKAGE_PREFIX}-jellyfin-fontconfig"
"${MINGW_PACKAGE_PREFIX}-jellyfin-freetype"
"${MINGW_PACKAGE_PREFIX}-jellyfin-harfbuzz")
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz)
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
# autoreconf to get updated libtool for clang
autoreconf -fiv
}
build() {
[[ -d "${srcdir}/build-${MSYSTEM}-static" ]] && rm -rf "${srcdir}/build-${MSYSTEM}-static"
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
CPPFLAGS+=" -DFRIBIDI_LIB_STATIC" \
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-shared \
--enable-static \
--disable-directwrite \
--disable-libunibreak \
--with-pic \
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "--enable-asm")
make
}
package() {
cd "${srcdir}/build-${MSYSTEM}-static"
make DESTDIR="${pkgdir}" install
}
@@ -0,0 +1,61 @@
# Maintainer: Leandro Nini <drfiemost@email.it>
_realname=libopenmpt
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=0.7.8
pkgrel=1
pkgdesc="A cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://lib.openmpt.org/libopenmpt/'
msys2_repository_url='https://github.com/OpenMPT/openmpt'
msys2_references=(
"cpe: cpe:/a:openmpt:libopenmpt"
)
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-zlib"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libogg"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libvorbis")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools")
source=("https://lib.openmpt.org/files/${_realname}/src/${_realname}-${pkgver}+release.autotools.tar.gz")
sha256sums=('87778c8046a226c6cbfb114f4c8e3e27c121b7b3dccce5cb7de45899250274cc')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}/${_realname}-${pkgver}+release.autotools"
# autoreconf to get updated libtool files with clang support
autoreconf -fiv
}
build() {
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
CPPFLAGS+=" -DMPT_CHECK_CXX_IGNORE_WARNING_O2" \
../${_realname}-${pkgver}+release.autotools/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-static \
--disable-{shared,examples,tests,openmpt123} \
--without-{mpg123,portaudio,portaudiocpp,sndfile,flac}
make
}
check() {
cd "${srcdir}/build-${MSYSTEM}"
make check || true
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/${_realname}-${pkgver}+release.autotools/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
@@ -0,0 +1,24 @@
--- libtheora-1.1.1/examples/encoder_example.c.orig 2015-01-19 20:00:34.333600000 +0300
+++ libtheora-1.1.1/examples/encoder_example.c 2015-01-19 20:02:00.570400000 +0300
@@ -47,11 +47,12 @@
#include "vorbis/codec.h"
#include "vorbis/vorbisenc.h"
-#ifdef _WIN32
+#if defined(_WIN32)
/*supply missing headers and functions to Win32. going to hell, I know*/
#include <fcntl.h>
#include <io.h>
+#if !defined(__MINGW64_VERSION_MAJOR)
static double rint(double x)
{
if (x < 0.0)
@@ -60,6 +61,7 @@
return (double)(int)(x + 0.5);
}
#endif
+#endif
const char *optstring = "b:e:o:a:A:v:V:s:S:f:F:ck:d:z:\1\2\3\4";
struct option options [] = {
@@ -0,0 +1,61 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=libtheora
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.1.1
pkgrel=7
pkgdesc="An open video codec developed by the Xiph.org (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://xiph.org/"
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-libpng"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libogg"
"${MINGW_PACKAGE_PREFIX}-jellyfin-libvorbis")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-doxygen"
"${MINGW_PACKAGE_PREFIX}-SDL"
"${MINGW_PACKAGE_PREFIX}-autotools")
source=("https://downloads.xiph.org/releases/theora/${_realname}-${pkgver}.tar.bz2"
libtheora-1.1.1-libpng16.patch
001-example.patch)
sha256sums=('b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc'
'e4c9a8dc798c596ed32a2a720020ae27a0e72f5add1a47cb8fadebe0e7180d7e'
'5627d26c3316fef71bca037e1834bcba063dbf949ea9293820f0e68b13641105')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
sed -i "s,EXPORTS,," "win32/xmingw32/libtheoradec-all.def"
sed -i "s,EXPORTS,," "win32/xmingw32/libtheoraenc-all.def"
patch -p0 -i ${srcdir}/libtheora-1.1.1-libpng16.patch
patch -p1 -i ${srcdir}/001-example.patch
autoreconf -fiv -I m4
}
build() {
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p ${srcdir}/build-$MINGW_CHOST
cd "${srcdir}/build-$MINGW_CHOST"
../${_realname}-${pkgver}/configure \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--prefix=${MINGW_PREFIX} \
--disable-{shared,examples,extra-programs,oggtest,vorbistest,spec,doc} \
--enable-static
# parallel is broken (libtheoraenc is missing sometimes)
make -j1
}
package() {
cd "${srcdir}/build-$MINGW_CHOST"
make install DESTDIR="${pkgdir}"
}
@@ -0,0 +1,38 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=opencl-headers
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}
pkgver=2023.04.17
pkgrel=1
epoch=2
pkgdesc='OpenCL (Open Computing Language) header files (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://registry.khronos.org/OpenCL/'
license=('spdx:Apache-2.0')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=(https://github.com/KhronosGroup/OpenCL-Headers/archive/v${pkgver}/OpenCL-Headers-${pkgver}.tar.gz)
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
package() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
cd "${srcdir}"/OpenCL-Headers-${pkgver}
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-G'Ninja' \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBUILD_TESTING=OFF \
../${_realname}-${pkgver}
DESTDIR=${pkgdir} cmake --install .
install -D -m644 "${srcdir}"/OpenCL-Headers-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
@@ -0,0 +1,58 @@
# Maintainer: Miloš Komarčević <miloskomarcevic@aim.com>
_realname=SVT-AV1
pkgbase=mingw-w64-jellyfin-svt-av1
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-svt-av1")
pkgver=2.1.2
pkgrel=1
pkgdesc="Scalable Video Technology AV1 encoder and decoder (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://gitlab.com/AOMediaCodec/SVT-AV1'
license=('spdx:BSD-3-Clause-Clear')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-nasm"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("${url}/-/archive/v${pkgver}/${_realname}-v${pkgver}.tar.gz")
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "${srcdir}"/${_realname}-v${pkgver}
}
build() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
[[ -d "${srcdir}"/build-${MSYSTEM}-static ]] && rm -rf "${srcdir}"/build-${MSYSTEM}-static
mkdir -p "${srcdir}"/build-${MSYSTEM}-static && cd "${srcdir}"/build-${MSYSTEM}-static
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-DREPRODUCIBLE_BUILDS=ON \
../${_realname}-v${pkgver}
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake --build .
}
package() {
cd "${srcdir}"/build-${MSYSTEM}-static
DESTDIR="${pkgdir}" ${MINGW_TOOLCHAIN_PREFIX}/bin/cmake --install .
install -Dm644 ${srcdir}/${_realname}-v${pkgver}/LICENSE.md ${pkgdir}${MINGW_PREFIX}/share/licenses/svt-av1/LICENSE
install -Dm644 ${srcdir}/${_realname}-v${pkgver}/PATENTS.md ${pkgdir}${MINGW_PREFIX}/share/licenses/svt-av1/PATENTS.md
}
@@ -0,0 +1,14 @@
--- x264/configure.orig 2020-01-16 21:08:21.000000000 +0100
+++ x264/configure 2020-01-16 21:09:16.000000000 +0100
@@ -1571,9 +1571,9 @@ includedir=$includedir
Name: x264
Description: H.264 (MPEG4 AVC) encoder library
Version: $(grep POINTVER < x264_config.h | sed -e 's/.* "//; s/".*//; s/ .*//')
-Libs: -L$libdir -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
+Libs: -L\${libdir} -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
Libs.private: $([ "$shared" = "yes" ] && echo $libpthread $libm $libdl)
-Cflags: -I$includedir $([ "$shared" = "yes" ] && echo "-DX264_API_IMPORTS")
+Cflags: -I\${includedir} $([ "$shared" = "yes" ] && echo "-DX264_API_IMPORTS")
EOF
filters="crop select_every"
@@ -0,0 +1,13 @@
--- x264/Makefile.orig 2013-12-21 21:45:07.000000000 +0000
+++ x264/Makefile 2013-12-22 21:25:49.711777600 +0000
@@ -392,8 +392,9 @@
install-lib-dev:
$(INSTALL) -d $(DESTDIR)$(includedir)
- $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL) -d $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/avisynth $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 $(SRCPATH)/x264.h x264_config.h $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 $(SRCPATH)/extras/avisynth_c.h $(DESTDIR)$(includedir)/avisynth
$(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
install-lib-static: lib-static install-lib-dev
@@ -0,0 +1,10 @@
--- a/configure
+++ b/configure
@@ -1611,6 +1611,7 @@ Version: $(grep POINTVER < x264_config.h | sed -e 's/.* "//; s/".*//; s/ .*//')
Libs: -L\${libdir} -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
Libs.private: $([ "$shared" = "yes" ] && echo $libpthread $libm $libdl)
Cflags: -I\${includedir} $([ "$shared" = "yes" ] && echo "-DX264_API_IMPORTS")
+Cflags.private: -UX264_API_IMPORTS
EOF
filters="crop select_every"
@@ -0,0 +1,19 @@
diff --git a/configure b/configure
index c1fb599f..7e77c7dd 100755
--- a/configure
+++ b/configure
@@ -934,13 +934,7 @@ fi
if cc_check '' '' '' '__attribute__((force_align_arg_pointer))' ; then
if [ $compiler = GNU -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
- if cc_check '' -mpreferred-stack-boundary=6 ; then
- CFLAGS="$CFLAGS -mpreferred-stack-boundary=6"
- stack_alignment=64
- elif cc_check '' -mstack-alignment=64 ; then
- CFLAGS="$CFLAGS -mstack-alignment=64"
- stack_alignment=64
- elif [ $stack_alignment -lt 16 ] ; then
+ if [ $stack_alignment -lt 16 ] ; then
if cc_check '' -mpreferred-stack-boundary=4 ; then
CFLAGS="$CFLAGS -mpreferred-stack-boundary=4"
stack_alignment=16
+84
View File
@@ -0,0 +1,84 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=x264
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-libx264")
pkgver=0.164.r3191.4613ac3
pkgrel=1
pkgdesc="Library for encoding H264/AVC video streams (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://www.videolan.org/developers/x264.html"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
$( [[ "${CARCH}" != "i686" \
&& "${CARCH}" != "x86_64" ]] \
|| echo "${MINGW_PACKAGE_PREFIX}-nasm" )
"git")
options=('strip' 'staticlibs')
_commit="4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1"
source=("${_realname}"::"git+https://code.videolan.org/videolan/${_realname}.git#commit=${_commit}"
0001-beautify-pc.all.patch
0002-install-avisynth_c.h.mingw.patch
0003-pkgconfig-add-Cflags-private.patch
0004-dont-align-64byte-stack.patch)
sha256sums=('SKIP'
'8e92f4d6c1924664e7c9f5b797070a35f8eabbfce431f996167fe426fc833dda'
'611d427742347e0dfbcea8d45c8c9b0fd15e29ab0b22207000f8bf5f3ba1a3a9'
'0cbf016c01291f1b8b97ffabdf7e52a8a8593ddf8d88c782245b60462a18bd60'
'SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
pkgver() {
cd ${srcdir}/${_realname}
./version.sh | grep X264_POINTVER | sed -r 's/^#define X264_POINTVER "([0-9]+\.[0-9]+)\.([0-9]+)M? (.*)"$/\1.r\2.\3/'
}
prepare() {
cd ${_realname}
patch -p1 -i ${srcdir}/0001-beautify-pc.all.patch
patch -p1 -i ${srcdir}/0002-install-avisynth_c.h.mingw.patch
patch -p1 -i ${srcdir}/0003-pkgconfig-add-Cflags-private.patch
# 64byte stack alignment conflicts with ffmpeg's 16byte alignment,
# which errors in clang with LTO, see https://github.com/llvm/llvm-project/issues/60310
patch -p1 -i ${srcdir}/0004-dont-align-64byte-stack.patch
}
build() {
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
../${_realname}/configure \
--prefix=${MINGW_PREFIX} \
--host=${MINGW_CHOST} \
--enable-static \
--enable-strip \
--disable-cli \
--disable-lavf \
--disable-swscale
make
make DESTDIR="${srcdir}/dest/libx264" install
}
package_libx264() {
depends=()
cp -r "${srcdir}/dest/libx264/"* "${pkgdir}"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;
+119
View File
@@ -0,0 +1,119 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Yuta Nakai <nak5124@live.jp>
_realname=x265
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=git
pkgrel=1
pkgdesc='Open Source H265/HEVC video encoder (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('GPL')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc"
$([[ "${CARCH}" != "x86_64" ]] || echo "${MINGW_PACKAGE_PREFIX}-nasm")
)
options=('strip')
url='https://bitbucket.org/multicoreware/x265_git'
msys2_references=(
"cpe: cpe:/a:multicorewareinc:x265"
"cpe: cpe:/a:multicorewareinc:x265_high_efficiency_video_coding"
)
_commit="ad1a30a8a69d5bbc0096da7aafc9da21c599cb01"
source=("${_realname}"::"git+https://bitbucket.org/multicoreware/x265_git.git#commit=${_commit}")
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
mv "${srcdir}"/"x265"* "${srcdir}"/x265_${pkgver}
cd "${srcdir}"/x265_${pkgver}
for d in 8 10 12; do
if [[ -d ${srcdir}/build-${CARCH}-${d} ]]; then
rm -rf ${srcdir}/build-${CARCH}-${d}
fi
mkdir -p ${srcdir}/build-${CARCH}-${d}
done
}
build() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
if [ "${CARCH}" = 'x86_64' ]; then
_ENABLE_ASM=ON
else
_ENABLE_ASM=OFF
fi
# 12-bit
cd "${srcdir}/build-${CARCH}-12"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DHIGH_BIT_DEPTH=ON \
-DMAIN12=ON \
-DEXPORT_C_API=OFF \
-DENABLE_CLI=OFF \
-DENABLE_SHARED=OFF \
-DENABLE_ASSEMBLY=${_ENABLE_ASM} \
../x265_${pkgver}/source
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --build .
# 10-bit
cd "${srcdir}/build-${CARCH}-10"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DHIGH_BIT_DEPTH=ON \
-DEXPORT_C_API=OFF \
-DENABLE_CLI=OFF \
-DENABLE_SHARED=OFF \
-DENABLE_ASSEMBLY=${_ENABLE_ASM} \
../x265_${pkgver}/source
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --build .
# 8-bit
cd "${srcdir}/build-${CARCH}-8"
ln -s ../build-${CARCH}-10/libx265.a libx265_main10.a
ln -s ../build-${CARCH}-12/libx265.a libx265_main12.a
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DENABLE_SHARED=OFF \
-DCMAKE_DLL_NAME_WITH_SOVERSION=ON \
-DENABLE_ASSEMBLY=${_ENABLE_ASM} \
-DENABLE_HDR10_PLUS=ON \
-DEXTRA_LIB='x265_main10.a;x265_main12.a' \
-DEXTRA_LINK_FLAGS='-L .' \
-DLINKED_10BIT=ON \
-DLINKED_12BIT=ON \
../x265_${pkgver}/source
${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --build .
# merge
mv libx265.a libx265_main.a
ar -M <<EOF
CREATE libx265.a
ADDLIB libx265_main.a
ADDLIB libx265_main10.a
ADDLIB libx265_main12.a
SAVE
END
EOF
}
package() {
cd "${srcdir}/build-${CARCH}-8"
DESTDIR="${pkgdir}" ${MINGW_TOOLCHAIN_PREFIX}/bin/cmake.exe --install .
}
@@ -0,0 +1,18 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,7 @@
libzimg_la_SOURCES = dummy.cpp
libzimg_la_LIBADD = libzimg_internal.la
-libzimg_la_LDFLAGS = -no-undefined -version-info 2
+libzimg_la_LDFLAGS = -no-undefined -version-info 2 -export-symbols $(srcdir)/_msvc/zimg.def
libzimg_internal_la_SOURCES = \
src/zimg/api/zimg.cpp \
--- a/_msvc/zimg.def
+++ b/_msvc/zimg.def
@@ -1,4 +1,3 @@
-LIBRARY z
EXPORTS
zimg_get_version_info
zimg_get_api_version
+53
View File
@@ -0,0 +1,53 @@
# Maintainer: Andrew Sun <adsun701@gmail.com>
_realname=zimg
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=3.0.5
pkgrel=2
pkgdesc="Scaling, colorspace conversion, and dithering library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://github.com/sekrit-twc/zimg"
license=('spdx:WTFPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"bsdtar")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-winpthreads-git")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/sekrit-twc/${_realname}/archive/release-${pkgver}.tar.gz"
0001-zimg-export-def-symbols.patch)
noextract=("${_realname}-${pkgver}.tar.gz")
sha256sums=('a9a0226bf85e0d83c41a8ebe4e3e690e1348682f6a2a7838f1b8cbff1b799bcf'
'6e52d715d19080434392f04b33005fee428368e12176da20555f4059209c8134')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare(){
bsdtar -xzf "${srcdir}/${_realname}-${pkgver}.tar.gz" || bsdtar -xzf "${srcdir}/${_realname}-${pkgver}.tar.gz"
cd "${srcdir}/${_realname}-release-${pkgver}"
patch -p1 -i "${srcdir}/0001-zimg-export-def-symbols.patch"
./autogen.sh
}
build() {
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
../${_realname}-release-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--enable-static \
--disable-shared
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR=${pkgdir} install
}
@@ -0,0 +1,29 @@
# Maintainer: ImperatorS79 <fevrier.simon@gmail.com>
_realname=amf-headers
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=1.4.34
pkgrel=1
pkgdesc='Header files for AMD Advanced Media Framework'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://github.com/GPUOpen-LibrariesAndSDKs/AMF/'
license=('spdx:MIT')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/v${pkgver}.tar.gz")
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
prepare() {
cd "AMF-${pkgver}"
}
package() {
mkdir -p "${pkgdir}${MINGW_PREFIX}"/include/AMF/
cp -r "${srcdir}/AMF-${pkgver}"/amf/public/include/core/ "${pkgdir}${MINGW_PREFIX}"/include/AMF/
cp -r "${srcdir}/AMF-${pkgver}"/amf/public/include/components/ "${pkgdir}${MINGW_PREFIX}"/include/AMF/
install -D -m644 "${srcdir}/AMF-${pkgver}"/LICENSE.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE
}
@@ -0,0 +1,41 @@
# Maintainer: ImperatorS79 <fevrier.simon@gmail.com>
_realname=ffnvcodec-headers
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}"
pkgver=12.0.16.1
pkgrel=1
pkgdesc='FFmpeg version of headers required to interface with Nvidias codec APIs (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url=https://github.com/FFmpeg/nv-codec-headers.git
license=('spdx:MIT')
makedepends=("git")
_tag=451da99614412a7f9526ef301a5ee0c7a6f9ad76
source=(git+https://github.com/FFmpeg/nv-codec-headers.git#tag=${_tag})
sha256sums=('SKIP')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
pkgver() {
cd nv-codec-headers
git describe --tags | sed 's/^n//'
}
build() {
make PREFIX=${MINGW_PREFIX} -C nv-codec-headers
sed -n '4,25p' nv-codec-headers/include/ffnvcodec/nvEncodeAPI.h > LICENSE # Extract license
sed -i '1,22s/^.\{,3\}//' LICENSE # Delete C comments
}
package() {
make PREFIX=${MINGW_PREFIX} DESTDIR="${pkgdir}" -C nv-codec-headers install
install -Dm 644 LICENSE -t "${pkgdir}${MINGW_PREFIX}"/share/licenses/ffnvcodec-headers/
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
for pcfile in "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/*.pc; do
sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i "${pcfile}"
done
}
@@ -0,0 +1,13 @@
--- a/libvpl/pkgconfig/vpl.pc.in
+++ b/libvpl/pkgconfig/vpl.pc.in
@@ -1,6 +1,7 @@
-prefix=@pc_rel_prefix@
-libdir=@pc_rel_libdir@
-includedir=@pc_rel_incdir@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
# oneAPI Video Processing Library (oneVPL)
Name: oneVPL
@@ -0,0 +1,13 @@
--- libvpl-2.10.1/env/CMakeLists.txt.orig 2024-01-23 08:40:12.541802700 +0100
+++ libvpl-2.10.1/env/CMakeLists.txt 2024-01-23 08:42:01.336124000 +0100
@@ -34,7 +34,9 @@
PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${ENV_SCRIPT_NAME}"
DESTINATION "${VPL_INSTALL_ENVDIR}"
COMPONENT ${VPL_COMPONENT_DEV})
-else()
+endif()
+
+if(NOT WIN32 OR MINGW)
file(TO_CMAKE_PATH "${env_rel_prefix}" env_rel_prefix)
file(TO_CMAKE_PATH "${CMAKE_INSTALL_INCLUDEDIR}" _install_includedir)
file(TO_CMAKE_PATH "${CMAKE_INSTALL_LIBDIR}" _install_libdir)
@@ -0,0 +1,11 @@
--- a/cmake/InstallDirs.cmake
+++ b/cmake/InstallDirs.cmake
@@ -8,7 +8,7 @@
# Set installation directories
#
-if(WIN32
+if(MSVC
AND NOT CMAKE_CROSSCOMPILING
AND CMAKE_SIZEOF_VOID_P EQUAL 4)
if(NOT CMAKE_INSTALL_BINDIR)
@@ -0,0 +1,84 @@
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
_realname=libvpl
pkgbase=mingw-w64-jellyfin-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}")
pkgver=2.11.0
pkgrel=1
pkgdesc="Intel Video Processing Library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://intel.github.io/libvpl'
msys2_repository_url="https://github.com/intel/libvpl"
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
provides=("${MINGW_PACKAGE_PREFIX}-jellyfin-onevpl")
conflicts=("${MINGW_PACKAGE_PREFIX}-jellyfin-onevpl")
replaces=("${MINGW_PACKAGE_PREFIX}-jellyfin-onevpl")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/intel/libvpl/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
0001-fix-pkgconfig-file.patch
0002-cmake-install-vars-sh.patch
0003-cmake-fix-32bit-install.patch)
sha256sums=('SKIP'
'f23ca1ccbaa9c8e3fd4fd7320996e5be2753cfcdc6e2a25f6def08222a5691cd'
'b9b1cdcb531ee0b6b1d7eef8bbfb1df8ca1ffe72d76961050dd912203edecc67'
'21b2cc2f466f636940c8ef81f50dff177aff96d60dc4bc57f58c5c9f016502fe')
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
export MINGW_PREFIX="${MINGW_PREFIX}/ffbuild"
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}"/libvpl-${pkgver}
apply_patch_with_msg \
0001-fix-pkgconfig-file.patch \
0002-cmake-install-vars-sh.patch \
0003-cmake-fix-32bit-install.patch
}
build() {
export CMAKE_PREFIX_PATH="${MINGW_PREFIX}"
export PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_{DISPATCHER,DEV}=ON \
-DBUILD_{PREVIEW,TESTS}=OFF \
-DBUILD_TOOLS{,_ONEVPL_EXPERIMENTAL}=OFF \
-DINSTALL_EXAMPLE_CODE=OFF \
../libvpl-${pkgver}
"${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe --build .
}
package() {
cd "${srcdir}/build-${MSYSTEM}-static"
DESTDIR="${pkgdir}" "${MINGW_TOOLCHAIN_PREFIX}"/bin/cmake.exe --install .
rm -r "${pkgdir}${MINGW_PREFIX}/share/vpl/examples"
install -Dm644 "${srcdir}/libvpl-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

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