Skip to content

Instantly share code, notes, and snippets.

@ABelliqueux
Created August 23, 2022 14:18
Show Gist options
  • Save ABelliqueux/11dbefdb0c386c5de88f78ef196cf5c6 to your computer and use it in GitHub Desktop.
Save ABelliqueux/11dbefdb0c386c5de88f78ef196cf5c6 to your computer and use it in GitHub Desktop.
!Experimental! PKGBUILD for tahoma2d with new binaries names
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Campbell Barton <ideasman42@gmail.com>
export GIT_LFS_SKIP_SMUDGE=1
pkgname=tahoma2d
pkgver=1.3
pkgrel=1
pkgdesc="Software for producing a 2D animation"
arch=(x86_64)
url="https://tahoma2d.org/"
license=(BSD)
depends=(cblas ffmpeg freeglut glew hicolor-icon-theme libmypaint qt5-multimedia qt5-script qt5-svg qt5-serialport superlu opencv)
makedepends=(git boost cmake qt5-tools)
provides=(tahoma2d)
conflicts=(tahoma2d)
source=("git+https://github.com/tahoma2d/tahoma2d.git#tag=v${pkgver}")
sha256sums=('SKIP')
prepare() {
[[ -d build ]] || mkdir build
cd "${pkgname%-git}"
# Specify path for ffmpeg
#sed -i 's|"ffmpegPath", QMetaType::QString, ""|"ffmpegPath", QMetaType::QString, "/usr/bin"|' toonz/sources/toonzlib/preferences.cpp
}
build() {
pushd "${pkgname%-git}/thirdparty/tiff-4.0.3"
./configure --with-pic --disable-jbig
make
popd
# substitute binaries names
sed -i 's/(tcleanup/(tdcleanup/g' "${pkgname%-git}"/toonz/sources/tcleanupper/CMakeLists.txt
sed -i 's/(tcomposer/(tdcomposer/g' "${pkgname%-git}"/toonz/sources/tcomposer/CMakeLists.txt
sed -i 's/(tconverter/(tdconverter/g' "${pkgname%-git}"/toonz/sources/tconverter/CMakeLists.txt
sed -i 's/(tfarmcontroller/(tdfarmcontroller/g' "${pkgname%-git}"/toonz/sources/toonzfarm/tfarmcontroller/CMakeLists.txt
sed -i 's/(tfarmserver/(tdfarmserver/g' "${pkgname%-git}"/toonz/sources/toonzfarm/tfarmserver/CMakeLists.txt
sed -i 's/(lzocompress/(tdlzocompress/g' "${pkgname%-git}"/thirdparty/lzo/driver/CMakeLists.txt
sed -i 's/(lzodecompress/(tdlzodecompress/g' "${pkgname%-git}"/thirdparty/lzo/driver/CMakeLists.txt
sed -i 's/TARGET_FILE:tcleanup/TARGET_FILE:tdcleanup/g; s/TARGET_FILE:tcomposer/TARGET_FILE:tdcomposer/g; s/TARGET_FILE:tconverter/TARGET_FILE:tdconverter/g; s/TARGET_FILE:tfarmcontroller/TARGET_FILE:tdfarmcontroller/g; s/TARGET_FILE:tfarmserver/TARGET_FILE:tdfarmserver/g; s/TARGET_FILE:lzocompress/TARGET_FILE:tdlzocompress/g; s/TARGET_FILE:lzodecompress/TARGET_FILE:tdlzodecompress/g' "${pkgname%-git}"/toonz/sources/toonz/CMakeLists.txt
cd build
cmake -G "Unix Makefiles" ../"${pkgname%-git}"/toonz/sources \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=YES
make
}
package() {
cd build
make DESTDIR="${pkgdir}" install
install -Dm644 ../"${pkgname%-git}"/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
@ABelliqueux
Copy link
Author

See here for details : tahoma2d/tahoma2d#1032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment