Package init

This commit is contained in:
dogsheng 2019-11-19 11:49:12 +08:00
commit 85e665ecc7
6 changed files with 1897 additions and 0 deletions

View File

@ -0,0 +1,138 @@
Make sure that the asm files don't incorrectly trigger an executable
stack marking in the final shared library. That's bad, mmmkay.
Upstream has already fixed this in their cvs.
--- libdv-0.104-old/libdv/dct_block_mmx.S
+++ libdv-0.104/libdv/dct_block_mmx.S
@@ -1217,3 +1217,7 @@ _dv_dct_block_mmx_postscale_248:
popl %esi
popl %ebp
ret
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/dct_block_mmx_x86_64.S
+++ libdv-0.104/libdv/dct_block_mmx_x86_64.S
@@ -1207,3 +1207,7 @@ _dv_dct_block_mmx_x86_64_postscale_248:
pop %r12
ret
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/encode_x86.S
+++ libdv-0.104/libdv/encode_x86.S
@@ -611,3 +611,6 @@ _dv_need_dct_248_mmx_rows:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/encode_x86_64.S
+++ libdv-0.104/libdv/encode_x86_64.S
@@ -612,3 +612,6 @@ _dv_need_dct_248_mmx_x86_64_rows:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/idct_block_mmx.S
+++ libdv-0.104/libdv/idct_block_mmx.S
@@ -649,3 +649,6 @@ x0:
.long 0,0
.align 8
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/idct_block_mmx_x86_64.S
+++ libdv-0.104/libdv/idct_block_mmx_x86_64.S
@@ -654,3 +654,6 @@ x0:
.long 0,0
.align 8
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/quant_x86.S
+++ libdv-0.104/libdv/quant_x86.S
@@ -458,3 +458,6 @@ _dv_quant_x86:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/quant_x86_64.S
+++ libdv-0.104/libdv/quant_x86_64.S
@@ -463,3 +463,6 @@ _dv_quant_x86_64:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/rgbtoyuv.S
+++ libdv-0.104/libdv/rgbtoyuv.S
@@ -1451,3 +1451,6 @@ video_copy_ntsc_c_block_mmx_loop:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/rgbtoyuv_x86_64.S
+++ libdv-0.104/libdv/rgbtoyuv_x86_64.S
@@ -1391,3 +1391,6 @@ video_copy_ntsc_c_block_mmx_loop:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/transpose_x86.S
+++ libdv-0.104/libdv/transpose_x86.S
@@ -190,3 +190,7 @@ popl %esi
popl %ebp
ret $0
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/transpose_x86_64.S
+++ libdv-0.104/libdv/transpose_x86_64.S
@@ -190,3 +190,7 @@ all_done_ready_to_exit:
pop %r12
ret $0
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/vlc_x86.S
+++ libdv-0.104/libdv/vlc_x86.S
@@ -587,3 +587,7 @@ mod_12:
.align 16
const_f_0_0_0:
.short 0xffff,0,0,0
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
--- libdv-0.104-old/libdv/vlc_x86_64.S
+++ libdv-0.104/libdv/vlc_x86_64.S
@@ -673,3 +673,7 @@ mod_12:
.align 16
const_f_0_0_0:
.short 0xffff,0,0,0
+
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif

View File

@ -0,0 +1,22 @@
We now need to explicitly link to libraries that we use because we can no
longer depend on our dependencies to pull them in for us. See
http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
--- libdv-1.0.0/playdv/#Makefile.am~ 2010-02-15 14:49:06.000000000 -0500
+++ libdv-1.0.0/playdv/Makefile.am 2010-02-15 14:49:06.000000000 -0500
@@ -15,4 +15,4 @@ bin_PROGRAMS= playdv
noinst_HEADERS= display.h oss.h
playdv_SOURCES= playdv.c display.c display.h oss.c
-playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB)
+playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -lX11 -lXext
--- libdv-1.0.0/Makefile.orig.am 2006-08-06 22:10:42.000000000 +0200
+++ libdv-1.0.0/Makefile.am 2016-08-01 12:31:11.622234099 +0200
@@ -5,6 +5,7 @@
endif
SUBDIRS = libdv encodedv $(gtk_subdirs)
+ACLOCAL_AMFLAGS = -I m4
AUX_DIST = $(ac_aux_dir)/config.guess \
$(ac_aux_dir)/config.sub \

