This patch adds in somewhat hackish way support for
building nasm as part of thirdparty/ tree, combined with earlier openjpeg-2.4.0
patch.

It worked without autgen.sh on my machine, but if you use github [0]
tarballs ./autogen.sh step is needed.

Also, dav1d-0.5.1 patch hardcoded nasm path to /usr/bin/nasm

I un-hardcoded it, so it actually can be build with newly-compiled nasm ...

seems to work on Ubuntu 16.04.7 amd64 ? At least simple ./configure
doesn't fail in dav1d dir ....

[0]
https://github.com/netwide-assembler/nasm/archive/nasm-2.14.02.tar.gz

also you can get xz traball from
https://sources.voidlinux-ppc.org/nasm-2.14.02/

{one can wonder why one need x86 asm on PPC, but may be for cross-compiling}
diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index d529a80..b2e096d 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -281,7 +281,7 @@ PKG_3RD([opus],[auto],
   [ include ])
 
 PKG_3RD([openjpeg],[auto],
-  [openjpeg-2.3.1],
+  [openjpeg-2.4.0],
   [ bin/libopenjp2.a ],
   [ src/lib/openjp2 ])
 
@@ -328,6 +328,9 @@ PKG_3RD([mjpegtools],[yes],
     mpeg2enc/.libs/libmpeg2encpp.a ],
   [ .  lavtools utils ])
 
+
+
+
 PKG_3RD([openexr],[auto],
   [openexr-2.4.1],
   [ usr/local/lib/libHalf.a \
@@ -459,20 +462,26 @@ I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
 X86=[`expr "x$ARCH" : 'x..._64*'`]
 
 if test "x$I86$X86" != "x00" ; then
+
   # Checks for ix86 programs.
-  REQUIRE_PROG(NASM, [nasm])
+#  REQUIRE_PROG(NASM, [nasm])
   # libx264 nasm fix
-  AC_MSG_CHECKING([nasm x264 compatible])
-  echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
-  nasm conftest.asm -o conftest.o > /dev/null 2>&1
-  if test $? != 0 ; then
-   AC_MSG_RESULT([no])
-   AC_MSG_WARN([libx264 built without assembly code])
-   X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
-  else
-   AC_MSG_RESULT([yes])
-  fi
-  rm -f conftest.asm conftest.o
+#  AC_MSG_CHECKING([nasm x264 compatible])
+#  echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
+#  nasm conftest.asm -o conftest.o > /dev/null 2>&1
+#  if test $? != 0 ; then
+#   AC_MSG_RESULT([no])
+#   AC_MSG_WARN([libx264 built without assembly code])
+#   X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
+#  else
+#   AC_MSG_RESULT([yes])
+#  fi
+#  rm -f conftest.asm conftest.o
+PKG_3RD([nasm],[yes],
+ [nasm-2.14.02],
+ [ ],
+ [ . ])
+
   REQUIRE_PROG(YASM, [yasm])
 fi
 
@@ -911,6 +920,9 @@ PKG_PROVIDE([mjpegtools])
 PKG_PROVIDE([libaom])
 PKG_PROVIDE([dav1d])
 PKG_PROVIDE([libwebp])
+if test "x$I86$X86" != "x00" ; then
+PKG_PROVIDE([nasm])
+fi
 PKG_PROVIDE([openExr], [$WANT_OPENEXR])
 PKG_PROVIDE([openexr], [$WANT_OPENEXR])
 PKG_PROVIDE([openjpeg])
@@ -1219,6 +1231,7 @@ echo ""
 echo "export thirdparty_libraries libraries"
 echo "export CFLAGS_ CXXFLAGS_ LDFLAGS_"
 echo "unexport CFLAGS CXXFLAGS LDFLAGS"
+echo "export PATH=`realpath $(echo $PWD)`/thirdparty/nasm-2.14.02:$PATH"
 
 if test "x$HAVE_tiff" = "xyes"; then
   if test "x$HAVE_jbig" != "xyes"; then
diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 27f13c6..6d0fa81 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -235,6 +235,8 @@ libtheora.ldflags?="$(call ld_path,libvorbis,lib/.libs) $(call ld_path,libogg,sr
 libtheora.cfg_params?= --disable-examples --disable-spec --enable-shared=no
 libuuid.cfg_params?=--enable-shared=no
 libvorbis.cfg_params?= --disable-oggtest --enable-shared=no
+nasm.cfg_vars?= ./autogen.sh;
+nasm.cfg_params?= --disable-doc
 openjpeg.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF
 openjpeg.cfg_vars?=$(call cmake_config,.)
 openjpeg.mak_params?= ; cd $(call bld_path,openjpeg,src/lib/openjp2); ln -sf . openjpeg-2.1
@@ -316,6 +318,7 @@ else
 rules=$(eval $(1))
 endif
 
+$(call rules,$(call std-build,nasm))
 $(call rules,$(call std-build,a52dec,djbfft))
 $(call rules,$(call std-build,djbfft))
 $(call rules,$(call std-build,audiofile))
@@ -329,9 +332,9 @@ $(call rules,$(call std-build,flac,libogg))
 $(call rules,$(call std-build,giflib))
 $(call rules,$(call std-build,ilmBase, openexr))
 $(call rules,$(call std-build,ladspa))
-$(call rules,$(call std-build,lame))
+$(call rules,$(call std-build,lame,nasm))
 $(call rules,$(call std-build,libaom))
-$(call rules,$(call std-build,dav1d))
+$(call rules,$(call std-build,dav1d,nasm))
 $(call rules,$(call std-build,libwebp))
 $(call rules,$(call std-build,libavc1394,libraw1394))
 $(call rules,$(call std-build,libdv))
@@ -352,8 +355,8 @@ $(call rules,$(call std-build,opus))
 $(call rules,$(call std-build,speech_tools))
 $(call rules,$(call std-build,tiff, libwebp))
 $(call rules,$(call std-build,twolame))
-$(call rules,$(call std-build,x264))
-$(call rules,$(call std-build,x265))
+$(call rules,$(call std-build,x264,nasm))
+$(call rules,$(call std-build,x265,nasm))
 $(call rules,$(call std-build,libvpx))
 $(call rules,$(call std-build,lv2))
 $(call rules,$(call std-build,serd))
diff --git a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1 b/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1
index d4f2b83..d49c88d 100644
--- a/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1
+++ b/cinelerra-5.1/thirdparty/src/dav1d-0.5.1.patch1
@@ -93,7 +93,7 @@ diff -urN a/Makefile b/Makefile
 +	-pthread \
 +
 +CC_CC=$(Q)cc $(CC_OPTS) $(CFLAGS)
-+NASM=$(Q)/usr/bin/nasm
++NASM=$(Q)nasm
 +any=$(foreach i,$(2),$(1)/$(i))
 +
 +# nasm
-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to