diff --git a/.orc.metadata b/.orc.metadata new file mode 100644 index 0000000..0c9ca77 --- /dev/null +++ b/.orc.metadata @@ -0,0 +1 @@ +5cb7b3225a23bc4a5771a62e9c94a90d21609632 SOURCES/orc-0.4.17.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Use-a-subdirectory-for-temporary-files.patch b/SOURCES/0001-Use-a-subdirectory-for-temporary-files.patch new file mode 100644 index 0000000..f8fc235 --- /dev/null +++ b/SOURCES/0001-Use-a-subdirectory-for-temporary-files.patch @@ -0,0 +1,56 @@ +From 048ecb97881ad2763c34458eb705fedf09dcc5ff Mon Sep 17 00:00:00 2001 +From: Fabian Deutsch +Date: Tue, 4 Oct 2011 13:28:38 +0200 +Subject: [PATCH 1/2] Use a subdirectory for temporary files. + +This allows the a better integration with selinux, as the rule can use the path name and doesn't need globbing. + +Signed-off-by: Fabian Deutsch +--- + orc/orccodemem.c | 19 ++++++++++++++++++- + 1 files changed, 18 insertions(+), 1 deletions(-) + +diff --git a/orc/orccodemem.c b/orc/orccodemem.c +index f470be5..295a880 100644 +--- a/orc/orccodemem.c ++++ b/orc/orccodemem.c +@@ -193,11 +193,27 @@ orc_code_chunk_free (OrcCodeChunk *chunk) + #ifdef HAVE_CODEMEM_MMAP + int + orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region, +- const char *dir, int force_unlink) ++ const char *basedir, int force_unlink) + { + int fd; + int n; + char *filename; ++ char *dir; ++ struct stat stat_p; ++ ++ dir = malloc (strlen (basedir) + strlen ("/.orc") + 1); ++ sprintf (dir, "%s/.orc", basedir); ++ ++ if (stat (dir, &stat_p) == -1 || ++ !S_ISDIR (stat_p.st_mode)) ++ { ++ n = mkdir (dir, S_IRWXU); ++ if (n < 0) ++ { ++ ORC_WARNING ("failed to create subdir"); ++ return FALSE; ++ } ++ } + + filename = malloc (strlen ("/orcexec..") + + strlen (dir) + 6 + 1); +@@ -211,6 +227,7 @@ orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region, + if (force_unlink || !_orc_compiler_flag_debug) { + unlink (filename); + } ++ free (dir); + free (filename); + + n = ftruncate (fd, SIZE); +-- +1.7.7.6 + diff --git a/SOURCES/0002-Add-compiler-option-for-ENABLE_USER_CODEMEM.patch b/SOURCES/0002-Add-compiler-option-for-ENABLE_USER_CODEMEM.patch new file mode 100644 index 0000000..c6b1487 --- /dev/null +++ b/SOURCES/0002-Add-compiler-option-for-ENABLE_USER_CODEMEM.patch @@ -0,0 +1,65 @@ +From bded311d32daa2339055341a7f1c1782ff39d047 Mon Sep 17 00:00:00 2001 +From: Fabian Deutsch +Date: Sun, 1 Jan 2012 21:41:04 +0100 +Subject: [PATCH 2/2] Add compiler option for ENABLE_USER_CODEMEM. + +This option disbales non-user-dependent path checking at compile time. If enabled, only paths corresponding to a user are checked. + +Signed-off-by: Fabian Deutsch +--- + configure.ac | 4 ++++ + orc/Makefile.am | 3 +++ + orc/orccodemem.c | 2 ++ + 3 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 00e1916..4daee88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -176,6 +176,10 @@ AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes") + AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes") + AM_CONDITIONAL(ENABLE_BACKEND_MIPS, test "x$ENABLE_BACKEND_MIPS" = "xyes") + ++AC_ARG_ENABLE(user-codemem, ++ AC_HELP_STRING([--enable-user-codemem],[Force codemem allocation to be user dependent (default is no)]), ++ [], [enable_user_codemem=no]) ++AM_CONDITIONAL(ENABLE_USER_CODEMEM, test "x$enable_user_codemem" = "xyes") + + AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code]) + +diff --git a/orc/Makefile.am b/orc/Makefile.am +index 26263e0..887d36b 100644 +--- a/orc/Makefile.am ++++ b/orc/Makefile.am +@@ -9,6 +9,9 @@ liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \ + -no-undefined -export-symbols-regex 'orc_' + liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS) \ + -DORC_ENABLE_UNSTABLE_API ++if ENABLE_USER_CODEMEM ++liborc_@ORC_MAJORMINOR@_la_CFLAGS += -DORC_FORCE_USER_CODEMEM ++endif + + liborc_@ORC_MAJORMINOR@_la_SOURCES = \ + orc.c \ +diff --git a/orc/orccodemem.c b/orc/orccodemem.c +index 295a880..4a91e3e 100644 +--- a/orc/orccodemem.c ++++ b/orc/orccodemem.c +@@ -280,12 +280,14 @@ orc_code_region_allocate_codemem (OrcCodeRegion *region) + { + const char *tmpdir; + ++#ifndef ORC_FORCE_USER_CODEMEM + tmpdir = getenv ("TMPDIR"); + if (tmpdir && orc_code_region_allocate_codemem_dual_map (region, + tmpdir, FALSE)) return; + + if (orc_code_region_allocate_codemem_dual_map (region, + "/tmp", FALSE)) return; ++#endif + + tmpdir = getenv ("XDG_RUNTIME_DIR"); + if (tmpdir && orc_code_region_allocate_codemem_dual_map (region, +-- +1.7.7.6 + diff --git a/SPECS/orc.spec b/SPECS/orc.spec new file mode 100644 index 0000000..30975b9 --- /dev/null +++ b/SPECS/orc.spec @@ -0,0 +1,240 @@ +Name: orc +Version: 0.4.17 +Release: 2%{?dist} +Summary: The Oil Run-time Compiler + +Group: System Environment/Libraries +License: BSD +URL: http://cgit.freedesktop.org/gstreamer/orc/ +Source0: http://code.entropywave.com/download/orc/orc-%{version}.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: gtk-doc, libtool + +# Upstream bugs: https://bugs.freedesktop.org/show_bug.cgi?id=41446 +Patch1: 0001-Use-a-subdirectory-for-temporary-files.patch +Patch2: 0002-Add-compiler-option-for-ENABLE_USER_CODEMEM.patch + +%description +Orc is a library and set of tools for compiling and executing +very simple programs that operate on arrays of data. The "language" +is a generic assembly language that represents many of the features +available in SIMD architectures, including saturated addition and +subtraction, and many arithmetic operations. + +%package doc +Summary: Documentation for Orc +Group: Development/Languages +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for Orc. + +%package devel +Summary: Development files and libraries for Orc +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-compiler +Requires: pkgconfig + +%description devel +This package contains the files needed to build packages that depend +on orc. + +%package compiler +Summary: Orc compiler +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description compiler +The Orc compiler, to produce optimized code. + + + +%prep +%setup -q +%patch1 -p1 -b .subdir +%patch2 -p1 -b .condtmp + +autoreconf -vif + + +%build +%configure --disable-static --enable-gtk-doc --enable-user-codemem + +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" + +# Remove unneeded files. +find %{buildroot}/%{_libdir} -name \*.a -or -name \*.la -delete +rm -rf %{buildroot}/%{_libdir}/orc + +touch -r stamp-h1 %{buildroot}%{_includedir}/%{name}-0.4/orc/orc-stdint.h + + +%clean +rm -rf %{buildroot} + + +%check +%ifnarch s390 s390x ppc ppc64 %{arm} i686 +make check +%endif + + +%post -p /sbin/ldconfig + + +%postun -p /sbin/ldconfig + + + +%files +%defattr(-,root,root,-) +%doc COPYING README +%{_libdir}/liborc-*.so.* +%{_bindir}/orc-bugreport + +%files doc +%defattr(-,root,root,-) +%doc %{_datadir}/gtk-doc/html/orc/ + +%files devel +%defattr(-,root,root,-) +%doc examples/*.c +%{_includedir}/%{name}-0.4/ +%{_libdir}/liborc-*.so +%{_libdir}/pkgconfig/orc-0.4.pc +%{_datadir}/aclocal/orc.m4 + +%files compiler +%defattr(-,root,root,-) +%{_bindir}/orcc + + + +%changelog +* Wed Feb 20 2013 Fabian Deutsch - 0.4.17-2 +- Fix typo rhbz#817944 + +* Wed Feb 20 2013 Fabian Deutsch - 0.4.17-1 +- Update to latest upstream release +- Removed obsolete patches + +* Thu Feb 14 2013 Fedora Release Engineering - 0.4.16-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jan 19 2013 Daniel Drake - 0.4.16-7 +- Fix fallback path when register allocation fails +- Fixes gstreamer-1.0 crash on OLPC XO-1.75 + +* Fri Jul 27 2012 Fedora Release Engineering - 0.4.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 07 2012 Fabian Deutsch - 0.4.16-5 +- Updated subdir patch. + +* Wed Oct 26 2011 Fedora Release Engineering - 0.4.16-4 +- Rebuilt for glibc bug#747377 + +* Sun Oct 16 2011 Fabian Deutsch - 0.4.16-3 +- Add Fedora specific patch for tempfiles in subdirs + +* Sun Oct 16 2011 Daniel Drake - 0.4.16-2 +- Add upstream patches to fix gstreamer crash on Geode (#746185) + +* Mon Oct 03 2011 Fabian Deutsch - 0.4.16-1 +- Update to 0.4.16 +- Fixing regression introdcued by 0.4.15 (#742534 and #734911) + +* Mon Sep 26 2011 Fabian Deutsch - 0.4.15-1 +- Update to 0.4.15 + +* Mon Jun 20 2011 Peter Robinson - 0.4.14-3 +- Add ARM platforms to the make check exclusion + +* Sat May 07 2011 Fabian Deutsch - 0.4.14-2 +- Add orc-bugreport to the main package (#702727) + +* Sat Apr 30 2011 Fabian Deutsch - 0.4.14-1 +- Update to 0.4.14 + +* Tue Apr 19 2011 Fabian Deutsch - 0.4.13-1 +- Update to 0.4.13, another bug fixing release + +* Fri Apr 15 2011 Fabian Deutsch - 0.4.12-1 +- Update to 0.4.12, a bug fixing release + +* Wed Feb 23 2011 Karsten Hopp 0.4.11-3 +- don't run tests on ppc, ppc64 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.4.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Oct 24 2010 Fabian Deutsch - 0.4.11-1 +- Update to 0.4.11. +- More bug fixes for CPUs that do not have backends, mmx and sse. + +* Fri Oct 08 2010 Fabian Deutsch - 0.4.10-1 +- Update to 0.4.10. +- Fixes some bugs related to SELinux. + +* Mon Sep 06 2010 Fabian Deutsch - 0.4.9-1 +- Update to 0.4.9, a pimarily bug fixing release. + +* Thu Aug 19 2010 Fabian Deutsch - 0.4.7-1 +- Updated to 0.4.7. + +* Tue Jul 22 2010 Fabian Deutsch - 0.4.6-1 +- Updated to 0.4.6. +- New orc-bugreport added. + +* Tue Jul 13 2010 Dan HorĂ¡k - 0.4.5-3 +- don't run test on s390(x) + +* Sun Jun 13 2010 Fabian Deutsch - 0.4.5-2 +- Added removed testing libraries to package. + +* Sun Jun 13 2010 Fabian Deutsch - 0.4.5-1 +- Updated to 0.4.5. +- Removed testing libraries from package. + +* Mon Apr 05 2010 Fabian Deutsch - 0.4.4-2 +- Docs as noarch. +- Sanitize timestamps of header files. +- orcc in -compiler subpackage. + +* Tue Mar 30 2010 Fabian Deutsch - 0.4.4-1 +- Updated to 0.4.4: Includes bugfixes for x86_64. + +* Wed Mar 17 2010 Fabian Deutsch - 0.4.3-2 +- Running autoreconf to prevent building problems. +- Added missing files to docs. +- Added examples to devel docs. + +* Thu Mar 04 2010 Fabian Deutsch - 0.4.3-1 +- Updated to 0.4.3 + +* Sun Oct 18 2009 Fabian Deutsch - 0.4.2-4 +- Removed unused libdir + +* Sun Oct 18 2009 Fabian Deutsch - 0.4.2-3 +- Specfile cleanup +- Removed tools subpackage +- Added docs subpackage + +* Sat Oct 03 2009 Fabian Deutsch - 0.4.2-2 +- Use orc as pakage name +- spec-file cleanup +- Added devel requirements +- Removed an rpath issue + +* Fri Oct 02 2009 Fabian Deutsch - 0.4.2-1 +- Initial release +