commit 058b129e2412617e5b227a25a3a740504aed4c39
Author: Jakub Bogusz <[email protected]>
Date:   Mon Jul 27 21:28:23 2015 +0200

    - initial

 matroska-foundation-format.patch |  30 ++++++
 matroska-foundation-shared.patch | 221 +++++++++++++++++++++++++++++++++++++++
 matroska-foundation.spec         | 122 +++++++++++++++++++++
 3 files changed, 373 insertions(+)
---
diff --git a/matroska-foundation.spec b/matroska-foundation.spec
new file mode 100644
index 0000000..a570986
--- /dev/null
+++ b/matroska-foundation.spec
@@ -0,0 +1,122 @@
+Summary:       libEBML2 and libMatroska2 libraries
+Summary(pl.UTF-8):     Biblioteki libEBML2 oraz libMatroska2
+Name:          matroska-foundation
+Version:       0
+%define        snap    20150326
+%define        gitref  29d8f2b2d0e939adfe6941af5f7f7f02344252fb
+Release:       0.%{snap}.1
+License:       BSD
+Group:         Libraries
+Source0:       
https://github.com/Matroska-Org/foundation-source/archive/%{gitref}/foundation-source-%{gitref}.tar.gz
+# Source0-md5: 00083d08cb517aa060c1ca0b8f839b8a
+Patch0:                %{name}-shared.patch
+Patch1:                %{name}-format.patch
+URL:           https://github.com/Matroska-Org/
+BuildRequires: libstdc++-devel
+%ifarch %{ix86} %{x8664} x32
+BuildRequires: yasm
+%endif
+BuildRequires: zlib-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libEBML2 and libMatroska2 libraries.
+
+%description -l pl.UTF-8
+Biblioteki libEBML2 oraz libMatroska2.
+
+%package devel
+Summary:       Header files for Matroska 2 libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek Matroska 2
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for Matroska 2 libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek Matroska 2.
+
+%prep
+%setup -q -n foundation-source-%{gitref}
+%patch0 -p1
+%patch1 -p1
+
+%{__sed} -i -e 's/^EBML_DLL /MATROSKA_DLL /' libmatroska2/matroska/matroska.h
+
+# use system
+%{__rm} -r corec/corec/helpers/zlib libmatroska2/bzip2
+
+%{__sed} -i -e 's/\(-O3 \|-m32 \|-m64 \|-march=i486 \|-msse \|-mmx 
\|-Wl,--strip-all\)//g' corec/tools/coremake/gcc_linux.build
+
+%build
+%{__make} -C corec/tools/coremake \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}" \
+       CPPFLAGS="%{rpmcppflags}" \
+       LDFLAGS="%{rpmldflags}"
+
+corec/tools/coremake/coremake -v \
+%ifarch %{ix86} x32
+       gcc_linux \
+%endif
+%ifarch %{x8664}
+       gcc_linux_x64 \
+%endif
+%ifarch %{arm}
+       gcc_linux_arm \
+%endif
+%ifarch mips
+       gcc_linux_mips \
+%endif
+%ifarch ppc
+       gcc_linux_ppc
+%endif
+
+%{__make} -C spectool \
+       V=1
+
+cd spectool
+../release/gcc_linux/data2lib2
+%{__mv} matroska_sem.c ../libmatroska2
+%{__mv} matroska_sem.h ../libmatroska2/matroska
+cd ..
+
+%{__make} \
+       V=1 \
+       CC="%{__cc}" \
+       CXX="%{__cxx}" \
+       CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+       STRIP=true
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}}
+
+install release/gcc_linux*/mkclean $RPM_BUILD_ROOT%{_bindir}
+install release/gcc_linux*/mkvalidator $RPM_BUILD_ROOT%{_bindir}
+install release/gcc_linux*/mkvtree $RPM_BUILD_ROOT%{_bindir}
+install release/gcc_linux*/libebml2.so $RPM_BUILD_ROOT%{_libdir}
+install release/gcc_linux*/libmatroska2.so $RPM_BUILD_ROOT%{_libdir}
+
+cp -a libebml2/ebml $RPM_BUILD_ROOT%{_includedir}
+cp -a libmatroska2/matroska $RPM_BUILD_ROOT%{_includedir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/mkclean
+%attr(755,root,root) %{_bindir}/mkvalidator
+%attr(755,root,root) %{_bindir}/mkvtree
+%attr(755,root,root) %{_libdir}/libebml2.so
+%attr(755,root,root) %{_libdir}/libmatroska2.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/ebml
+%{_includedir}/matroska
diff --git a/matroska-foundation-format.patch b/matroska-foundation-format.patch
new file mode 100644
index 0000000..7d3d96e
--- /dev/null
+++ b/matroska-foundation-format.patch
@@ -0,0 +1,30 @@
+#--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/parser/parser2.c.orig
      2015-07-26 20:00:49.941053931 +0200
+#+++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/parser/parser2.c
   2015-07-26 20:01:13.681052936 +0200
+#@@ -1915,7 +1915,7 @@
+# 
+# static NOINLINE bool_t ReadHex(const tchar_t** p,intptr_t* Out,bool_t RGB, 
bool_t Neg);
+# 
+#-NOINLINE bool_t ExprIsTokenEx(const tchar_t** p,const tchar_t* Name,...)
+#+NOINLINE bool_t ExprIsTokenEx(const tchar_t** p,const tchar_t* Name,...) 
__attribute__((format(scanf, 2, 3)))
+# {
+#     const tchar_t* s = *p;
+#     bool_t Long = 0;
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/parser/parser2.c.orig
       2015-07-26 20:06:34.367706144 +0200
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/parser/parser2.c
    2015-07-26 20:06:44.351039013 +0200
