blob: 3f1d61e270c82b25abe99342b209829902053a6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=imagine
pkgname=vapoursynth-plugin-${_plug}-git
pkgver=r42.049d5d8
pkgrel=2
pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT version)"
arch=('x86_64')
url='https://forum.doom9.org/showthread.php?t=173633'
license=('GPL')
depends=('vapoursynth'
'libpng'
'libtiff'
'openjpeg2'
'libavcodec.so'
'libavformat.so'
'libavutil.so'
'libswscale.so'
)
makedepends=('git'
'ffmpeg'
)
provides=("vapoursynth-plugin-${_plug}")
conflicts=("vapoursynth-plugin-${_plug}")
source=("${_plug}::git+https://github.com/sekrit-twc/imagine.git"
'git+https://github.com/sekrit-twc/libp2p.git'
'git+https://github.com/sekrit-twc/vsxx.git'
)
sha256sums=('SKIP'
'SKIP'
'SKIP'
)
options=('debug')
pkgver() {
cd "${_plug}"
#echo "$(git describe --long --tags | tr - .)"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare(){
cd "${_plug}"
git config submodule.extra/libp2p.url "${srcdir}/libp2p"
git config submodule.extra/vsxx.url "${srcdir}/vsxx"
git submodule update --init extra/libp2p extra/vsxx
rm -fr extra/vsxx/VSHelper.h extra/vsxx/VapourSynth.h
sed -e 's|"VapourSynth.h"|<VapourSynth.h>|g' \
-e 's|"VSHelper.h"|<VSHelper.h>|g' \
-i extra/vsxx/VapourSynth++.hpp
# silence deprecation warnings
sed -e 's|uint8 |uint8_t |g' \
-e 's|uint8>|uint8_t>|g' \
-e 's|uint16 |uint16_t |g' \
-e 's|uint32 |uint32_t |g' \
-i src/imagine/provider/tiff_decoder.cpp
echo "all:
g++ -c -fPIC ${CXXFLAGS} -std=c++11 -Wno-missing-field-initializers ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o extra/libp2p/v210.o extra/libp2p/v210.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 -Wno-missing-field-initializers ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o extra/libp2p/p2p_api.o extra/libp2p/p2p_api.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o extra/vsxx/vsxx_pluginmain.o extra/vsxx/vsxx_pluginmain.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/api/imagine.o src/imagine/api/imagine.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/decoder.o src/imagine/common/decoder.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/file_io.o src/imagine/common/file_io.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/io_context.o src/imagine/common/io_context.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/jumpman.o src/imagine/common/jumpman.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/memory_io.o src/imagine/common/memory_io.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -o src/imagine/common/path.o src/imagine/common/path.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -DP2P_USER_NAMESPACE=im_p2p -o src/imagine/provider/bmp_decoder.o src/imagine/provider/bmp_decoder.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -DP2P_USER_NAMESPACE=im_p2p -o src/imagine/provider/jpeg_decoder.o src/imagine/provider/jpeg_decoder.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -DP2P_USER_NAMESPACE=im_p2p -o src/imagine/provider/png_decoder.o src/imagine/provider/png_decoder.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./extra $(pkg-config --cflags vapoursynth) -DP2P_USER_NAMESPACE=im_p2p -o src/imagine/provider/tiff_decoder.o src/imagine/provider/tiff_decoder.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./src/imagine/api -I./extra $(pkg-config --cflags vapoursynth) -o src/vsimagine/path.o src/vsimagine/path.cpp
g++ -c -fPIC ${CXXFLAGS} -std=c++11 ${CPPFLAGS} -I. -I./src/vsimagine -I./src/imagine -I./src/imagine/api -I./extra $(pkg-config --cflags vapoursynth) -o src/vsimagine/vsimagine.o src/vsimagine/vsimagine.cpp
ar r libimage.a extra/libp2p/v210.o extra/libp2p/p2p_api.o src/imagine/api/imagine.o src/imagine/common/decoder.o src/imagine/common/file_io.o src/imagine/common/io_context.o src/imagine/common/jumpman.o src/imagine/common/memory_io.o src/imagine/common/path.o src/imagine/provider/bmp_decoder.o src/imagine/provider/jpeg_decoder.o src/imagine/provider/png_decoder.o src/imagine/provider/tiff_decoder.o
ranlib libimage.a
g++ -fPIC ${CXXFLAGS} -std=c++11 -shared -L. -limage $(pkg-config --libs libpng libturbojpeg libtiff-4 libopenjp2 libavcodec libavformat libavutil libswscale) -fPIC ${LDFLAGS} -o libvs${_plug}.so extra/vsxx/vsxx_pluginmain.o src/vsimagine/path.o src/vsimagine/vsimagine.o"> Makefile
}
build() {
cd "${_plug}"
make
}
package() {
cd "${_plug}"
install -Dm755 "libvs${_plug}.so" "${pkgdir}/usr/lib/vapoursynth/libvs${_plug}.so"
}
|