I think something like this patch can be applied to automated builds, where you
generally don't look into directories for debug, just want you binary package 
fast.

I was trying to build CinelerraGG from source in just ~700 Mb compressed btrfs 
image on
Live DVD from Linux Mint 18, 32-bit (from ~early 2016). With total 2Gb of memory
for my virtual machine. It worked after I disabled ffmpeg's debug symbols, 
programs,
and few other things in Cinelerra itself.

Feel free to adapt to your needs.

after applying this and opencv trim patch full 32-bit build eats around
2913M
instead of 3650M or so. (uncompressed)

PS: what exactly this file in thirdparty/src does, I can't find reference to it?
-rw-r--r--  32600440  cimg-source.txz 

?

---

diff --git a/cinelerra-5.1/thirdparty/Makefile 
b/cinelerra-5.1/thirdparty/Makefile
index e343f39a..c4c6c4ad 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -131,6 +131,7 @@ esound.ldflags=" -lm -lstdc++"
 fftw.cfg_params= --disable-fortran --enable-shared=no
 ffmpeg.cfg_params= \
        --enable-pthreads --enable-gpl --disable-ffplay \
+       --disable-debug --disable-programs --disable-doc \
        $(call if_want,VAAPI,--enable-vaapi,--disable-vaapi) \
        $(call if_want,VDPAU,--enable-vdpau,--disable-vdpau) \
        $(call if_want,NV, --enable-nvenc --enable-nvdec --enable-ffnvcodec) \
@@ -199,7 +200,7 @@ lame.cfg_vars?= CFLAGS+=" -O"
 lame.cfg_params?=--enable-shared=no
 lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame
 libaom.cfg_vars?=$(call cmake_config,aom-master)
-libaom.cfg_params?= -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
+libaom.cfg_params?= -DENABLE_SHARED=no -DENABLE_TESTS=OFF 
-DENABLE_EXAMPLES=OFF -DENABLE_TOOLS=OFF -DCMAKE_INSTALL_LIBDIR=lib \
  -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local
 libaom.mak_params?= ; $(MAKE) -C libaom* install
 dav1d.cfg_vars?=echo "echo dav1d custom make" >> configure; chmod +x 
./configure;
@@ -242,6 +243,7 @@ opencv.cfg_vars?=$(call cmake_config,.)
 opencv.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF
 openexr.cfg_vars?=true; \#
 openexr.mak_vars?=true; \#
+opus.cfg_params?= --disable-doc  --disable-extra-programs 
 speech_tools.mak_params?=-j1
 tiff.cfg_vars+=LIBS+=" -lpthread"
 tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
@@ -251,7 +253,8 @@ twolame.cfg_params?=--enable-shared=no
 x264.cfg_params?= --enable-static --enable-pic
 x265.cfg_vars?=$(call cmake_config,source)
 x265.cfg_params?= -DENABLE_SHARED=no
-libvpx.cfg_params?= --enable-pic
+libvpx.cfg_params?= --enable-pic --disable-unit-tests --disable-examples 
--disable-tools
+
 
 DS:=$$$$$$$$
 pkg_cfg=$(call bld_path,$(1),usr/local/lib/pkgconfig):
diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index e343f39a..c4c6c4ad 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -131,6 +131,7 @@ esound.ldflags=" -lm -lstdc++"
 fftw.cfg_params= --disable-fortran --enable-shared=no
 ffmpeg.cfg_params= \
 	--enable-pthreads --enable-gpl --disable-ffplay \
+	--disable-debug --disable-programs --disable-doc \
 	$(call if_want,VAAPI,--enable-vaapi,--disable-vaapi) \
 	$(call if_want,VDPAU,--enable-vdpau,--disable-vdpau) \
 	$(call if_want,NV, --enable-nvenc --enable-nvdec --enable-ffnvcodec) \
@@ -199,7 +200,7 @@ lame.cfg_vars?= CFLAGS+=" -O"
 lame.cfg_params?=--enable-shared=no
 lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame
 libaom.cfg_vars?=$(call cmake_config,aom-master)