+@@ -1915,6 +1915,7 @@
+ 
+ static NOINLINE bool_t ReadHex(const tchar_t** p,intptr_t* Out,bool_t RGB, 
bool_t Neg);
+ 
++__attribute__((format(scanf, 2, 3)))
+ NOINLINE bool_t ExprIsTokenEx(const tchar_t** p,const tchar_t* Name,...)
+ {
+     const tchar_t* s = *p;
+@@ -2019,7 +2020,7 @@
+ 
+ NOINLINE bool_t ExprIsToken(const tchar_t** p,const tchar_t* Name)
+ {
+-    return ExprIsTokenEx(p,Name);
++    return ExprIsTokenEx(p,Name,NULL /*workaround*/);
+ }
+ 
+ uint32_t StringToIP(const tchar_t *Address)
diff --git a/matroska-foundation-shared.patch b/matroska-foundation-shared.patch
new file mode 100644
index 0000000..9fe5efc
--- /dev/null
+++ b/matroska-foundation-shared.patch
@@ -0,0 +1,221 @@
+--- foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/config.h.orig   
2015-07-07 21:13:46.356361073 +0200
++++ foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/config.h        
2015-07-07 21:14:04.243027020 +0200
+@@ -1,4 +1,3 @@
+-#define COREMAKE_STATIC
+ #define COREMAKE_UNICODE
+ #define CONFIG_EBML_WRITING
+ #define CONFIG_EBML_UNICODE
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkclean/mkclean.proj.orig
       2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkclean/mkclean.proj 
   2015-07-07 21:57:53.672916537 +0200
+@@ -5,6 +5,7 @@
+   PROJECT_NAME "mkclean"
+   PROJECT_VERSION  0.8.8
+   PROJECT_VENDOR   "Matroska"
++  USE ebml2
+   USE matroska2
+   IF !CONFIG_EBML_UNICODE
+     USE parser
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/node/node.h.orig
    2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/node/node.h
 2015-07-21 22:11:27.385521000 +0200
+@@ -41,9 +41,9 @@
+ #include "corec/str/str.h"
+ #include "corec/memheap.h"
+ 
+-#if defined(NODE_EXPORTS)
++#if defined(NODE_EXPORTS) || defined (EBML2_EXPORTS)
+ #define NODE_DLL DLLEXPORT
+-#elif defined(NODE_IMPORTS)
++#elif defined(NODE_IMPORTS) || defined (EBML2_IMPORTS)
+ #define NODE_DLL DLLIMPORT
+ #else
+ #define NODE_DLL
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/array/array.h.orig
  2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/array/array.h
       2015-07-22 20:45:34.495444711 +0200
+@@ -37,9 +37,9 @@
+ extern "C" {
+ #endif
+ 
+-#if defined(ARRAY_EXPORTS)
++#if defined(ARRAY_EXPORTS) || defined(EBML2_EXPORTS)
+ #define ARRAY_DLL DLLEXPORT
+-#elif defined(ARRAY_IMPORTS)
++#elif defined(ARRAY_IMPORTS) || defined(EBML2_IMPORTS)
+ #define ARRAY_DLL DLLIMPORT
+ #else
+ #define ARRAY_DLL
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/str/str.h.orig
      2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/str/str.h
   2015-07-22 20:58:07.995413103 +0200
+@@ -36,9 +36,9 @@
+ extern "C" {
+ #endif
+ 
+-#if defined(STR_EXPORTS)
++#if defined(STR_EXPORTS) || defined(EBML2_EXPORTS)
+ #define STR_DLL DLLEXPORT
+-#elif defined(STR_IMPORTS)
++#elif defined(STR_IMPORTS) || defined(EBML2_IMPORTS)
+ #define STR_DLL DLLIMPORT
+ #else
+ #define STR_DLL
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libebml2/ebml/ebml.h.orig
       2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libebml2/ebml/ebml.h 
   2015-07-22 21:35:18.088652842 +0200
+@@ -244,21 +244,21 @@
+ #endif
+ 
+ // EBML contexts
+-extern CONTEXT_CONST ebml_context EBML_ContextHead;
+-extern CONTEXT_CONST ebml_context EBML_ContextDummy;
+-extern CONTEXT_CONST ebml_context EBML_ContextVersion;
+-extern CONTEXT_CONST ebml_context EBML_ContextReadVersion;
+-extern CONTEXT_CONST ebml_context EBML_ContextMaxIdLength;
+-extern CONTEXT_CONST ebml_context EBML_ContextMaxSizeLength;
+-extern CONTEXT_CONST ebml_context EBML_ContextDocType;
+-extern CONTEXT_CONST ebml_context EBML_ContextDocTypeVersion;
+-extern CONTEXT_CONST ebml_context EBML_ContextDocTypeReadVersion;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextHead;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextDummy;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextVersion;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextReadVersion;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextMaxIdLength;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextMaxSizeLength;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextDocType;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextDocTypeVersion;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextDocTypeReadVersion;
+ 
+-extern CONTEXT_CONST ebml_context EBML_ContextEbmlVoid;
+-extern CONTEXT_CONST ebml_context EBML_ContextEbmlCrc32;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextEbmlVoid;
++EBML_DLL extern CONTEXT_CONST ebml_context EBML_ContextEbmlCrc32;
+ 
+ //extern const ebml_context EBML_ContextGlobals;
+-extern const ebml_semantic EBML_SemanticGlobals[];
++EBML_DLL extern const ebml_semantic EBML_SemanticGlobals[];
+ 
+ #ifdef __cplusplus
+ }
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/libmatroska2.proj.orig
     2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/libmatroska2.proj
  2015-07-22 21:31:33.498662318 +0200
+@@ -34,6 +34,7 @@
+ {
+   DEFINE MATROSKA_LIBRARY
+   USE matroska2_group
++  LIBS z
+ }
+ 
+ GROUP matroska2_haali
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/spectool/data2lib2.c.orig
       2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/spectool/data2lib2.c 
   2015-07-26 12:27:44.332194804 +0200
+@@ -298,7 +298,7 @@
+ 
+         if (Extras->PassedEBML)
+         {
+-            TextPrintf(CFile, T("extern const ebml_context 
MATROSKA_Context%s;\n"), elt->Name);
++            TextPrintf(CFile, T("MATROSKA_DLL extern const ebml_context 
MATROSKA_Context%s;\n"), elt->Name);
+             if (elt->Type==EBML_MASTER)
+                 TextWrite(CFile, T("\n"));
+         }
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/matroska/matroska.h.orig
   2015-07-26 13:21:15.122060060 +0200
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/matroska/matroska.h
        2015-07-26 13:50:06.318654074 +0200
+@@ -195,6 +195,6 @@
+ EBML_DLL matroska_block *MATROSKA_GetBlockForTimecode(matroska_cluster 
*Cluster, timecode_t Timecode, int16_t Track);
+ EBML_DLL void MATROSKA_LinkClusterBlocks(matroska_cluster *Cluster, 
ebml_master *RSegmentInfo, ebml_master *Tracks, bool_t KeepUnmatched);
+ 
+-extern const ebml_context MATROSKA_ContextStream;
++MATROSKA_DLL extern const ebml_context MATROSKA_ContextStream;
+ 
+ #endif // MATROSKA_MATROSKA_H
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/file/file.h.orig
    2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/file/file.h
 2015-07-26 13:51:28.251983970 +0200
+@@ -37,9 +37,9 @@
+ extern "C" {
+ #endif
+ 
+-#if defined(FILE_EXPORTS)
++#if defined(FILE_EXPORTS) || defined(EBML2_EXPORTS)
+ #define FILE_DLL DLLEXPORT
+-#elif defined(FILE_IMPORTS)
++#elif defined(FILE_IMPORTS) || defined(EBML2_IMPORTS)
+ #define FILE_DLL DLLIMPORT
+ #else
+ #define FILE_DLL
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/date/date.h.orig
    2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/corec/corec/helpers/date/date.h
 2015-07-26 15:00:22.798477128 +0200
+@@ -36,9 +36,9 @@
+ extern "C" {
+ #endif
+ 
+-#if defined(DATE_EXPORTS)
++#if defined(DATE_EXPORTS) || defined(EBML2_EXPORTS)
+ #define DATE_DLL DLLEXPORT
+-#elif defined(DATE_IMPORTS)
++#elif defined(DATE_IMPORTS) || defined(EBML2_IMPORTS)
+ #define DATE_DLL DLLIMPORT
+ #else
+ #define DATE_DLL
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkvalidator/mkvalidator.proj.orig
       2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkvalidator/mkvalidator.proj
    2015-07-26 15:10:37.748451320 +0200
+@@ -3,6 +3,7 @@
+   PROJECT_NAME "mkvalidator"
+   PROJECT_VERSION  0.5.0
+   PROJECT_VENDOR   "Matroska"
++  USE ebml2
+   USE matroska2
+   SOURCE mkvalidator.c
+   COMPILE src.br
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkvalidator/mkvalidator.c.orig
  2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/mkvalidator/mkvalidator.c
       2015-07-26 16:41:32.691555426 +0200
+@@ -895,7 +895,7 @@
+ 
+     // Core-C init phase
+     ParserContext_Init(&p,NULL,NULL,NULL);
+-      StdAfx_Init((nodemodule*)&p);
++//    StdAfx_Init((nodemodule*)&p);
+     ProjectSettings((nodecontext*)&p);
+ 
+     // EBML & Matroska Init
+@@ -1437,7 +1437,7 @@
+     MATROSKA_Done((nodecontext*)&p);
+ 
+     // Core-C ending
+-      StdAfx_Done((nodemodule*)&p);
++//    StdAfx_Done((nodemodule*)&p);
+     ParserContext_Done(&p);
+ 
+     return Result;
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/test/mkvtree.c.orig
        2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/test/mkvtree.c
     2015-07-26 16:47:17.138208091 +0200
+@@ -30,7 +30,6 @@
+ 
+ #define CONFIG_EBML_UNICODE
+ #include "matroska/matroska.h"
+-#include "mkvtree_stdafx.h"
+ 
+ static int ShowPos = 0;
+ 
+@@ -301,7 +300,7 @@
+ #else
+     NodeContext_Init(&p,NULL,NULL,NULL);
+ #endif
+-      StdAfx_Init((nodemodule*)&p);
++//    StdAfx_Init((nodemodule*)&p);
+     // EBML & Matroska Init
+     MATROSKA_Init((nodecontext*)&p);
+ 
+@@ -320,7 +319,7 @@
+     // EBML & Matroska ending
+     MATROSKA_Done((nodecontext*)&p);
+     // Core-C ending
+-      StdAfx_Done((nodemodule*)&p);
++//    StdAfx_Done((nodemodule*)&p);
+ #if defined(CONFIG_EBML_UNICODE)
+     ParserContext_Done(&p);
+ #else
+--- 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/test/test.proj.orig
        2015-03-25 11:01:01.000000000 +0100
++++ 
foundation-source-29d8f2b2d0e939adfe6941af5f7f7f02344252fb/libmatroska2/test/test.proj
     2015-07-26 16:48:07.278205799 +0200
+@@ -1,5 +1,6 @@
+ CON mkvtree
+ {
++  USE ebml2
+   USE matroska2
+   SOURCE mkvtree.c
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/matroska-foundation.git/commitdiff/058b129e2412617e5b227a25a3a740504aed4c39

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to