From: Good Guy Date: Sat, 7 Jul 2018 18:32:14 +0000 (-0600) Subject: move bld scripts to blds, add yuri GL bsd patch X-Git-Url: https://git.cinelerra-gg.org/?a=commitdiff_plain;h=4a894820c0dad2eef6a281f00988aea48696765b;p=goodguy%2Fhistory.git move bld scripts to blds, add yuri GL bsd patch --- diff --git a/cinelerra-5.1/PKGBUILD b/cinelerra-5.1/PKGBUILD deleted file mode 100644 index 0346070b..00000000 --- a/cinelerra-5.1/PKGBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Maintainer: goodguy -pkgname=cin -pkgver=5.1 -pkgrel=20180630 -pkgdesc="Cinelerra git://git.cinelerra-cv.org/goodguy/cinelerra.git ($pkgrel)" -arch=('x86_64') -url="http://www.cinelerra-cv.org" -license=('GPL') -DEPENDS=( 'alsa-lib' 'atk' 'bzip2' 'cairo' 'expat' 'fftw' 'flac' - 'fontconfig' 'freetype2' 'fribidi' 'gcc-libs' 'gdk-pixbuf2' - 'glib2' 'glibc' 'glu' 'graphite' 'gtk2' 'harfbuzz' 'libavc1394' - 'libdatrie' 'libdv' 'libffi' 'libglvnd' 'libiec61883' 'libjpeg-turbo' - 'libogg' 'libpng' 'libraw1394' 'libsndfile' 'libthai' - 'libtheora' 'libtiff' 'libutil-linux' 'libvdpau' 'libvorbis' - 'libvpx' 'libx11' 'libxau' 'libxcb' 'libxcomposite' 'libxcursor' - 'libxdamage' 'libxdmcp' 'libxext' 'libxfixes' 'libxft' 'libxi' - 'libxinerama' 'libxrandr' 'libxrender' 'libxv' 'numactl' 'opus' - 'pango' 'pcre' 'pixman' 'xz' 'zlib' 'xorg-server' 'libva' - 'xorg-fonts-misc' 'ttf-dejavu' 'inkscape' 'dvdauthor' 'udftools' ) - -makedepends=( 'autoconf' 'automake' 'yasm' 'nasm' 'cmake' - 'libxml2' 'perl-xml-libxml' 'perl-xml-parser' - 'xorg-mkfontdir' 'xorg-mkfontscale' ) - -conflicts=() -source=(https://www.cinelerra-cv.org/five/pkgs/src/cin_$pkgver.$pkgrel-src.tgz) -md5sums=('00000000000000000000000000000000') - -prepare() { - cd "$srcdir/cinelerra-$pkgver" - sed -i 's/\/python2.7/' ./guicast/Makefile -} - -build() { - cd "$srcdir/cinelerra-$pkgver" - ./autogen.sh - export FFMPEG_EXTRA_CFG=" --disable-vdpau" - ./configure --prefix=/usr --with-exec-name=$pkgname -CFG_VARS="\ -CFLAGS+=' -Wno-narrowing -O2 -g -fno-omit-frame-pointer' \ -CXXFLAGS+=' -Wno-narrowing -O2 -g -fno-omit-frame-pointer' \ -WERROR_CFLAGS+=' -fpermissive'" \ - make 2>&1 | tee log -} - -package() { - cd "$srcdir/cinelerra-$pkgver" - make install DESTDIR="$pkgdir" -} diff --git a/cinelerra-5.1/arch.bld b/cinelerra-5.1/arch.bld deleted file mode 100755 index 99535212..00000000 --- a/cinelerra-5.1/arch.bld +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -#pacman -S openexr libdv flac - -( ./autogen.sh - ./configure --with-single-user --disable-static-build --without-lv2 \ - --without-firewire --without-dv --without-dvb --without-video4linux2 \ - --without-libzmpeg --without-commercial --without-thirdparty - make && make install ) 2>&1 | tee log -mv Makefile Makefile.cfg -cp Makefile.devel Makefile diff --git a/cinelerra-5.1/bld_scripts/bld_dynamic.sh b/cinelerra-5.1/bld_scripts/bld_dynamic.sh deleted file mode 100755 index 40fd50ab..00000000 --- a/cinelerra-5.1/bld_scripts/bld_dynamic.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -x - -dir="$1" -shift -path="/home" -bld="git-repo" -proj="cinelerra5" -base="cinelerra-5.1" - -if [ ! -d "$path/$dir/$bld" ]; then - echo "$bld missing in $path/$dir" - exit 1 -fi - -cd "$path/$dir/$bld" -rm -rf "$proj.dyn" -mkdir "$proj.dyn" - -git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "$proj.dyn" -#rsh host tar -C "/mnt0/$proj" -cf - "$base" | tar -C "$proj.dyn" -xf - -if [ $? -ne 0 ]; then - echo "git clone $proj failed" - exit 1 -fi - -cd "$proj.dyn/$base" -{ -./autogen.sh && \ -./configure --with-single-user --disable-static-build && \ -make $@ && \ -make install -} 2>&1 | tee log || true - -echo "finished: scanning log for ***" -grep -ai "\*\*\*.*error" log | head - diff --git a/cinelerra-5.1/bld_scripts/bld_package.sh b/cinelerra-5.1/bld_scripts/bld_package.sh deleted file mode 100755 index c48bf6a9..00000000 --- a/cinelerra-5.1/bld_scripts/bld_package.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -x - -if [ $# -ne 2 ]; then - echo "usage: $0 " - echo " os = centos | ubuntu | suse | debian" - echo " typ = sta | dyn" - exit 1 -fi - -dir="$1" -typ="$2" -path="/home" -bld="git-repo" -proj="cinelerra5" -base="cinelerra-5.1" - -arch01="arch-20160601" -arch="arch-20161201" -cent01="centos-7.0-1406" -centos="centos-7.x-1611" -deb01="debian-8.4.0" -deb03="debian-8.7.1" -debian="debian-8.6.0" -fc23="fedora-23" -fc24="fedora-24" -fedora="fedora-25" -leap01="leap-42.1" -leap="leap-42.2" -mint01="mint-14.04.1" -mint="mint-18.1" -slk32="slk32-14.2" -slk64="slk64-14.2" -suse="opensuse-13.2" -ub14="ub14.04.1" -ub15="ub15.10" -ub16="ub16.04" -ub17="ub17.04" -ub1601="ub16.10" -ubuntu="ubuntu-14.04.1" - -eval os="\${$dir}" -if [ -z "$os" ]; then - echo "unknown os: $dir" -fi - -if [ ! -d "$path/$dir/$bld/$proj.$typ/$base" ]; then - echo "missing $bld/$proj.$typ/$base in $path/$dir" - exit 1 -fi - -sfx=`uname -m`-`date +"%Y%m%d"` -if [ "$typ" = "sta" ]; then - sfx="$sfx-static" -elif [ "$typ" != "dyn" ]; then - echo "err: suffix must be [sta | dyn]" - exit 1 -fi - -cd "$path/$dir/$bld/$proj.$typ/$base" -tar -C bin -cJf "../$base-$os-$sfx.txz" . -rm -f "$path/$dir/$base-$os-$sfx.txz" -mv "../$base-$os-$sfx.txz" "$path/$dir/." - diff --git a/cinelerra-5.1/bld_scripts/bld_prepare.sh b/cinelerra-5.1/bld_scripts/bld_prepare.sh deleted file mode 100755 index fa9c6096..00000000 --- a/cinelerra-5.1/bld_scripts/bld_prepare.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -# need lv2 plugins (eg. lv2-calf-plugin) - -if [ `id -u` -ne 0 ]; then - echo "you must be root" -fi - -if [ $# -ne 1 ]; then - echo "usage: $0 " - echo " = [centos | suse | ubuntu]" -fi - -dir="$1" - - -case "$dir" in -"centos") - yum -y install nasm libavc1394-devel libusb-devel flac-devel \ - libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \ - libtheora-devel libiec61883-devel uuid-devel giflib-devel \ - ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \ - libsndfile-devel libXft-devel libXinerama-devel libXv-devel \ - xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \ - xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \ - libpng-devel bzip2-devel zlib-devel kernel-headers libtiff-devel \ - libavc1394 festival-devel libiec61883-devel flac-devel inkscape \ - libsndfile-devel libtheora-devel linux-firmware ivtv-firmware \ - libvorbis-devel texinfo xz-devel lzma-devel cmake udftools git \ - autoconf automake rpm-build jbigkit-devel libvdpau-devel alsa-lib-devel \ - gtk2-devel - yasm=yasm-1.3.0-3.fc24.x86_64.rpm - release=http://archives.fedoraproject.org/pub/fedora/linux/releases/24 - url=$release/Everything/x86_64/os/Packages/y/$yasm - wget -P /tmp $url - yum -y install /tmp/$yasm - rm -f /tmp/$yasm - ;; -"fedora") - dnf install groups "Development Tools" - dnf -y --best --allowerasing \ - install nasm yasm libavc1394-devel libusb-devel flac-devel \ - libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \ - libtheora-devel libiec61883-devel esound-devel uuid-devel \ - giflib-devel ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \ - libsndfile-devel libXft-devel libXinerama-devel libXv-devel \ - xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \ - xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \ - libpng-devel bzip2-devel zlib-devel kernel-headers libavc1394 \ - festival-devel libdc1394-devel libiec61883-devel esound-devel \ - flac-devel libsndfile-devel libtheora-devel linux-firmware \ - ivtv-firmware libvorbis-devel texinfo xz-devel lzma-devel cmake git \ - ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \ - gettext-devel inkscape udftools autoconf automake numactl-devel \ - jbigkit-devel libvdpau-devel gtk2-devel - ;; -"suse" | "leap") - zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \ - freeglut-devel libXv-devel alsa-devel libbz2-devel ncurses-devel \ - libXinerama-devel freetype-devel libXft-devel giflib-devel ctags \ - bitstream-vera-fonts xorg-x11-fonts-core xorg-x11-fonts dejavu-fonts \ - openexr-devel libavc1394-devel festival-devel libjpeg8-devel libdv-devel \ - libdvdnav-devel libdvdread-devel libiec61883-devel libuuid-devel \ - ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \ - libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \ - yasm autoconf automake rpm-build libjbig-devel libvdpau-devel gtk2-devel - if [ ! -f /usr/lib64/libtermcap.so ]; then - ln -s libtermcap.so.2 /usr/lib64/libtermcap.so - fi - ;; -#debian 32bit: export ac_cv_header_xmmintrin_h=no -"debian") - apt-get -f -y install apt-file sox nasm yasm g++ build-essential zlib1g-dev \ - texinfo libpng12-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \ - libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \ - libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \ - fonts-dejavu libopenexr-dev festival libfftw3-dev gdb \ - libdc1394-22-dev libesd0-dev libflac-dev libjbig-dev libvdpau-dev \ - inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \ - autoconf automake debhelper libgtk2.0-dev - ;; -#"ub16-10") -# apt-get -y install libx264-dev libx265-dev libvpx-dev libmjpegtools-dev -"ubuntu" | "mint" | "ub14" | "ub15" | "ub16" | "ub17" | "ub18" ) - apt-get -y install apt-file sox nasm yasm g++ build-essential libz-dev \ - texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \ - libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \ - libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \ - fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \ - libdc1394-22-dev libiec61883-dev libesd0-dev libflac-dev libjbig-dev \ - libvdpau-dev libsndfile1-dev libtheora-dev cmake udftools libxml2-utils \ - git inkscape autoconf automake debhelper libgtk2.0-dev - ;; - *) - echo "unknown os: $dir" - exit 1; - ;; -esac - -mkdir -p "/home/$dir/git-repo" -chmod a+rwx -R "/home/$dir/git-repo" - diff --git a/cinelerra-5.1/bld_scripts/bld_static.sh b/cinelerra-5.1/bld_scripts/bld_static.sh deleted file mode 100755 index 39e19743..00000000 --- a/cinelerra-5.1/bld_scripts/bld_static.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -x - -dir="$1" -shift -path="/home" -bld="git-repo" -proj="cinelerra5" -base="cinelerra-5.1" - -if [ ! -d "$path/$dir/$bld" ]; then - echo "$bld missing in $path/$dir" - exit 1 -fi - -cd "$path/$dir/$bld" -rm -rf "$proj.sta" -mkdir "$proj.sta" - -git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "$proj.sta" -#rsh host tar -C "/mnt0/$proj" -cf - "$base" | tar -C "$proj.sta" -xf - -if [ $? -ne 0 ]; then - echo "git clone $proj failed" - exit 1 -fi - -cd "$proj.sta/$base" -{ -./autogen.sh && \ -./configure --with-single-user --enable-static-build && \ -make $@ && \ -make install -} 2>&1 | tee log || true - -echo "finished: scanning log for ***" -grep -ai "\*\*\*.*error" log | head - diff --git a/cinelerra-5.1/bld_scripts/debpkg.sh b/cinelerra-5.1/bld_scripts/debpkg.sh deleted file mode 100755 index 4c821b04..00000000 --- a/cinelerra-5.1/bld_scripts/debpkg.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -x - -./debian/rules binary - diff --git a/cinelerra-5.1/bld_scripts/pkgbld.sh b/cinelerra-5.1/bld_scripts/pkgbld.sh deleted file mode 100755 index 5c545f5f..00000000 --- a/cinelerra-5.1/bld_scripts/pkgbld.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -makepkg diff --git a/cinelerra-5.1/bld_scripts/rpmsrc.sh b/cinelerra-5.1/bld_scripts/rpmsrc.sh deleted file mode 100755 index 5a2bd8fa..00000000 --- a/cinelerra-5.1/bld_scripts/rpmsrc.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -x - -rpmbuild --define "_srcrpmdir `cd ..; pwd`" \ - -bs --build-in-place cinelerra.spec - diff --git a/cinelerra-5.1/blds/PKGBUILD b/cinelerra-5.1/blds/PKGBUILD new file mode 100644 index 00000000..0346070b --- /dev/null +++ b/cinelerra-5.1/blds/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: goodguy +pkgname=cin +pkgver=5.1 +pkgrel=20180630 +pkgdesc="Cinelerra git://git.cinelerra-cv.org/goodguy/cinelerra.git ($pkgrel)" +arch=('x86_64') +url="http://www.cinelerra-cv.org" +license=('GPL') +DEPENDS=( 'alsa-lib' 'atk' 'bzip2' 'cairo' 'expat' 'fftw' 'flac' + 'fontconfig' 'freetype2' 'fribidi' 'gcc-libs' 'gdk-pixbuf2' + 'glib2' 'glibc' 'glu' 'graphite' 'gtk2' 'harfbuzz' 'libavc1394' + 'libdatrie' 'libdv' 'libffi' 'libglvnd' 'libiec61883' 'libjpeg-turbo' + 'libogg' 'libpng' 'libraw1394' 'libsndfile' 'libthai' + 'libtheora' 'libtiff' 'libutil-linux' 'libvdpau' 'libvorbis' + 'libvpx' 'libx11' 'libxau' 'libxcb' 'libxcomposite' 'libxcursor' + 'libxdamage' 'libxdmcp' 'libxext' 'libxfixes' 'libxft' 'libxi' + 'libxinerama' 'libxrandr' 'libxrender' 'libxv' 'numactl' 'opus' + 'pango' 'pcre' 'pixman' 'xz' 'zlib' 'xorg-server' 'libva' + 'xorg-fonts-misc' 'ttf-dejavu' 'inkscape' 'dvdauthor' 'udftools' ) + +makedepends=( 'autoconf' 'automake' 'yasm' 'nasm' 'cmake' + 'libxml2' 'perl-xml-libxml' 'perl-xml-parser' + 'xorg-mkfontdir' 'xorg-mkfontscale' ) + +conflicts=() +source=(https://www.cinelerra-cv.org/five/pkgs/src/cin_$pkgver.$pkgrel-src.tgz) +md5sums=('00000000000000000000000000000000') + +prepare() { + cd "$srcdir/cinelerra-$pkgver" + sed -i 's/\/python2.7/' ./guicast/Makefile +} + +build() { + cd "$srcdir/cinelerra-$pkgver" + ./autogen.sh + export FFMPEG_EXTRA_CFG=" --disable-vdpau" + ./configure --prefix=/usr --with-exec-name=$pkgname +CFG_VARS="\ +CFLAGS+=' -Wno-narrowing -O2 -g -fno-omit-frame-pointer' \ +CXXFLAGS+=' -Wno-narrowing -O2 -g -fno-omit-frame-pointer' \ +WERROR_CFLAGS+=' -fpermissive'" \ + make 2>&1 | tee log +} + +package() { + cd "$srcdir/cinelerra-$pkgver" + make install DESTDIR="$pkgdir" +} diff --git a/cinelerra-5.1/blds/arch.bld b/cinelerra-5.1/blds/arch.bld new file mode 100755 index 00000000..99535212 --- /dev/null +++ b/cinelerra-5.1/blds/arch.bld @@ -0,0 +1,11 @@ +#!/bin/bash + +#pacman -S openexr libdv flac + +( ./autogen.sh + ./configure --with-single-user --disable-static-build --without-lv2 \ + --without-firewire --without-dv --without-dvb --without-video4linux2 \ + --without-libzmpeg --without-commercial --without-thirdparty + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile diff --git a/cinelerra-5.1/blds/bld_dynamic.sh b/cinelerra-5.1/blds/bld_dynamic.sh new file mode 100755 index 00000000..40fd50ab --- /dev/null +++ b/cinelerra-5.1/blds/bld_dynamic.sh @@ -0,0 +1,36 @@ +#!/bin/bash -x + +dir="$1" +shift +path="/home" +bld="git-repo" +proj="cinelerra5" +base="cinelerra-5.1" + +if [ ! -d "$path/$dir/$bld" ]; then + echo "$bld missing in $path/$dir" + exit 1 +fi + +cd "$path/$dir/$bld" +rm -rf "$proj.dyn" +mkdir "$proj.dyn" + +git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "$proj.dyn" +#rsh host tar -C "/mnt0/$proj" -cf - "$base" | tar -C "$proj.dyn" -xf - +if [ $? -ne 0 ]; then + echo "git clone $proj failed" + exit 1 +fi + +cd "$proj.dyn/$base" +{ +./autogen.sh && \ +./configure --with-single-user --disable-static-build && \ +make $@ && \ +make install +} 2>&1 | tee log || true + +echo "finished: scanning log for ***" +grep -ai "\*\*\*.*error" log | head + diff --git a/cinelerra-5.1/blds/bld_package.sh b/cinelerra-5.1/blds/bld_package.sh new file mode 100755 index 00000000..c48bf6a9 --- /dev/null +++ b/cinelerra-5.1/blds/bld_package.sh @@ -0,0 +1,63 @@ +#!/bin/bash -x + +if [ $# -ne 2 ]; then + echo "usage: $0 " + echo " os = centos | ubuntu | suse | debian" + echo " typ = sta | dyn" + exit 1 +fi + +dir="$1" +typ="$2" +path="/home" +bld="git-repo" +proj="cinelerra5" +base="cinelerra-5.1" + +arch01="arch-20160601" +arch="arch-20161201" +cent01="centos-7.0-1406" +centos="centos-7.x-1611" +deb01="debian-8.4.0" +deb03="debian-8.7.1" +debian="debian-8.6.0" +fc23="fedora-23" +fc24="fedora-24" +fedora="fedora-25" +leap01="leap-42.1" +leap="leap-42.2" +mint01="mint-14.04.1" +mint="mint-18.1" +slk32="slk32-14.2" +slk64="slk64-14.2" +suse="opensuse-13.2" +ub14="ub14.04.1" +ub15="ub15.10" +ub16="ub16.04" +ub17="ub17.04" +ub1601="ub16.10" +ubuntu="ubuntu-14.04.1" + +eval os="\${$dir}" +if [ -z "$os" ]; then + echo "unknown os: $dir" +fi + +if [ ! -d "$path/$dir/$bld/$proj.$typ/$base" ]; then + echo "missing $bld/$proj.$typ/$base in $path/$dir" + exit 1 +fi + +sfx=`uname -m`-`date +"%Y%m%d"` +if [ "$typ" = "sta" ]; then + sfx="$sfx-static" +elif [ "$typ" != "dyn" ]; then + echo "err: suffix must be [sta | dyn]" + exit 1 +fi + +cd "$path/$dir/$bld/$proj.$typ/$base" +tar -C bin -cJf "../$base-$os-$sfx.txz" . +rm -f "$path/$dir/$base-$os-$sfx.txz" +mv "../$base-$os-$sfx.txz" "$path/$dir/." + diff --git a/cinelerra-5.1/blds/bld_prepare.sh b/cinelerra-5.1/blds/bld_prepare.sh new file mode 100755 index 00000000..fa9c6096 --- /dev/null +++ b/cinelerra-5.1/blds/bld_prepare.sh @@ -0,0 +1,101 @@ +#!/bin/bash +# need lv2 plugins (eg. lv2-calf-plugin) + +if [ `id -u` -ne 0 ]; then + echo "you must be root" +fi + +if [ $# -ne 1 ]; then + echo "usage: $0 " + echo " = [centos | suse | ubuntu]" +fi + +dir="$1" + + +case "$dir" in +"centos") + yum -y install nasm libavc1394-devel libusb-devel flac-devel \ + libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \ + libtheora-devel libiec61883-devel uuid-devel giflib-devel \ + ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \ + libsndfile-devel libXft-devel libXinerama-devel libXv-devel \ + xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \ + xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \ + libpng-devel bzip2-devel zlib-devel kernel-headers libtiff-devel \ + libavc1394 festival-devel libiec61883-devel flac-devel inkscape \ + libsndfile-devel libtheora-devel linux-firmware ivtv-firmware \ + libvorbis-devel texinfo xz-devel lzma-devel cmake udftools git \ + autoconf automake rpm-build jbigkit-devel libvdpau-devel alsa-lib-devel \ + gtk2-devel + yasm=yasm-1.3.0-3.fc24.x86_64.rpm + release=http://archives.fedoraproject.org/pub/fedora/linux/releases/24 + url=$release/Everything/x86_64/os/Packages/y/$yasm + wget -P /tmp $url + yum -y install /tmp/$yasm + rm -f /tmp/$yasm + ;; +"fedora") + dnf install groups "Development Tools" + dnf -y --best --allowerasing \ + install nasm yasm libavc1394-devel libusb-devel flac-devel \ + libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \ + libtheora-devel libiec61883-devel esound-devel uuid-devel \ + giflib-devel ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \ + libsndfile-devel libXft-devel libXinerama-devel libXv-devel \ + xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \ + xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \ + libpng-devel bzip2-devel zlib-devel kernel-headers libavc1394 \ + festival-devel libdc1394-devel libiec61883-devel esound-devel \ + flac-devel libsndfile-devel libtheora-devel linux-firmware \ + ivtv-firmware libvorbis-devel texinfo xz-devel lzma-devel cmake git \ + ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \ + gettext-devel inkscape udftools autoconf automake numactl-devel \ + jbigkit-devel libvdpau-devel gtk2-devel + ;; +"suse" | "leap") + zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \ + freeglut-devel libXv-devel alsa-devel libbz2-devel ncurses-devel \ + libXinerama-devel freetype-devel libXft-devel giflib-devel ctags \ + bitstream-vera-fonts xorg-x11-fonts-core xorg-x11-fonts dejavu-fonts \ + openexr-devel libavc1394-devel festival-devel libjpeg8-devel libdv-devel \ + libdvdnav-devel libdvdread-devel libiec61883-devel libuuid-devel \ + ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \ + libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \ + yasm autoconf automake rpm-build libjbig-devel libvdpau-devel gtk2-devel + if [ ! -f /usr/lib64/libtermcap.so ]; then + ln -s libtermcap.so.2 /usr/lib64/libtermcap.so + fi + ;; +#debian 32bit: export ac_cv_header_xmmintrin_h=no +"debian") + apt-get -f -y install apt-file sox nasm yasm g++ build-essential zlib1g-dev \ + texinfo libpng12-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \ + libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \ + libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \ + fonts-dejavu libopenexr-dev festival libfftw3-dev gdb \ + libdc1394-22-dev libesd0-dev libflac-dev libjbig-dev libvdpau-dev \ + inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \ + autoconf automake debhelper libgtk2.0-dev + ;; +#"ub16-10") +# apt-get -y install libx264-dev libx265-dev libvpx-dev libmjpegtools-dev +"ubuntu" | "mint" | "ub14" | "ub15" | "ub16" | "ub17" | "ub18" ) + apt-get -y install apt-file sox nasm yasm g++ build-essential libz-dev \ + texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \ + libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \ + libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \ + fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \ + libdc1394-22-dev libiec61883-dev libesd0-dev libflac-dev libjbig-dev \ + libvdpau-dev libsndfile1-dev libtheora-dev cmake udftools libxml2-utils \ + git inkscape autoconf automake debhelper libgtk2.0-dev + ;; + *) + echo "unknown os: $dir" + exit 1; + ;; +esac + +mkdir -p "/home/$dir/git-repo" +chmod a+rwx -R "/home/$dir/git-repo" + diff --git a/cinelerra-5.1/blds/bld_static.sh b/cinelerra-5.1/blds/bld_static.sh new file mode 100755 index 00000000..39e19743 --- /dev/null +++ b/cinelerra-5.1/blds/bld_static.sh @@ -0,0 +1,36 @@ +#!/bin/bash -x + +dir="$1" +shift +path="/home" +bld="git-repo" +proj="cinelerra5" +base="cinelerra-5.1" + +if [ ! -d "$path/$dir/$bld" ]; then + echo "$bld missing in $path/$dir" + exit 1 +fi + +cd "$path/$dir/$bld" +rm -rf "$proj.sta" +mkdir "$proj.sta" + +git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "$proj.sta" +#rsh host tar -C "/mnt0/$proj" -cf - "$base" | tar -C "$proj.sta" -xf - +if [ $? -ne 0 ]; then + echo "git clone $proj failed" + exit 1 +fi + +cd "$proj.sta/$base" +{ +./autogen.sh && \ +./configure --with-single-user --enable-static-build && \ +make $@ && \ +make install +} 2>&1 | tee log || true + +echo "finished: scanning log for ***" +grep -ai "\*\*\*.*error" log | head + diff --git a/cinelerra-5.1/blds/bsd.bld b/cinelerra-5.1/blds/bsd.bld new file mode 100755 index 00000000..3707579c --- /dev/null +++ b/cinelerra-5.1/blds/bsd.bld @@ -0,0 +1,15 @@ +#!/bin/bash +#use: patch -p2 < bsd.patch +export CONFIG_SHELL=/bin/bash +export MAKE=gmake +export C_INCLUDE_PATH=/usr/local/include +export CPLUS_INCLUDE_PATH=/usr/local/include +export LIBRARY_PATH=/usr/local/lib +alias make=gmake +./autogen.sh +CC=clang CXX=clang++ CFLAGS="-g -O2 -DFFMPEG3" ./configure --with-single-user \ + --disable-static-build --without-lv2 --disable-lame --disable-twolame \ + --with-oss --without-alsa --without-gl --without-firewire --without-dv \ + --without-dvb --without-video4linux2 --without-xxf86vm --without-ladspa-build \ + --without-libzmpeg --without-commercial --without-thirdparty +gmake 2>&1 | tee log diff --git a/cinelerra-5.1/blds/bsd.patch b/cinelerra-5.1/blds/bsd.patch new file mode 100644 index 00000000..31d18ba6 --- /dev/null +++ b/cinelerra-5.1/blds/bsd.patch @@ -0,0 +1,663 @@ +diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel +index a12d8f2b..9aac014a 100644 +--- a/cinelerra-5.1/Makefile.devel ++++ b/cinelerra-5.1/Makefile.devel +@@ -4,7 +4,7 @@ TOPDIR := $(CURDIR) + CFLAGS ?= -ggdb + export CFLAGS_ := $(CFLAGS) + +-cpus:=$(shell grep -c "^proc" /proc/cpuinfo) ++cpus:=$(shell sysctl -n hw.ncpu) + jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2))) + MAKEJ := $(MAKE) $(jobs) + +diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile +index 18590e3a..5eead290 100644 +--- a/cinelerra-5.1/cinelerra/Makefile ++++ b/cinelerra-5.1/cinelerra/Makefile +@@ -395,6 +395,7 @@ LIBS += -lfontconfig -lfreetype + LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil + LIBS += -lswresample -lswscale + LIBS += -lvpx -lwebp -lwebpmux ++LIBS += -lintl -liconv -lexecinfo + + LIBS += $(if $(filter fftw,$(static_pkgs)), -lfftw3) + LIBS += $(if $(filter flac,$(static_pkgs)), -lFLAC) +@@ -414,7 +415,7 @@ LIBS += $(if $(filter x265,$(static_pkgs)), -lx265) + LIBS += $(if $(filter libvpx,$(static_pkgs)), -lvpx) + + ifneq ($(WANT_GL),no) +-LIBS += -lGL -lGLU -lGLX ++LIBS += -lGL -lGLU + endif + ifneq ($(WANT_XFT),no) + LIBS += -lXft +@@ -476,6 +477,7 @@ LV2OBJS = \ + endif + + CFLAGS := \ ++ -I/usr/local/include \ + -I$(GUICAST) \ + -I$(LIBZMPEG3) \ + $(static_incs) \ +@@ -523,15 +525,15 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI) + $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES) + $(LINKER) `cat $(OBJDIR)/objs` + $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G)) +- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) ++ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) + ln -f -s ../bin/$(WANT_CIN) ci + + ifneq ($(WANT_COMMERCIAL),no) + $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES) +- @echo g++ -o $@ $(CUTOBJS) +- @g++ $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) ++ @echo $(CXX) -o $@ $(CUTOBJS) ++ @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) + $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo) +- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS)) ++ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS)) + + install-cutads: + cp -av $(OBJDIR)/cutads $(BINDIR)/. +@@ -540,18 +542,18 @@ install: install-cutads + endif + + $(BDWRITE): $(BDWOBJS) $(LIBRARIES) +- @echo g++ -o $@ $(BDWOBJS) +- @g++ $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS) ++ @echo $(CXX) -o $@ $(BDWOBJS) ++ @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS) + $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo) +- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE)) ++ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE)) + + install-bdwrite: + cp -av $(OBJDIR)/bdwrite $(BINDIR)/. + install: install-bdwrite + + ydiff: ydiff.C $(LIBRARIES) +- @echo g++ -o $@ ydiff.C +- @g++ $(CFLAGS) ydiff.C -o $@ $(LIBS) ++ @echo $(CXX) -o $@ ydiff.C ++ @$(CXX) $(CFLAGS) ydiff.C -o $@ $(LIBS) + + clean: + rm -rf $(OBJDIR) +@@ -585,7 +587,7 @@ $(OBJDIR)/lv2ui: $(LV2OBJS) + @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@ + @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS) + $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo) +- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI)) ++ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI)) + + .PHONY: lv2ui + lv2ui: $(LV2UI) +diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C +index 27f728ad..9215090d 100644 +--- a/cinelerra-5.1/cinelerra/bdcreate.C ++++ b/cinelerra-5.1/cinelerra/bdcreate.C +@@ -25,8 +25,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + // BD Creation + +diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C +index 6a2b4ca3..78cf9bef 100644 +--- a/cinelerra-5.1/cinelerra/bdwrite.C ++++ b/cinelerra-5.1/cinelerra/bdwrite.C +@@ -38,7 +38,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + // work arounds (centos) +diff --git a/cinelerra-5.1/cinelerra/cutads.C b/cinelerra-5.1/cinelerra/cutads.C +index ac58d56a..f6690cf2 100644 +--- a/cinelerra-5.1/cinelerra/cutads.C ++++ b/cinelerra-5.1/cinelerra/cutads.C +@@ -23,14 +23,6 @@ + using namespace std; + #define fail(s) do { printf("fail %s%s:%d\n",__func__,#s,__LINE__); return 1; } while(0) + +-/* missing from system headers, no /usr/include +- * IOPRIO_WHO_PROCESS, IOPRIO_CLASS_SHIFT, IOPRIO_CLASS_IDLE */ +-enum { IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE, }; +-#define IO_CLASS(n) (((int)(n)) << 13) +-#define IO_WHO_PROCESS 1 +-#include +-#include +- + // commercial edge detection: + // must have audio < min_audio + // and within +- check_margin seconds of low audio +@@ -55,11 +47,6 @@ class Video; + class Audio; + class Scan; + +-static int ioprio_set(int which, int who, int ioprio) +-{ +- return syscall(SYS_ioprio_set, which, who, ioprio); +-} +- + static inline int clip(int v, int mn, int mx) + { + return vmx ? mx : v; +@@ -617,7 +604,6 @@ class Scan + const char *asset_path; + static void set_priority(int pr, int io) { + setpriority(PRIO_PROCESS, 0, pr); // lowest cpu priority +- ioprio_set(IO_WHO_PROCESS, 0, IO_CLASS(io)); + } + class low_priority { public: + low_priority() { set_priority(19, IOPRIO_CLASS_IDLE); } +diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C +index 1014baf5..f38094e9 100644 +--- a/cinelerra-5.1/cinelerra/dvdcreate.C ++++ b/cinelerra-5.1/cinelerra/dvdcreate.C +@@ -24,8 +24,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + + #define DVD_PAL_4x3 0 +diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C +index 03348e0a..552a140d 100644 +--- a/cinelerra-5.1/cinelerra/file.C ++++ b/cinelerra-5.1/cinelerra/file.C +@@ -1584,7 +1584,10 @@ int File::record_fd() + void File::get_exe_path(char *result, char *bnp) + { + // Get executable path, basename +- int len = readlink("/proc/self/exe", result, BCTEXTLEN-1); ++ char exe_path[BCTEXTLEN]; ++ sprintf(exe_path,"/proc/%d/file",getpid()); ++ int len = readlink(exe_path, result, BCTEXTLEN-1); ++ + if( len >= 0 ) { + result[len] = 0; + char *ptr = strrchr(result, '/'); +diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C +index 3d21d2af..f3064199 100644 +--- a/cinelerra-5.1/cinelerra/indexfile.C ++++ b/cinelerra-5.1/cinelerra/indexfile.C +@@ -70,7 +70,7 @@ + + #include + #include +-#include ++#include + + // check for isofs volume_id for dvd/cdrom + +diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac +index 94f9b382..4c4bee11 100644 +--- a/cinelerra-5.1/configure.ac ++++ b/cinelerra-5.1/configure.ac +@@ -16,15 +16,26 @@ CFG_CFLAGS+=" -Wno-unused-result" + CFG_CFLAGS+=" -Wno-stringop-overflow" + CFG_CFLAGS+=" -Wno-format-truncation" + CFG_CFLAGS+=" -Wno-format-overflow" ++CFG_CFLAGS+=" -Wno-unknown-warning-option" + CFG_CFLAGS+=" -Wno-parentheses" + CFG_CFLAGS+=" -Wno-stringop-truncation" ++CFG_CFLAGS+=" -Wno-gnu-designator" ++CFG_CFLAGS+=" -Wno-missing-braces" ++CFG_CFLAGS+=" -Wno-overloaded-virtual" ++CFG_CFLAGS+=" -Wno-self-assign-field" ++CFG_CFLAGS+=" -Wno-sometimes-uninitialized" ++CFG_CFLAGS+=" -Wno-tautological-pointer-compare" ++CFG_CFLAGS+=" -Wno-unused-function" ++CFG_CFLAGS+=" -Wno-unused-private-field" ++CFG_CFLAGS+=" -Wno-infinite-recursion" + CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS" + CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS" + CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1" + CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" +-CFG_CFLAGS+=" -I/usr/include/freetype2" +-CFG_CFLAGS+=" -I/usr/include/uuid" +-CFG_CFLAGS+=" -I/usr/include/mjpegtools" ++CFG_CFLAGS+=" -I/usr/local/include" ++CFG_CFLAGS+=" -I/usr/local/include/freetype2 -I/usr/include/freetype2" ++CFG_CFLAGS+=" -I/usr/local/include/uuid -I/usr/include/uuid" ++CFG_CFLAGS+=" -I/usr/local/include/mjpegtools -I/usr/include/mjpegtools" + + AC_DEFUN([CHECK_WITH], [ + AC_ARG_WITH([$1], +@@ -126,7 +137,7 @@ AC_SUBST(MAK_INSTALLS) + AC_SUBST(MAK_UNINSTALLS) + + if test "x$WANT_JOBS" = "xauto"; then +- CPUS=`grep -c "^proc" /proc/cpuinfo` ++ CPUS=`sysctl -n hw.ncpu` + WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2` + fi + +diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h +index 8ee88002..9a17091e 100644 +--- a/cinelerra-5.1/db/tdb.h ++++ b/cinelerra-5.1/db/tdb.h +@@ -32,7 +32,7 @@ inline void operator delete[](void *t,size_t n) { free(t); } + #endif + + #define ZMEDIA +-#define ZFUTEX ++//#define ZFUTEX + #ifdef ZFUTEX + #include + #include +diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h +index f5994d53..c73169bb 100644 +--- a/cinelerra-5.1/guicast/bclistbox.h ++++ b/cinelerra-5.1/guicast/bclistbox.h +@@ -185,7 +185,9 @@ public: + + // take_focus - used by the suggestion box to keep it from taking focus from the + // textbox +- int activate(int take_focus = 1); ++ int activate() { return activate(1); } ++ int activate(int take_focus); ++ + int activate(int x, int y, int w=-1, int h=-1); + int deactivate(); + int is_active(); +diff --git a/cinelerra-5.1/guicast/bcpan.h b/cinelerra-5.1/guicast/bcpan.h +index 40f5971f..73d47586 100644 +--- a/cinelerra-5.1/guicast/bcpan.h ++++ b/cinelerra-5.1/guicast/bcpan.h +@@ -93,7 +93,8 @@ public: + int &stick_x, + int &stick_y); + static int rdtoxy(int &x, int &y, int a, int virtual_r); +- int activate(int popup_x = -1, int popup_y = -1); ++ int activate(int popup_x, int popup_y); ++ int activate() { return activate(-1,-1); } + int deactivate(); + float* get_values(); + +diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C +index e3400600..f201028c 100644 +--- a/cinelerra-5.1/guicast/bcresources.C ++++ b/cinelerra-5.1/guicast/bcresources.C +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -297,23 +298,12 @@ int BC_Resources::machine_cpus = 1; + + int BC_Resources::get_machine_cpus() + { +- int cpus = 1; +- FILE *proc = fopen("/proc/cpuinfo", "r"); +- if( proc ) { +- char string[BCTEXTLEN], *cp; +- while(!feof(proc) && fgets(string, sizeof(string), proc) ) { +- if( !strncasecmp(string, "processor", 9) && +- (cp = strchr(string, ':')) != 0 ) { +- int n = atol(cp+1) + 1; +- if( n > cpus ) cpus = n; +- } +- else if( !strncasecmp(string, "cpus detected", 13) && +- (cp = strchr(string, ':')) != 0 ) +- cpus = atol(cp+1); +- } +- fclose(proc); +- } +- return cpus; ++ int mib[2], ncpu; ++ size_t len = sizeof(ncpu); ++ mib[0] = CTL_HW; ++ mib[1] = HW_NCPU; ++ if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1; ++ return ncpu; + } + + void BC_Resources::new_vframes(int n, VFrame *vframes[], ...) +@@ -695,7 +685,7 @@ new_vframes(20,default_medium_7segment, + generic_button_margin = 15; + draw_clock_background=1; + +- use_shm = -1; ++ use_shm = 0; + shm_reply = 1; + + // Initialize +@@ -1681,6 +1671,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style, + return style_match; + } + ++ ++class utf8conv { ++ uint8_t *obfr, *out, *oend; ++ uint8_t *ibfr, *inp, *iend; ++public: ++ utf8conv(void *out, int olen, void *inp, int ilen) { ++ this->obfr = this->out = (uint8_t*)out; ++ this->oend = this->out + olen; ++ this->ibfr = this->inp = (uint8_t*)inp; ++ this->iend = this->inp + ilen; ++ } ++ int cur() { return inp>=iend ? -1 : *inp; } ++ int next() { return inp>=iend ? -1 : *inp++; } ++ int next(int ch) { return out>=oend ? -1 : *out++ = ch; } ++ int ilen() { return inp-ibfr; } ++ int olen() { return out-obfr; } ++ int wnext(); ++ int wnext(unsigned int v); ++}; ++ ++int utf8conv:: ++wnext(unsigned int v) ++{ ++ if( v < 0x00000080 ) { next(v); return 1; } ++ int n = v < 0x00000800 ? 2 : v < 0x00010000 ? 3 : ++ v < 0x00200000 ? 4 : v < 0x04000000 ? 5 : 6; ++ int m = (0xff00 >> n), i = n-1; ++ next((v>>(6*i)) | m); ++ while( --i >= 0 ) next(((v>>(6*i)) & 0x3f) | 0x80); ++ return n; ++} ++ ++int utf8conv:: ++wnext() ++{ ++ int v = 0, n = 0, ch = next(); ++ if( ch == '\\' ) { ++ switch( (ch=next()) ) { ++ case 'n': return '\n'; ++ case 't': return '\t'; ++ case 'r': return '\r'; ++ case 'b': return '\b'; ++ case 'f': return '\f'; ++ case 'v': return '\v'; ++ case 'a': return '\a'; ++ case '0': case '1': case '2': case '3': ++ case '4': case '5': case '6': case '7': ++ v = ch - '0'; ++ for( int i=3; --i>0; v=v*8+ch, next() ) ++ if( (ch=cur()-'0') < 0 || ch >= 8 ) break; ++ return v; ++ case 'x': n = 2; break; ++ case 'u': n = 4; break; ++ case 'U': n = 8; break; ++ default: return ch; ++ } ++ for( int i=n; --i>=0; v=v*16+ch, next() ) { ++ if( (ch=cur()-'0')>=0 && ch<10 ) continue; ++ if( (ch-='A'-'0'-10)>=10 && ch<16 ) continue; ++ if( (ch-='a'-'A')<10 || ch>=16 ) break; ++ } ++ } ++ else if( ch >= 0x80 ) { ++ static const unsigned char byts[] = { ++ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5, ++ }; ++ int i = ch - 0xc0; ++ n = i<0 ? 0 : byts[i/4]; ++ for( v=ch, i=n; --i>=0; v+=next() ) v <<= 6; ++ static const unsigned int ofs[6] = { ++ 0x00000000U, 0x00003080U, 0x000E2080U, ++ 0x03C82080U, 0xFA082080U, 0x82082080U ++ }; ++ v -= ofs[n]; ++ } ++ else ++ v = ch; ++ return v; ++} ++ ++ + size_t BC_Resources::encode(const char *from_enc, const char *to_enc, + char *input, int input_length, char *output, int output_length) + { +@@ -1688,10 +1759,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc, + iconv_t cd; + char *outbase = output; + +- if(!from_enc || *from_enc == 0) ++ if( !from_enc || *from_enc == 0 || ++ !strcmp(from_enc,"UTF8") || !strcmp(from_enc, "US-ASCII") ) + from_enc = "UTF-8"; + +- if(!to_enc || *to_enc == 0) ++ if( !to_enc || *to_enc == 0 || ++ !strcmp(to_enc,"UTF8") || !strcmp(to_enc, "US-ASCII") ) + to_enc = "UTF-8"; + + if(input_length < 0) +@@ -1701,32 +1774,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc, + + if(strcmp(from_enc, to_enc) && inbytes) + { +- if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1) ++ if( !strcmp(from_enc, "UTF-8") && !strcmp(to_enc,"UTF32LE") ) { ++ utf8conv uc(0,0, input,inbytes); ++ uint32_t *op = (uint32_t *)output; ++ uint32_t *ep = (uint32_t *)(output+output_length); ++ for( int wch; op=0; *op++=wch ); ++ output = (char *)op; ++ outbytes = (char*)ep - output; ++ } ++ else if( !strcmp(from_enc, "UTF32LE") && !strcmp(to_enc,"UTF-8") ) { ++ utf8conv uc(output,output_length, 0,0); ++ uint32_t *ip = (uint32_t *)input; ++ uint32_t *ep = (uint32_t *)(input+inbytes); ++ for( ; ip=0; ++ip ); ++ output += uc.olen(); ++ outbytes = output_length-uc.olen(); ++ } ++ else if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1) + { + printf(_("Conversion from %s to %s is not available\n"), + from_enc, to_enc); + return 0; + } +- +- outbytes = output_length - 1; +- +- iconv(cd, &input, &inbytes, &output, &outbytes); +- +- iconv_close(cd); +- inbytes = output - outbase; ++ else { ++ outbytes = output_length - 1; ++ iconv(cd, &input, &inbytes, &output, &outbytes); ++ iconv_close(cd); ++ } + } + else if(inbytes) + { + memcpy(output, input, inbytes); ++ output += inbytes; + outbytes -= inbytes; + } +- for(int i = 0; i < 4; i++) +- { ++ if( outbytes > sizeof(uint32_t) ) ++ outbytes = sizeof(uint32_t); ++ for(int i = 0; i < outbytes; i++) + output[i] = 0; +- if(outbytes-- == 0) +- break; +- } +- return inbytes; ++ return output - outbase; + } + + void BC_Resources::encode_to_utf8(char *buffer, int buflen) +diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C +index ed50cfb1..f1b894ba 100644 +--- a/cinelerra-5.1/guicast/bcsignals.C ++++ b/cinelerra-5.1/guicast/bcsignals.C +@@ -37,9 +37,11 @@ + #include + #include + #include +-#include + #include + ++#define dirent64 dirent ++#define readdir64 readdir ++ + BC_Signals* BC_Signals::global_signals = 0; + static int signal_done = 0; + +@@ -279,18 +281,6 @@ static void handle_exit(int signum) + + void BC_Signals::set_sighup_exit(int enable) + { +- if( enable ) { +-// causes SIGHUP to be generated when parent dies +- signal(SIGHUP, handle_exit); +- prctl(PR_SET_PDEATHSIG, SIGHUP, 0,0,0); +-// prevents ^C from signalling child when attached to gdb +- setpgid(0, 0); +- if( isatty(0) ) ioctl(0, TIOCNOTTY, 0); +- } +- else { +- signal(SIGHUP, signal_entry); +- prctl(PR_SET_PDEATHSIG, 0,0,0,0); +- } + } + + BC_Signals::BC_Signals() +@@ -383,11 +373,13 @@ const char* BC_Signals::sig_to_str(int number) + #include + #include "thread.h" + ++#define SC_(r)sc_##r ++ + #if __i386__ +-#define IP eip ++#define IP SC_(eip) + #endif + #if __x86_64__ +-#define IP rip ++#define IP SC_(rip) + #endif + #ifndef IP + #error gotta have IP +@@ -473,26 +465,5 @@ static void handle_dump(int n, siginfo_t * info, void *sc) + + fprintf(fp,"\n\n"); + if( fp != stdout ) fclose(fp); +- char cmd[1024], *cp = cmd; +- cp += sprintf(cp, "exec gdb /proc/%d/exe -p %d --batch --quiet " +- "-ex \"thread apply all info registers\" " +- "-ex \"thread apply all bt full\" " +- "-ex \"quit\"", pid, pid); +- if( fp != stdout ) +- cp += sprintf(cp," >> \"%s\"", fn); +- cp += sprintf(cp," 2>&1"); +-//printf("handle_dump:: pid=%d, cmd='%s' fn='%s'\n",pid,cmd,fn); +- pid = vfork(); +- if( pid < 0 ) { +- fprintf(stderr,"** can't start gdb, dump abondoned\n"); +- return; +- } +- if( pid > 0 ) { +- waitpid(pid,0,0); +- fprintf(stderr,"** dump complete\n"); +- return; +- } +- char *const argv[4] = { (char*) "/bin/sh", (char*) "-c", cmd, 0 }; +- execvp(argv[0], &argv[0]); + } + +diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C +index ebc2007d..9d6452cb 100644 +--- a/cinelerra-5.1/guicast/filesystem.C ++++ b/cinelerra-5.1/guicast/filesystem.C +@@ -33,6 +33,8 @@ + #include + #include + ++#define dirent64 dirent ++#define readdir64 readdir + + #include "filesystem.h" + +diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C +index dff53e61..321ab4fc 100644 +--- a/cinelerra-5.1/guicast/thread.C ++++ b/cinelerra-5.1/guicast/thread.C +@@ -55,13 +55,6 @@ void* Thread::entrypoint(void *parameters) + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + thread->cancel_enabled = false; + +-// Set realtime here seince it doesn't work in start +- if( thread->realtime && getuid() == 0 ) { +- struct sched_param param = { sched_priority : 1 }; +- if(pthread_setschedparam(thread->tid, SCHED_RR, ¶m) < 0) +- perror("Thread::entrypoint pthread_attr_setschedpolicy"); +- } +- + thread->run(); + thread->finished = true; + if( !thread->synchronous ) { +diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h +index 216ecd2b..8ebec237 100644 +--- a/cinelerra-5.1/guicast/thread.h ++++ b/cinelerra-5.1/guicast/thread.h +@@ -27,7 +27,7 @@ + #include + #include + +-static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); } ++static inline long gettid() { return (long)pthread_self(); } + + // The thread does not autodelete by default. + // If autodelete is 1 the thread autodeletes. +diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile +index 6ed357c7..56081181 100644 +--- a/cinelerra-5.1/plugins/Makefile ++++ b/cinelerra-5.1/plugins/Makefile +@@ -31,7 +31,6 @@ DIRS = $(OPENCV_OBJS) \ + brightness \ + burn \ + C41 \ +- cdripper \ + chromakey \ + chromakeyhsv \ + color3way \ +@@ -161,6 +160,8 @@ DIRS = $(OPENCV_OBJS) \ + # denoisemjpeg \ + # duplicate + # vocoder \ ++# not in bsd ++# cdripper \ + + PLUGIN_DIR = $(BINDIR)/plugins + DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes +diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C +index fefbbdb1..045e96d4 100644 +--- a/cinelerra-5.1/plugins/titler/titler.C ++++ b/cinelerra-5.1/plugins/titler/titler.C +@@ -57,8 +57,7 @@ + #include + #include + #include +-#include +-#include ++#include + #include + #include + #include diff --git a/cinelerra-5.1/blds/cfg-cv.sh b/cinelerra-5.1/blds/cfg-cv.sh new file mode 100755 index 00000000..153a526b --- /dev/null +++ b/cinelerra-5.1/blds/cfg-cv.sh @@ -0,0 +1,134 @@ +#!/bin/bash -x +# cd cincv; cfg_cv.sh /path/cin5 +# used git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "cinelerra5" +# ver: git checkout 135eb5f052a2f75e4df6c86511a94ec9586e096d (dec 30, 2016) +cin="$1" +THIRDPARTY=`pwd`/thirdparty +unset LIBS LDFLAGS CFLAGS CPPFLAGS CXXFLAGS +export ac_cv_header_xmmintrin_h=no +for f in ./quicktime/Makefile.am ./libmpeg3/Makefile.am; do + sed -e 's/-Wl,--no-undefined//' -i $f +done +rm -rf thirdparty; cp -a $cin/thirdparty . +for f in configure.ac Makefile.am autogen.sh; do mv $f $f.cv; cp -a $cin/$f .; done +mv m4 m4.cv +rm -rf ./libzmpeg3 ./db +mkdir -p libzmpeg3 db db/utils mpeg2enc mplexlo + +./autogen.sh +./configure --disable-static-build --without-ladspa-build \ + --enable-faac=yes --enable-faad2=yes --enable-a52dec=yes \ + --enable-mjpegtools=yes --enable-lame=yes --enable-x264=yes \ + --enable-libogg=auto --enable-libtheora=auto --enable-libvorbis=auto \ + --enable-openexr=auto --enable-libsndfile=auto --enable-libdv=auto \ + --enable-libjpeg=auto --enable-tiff=auto --enable-x264=auto \ + --disable-audiofile --disable-encore --disable-esound --disable-fdk \ + --disable-ffmpeg --disable-fftw --disable-flac --disable-giflib --disable-ilmbase \ + --disable-libavc1394 --disable-libraw1394 --disable-libiec61883 --disable-libvpx \ + --disable-openjpeg --disable-twolame --disable-x265 + +export CFG_VARS='CFLAGS+=" -fPIC"'; \ +export MAK_VARS='CFLAGS+=" -fPIC"'; \ +export CFG_PARAMS="--with-pic --enable-pic --disable-asm"; \ + +jobs=`make -s -C thirdparty val-WANT_JOBS` +make -C thirdparty -j$jobs + +static_libs=`make -C thirdparty -s val-static_libs` +static_incs=`make -C thirdparty -s val-static_incs` + +./autogen.sh clean +for f in configure.ac Makefile.am autogen.sh; do rm -f $f; mv $f.cv $f; done +mv m4.cv m4 + +LDFLAGS=`for f in $static_libs; do + if [ ! -f "$f" ]; then continue; fi; + ls $f +done | sed -e 's;/[^/]*$;;' | \ +sort -u | while read d; do + echo -n " -L$d"; +done` +export LDFLAGS + +LIBS=`for f in $static_libs; do + if [ ! -f "$f" ]; then continue; fi; + ls $f +done | sed -e 's;.*/;;' -e 's;lib\(.*\)\.a$;\1;' | \ +sort -u | while read a; do + echo -n " -l$a"; +done` +LIBS+=" -lpthread" +export LIBS + +export CFLAGS="$static_incs" +export CXXFLAGS="$static_incs" + +if [ ! -f configure ]; then ./autogen.sh; fi +sed -e 's/^LIBX264_LIBS=""/#LIBX264_LIBS=""/' -i configure + +export MJPEG_LIBS="-L$THIRDPARTY/mjpegtools-2.1.0/utils/.libs -lmjpegutils \ + -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavfile \ + -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavjpeg \ + -L$THIRDPARTY/mjpegtools-2.1.0/mpeg2enc/.libs -lmpeg2encpp \ + -L$THIRDPARTY/mjpegtools-2.1.0/mplex/.libs -lmplex2" +export MJPEG_CFLAGS="-I$THIRDPARTY/mjpegtools-2.1.0/. \ + -I$THIRDPARTY/mjpegtools-2.1.0/lavtools \ + -I$THIRDPARTY/mjpegtools-2.1.0/utils" + +export LIBX264_CFLAGS="-I$THIRDPARTY/x264-snapshot-20160220-2245-stable/." +export LIBX264_LIBS="-L$THIRDPARTY/x264-snapshot-20160220-2245-stable/. -lx264" + +for f in $MJPEG_LIBS $LIBX264_LIBS; do + LIBS=`echo "$LIBS" | sed -e "s;[ ]*\<$f\>[ ]*; ;"` +done + +echo LDFLAGS=$LDFLAGS +echo LIBS=$LIBS +echo CFLAGS=$CFLAGS + +# -lmxxxxx dies, feed it a -lm early to prevent misformed parameters +export LIBS="-la52 -ldjbfft -lfaac -lfaad -lHalf -lIex -lIexMath -lIlmThread -lImath -llavfile -llavjpeg -lm -lmjpegutils -lmmxsse -lmp3lame -lmp4ff -lmpeg2encpp -lmpgdecoder -lmplex2 -logg -lvorbis -lvorbisenc -lvorbisfile -lx264 -lyuvfilters -lpthread -ldl" +# po Makefile construction error: skip it +touch po/Makefile.in.in + +# uuid search path is not predictable, fake it +( cd thirdparty/libuuid-1.0.3/; ln -s . uuid ) +# old linker scripts want .libs/.libs path, fake it: +find thirdparty/ -name .libs | while read f ; do ( cd $f; ln -s . .libs ); done + +./configure + +echo "Run:" +echo "export ac_cv_header_xmmintrin_h=no" +echo "export THIRDPARTY=\"$THIRDPARTY\"" +exit + +# have to rebuild these by hand +# have to get rid of -Wl,--no-undefined" +# cd plugins/libeffecttv/.libs/; \rm -f libeffecttv.a; ar r libeffecttv.a effecttv.o +# cd quicktime/encore50/.libs/; \rm -f libencore.a; ar r libencore.a *.o +# cd quicktime; vi Makefile; remove -Wl,--no-undefined from:, make +# libquicktimecv_la_LDFLAGS = -version-info 1:0:0 -release 1.6.0 + +# shares do not want thirdparty link data: +( cd libmpeg3 + make clean + make LIBS= \ + LDFLAGS="-L$THIRDPARTY/a52dec-0.7.4/liba52/.libs \ + -L$THIRDPARTY/djbfft-0.76 -ldjbfft" ) +( cd guicast + make clean + make LIBS= LDFLAGS= ) +( cd plugins + for f in */Makefile; do + cp $f $f.sav1; sed -e "/^LIBS\>/d" -e "/^LDFLAGS\>/d" -i $f + done + make clean + make ) + +#make -j$jobs >& log +#make install DESTDIR=`pwd` >> log 2>&1 +#export LD_LIBRARY_PATH=`pwd`/usr/local/lib +#cd cinelerra +#gdb ./.libs/cinelerra + diff --git a/cinelerra-5.1/blds/cin.SlackBuild b/cinelerra-5.1/blds/cin.SlackBuild new file mode 100644 index 00000000..76599411 --- /dev/null +++ b/cinelerra-5.1/blds/cin.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/bash -x + +# Slackware build script for cin 5.1 + +# Copyright 2017 by WP Morrow (aka goodguy) +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=cin +VERSION="$( date +%Y%m%d )" +BUILD=${BUILD:-1} +TAG=${TAG:-_cin} +GITURL="git://git.cinelerra-cv.org/goodguy/cinelerra.git" +SLKBLD=`realpath "$0"` + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + export CFG_VARS='ac_cv_header_xmmintrin_h=no' + SLKCFLAGS="-march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +git clone --depth 1 $GITURL $PRGNAM-$VERSION +#rsh host tar -C /mnt0 -cf - cinelerra5 | tar -xf - +#mv cinelerra5 $PRGNAM-$VERSION +cd $PRGNAM-$VERSION/cinelerra-5.1 +chown -R root:root . + +# disable vdpau or ffmpeg won't build on Slackware 14.2 +export FFMPEG_EXTRA_CFG=" --disable-vdpau" + +# configure the build +./autogen.sh + +# Use ccache for faster rebuilding +# TODO: Let ffmpeg compile with ccache +export CC="ccache gcc" + +./configure \ + --prefix=/usr \ + --with-exec-name=$PRGNAM \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -type f | while read f ; do + if ! ( file "$f" | grep ELF | grep -q -e "executable" -e "shared object" ); then + continue + fi + echo == "$f" + strip --strip-unneeded "$f" +done 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $SLKBLD > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat > $PKG/install/slack-desc <<<" + |-----handy-ruler------------------------------------------------------| +$PRGNAM: $PRGNAM (GNU/Linux Video/Audio Studio) +$PRGNAM: 5.x variant of Cinelerra by WP Morrow (aka goodguy) +$PRGNAM: +$PRGNAM: Cinelerra is the most advanced non-linear video editor +$PRGNAM: and compositor for Linux. It does primarily three main +$PRGNAM: things: capturing, compositing, and editing audio and +$PRGNAM: video with sample level accuracy. +$PRGNAM: +$PRGNAM: Homepage: http://cinelerra-cv.org/" +cat > $PKG/install/doinst.sh <<<" +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi" + +# desktop icon data path +sed -e "s;^Icon=.*;Icon=/usr/share/pixmaps/$PRGNAM.xpm;" \ + < image/cin.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} diff --git a/cinelerra-5.1/blds/cinelerra.spec b/cinelerra-5.1/blds/cinelerra.spec new file mode 100644 index 00000000..50bf6db7 --- /dev/null +++ b/cinelerra-5.1/blds/cinelerra.spec @@ -0,0 +1,92 @@ +%define ver 20180630 +%define cin cinelerra +Summary: Multimedia Editing and construction + +%if 0%{?hidepth} +%define xbit 10bit +%define xcfg --enable-x265_hidepth --with-exec-name=cinx +%endif + +Name: %{cin}%{?xbit} +Version: 5.1 +Release: %{ver} +License: GPL +Group: Applications/Multimedia +URL: http://cinelerra-cv.org/ + +# Obtained from : +# git clone git://git.cinelerra.org/goodguy/cinelerra.git cinelerra5 +Source0: %{cin}-%{version}-%{ver}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%if 0%{?fedora}%{?centos} +%define rhat 1 +%endif + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: cmake +BuildRequires: binutils +BuildRequires: ctags +BuildRequires: flac-devel +BuildRequires: freetype-devel +BuildRequires: gcc-c++ +BuildRequires: gettext-devel +BuildRequires: git +BuildRequires: inkscape +BuildRequires: libpng-devel +BuildRequires: libXft-devel +BuildRequires: libXinerama-devel +BuildRequires: libXv-devel +BuildRequires: nasm +BuildRequires: ncurses-devel +BuildRequires: texinfo +BuildRequires: udftools +BuildRequires: gtk2-devel +%{?rhat:BuildRequires: alsa-lib-devel} +%{?rhat:BuildRequires: bzip2-devel} +%{?rhat:BuildRequires: xorg-x11-fonts-cyrillic} +%{?rhat:BuildRequires: xorg-x11-fonts-cyrillic} +%{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-100dpi} +%{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-75dpi} +%{?rhat:BuildRequires: xorg-x11-fonts-misc} +%{?rhat:BuildRequires: xorg-x11-fonts-Type1} +%{?suse:BuildRequires: alsa-devel} +%{?suse:BuildRequires: libbz2-devel} +%{?suse:BuildRequires: bitstream-vera-fonts} +%{?suse:BuildRequires: xorg-x11-fonts-core} +%{?suse:BuildRequires: xorg-x11-fonts} +%{?suse:BuildRequires: dejavu-fonts} +%{?suse:BuildRequires: libnuma-devel} +BuildRequires: xz-devel +BuildRequires: yasm +BuildRequires: zlib-devel + +%description +Multimedia editing and construction + +%prep +%define _buildsubdir %{cin}-%{version} +%setup -q -n %{cin}-%{version} +%build +./autogen.sh +%configure %{?xcfg} +%{__make} + +%install +%make_install + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%{_bindir}/* +%{_libdir}/* +%{_datadir}/* + +%exclude /usr/src/debug +%exclude /usr/lib/debug + +%changelog + diff --git a/cinelerra-5.1/blds/deb.bld b/cinelerra-5.1/blds/deb.bld new file mode 100755 index 00000000..b5103339 --- /dev/null +++ b/cinelerra-5.1/blds/deb.bld @@ -0,0 +1,17 @@ +#!/bin/bash + +#apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev \ +# libavresample-dev libavutil-dev uuid-dev libdv4-dev libmjpegtools-dev \ +# liblilv-dev libsuil-dev libavc1394-dev libraw1394-dev libmp3lame-dev \ +# libopenjp2-7-dev libtwolame-dev libvpx-dev libwebp-dev libwebpmux3 \ +# libx264-dev libx265-dev libopus-dev + +( ./autogen.sh + CFLAGS=-DFFMPEG3 ./configure --with-single-user \ + --disable-static-build --without-thirdparty \ + --without-video4linux2 --without-dvb --with-lv2=auto \ + --without-libzmpeg --without-commercial + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile + diff --git a/cinelerra-5.1/blds/debian/changelog b/cinelerra-5.1/blds/debian/changelog new file mode 100644 index 00000000..173d6ac3 --- /dev/null +++ b/cinelerra-5.1/blds/debian/changelog @@ -0,0 +1,12 @@ +cin (1:5.1.20180630) unstable; urgency=low + + [ guy goode ] + + -- lists Mon, 6 Jun 2016 18:39:04 +0700 + +cin (1:5.1.20160606) unstable; urgency=low + + [ guy goode ] + + -- lists Mon, 6 Jun 2016 18:39:04 +0700 + diff --git a/cinelerra-5.1/blds/debian/cin.postinst b/cinelerra-5.1/blds/debian/cin.postinst new file mode 100644 index 00000000..621b186f --- /dev/null +++ b/cinelerra-5.1/blds/debian/cin.postinst @@ -0,0 +1,4 @@ +#!/bin/bash -e +exec > /dev/null 2>&1 +if [ ! /proc/self/root -ef /proc/1/root ]; then exit; fi +sysctl -p /etc/sysctl.d/50-cin.conf diff --git a/cinelerra-5.1/blds/debian/compat b/cinelerra-5.1/blds/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/cinelerra-5.1/blds/debian/compat @@ -0,0 +1 @@ +9 diff --git a/cinelerra-5.1/blds/debian/control b/cinelerra-5.1/blds/debian/control new file mode 100644 index 00000000..9823f262 --- /dev/null +++ b/cinelerra-5.1/blds/debian/control @@ -0,0 +1,21 @@ +Source: cin +Section: video +Priority: optional +Standards-Version: 5.1.20180630 +Maintainer: mailing list +Homepage: http://www.cinelerra-cv.org/ +Build-Depends: nasm, yasm, g++, gdb, build-essential, e2fsprogs, + libz-dev, liblzma-dev, libbz2-dev, exuberant-ctags, + libxft-dev, libxinerama-dev, libxv-dev, linux-firmware, + freeglut3-dev, libxv-dev, libasound2-dev, + libncurses5-dev, libxinerama-dev, libfreetype6-dev, libxft-dev, + ttf-bitstream-vera, xfonts-75dpi, xfonts-100dpi, fonts-dejavu, + libflac-dev, inkscape, texinfo, libpng-dev, + cmake, udftools, libxml2-utils, git, gettext, + autoconf, automake + +Package: cin +Depends: ${misc:Depends} +Description: Multimedia editing and construction +Architecture: any + diff --git a/cinelerra-5.1/blds/debian/copyright b/cinelerra-5.1/blds/debian/copyright new file mode 100644 index 00000000..4396b192 --- /dev/null +++ b/cinelerra-5.1/blds/debian/copyright @@ -0,0 +1,31 @@ +originally written by Heroine Virtual Ltd. +http://heroinewarrior.com/ + +This package is using sources obtained from: +http://cinelerra-cv.org. +git://git.cinelerra-cv.org/goodguy/cinelerra.git + +Copyright (c) 1996-2015 Heroine Virtual Ltd. +Copyright (c) 2006-2016 Cinelerra-CV community + +Cinelerra is released under GNU Public License v.2. + + All Rights Reserved + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + diff --git a/cinelerra-5.1/blds/debian/rules b/cinelerra-5.1/blds/debian/rules new file mode 100755 index 00000000..c95b0a03 --- /dev/null +++ b/cinelerra-5.1/blds/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f +# from topdir ./debian/rules binary +package=cin + +# Enable hardening flags +CFLAGS += $(shell dpkg-buildflags --get CFLAGS) +CXXFLAGS += $(shell dpkg-buildflags --get CXXFLAGS) +LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS) + +build build-arch build-indep: build-stamp + +build-stamp: + dh_testdir + @if [ ! -e configure ] ; then ./autogen.sh; fi + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \ + ./configure --enable-opengl --prefix=/usr $(CONFFLAGS) + $(MAKE) $(MAKEFLAGS) + touch $@ + +clean: + dh_testdir + dh_testroot + [ ! -f Makefile ] || $(MAKE) clean + dh_clean -a + -rm -f build-stamp + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/cin + install -D -m644 debian/sysctl.d debian/cin/etc/sysctl.d/50-cin.conf + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_install + dh_link -a + dh_icons -a + dh_fixperms -a + dh_installdeb -a + dh_gencontrol + dh_builddeb -p cin + +binary: binary-indep binary-arch + diff --git a/cinelerra-5.1/blds/debian/sysctl.d b/cinelerra-5.1/blds/debian/sysctl.d new file mode 100644 index 00000000..a9a2d42f --- /dev/null +++ b/cinelerra-5.1/blds/debian/sysctl.d @@ -0,0 +1,2 @@ +kernel.shmmax = 0x7fffffff +kernel.shmmni = 0x4000 diff --git a/cinelerra-5.1/blds/debpkg.sh b/cinelerra-5.1/blds/debpkg.sh new file mode 100755 index 00000000..4c821b04 --- /dev/null +++ b/cinelerra-5.1/blds/debpkg.sh @@ -0,0 +1,4 @@ +#!/bin/bash -x + +./debian/rules binary + diff --git a/cinelerra-5.1/blds/pkgbld.sh b/cinelerra-5.1/blds/pkgbld.sh new file mode 100755 index 00000000..5c545f5f --- /dev/null +++ b/cinelerra-5.1/blds/pkgbld.sh @@ -0,0 +1,2 @@ +#!/bin/bash +makepkg diff --git a/cinelerra-5.1/blds/rpm.bld b/cinelerra-5.1/blds/rpm.bld new file mode 100755 index 00000000..59e1476f --- /dev/null +++ b/cinelerra-5.1/blds/rpm.bld @@ -0,0 +1,20 @@ +#!/bin/bash + +#zypper install ffmpeg \ +# libavc1394-devel libavcodec-devel libavdevice-devel libavfilter-devel \ +# libavformat-devel libavresample-devel libavutil-devel libmp3lame-devel \ +# libopus-devel libossp-uuid++16 libossp-uuid16 libossp-uuid_dce16 \ +# libtwolame-devel libvpx-devel libwebp-devel libwebpdecoder2 libwebpextras0 \ +# uuid-devel liblilv-0-devel suil-devel libmjpegutils-devel \ +# libogg-devel libvorbis-devel libtheora-devel libXdmcp-devel + +( ./autogen.sh + CFLAGS="-DFFMPEG3 -I/usr/include/ffmpeg" ./configure \ + --with-single-user --disable-static-build --without-thirdparty \ + --without-video4linux2 --without-dvb --with-lv2=auto \ + --without-libzmpeg --without-commercial \ + --disable-x264 --disable-x265 --disable-openjpeg + make && make install ) 2>&1 | tee log +mv Makefile Makefile.cfg +cp Makefile.devel Makefile + diff --git a/cinelerra-5.1/blds/rpmsrc.sh b/cinelerra-5.1/blds/rpmsrc.sh new file mode 100755 index 00000000..5a2bd8fa --- /dev/null +++ b/cinelerra-5.1/blds/rpmsrc.sh @@ -0,0 +1,5 @@ +#!/bin/bash -x + +rpmbuild --define "_srcrpmdir `cd ..; pwd`" \ + -bs --build-in-place cinelerra.spec + diff --git a/cinelerra-5.1/bsd.bld b/cinelerra-5.1/bsd.bld deleted file mode 100755 index 3707579c..00000000 --- a/cinelerra-5.1/bsd.bld +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -#use: patch -p2 < bsd.patch -export CONFIG_SHELL=/bin/bash -export MAKE=gmake -export C_INCLUDE_PATH=/usr/local/include -export CPLUS_INCLUDE_PATH=/usr/local/include -export LIBRARY_PATH=/usr/local/lib -alias make=gmake -./autogen.sh -CC=clang CXX=clang++ CFLAGS="-g -O2 -DFFMPEG3" ./configure --with-single-user \ - --disable-static-build --without-lv2 --disable-lame --disable-twolame \ - --with-oss --without-alsa --without-gl --without-firewire --without-dv \ - --without-dvb --without-video4linux2 --without-xxf86vm --without-ladspa-build \ - --without-libzmpeg --without-commercial --without-thirdparty -gmake 2>&1 | tee log diff --git a/cinelerra-5.1/bsd.patch b/cinelerra-5.1/bsd.patch deleted file mode 100644 index f6841bda..00000000 --- a/cinelerra-5.1/bsd.patch +++ /dev/null @@ -1,654 +0,0 @@ -diff --git a/cinelerra-5.1/Makefile.devel b/cinelerra-5.1/Makefile.devel -index a12d8f2b..f892f648 100644 ---- a/cinelerra-5.1/Makefile.devel -+++ b/cinelerra-5.1/Makefile.devel -@@ -4,7 +4,7 @@ TOPDIR := $(CURDIR) - CFLAGS ?= -ggdb - export CFLAGS_ := $(CFLAGS) - --cpus:=$(shell grep -c "^proc" /proc/cpuinfo) -+cpus:=$(shell sysctl -n hw.ncpu) - jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2))) - MAKEJ := $(MAKE) $(jobs) - -diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile -index 18590e3a..a60c71d1 100644 ---- a/cinelerra-5.1/cinelerra/Makefile -+++ b/cinelerra-5.1/cinelerra/Makefile -@@ -395,6 +395,7 @@ LIBS += -lfontconfig -lfreetype - LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil - LIBS += -lswresample -lswscale - LIBS += -lvpx -lwebp -lwebpmux -+LIBS += -lintl -liconv -lexecinfo - - LIBS += $(if $(filter fftw,$(static_pkgs)), -lfftw3) - LIBS += $(if $(filter flac,$(static_pkgs)), -lFLAC) -@@ -476,6 +477,7 @@ LV2OBJS = \ - endif - - CFLAGS := \ -+ -I/usr/local/include \ - -I$(GUICAST) \ - -I$(LIBZMPEG3) \ - $(static_incs) \ -@@ -523,15 +525,15 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI) - $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES) - $(LINKER) `cat $(OBJDIR)/objs` - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G)) -- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) -+ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) - ln -f -s ../bin/$(WANT_CIN) ci - - ifneq ($(WANT_COMMERCIAL),no) - $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES) -- @echo g++ -o $@ $(CUTOBJS) -- @g++ $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) -+ @echo $(CXX) -o $@ $(CUTOBJS) -+ @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo) -- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS)) -+ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS)) - - install-cutads: - cp -av $(OBJDIR)/cutads $(BINDIR)/. -@@ -540,18 +542,18 @@ install: install-cutads - endif - - $(BDWRITE): $(BDWOBJS) $(LIBRARIES) -- @echo g++ -o $@ $(BDWOBJS) -- @g++ $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS) -+ @echo $(CXX) -o $@ $(BDWOBJS) -+ @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo) -- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE)) -+ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE)) - - install-bdwrite: - cp -av $(OBJDIR)/bdwrite $(BINDIR)/. - install: install-bdwrite - - ydiff: ydiff.C $(LIBRARIES) -- @echo g++ -o $@ ydiff.C -- @g++ $(CFLAGS) ydiff.C -o $@ $(LIBS) -+ @echo $(CXX) -o $@ ydiff.C -+ @$(CXX) $(CFLAGS) ydiff.C -o $@ $(LIBS) - - clean: - rm -rf $(OBJDIR) -@@ -585,7 +587,7 @@ $(OBJDIR)/lv2ui: $(LV2OBJS) - @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@ - @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo) -- $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI)) -+ #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI)) - - .PHONY: lv2ui - lv2ui: $(LV2UI) -diff --git a/cinelerra-5.1/cinelerra/bdcreate.C b/cinelerra-5.1/cinelerra/bdcreate.C -index 27f728ad..9215090d 100644 ---- a/cinelerra-5.1/cinelerra/bdcreate.C -+++ b/cinelerra-5.1/cinelerra/bdcreate.C -@@ -25,8 +25,8 @@ - #include - #include - #include --#include --#include -+#include -+#include - - // BD Creation - -diff --git a/cinelerra-5.1/cinelerra/bdwrite.C b/cinelerra-5.1/cinelerra/bdwrite.C -index 6a2b4ca3..78cf9bef 100644 ---- a/cinelerra-5.1/cinelerra/bdwrite.C -+++ b/cinelerra-5.1/cinelerra/bdwrite.C -@@ -38,7 +38,7 @@ - #include - #include - #include --#include -+#include - #include - #include - // work arounds (centos) -diff --git a/cinelerra-5.1/cinelerra/cutads.C b/cinelerra-5.1/cinelerra/cutads.C -index ac58d56a..f6690cf2 100644 ---- a/cinelerra-5.1/cinelerra/cutads.C -+++ b/cinelerra-5.1/cinelerra/cutads.C -@@ -23,14 +23,6 @@ - using namespace std; - #define fail(s) do { printf("fail %s%s:%d\n",__func__,#s,__LINE__); return 1; } while(0) - --/* missing from system headers, no /usr/include -- * IOPRIO_WHO_PROCESS, IOPRIO_CLASS_SHIFT, IOPRIO_CLASS_IDLE */ --enum { IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE, }; --#define IO_CLASS(n) (((int)(n)) << 13) --#define IO_WHO_PROCESS 1 --#include --#include -- - // commercial edge detection: - // must have audio < min_audio - // and within +- check_margin seconds of low audio -@@ -55,11 +47,6 @@ class Video; - class Audio; - class Scan; - --static int ioprio_set(int which, int who, int ioprio) --{ -- return syscall(SYS_ioprio_set, which, who, ioprio); --} -- - static inline int clip(int v, int mn, int mx) - { - return vmx ? mx : v; -@@ -617,7 +604,6 @@ class Scan - const char *asset_path; - static void set_priority(int pr, int io) { - setpriority(PRIO_PROCESS, 0, pr); // lowest cpu priority -- ioprio_set(IO_WHO_PROCESS, 0, IO_CLASS(io)); - } - class low_priority { public: - low_priority() { set_priority(19, IOPRIO_CLASS_IDLE); } -diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C -index 1014baf5..f38094e9 100644 ---- a/cinelerra-5.1/cinelerra/dvdcreate.C -+++ b/cinelerra-5.1/cinelerra/dvdcreate.C -@@ -24,8 +24,8 @@ - #include - #include - #include --#include --#include -+#include -+#include - - - #define DVD_PAL_4x3 0 -diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C -index 03348e0a..552a140d 100644 ---- a/cinelerra-5.1/cinelerra/file.C -+++ b/cinelerra-5.1/cinelerra/file.C -@@ -1584,7 +1584,10 @@ int File::record_fd() - void File::get_exe_path(char *result, char *bnp) - { - // Get executable path, basename -- int len = readlink("/proc/self/exe", result, BCTEXTLEN-1); -+ char exe_path[BCTEXTLEN]; -+ sprintf(exe_path,"/proc/%d/file",getpid()); -+ int len = readlink(exe_path, result, BCTEXTLEN-1); -+ - if( len >= 0 ) { - result[len] = 0; - char *ptr = strrchr(result, '/'); -diff --git a/cinelerra-5.1/cinelerra/indexfile.C b/cinelerra-5.1/cinelerra/indexfile.C -index 3d21d2af..f3064199 100644 ---- a/cinelerra-5.1/cinelerra/indexfile.C -+++ b/cinelerra-5.1/cinelerra/indexfile.C -@@ -70,7 +70,7 @@ - - #include - #include --#include -+#include - - // check for isofs volume_id for dvd/cdrom - -diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac -index 6fba32bb..ccdb683b 100644 ---- a/cinelerra-5.1/configure.ac -+++ b/cinelerra-5.1/configure.ac -@@ -16,15 +16,26 @@ CFG_CFLAGS+=" -Wno-unused-result" - CFG_CFLAGS+=" -Wno-stringop-overflow" - CFG_CFLAGS+=" -Wno-format-truncation" - CFG_CFLAGS+=" -Wno-format-overflow" -+CFG_CFLAGS+=" -Wno-unknown-warning-option" - CFG_CFLAGS+=" -Wno-parentheses" - CFG_CFLAGS+=" -Wno-stringop-truncation" -+CFG_CFLAGS+=" -Wno-gnu-designator" -+CFG_CFLAGS+=" -Wno-missing-braces" -+CFG_CFLAGS+=" -Wno-overloaded-virtual" -+CFG_CFLAGS+=" -Wno-self-assign-field" -+CFG_CFLAGS+=" -Wno-sometimes-uninitialized" -+CFG_CFLAGS+=" -Wno-tautological-pointer-compare" -+CFG_CFLAGS+=" -Wno-unused-function" -+CFG_CFLAGS+=" -Wno-unused-private-field" -+CFG_CFLAGS+=" -Wno-infinite-recursion" - CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS" - CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS" - CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1" - CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" --CFG_CFLAGS+=" -I/usr/include/freetype2" --CFG_CFLAGS+=" -I/usr/include/uuid" --CFG_CFLAGS+=" -I/usr/include/mjpegtools" -+CFG_CFLAGS+=" -I/usr/local/include" -+CFG_CFLAGS+=" -I/usr/local/include/freetype2 -I/usr/include/freetype2" -+CFG_CFLAGS+=" -I/usr/local/include/uuid -I/usr/include/uuid" -+CFG_CFLAGS+=" -I/usr/local/include/mjpegtools -I/usr/include/mjpegtools" - - AC_DEFUN([CHECK_WITH], [ - AC_ARG_WITH([$1], -@@ -126,7 +137,7 @@ AC_SUBST(MAK_INSTALLS) - AC_SUBST(MAK_UNINSTALLS) - - if test "x$WANT_JOBS" = "xauto"; then -- CPUS=`grep -c "^proc" /proc/cpuinfo` -+ CPUS=`sysctl -n hw.ncpu` - WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2` - fi - -diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h -index 8ee88002..9a17091e 100644 ---- a/cinelerra-5.1/db/tdb.h -+++ b/cinelerra-5.1/db/tdb.h -@@ -32,7 +32,7 @@ inline void operator delete[](void *t,size_t n) { free(t); } - #endif - - #define ZMEDIA --#define ZFUTEX -+//#define ZFUTEX - #ifdef ZFUTEX - #include - #include -diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h -index f5994d53..c73169bb 100644 ---- a/cinelerra-5.1/guicast/bclistbox.h -+++ b/cinelerra-5.1/guicast/bclistbox.h -@@ -185,7 +185,9 @@ public: - - // take_focus - used by the suggestion box to keep it from taking focus from the - // textbox -- int activate(int take_focus = 1); -+ int activate() { return activate(1); } -+ int activate(int take_focus); -+ - int activate(int x, int y, int w=-1, int h=-1); - int deactivate(); - int is_active(); -diff --git a/cinelerra-5.1/guicast/bcpan.h b/cinelerra-5.1/guicast/bcpan.h -index 40f5971f..73d47586 100644 ---- a/cinelerra-5.1/guicast/bcpan.h -+++ b/cinelerra-5.1/guicast/bcpan.h -@@ -93,7 +93,8 @@ public: - int &stick_x, - int &stick_y); - static int rdtoxy(int &x, int &y, int a, int virtual_r); -- int activate(int popup_x = -1, int popup_y = -1); -+ int activate(int popup_x, int popup_y); -+ int activate() { return activate(-1,-1); } - int deactivate(); - float* get_values(); - -diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C -index e3400600..b32d0a6f 100644 ---- a/cinelerra-5.1/guicast/bcresources.C -+++ b/cinelerra-5.1/guicast/bcresources.C -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -297,23 +298,12 @@ int BC_Resources::machine_cpus = 1; - - int BC_Resources::get_machine_cpus() - { -- int cpus = 1; -- FILE *proc = fopen("/proc/cpuinfo", "r"); -- if( proc ) { -- char string[BCTEXTLEN], *cp; -- while(!feof(proc) && fgets(string, sizeof(string), proc) ) { -- if( !strncasecmp(string, "processor", 9) && -- (cp = strchr(string, ':')) != 0 ) { -- int n = atol(cp+1) + 1; -- if( n > cpus ) cpus = n; -- } -- else if( !strncasecmp(string, "cpus detected", 13) && -- (cp = strchr(string, ':')) != 0 ) -- cpus = atol(cp+1); -- } -- fclose(proc); -- } -- return cpus; -+ int mib[2], ncpu; -+ size_t len = sizeof(ncpu); -+ mib[0] = CTL_HW; -+ mib[1] = HW_NCPU; -+ if( sysctl(mib, 2, &ncpu, &len, 0, 0) ) ncpu = 1; -+ return ncpu; - } - - void BC_Resources::new_vframes(int n, VFrame *vframes[], ...) -@@ -695,7 +685,7 @@ new_vframes(20,default_medium_7segment, - generic_button_margin = 15; - draw_clock_background=1; - -- use_shm = -1; -+ use_shm = 0; - shm_reply = 1; - - // Initialize -@@ -1681,6 +1671,87 @@ BC_FontEntry *BC_Resources::find_fontentry(const char *displayname, int style, - return style_match; - } - -+ -+class utf8conv { -+ uint8_t *obfr, *out, *oend; -+ uint8_t *ibfr, *inp, *iend; -+public: -+ utf8conv(void *out, int olen, void *inp, int ilen) { -+ this->obfr = this->out = (uint8_t*)out; -+ this->oend = this->out + olen; -+ this->ibfr = this->inp = (uint8_t*)inp; -+ this->iend = this->inp + ilen; -+ } -+ int cur() { return inp>=iend ? -1 : *inp; } -+ int next() { return inp>=iend ? -1 : *inp++; } -+ int next(int ch) { return out>=oend ? -1 : *out++ = ch; } -+ int ilen() { return inp-ibfr; } -+ int olen() { return out-obfr; } -+ int wnext(); -+ int wnext(unsigned int v); -+}; -+ -+int utf8conv:: -+wnext(unsigned int v) -+{ -+ if( v < 0x00000080 ) { next(v); return 1; } -+ int n = v < 0x00000800 ? 2 : v < 0x00010000 ? 3 : -+ v < 0x00200000 ? 4 : v < 0x04000000 ? 5 : 6; -+ int m = (0xff00 >> n), i = n-1; -+ next((v>>(6*i)) | m); -+ while( --i >= 0 ) next(((v>>(6*i)) & 0x3f) | 0x80); -+ return n; -+} -+ -+int utf8conv:: -+wnext() -+{ -+ int v = 0, n = 0, ch = next(); -+ if( ch == '\\' ) { -+ switch( (ch=next()) ) { -+ case 'n': return '\n'; -+ case 't': return '\t'; -+ case 'r': return '\r'; -+ case 'b': return '\b'; -+ case 'f': return '\f'; -+ case 'v': return '\v'; -+ case 'a': return '\a'; -+ case '0': case '1': case '2': case '3': -+ case '4': case '5': case '6': case '7': -+ v = ch - '0'; -+ for( int i=3; --i>0; v=v*8+ch, next() ) -+ if( (ch=cur()-'0') < 0 || ch >= 8 ) break; -+ return v; -+ case 'x': n = 2; break; -+ case 'u': n = 4; break; -+ case 'U': n = 8; break; -+ default: return ch; -+ } -+ for( int i=n; --i>=0; v=v*16+ch, next() ) { -+ if( (ch=cur()-'0')>=0 && ch<10 ) continue; -+ if( (ch-='A'-'0'-10)>=10 && ch<16 ) continue; -+ if( (ch-='a'-'A')<10 || ch>=16 ) break; -+ } -+ } -+ else if( ch >= 0x80 ) { -+ static const unsigned char byts[] = { -+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5, -+ }; -+ int i = ch - 0xc0; -+ n = i<0 ? 0 : byts[i/4]; -+ for( v=ch, i=n; --i>=0; v+=next() ) v <<= 6; -+ static const unsigned int ofs[6] = { -+ 0x00000000U, 0x00003080U, 0x000E2080U, -+ 0x03C82080U, 0xFA082080U, 0x82082080U -+ }; -+ v -= ofs[n]; -+ } -+ else -+ v = ch; -+ return v; -+} -+ -+ - size_t BC_Resources::encode(const char *from_enc, const char *to_enc, - char *input, int input_length, char *output, int output_length) - { -@@ -1688,10 +1759,12 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc, - iconv_t cd; - char *outbase = output; - -- if(!from_enc || *from_enc == 0) -+ if( !from_enc || *from_enc == 0 || -+ !strcmp(from_enc,"UTF8") || !strcmp(from_enc, "US-ASCII") ) - from_enc = "UTF-8"; - -- if(!to_enc || *to_enc == 0) -+ if( !to_enc || *to_enc == 0 || -+ !strcmp(to_enc,"UTF8") || !strcmp(to_enc, "US-ASCII") ) - to_enc = "UTF-8"; - - if(input_length < 0) -@@ -1701,32 +1774,45 @@ size_t BC_Resources::encode(const char *from_enc, const char *to_enc, - - if(strcmp(from_enc, to_enc) && inbytes) - { -- if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1) -+ if( !strcmp(from_enc, "UTF-8") && !strcmp(to_enc,"UTF32LE") ) { -+ utf8conv uc(0,0, input,inbytes); -+ uint32_t *op = (uint32_t *)output; -+ uint32_t *ep = (uint32_t *)(output+output_length); -+ for( int wch; op=0; *op++=wch ); -+ output = (char *)op; -+ outbytes = (char*)ep - output; -+ } -+ else if( !strcmp(from_enc, "UTF32LE") && !strcmp(to_enc,"UTF-8") ) { -+ utf8conv uc(output,output_length, 0,0); -+ uint32_t *ip = (uint32_t *)input; -+ uint32_t *ep = (uint32_t *)(input+inbytes); -+ for( ; ip=0; ++ip ); -+ output += uc.olen(); -+ outbytes = output_length-uc.olen(); -+ } -+ else if((cd = iconv_open(to_enc, from_enc)) == (iconv_t)-1) - { - printf(_("Conversion from %s to %s is not available\n"), - from_enc, to_enc); - return 0; - } -- -- outbytes = output_length - 1; -- -- iconv(cd, &input, &inbytes, &output, &outbytes); -- -- iconv_close(cd); -- inbytes = output - outbase; -+ else { -+ outbytes = output_length - 1; -+ iconv(cd, &input, &inbytes, &output, &outbytes); -+ iconv_close(cd); -+ } - } - else if(inbytes) - { - memcpy(output, input, inbytes); -+ output += inbytes; - outbytes -= inbytes; - } -- for(int i = 0; i < 4; i++) -- { -+ if( outbytes > sizeof(uint32_t) ) -+ outbytes = sizeof(uint32_t); -+ for(int i = 0; i < outbytes; i++) - output[i] = 0; -- if(outbytes-- == 0) -- break; -- } -- return inbytes; -+ return output - outbase; - } - - void BC_Resources::encode_to_utf8(char *buffer, int buflen) -diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C -index ed50cfb1..f1b894ba 100644 ---- a/cinelerra-5.1/guicast/bcsignals.C -+++ b/cinelerra-5.1/guicast/bcsignals.C -@@ -37,9 +37,11 @@ - #include - #include - #include --#include - #include - -+#define dirent64 dirent -+#define readdir64 readdir -+ - BC_Signals* BC_Signals::global_signals = 0; - static int signal_done = 0; - -@@ -279,18 +281,6 @@ static void handle_exit(int signum) - - void BC_Signals::set_sighup_exit(int enable) - { -- if( enable ) { --// causes SIGHUP to be generated when parent dies -- signal(SIGHUP, handle_exit); -- prctl(PR_SET_PDEATHSIG, SIGHUP, 0,0,0); --// prevents ^C from signalling child when attached to gdb -- setpgid(0, 0); -- if( isatty(0) ) ioctl(0, TIOCNOTTY, 0); -- } -- else { -- signal(SIGHUP, signal_entry); -- prctl(PR_SET_PDEATHSIG, 0,0,0,0); -- } - } - - BC_Signals::BC_Signals() -@@ -383,11 +373,13 @@ const char* BC_Signals::sig_to_str(int number) - #include - #include "thread.h" - -+#define SC_(r)sc_##r -+ - #if __i386__ --#define IP eip -+#define IP SC_(eip) - #endif - #if __x86_64__ --#define IP rip -+#define IP SC_(rip) - #endif - #ifndef IP - #error gotta have IP -@@ -473,26 +465,5 @@ static void handle_dump(int n, siginfo_t * info, void *sc) - - fprintf(fp,"\n\n"); - if( fp != stdout ) fclose(fp); -- char cmd[1024], *cp = cmd; -- cp += sprintf(cp, "exec gdb /proc/%d/exe -p %d --batch --quiet " -- "-ex \"thread apply all info registers\" " -- "-ex \"thread apply all bt full\" " -- "-ex \"quit\"", pid, pid); -- if( fp != stdout ) -- cp += sprintf(cp," >> \"%s\"", fn); -- cp += sprintf(cp," 2>&1"); --//printf("handle_dump:: pid=%d, cmd='%s' fn='%s'\n",pid,cmd,fn); -- pid = vfork(); -- if( pid < 0 ) { -- fprintf(stderr,"** can't start gdb, dump abondoned\n"); -- return; -- } -- if( pid > 0 ) { -- waitpid(pid,0,0); -- fprintf(stderr,"** dump complete\n"); -- return; -- } -- char *const argv[4] = { (char*) "/bin/sh", (char*) "-c", cmd, 0 }; -- execvp(argv[0], &argv[0]); - } - -diff --git a/cinelerra-5.1/guicast/filesystem.C b/cinelerra-5.1/guicast/filesystem.C -index ebc2007d..9d6452cb 100644 ---- a/cinelerra-5.1/guicast/filesystem.C -+++ b/cinelerra-5.1/guicast/filesystem.C -@@ -33,6 +33,8 @@ - #include - #include - -+#define dirent64 dirent -+#define readdir64 readdir - - #include "filesystem.h" - -diff --git a/cinelerra-5.1/guicast/thread.C b/cinelerra-5.1/guicast/thread.C -index dff53e61..321ab4fc 100644 ---- a/cinelerra-5.1/guicast/thread.C -+++ b/cinelerra-5.1/guicast/thread.C -@@ -55,13 +55,6 @@ void* Thread::entrypoint(void *parameters) - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - thread->cancel_enabled = false; - --// Set realtime here seince it doesn't work in start -- if( thread->realtime && getuid() == 0 ) { -- struct sched_param param = { sched_priority : 1 }; -- if(pthread_setschedparam(thread->tid, SCHED_RR, ¶m) < 0) -- perror("Thread::entrypoint pthread_attr_setschedpolicy"); -- } -- - thread->run(); - thread->finished = true; - if( !thread->synchronous ) { -diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h -index 216ecd2b..8ebec237 100644 ---- a/cinelerra-5.1/guicast/thread.h -+++ b/cinelerra-5.1/guicast/thread.h -@@ -27,7 +27,7 @@ - #include - #include - --static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); } -+static inline long gettid() { return (long)pthread_self(); } - - // The thread does not autodelete by default. - // If autodelete is 1 the thread autodeletes. -diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile -index 6ed357c7..56081181 100644 ---- a/cinelerra-5.1/plugins/Makefile -+++ b/cinelerra-5.1/plugins/Makefile -@@ -31,7 +31,6 @@ DIRS = $(OPENCV_OBJS) \ - brightness \ - burn \ - C41 \ -- cdripper \ - chromakey \ - chromakeyhsv \ - color3way \ -@@ -161,6 +160,8 @@ DIRS = $(OPENCV_OBJS) \ - # denoisemjpeg \ - # duplicate - # vocoder \ -+# not in bsd -+# cdripper \ - - PLUGIN_DIR = $(BINDIR)/plugins - DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes -diff --git a/cinelerra-5.1/plugins/titler/titler.C b/cinelerra-5.1/plugins/titler/titler.C -index fefbbdb1..045e96d4 100644 ---- a/cinelerra-5.1/plugins/titler/titler.C -+++ b/cinelerra-5.1/plugins/titler/titler.C -@@ -57,8 +57,7 @@ - #include - #include - #include --#include --#include -+#include - #include - #include - #include diff --git a/cinelerra-5.1/cfg-cv.sh b/cinelerra-5.1/cfg-cv.sh deleted file mode 100755 index 153a526b..00000000 --- a/cinelerra-5.1/cfg-cv.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -x -# cd cincv; cfg_cv.sh /path/cin5 -# used git clone "git://git.cinelerra-cv.org/goodguy/cinelerra.git" "cinelerra5" -# ver: git checkout 135eb5f052a2f75e4df6c86511a94ec9586e096d (dec 30, 2016) -cin="$1" -THIRDPARTY=`pwd`/thirdparty -unset LIBS LDFLAGS CFLAGS CPPFLAGS CXXFLAGS -export ac_cv_header_xmmintrin_h=no -for f in ./quicktime/Makefile.am ./libmpeg3/Makefile.am; do - sed -e 's/-Wl,--no-undefined//' -i $f -done -rm -rf thirdparty; cp -a $cin/thirdparty . -for f in configure.ac Makefile.am autogen.sh; do mv $f $f.cv; cp -a $cin/$f .; done -mv m4 m4.cv -rm -rf ./libzmpeg3 ./db -mkdir -p libzmpeg3 db db/utils mpeg2enc mplexlo - -./autogen.sh -./configure --disable-static-build --without-ladspa-build \ - --enable-faac=yes --enable-faad2=yes --enable-a52dec=yes \ - --enable-mjpegtools=yes --enable-lame=yes --enable-x264=yes \ - --enable-libogg=auto --enable-libtheora=auto --enable-libvorbis=auto \ - --enable-openexr=auto --enable-libsndfile=auto --enable-libdv=auto \ - --enable-libjpeg=auto --enable-tiff=auto --enable-x264=auto \ - --disable-audiofile --disable-encore --disable-esound --disable-fdk \ - --disable-ffmpeg --disable-fftw --disable-flac --disable-giflib --disable-ilmbase \ - --disable-libavc1394 --disable-libraw1394 --disable-libiec61883 --disable-libvpx \ - --disable-openjpeg --disable-twolame --disable-x265 - -export CFG_VARS='CFLAGS+=" -fPIC"'; \ -export MAK_VARS='CFLAGS+=" -fPIC"'; \ -export CFG_PARAMS="--with-pic --enable-pic --disable-asm"; \ - -jobs=`make -s -C thirdparty val-WANT_JOBS` -make -C thirdparty -j$jobs - -static_libs=`make -C thirdparty -s val-static_libs` -static_incs=`make -C thirdparty -s val-static_incs` - -./autogen.sh clean -for f in configure.ac Makefile.am autogen.sh; do rm -f $f; mv $f.cv $f; done -mv m4.cv m4 - -LDFLAGS=`for f in $static_libs; do - if [ ! -f "$f" ]; then continue; fi; - ls $f -done | sed -e 's;/[^/]*$;;' | \ -sort -u | while read d; do - echo -n " -L$d"; -done` -export LDFLAGS - -LIBS=`for f in $static_libs; do - if [ ! -f "$f" ]; then continue; fi; - ls $f -done | sed -e 's;.*/;;' -e 's;lib\(.*\)\.a$;\1;' | \ -sort -u | while read a; do - echo -n " -l$a"; -done` -LIBS+=" -lpthread" -export LIBS - -export CFLAGS="$static_incs" -export CXXFLAGS="$static_incs" - -if [ ! -f configure ]; then ./autogen.sh; fi -sed -e 's/^LIBX264_LIBS=""/#LIBX264_LIBS=""/' -i configure - -export MJPEG_LIBS="-L$THIRDPARTY/mjpegtools-2.1.0/utils/.libs -lmjpegutils \ - -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavfile \ - -L$THIRDPARTY/mjpegtools-2.1.0/lavtools/.libs -llavjpeg \ - -L$THIRDPARTY/mjpegtools-2.1.0/mpeg2enc/.libs -lmpeg2encpp \ - -L$THIRDPARTY/mjpegtools-2.1.0/mplex/.libs -lmplex2" -export MJPEG_CFLAGS="-I$THIRDPARTY/mjpegtools-2.1.0/. \ - -I$THIRDPARTY/mjpegtools-2.1.0/lavtools \ - -I$THIRDPARTY/mjpegtools-2.1.0/utils" - -export LIBX264_CFLAGS="-I$THIRDPARTY/x264-snapshot-20160220-2245-stable/." -export LIBX264_LIBS="-L$THIRDPARTY/x264-snapshot-20160220-2245-stable/. -lx264" - -for f in $MJPEG_LIBS $LIBX264_LIBS; do - LIBS=`echo "$LIBS" | sed -e "s;[ ]*\<$f\>[ ]*; ;"` -done - -echo LDFLAGS=$LDFLAGS -echo LIBS=$LIBS -echo CFLAGS=$CFLAGS - -# -lmxxxxx dies, feed it a -lm early to prevent misformed parameters -export LIBS="-la52 -ldjbfft -lfaac -lfaad -lHalf -lIex -lIexMath -lIlmThread -lImath -llavfile -llavjpeg -lm -lmjpegutils -lmmxsse -lmp3lame -lmp4ff -lmpeg2encpp -lmpgdecoder -lmplex2 -logg -lvorbis -lvorbisenc -lvorbisfile -lx264 -lyuvfilters -lpthread -ldl" -# po Makefile construction error: skip it -touch po/Makefile.in.in - -# uuid search path is not predictable, fake it -( cd thirdparty/libuuid-1.0.3/; ln -s . uuid ) -# old linker scripts want .libs/.libs path, fake it: -find thirdparty/ -name .libs | while read f ; do ( cd $f; ln -s . .libs ); done - -./configure - -echo "Run:" -echo "export ac_cv_header_xmmintrin_h=no" -echo "export THIRDPARTY=\"$THIRDPARTY\"" -exit - -# have to rebuild these by hand -# have to get rid of -Wl,--no-undefined" -# cd plugins/libeffecttv/.libs/; \rm -f libeffecttv.a; ar r libeffecttv.a effecttv.o -# cd quicktime/encore50/.libs/; \rm -f libencore.a; ar r libencore.a *.o -# cd quicktime; vi Makefile; remove -Wl,--no-undefined from:, make -# libquicktimecv_la_LDFLAGS = -version-info 1:0:0 -release 1.6.0 - -# shares do not want thirdparty link data: -( cd libmpeg3 - make clean - make LIBS= \ - LDFLAGS="-L$THIRDPARTY/a52dec-0.7.4/liba52/.libs \ - -L$THIRDPARTY/djbfft-0.76 -ldjbfft" ) -( cd guicast - make clean - make LIBS= LDFLAGS= ) -( cd plugins - for f in */Makefile; do - cp $f $f.sav1; sed -e "/^LIBS\>/d" -e "/^LDFLAGS\>/d" -i $f - done - make clean - make ) - -#make -j$jobs >& log -#make install DESTDIR=`pwd` >> log 2>&1 -#export LD_LIBRARY_PATH=`pwd`/usr/local/lib -#cd cinelerra -#gdb ./.libs/cinelerra - diff --git a/cinelerra-5.1/cin.SlackBuild b/cinelerra-5.1/cin.SlackBuild deleted file mode 100644 index 76599411..00000000 --- a/cinelerra-5.1/cin.SlackBuild +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash -x - -# Slackware build script for cin 5.1 - -# Copyright 2017 by WP Morrow (aka goodguy) -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=cin -VERSION="$( date +%Y%m%d )" -BUILD=${BUILD:-1} -TAG=${TAG:-_cin} -GITURL="git://git.cinelerra-cv.org/goodguy/cinelerra.git" -SLKBLD=`realpath "$0"` - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i486 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i486" ]; then - export CFG_VARS='ac_cv_header_xmmintrin_h=no' - SLKCFLAGS="-march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -git clone --depth 1 $GITURL $PRGNAM-$VERSION -#rsh host tar -C /mnt0 -cf - cinelerra5 | tar -xf - -#mv cinelerra5 $PRGNAM-$VERSION -cd $PRGNAM-$VERSION/cinelerra-5.1 -chown -R root:root . - -# disable vdpau or ffmpeg won't build on Slackware 14.2 -export FFMPEG_EXTRA_CFG=" --disable-vdpau" - -# configure the build -./autogen.sh - -# Use ccache for faster rebuilding -# TODO: Let ffmpeg compile with ccache -export CC="ccache gcc" - -./configure \ - --prefix=/usr \ - --with-exec-name=$PRGNAM \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG -type f | while read f ; do - if ! ( file "$f" | grep ELF | grep -q -e "executable" -e "shared object" ); then - continue - fi - echo == "$f" - strip --strip-unneeded "$f" -done 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cat $SLKBLD > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat > $PKG/install/slack-desc <<<" - |-----handy-ruler------------------------------------------------------| -$PRGNAM: $PRGNAM (GNU/Linux Video/Audio Studio) -$PRGNAM: 5.x variant of Cinelerra by WP Morrow (aka goodguy) -$PRGNAM: -$PRGNAM: Cinelerra is the most advanced non-linear video editor -$PRGNAM: and compositor for Linux. It does primarily three main -$PRGNAM: things: capturing, compositing, and editing audio and -$PRGNAM: video with sample level accuracy. -$PRGNAM: -$PRGNAM: Homepage: http://cinelerra-cv.org/" -cat > $PKG/install/doinst.sh <<<" -if [ -x /usr/bin/update-desktop-database ]; then - /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 -fi" - -# desktop icon data path -sed -e "s;^Icon=.*;Icon=/usr/share/pixmaps/$PRGNAM.xpm;" \ - < image/cin.desktop > $PKG/usr/share/applications/$PRGNAM.desktop - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} diff --git a/cinelerra-5.1/cinelerra.spec b/cinelerra-5.1/cinelerra.spec deleted file mode 100644 index 50bf6db7..00000000 --- a/cinelerra-5.1/cinelerra.spec +++ /dev/null @@ -1,92 +0,0 @@ -%define ver 20180630 -%define cin cinelerra -Summary: Multimedia Editing and construction - -%if 0%{?hidepth} -%define xbit 10bit -%define xcfg --enable-x265_hidepth --with-exec-name=cinx -%endif - -Name: %{cin}%{?xbit} -Version: 5.1 -Release: %{ver} -License: GPL -Group: Applications/Multimedia -URL: http://cinelerra-cv.org/ - -# Obtained from : -# git clone git://git.cinelerra.org/goodguy/cinelerra.git cinelerra5 -Source0: %{cin}-%{version}-%{ver}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%if 0%{?fedora}%{?centos} -%define rhat 1 -%endif - -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: cmake -BuildRequires: binutils -BuildRequires: ctags -BuildRequires: flac-devel -BuildRequires: freetype-devel -BuildRequires: gcc-c++ -BuildRequires: gettext-devel -BuildRequires: git -BuildRequires: inkscape -BuildRequires: libpng-devel -BuildRequires: libXft-devel -BuildRequires: libXinerama-devel -BuildRequires: libXv-devel -BuildRequires: nasm -BuildRequires: ncurses-devel -BuildRequires: texinfo -BuildRequires: udftools -BuildRequires: gtk2-devel -%{?rhat:BuildRequires: alsa-lib-devel} -%{?rhat:BuildRequires: bzip2-devel} -%{?rhat:BuildRequires: xorg-x11-fonts-cyrillic} -%{?rhat:BuildRequires: xorg-x11-fonts-cyrillic} -%{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-100dpi} -%{?rhat:BuildRequires: xorg-x11-fonts-ISO8859-1-75dpi} -%{?rhat:BuildRequires: xorg-x11-fonts-misc} -%{?rhat:BuildRequires: xorg-x11-fonts-Type1} -%{?suse:BuildRequires: alsa-devel} -%{?suse:BuildRequires: libbz2-devel} -%{?suse:BuildRequires: bitstream-vera-fonts} -%{?suse:BuildRequires: xorg-x11-fonts-core} -%{?suse:BuildRequires: xorg-x11-fonts} -%{?suse:BuildRequires: dejavu-fonts} -%{?suse:BuildRequires: libnuma-devel} -BuildRequires: xz-devel -BuildRequires: yasm -BuildRequires: zlib-devel - -%description -Multimedia editing and construction - -%prep -%define _buildsubdir %{cin}-%{version} -%setup -q -n %{cin}-%{version} -%build -./autogen.sh -%configure %{?xcfg} -%{__make} - -%install -%make_install - -%clean -%{__rm} -rf %{buildroot} - -%files -%defattr(-, root, root, -) -%{_bindir}/* -%{_libdir}/* -%{_datadir}/* - -%exclude /usr/src/debug -%exclude /usr/lib/debug - -%changelog - diff --git a/cinelerra-5.1/cinelerra/videodevice.C b/cinelerra-5.1/cinelerra/videodevice.C index 0a9c7799..78214ada 100644 --- a/cinelerra-5.1/cinelerra/videodevice.C +++ b/cinelerra-5.1/cinelerra/videodevice.C @@ -351,7 +351,7 @@ void VideoDevice::fix_asset(Asset *asset, int driver) // Fix asset using legacy routine const char *vcodec = 0; switch(driver) { -#ifdef HAVE_DVB +#ifdef HAVE_DV case CAPTURE_IEC61883: case CAPTURE_FIREWIRE: vcodec = CODEC_TAG_DVSD; diff --git a/cinelerra-5.1/deb.bld b/cinelerra-5.1/deb.bld deleted file mode 100755 index b5103339..00000000 --- a/cinelerra-5.1/deb.bld +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -#apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev \ -# libavresample-dev libavutil-dev uuid-dev libdv4-dev libmjpegtools-dev \ -# liblilv-dev libsuil-dev libavc1394-dev libraw1394-dev libmp3lame-dev \ -# libopenjp2-7-dev libtwolame-dev libvpx-dev libwebp-dev libwebpmux3 \ -# libx264-dev libx265-dev libopus-dev - -( ./autogen.sh - CFLAGS=-DFFMPEG3 ./configure --with-single-user \ - --disable-static-build --without-thirdparty \ - --without-video4linux2 --without-dvb --with-lv2=auto \ - --without-libzmpeg --without-commercial - make && make install ) 2>&1 | tee log -mv Makefile Makefile.cfg -cp Makefile.devel Makefile - diff --git a/cinelerra-5.1/debian/changelog b/cinelerra-5.1/debian/changelog deleted file mode 100644 index 173d6ac3..00000000 --- a/cinelerra-5.1/debian/changelog +++ /dev/null @@ -1,12 +0,0 @@ -cin (1:5.1.20180630) unstable; urgency=low - - [ guy goode ] - - -- lists Mon, 6 Jun 2016 18:39:04 +0700 - -cin (1:5.1.20160606) unstable; urgency=low - - [ guy goode ] - - -- lists Mon, 6 Jun 2016 18:39:04 +0700 - diff --git a/cinelerra-5.1/debian/cin.postinst b/cinelerra-5.1/debian/cin.postinst deleted file mode 100644 index 621b186f..00000000 --- a/cinelerra-5.1/debian/cin.postinst +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e -exec > /dev/null 2>&1 -if [ ! /proc/self/root -ef /proc/1/root ]; then exit; fi -sysctl -p /etc/sysctl.d/50-cin.conf diff --git a/cinelerra-5.1/debian/compat b/cinelerra-5.1/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/cinelerra-5.1/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/cinelerra-5.1/debian/control b/cinelerra-5.1/debian/control deleted file mode 100644 index 9823f262..00000000 --- a/cinelerra-5.1/debian/control +++ /dev/null @@ -1,21 +0,0 @@ -Source: cin -Section: video -Priority: optional -Standards-Version: 5.1.20180630 -Maintainer: mailing list -Homepage: http://www.cinelerra-cv.org/ -Build-Depends: nasm, yasm, g++, gdb, build-essential, e2fsprogs, - libz-dev, liblzma-dev, libbz2-dev, exuberant-ctags, - libxft-dev, libxinerama-dev, libxv-dev, linux-firmware, - freeglut3-dev, libxv-dev, libasound2-dev, - libncurses5-dev, libxinerama-dev, libfreetype6-dev, libxft-dev, - ttf-bitstream-vera, xfonts-75dpi, xfonts-100dpi, fonts-dejavu, - libflac-dev, inkscape, texinfo, libpng-dev, - cmake, udftools, libxml2-utils, git, gettext, - autoconf, automake - -Package: cin -Depends: ${misc:Depends} -Description: Multimedia editing and construction -Architecture: any - diff --git a/cinelerra-5.1/debian/copyright b/cinelerra-5.1/debian/copyright deleted file mode 100644 index 4396b192..00000000 --- a/cinelerra-5.1/debian/copyright +++ /dev/null @@ -1,31 +0,0 @@ -originally written by Heroine Virtual Ltd. -http://heroinewarrior.com/ - -This package is using sources obtained from: -http://cinelerra-cv.org. -git://git.cinelerra-cv.org/goodguy/cinelerra.git - -Copyright (c) 1996-2015 Heroine Virtual Ltd. -Copyright (c) 2006-2016 Cinelerra-CV community - -Cinelerra is released under GNU Public License v.2. - - All Rights Reserved - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/cinelerra-5.1/debian/rules b/cinelerra-5.1/debian/rules deleted file mode 100755 index c95b0a03..00000000 --- a/cinelerra-5.1/debian/rules +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/make -f -# from topdir ./debian/rules binary -package=cin - -# Enable hardening flags -CFLAGS += $(shell dpkg-buildflags --get CFLAGS) -CXXFLAGS += $(shell dpkg-buildflags --get CXXFLAGS) -LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS) - -build build-arch build-indep: build-stamp - -build-stamp: - dh_testdir - @if [ ! -e configure ] ; then ./autogen.sh; fi - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \ - ./configure --enable-opengl --prefix=/usr $(CONFFLAGS) - $(MAKE) $(MAKEFLAGS) - touch $@ - -clean: - dh_testdir - dh_testroot - [ ! -f Makefile ] || $(MAKE) clean - dh_clean -a - -rm -f build-stamp - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - $(MAKE) install DESTDIR=$(CURDIR)/debian/cin - install -D -m644 debian/sysctl.d debian/cin/etc/sysctl.d/50-cin.conf - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_install - dh_link -a - dh_icons -a - dh_fixperms -a - dh_installdeb -a - dh_gencontrol - dh_builddeb -p cin - -binary: binary-indep binary-arch - diff --git a/cinelerra-5.1/debian/sysctl.d b/cinelerra-5.1/debian/sysctl.d deleted file mode 100644 index a9a2d42f..00000000 --- a/cinelerra-5.1/debian/sysctl.d +++ /dev/null @@ -1,2 +0,0 @@ -kernel.shmmax = 0x7fffffff -kernel.shmmni = 0x4000 diff --git a/cinelerra-5.1/rpm.bld b/cinelerra-5.1/rpm.bld deleted file mode 100755 index 59e1476f..00000000 --- a/cinelerra-5.1/rpm.bld +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -#zypper install ffmpeg \ -# libavc1394-devel libavcodec-devel libavdevice-devel libavfilter-devel \ -# libavformat-devel libavresample-devel libavutil-devel libmp3lame-devel \ -# libopus-devel libossp-uuid++16 libossp-uuid16 libossp-uuid_dce16 \ -# libtwolame-devel libvpx-devel libwebp-devel libwebpdecoder2 libwebpextras0 \ -# uuid-devel liblilv-0-devel suil-devel libmjpegutils-devel \ -# libogg-devel libvorbis-devel libtheora-devel libXdmcp-devel - -( ./autogen.sh - CFLAGS="-DFFMPEG3 -I/usr/include/ffmpeg" ./configure \ - --with-single-user --disable-static-build --without-thirdparty \ - --without-video4linux2 --without-dvb --with-lv2=auto \ - --without-libzmpeg --without-commercial \ - --disable-x264 --disable-x265 --disable-openjpeg - make && make install ) 2>&1 | tee log -mv Makefile Makefile.cfg -cp Makefile.devel Makefile -