-libaom.cfg_params?= -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
+libaom.cfg_params?= -DENABLE_SHARED=no -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_TOOLS=OFF -DCMAKE_INSTALL_LIBDIR=lib \
  -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local
 libaom.mak_params?= ; $(MAKE) -C libaom* install
 dav1d.cfg_vars?=echo "echo dav1d custom make" >> configure; chmod +x ./configure;
@@ -242,6 +243,7 @@ opencv.cfg_vars?=$(call cmake_config,.)
 opencv.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF
 openexr.cfg_vars?=true; \#
 openexr.mak_vars?=true; \#
+opus.cfg_params?= --disable-doc  --disable-extra-programs 
 speech_tools.mak_params?=-j1
 tiff.cfg_vars+=LIBS+=" -lpthread"
 tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
@@ -251,7 +253,8 @@ twolame.cfg_params?=--enable-shared=no
 x264.cfg_params?= --enable-static --enable-pic
 x265.cfg_vars?=$(call cmake_config,source)
 x265.cfg_params?= -DENABLE_SHARED=no
-libvpx.cfg_params?= --enable-pic
+libvpx.cfg_params?= --enable-pic --disable-unit-tests --disable-examples --disable-tools
+
 
 DS:=$$$$$$$$
 pkg_cfg=$(call bld_path,$(1),usr/local/lib/pkgconfig):
diff --git a/cinelerra-5.1/opencv_build b/cinelerra-5.1/opencv_build
index 736e1d90..7be18228 100644
--- a/cinelerra-5.1/opencv_build
+++ b/cinelerra-5.1/opencv_build
@@ -49,6 +49,7 @@ jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2)))
 #opencv4 breaks SIFT/SURF findobj
 CFLAGS += -I$(opencv_prefix)/include/opencv4
 CFLAGS += -I$(opencv_prefix)/include
+CFLAGS += -std=c++11
 
 ifeq ($(src),git)
 $(opencv).src:
@@ -83,6 +84,9 @@ $(opencv)/build: $(opencv).src
   -DINSTALL_C_EXAMPLES=OFF \
   -DINSTALL_PYTHON_EXAMPLES=OFF \
   -DBUILD_EXAMPLES=OFF .. \
+  -DBUILD_PERF_TESTS=OFF \
+  -DBUILD_TESTS=OFF \
+  -DBUILD_opencv_apps=OFF \
   -DBUILD_opencv_python3=no \
   -DCMAKE_INSTALL_PREFIX=/usr/local \
   -DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/"
@@ -106,10 +110,13 @@ $(opencv)/build: $(opencv).src
   -DINSTALL_PYTHON_EXAMPLES=ON \
   -DBUILD_EXAMPLES=ON .. \
   -DBUILD_opencv_python3=no \
+  -DBUILD_PERF_TESTS=OFF \
+  -DBUILD_TESTS=OFF \
+  -DBUILD_opencv_apps=OFF \
   -DCMAKE_INSTALL_PREFIX=/usr/local \
   -DOPENCV_EXTRA_MODULES_PATH="$(opencv)_contrib/modules/"
 
-SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64))
+SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64))
 CVLIBS := $(dir $(shell find $(opencv_prefix) -name libopencv_core.so))
 LFLAGS += -L$(CVLIBS) $(patsubst $(CVLIBS)/lib%.so,-l%,$(wildcard $(CVLIBS)/libopencv_*.so))
 LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so))
@@ -118,7 +125,7 @@ static_incs :=
 else ifeq ($(bld),sys)
 $(opencv)/build:
 
-SYSLIB := $(lastword $(wildcard /usr/lib /usrlib32 /usr/lib64))
+SYSLIB := $(lastword $(wildcard /usr/lib /usr/lib32 /usr/lib64))
 LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/libopencv_*.so))
 LFLAGS += $(patsubst $(SYSLIB)/lib%.so,-l%,$(wildcard $(SYSLIB)/lib{Half,Imath,Ilm,Iex}*.so))
 static_libs :=
-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to