28
libdv-1.0.0-gtk2.patch Normal file
View File

@ -0,0 +1,28 @@
--- libdv-1.0.0/configure.ac.orig 2007-01-19 15:48:43.000000000 -0500
+++ libdv-1.0.0/configure.ac 2007-01-19 15:50:08.000000000 -0500
@@ -1,12 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(libdv/parse.c)
+AC_INIT(libdv, 1.0.0)
+AC_CONFIG_SRCDIR(libdv/parse.c)
+AC_CONFIG_MACRO_DIRS([m4])
dnl AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
RPM_RELEASE=1
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(libdv, 1.0.0)
+AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_LIBTOOL_PICMODE(no)
@@ -164,7 +164,7 @@
dnl Checks for libraries.
have_gtk="false"
if $use_gtk; then
- REQUIRES='glib >= 1.2.4 gtk+ >= 1.2.4'
+ REQUIRES='glib-2.0 >= 2.1.0 gtk+-x11-2.0 >= 2.1.0'
PKG_CHECK_MODULES(GTK,$REQUIRES,have_gtk="true",have_gtk="false")
AC_DEFINE(HAVE_GTK)
fi

1634
libdv-1.0.0-pic.patch Normal file

File diff suppressed because it is too large Load Diff

BIN
libdv-1.0.0.tar.gz Normal file

Binary file not shown.

75
libdv.spec Normal file
View File

@ -0,0 +1,75 @@
Name: libdv
Version: 1.0.0
Release: 29
Summary: The Quasar DV Codec
License: LGPLv2+
URL: http://libdv.sourceforge.net/
Source: http://downloads.sourceforge.net/libdv/libdv-%{version}.tar.gz
Patch0001: libdv-0.104-no-exec-stack.patch
Patch0002: libdv-1.0.0-pic.patch
Patch0003: libdv-1.0.0-gtk2.patch
Patch0004: libdv-1.0.0-dso-linking.patch
BuildRequires: gtk2-devel libXt-devel libXv-devel popt-devel
BuildRequires: SDL-devel autoconf automake libtool
%description
The Quasar DV Codec (libdv) is a software decoder for DV format
video, as defined by the IEC 61834 and SMPTE 314M standards.
DV is the encoding format used by consumer-grade digital camcorders.
%package tools
Summary: Basic tools to manipulate Digital Video streams
Requires: %{name} = %{version}-%{release}
%description tools
Libdv-tools provides Basic tools to manipulate Digital Video streams.
%package devel
Summary: Development package for libdv
Requires: %{name} = %{version}-%{release} pkgconfig
%description devel
Libdv-devel provides libraries and other files for libdv.
%package help
Summary: Help documents for libdv
%description help
Libdv-help provides man pages and other related help documents for libdv.
%prep
%autosetup -n %{name}-%{version} -p1
libtoolize
autoreconf -vif
%build
%configure --with-pic
%make_install
%install
%make_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc ChangeLog README.* AUTHORS
%license COPYING COPYRIGHT
%{_libdir}/libdv.so.*
%exclude %{_libdir}/libdv.{a,la}
%files tools
%{_bindir}/{dubdv,dvconnect,encodedv,playdv}
%files devel
%{_includedir}/libdv/
%{_libdir}/libdv.so
%{_libdir}/pkgconfig/libdv.pc
%files help
%{_mandir}/man1/*.1*
%changelog
* Thu Oct 24 2019 yanzhihua <yanzhihua4@huawei.com> - 1.0.0-29
- Package init