diff --git a/README.md b/README.md index 4ad4702..9e290cb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libpixman +Libpixman is a merge of libpixregion (a generic library for manipulating pixel regions) and libic (a generic image compositing library). + diff --git a/libpixman-0.23.6-arm_qemu_dont_use_auxv_to_detect_features.patch b/libpixman-0.23.6-arm_qemu_dont_use_auxv_to_detect_features.patch new file mode 100644 index 0000000..030b941 --- /dev/null +++ b/libpixman-0.23.6-arm_qemu_dont_use_auxv_to_detect_features.patch @@ -0,0 +1,122 @@ +diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c +index e4fb1e4..8e0dd15 100644 +--- a/pixman/pixman-cpu.c ++++ b/pixman/pixman-cpu.c +@@ -246,60 +246,55 @@ pixman_have_arm_neon (void) + + #else /* linux ELF */ + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include + +-static pixman_bool_t arm_has_v7 = FALSE; + static pixman_bool_t arm_has_v6 = FALSE; +-static pixman_bool_t arm_has_vfp = FALSE; + static pixman_bool_t arm_has_neon = FALSE; +-static pixman_bool_t arm_has_iwmmxt = FALSE; + static pixman_bool_t arm_tests_initialized = FALSE; + ++static sigjmp_buf cpu_jmpbuf; ++ + static void +-pixman_arm_read_auxv () ++pixman_catch_sigill(int sig) + { +- int fd; +- Elf32_auxv_t aux; ++ siglongjmp(cpu_jmpbuf, 1); ++} ++ ++static void ++pixman_arm_check_neon (void) ++{ ++ struct sigaction sa, old_sa; + +- fd = open ("/proc/self/auxv", O_RDONLY); +- if (fd >= 0) ++ /* setup the sigaction */ ++ sa.sa_handler = pixman_catch_sigill; ++ sa.sa_flags = SA_RESTART; ++ sigemptyset(&sa.sa_mask); ++ sigaction(SIGILL, &sa, &old_sa); ++ ++#if defined(USE_ARM_NEON) ++ if (!sigsetjmp(cpu_jmpbuf, 1)) + { +- while (read (fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) +- { +- if (aux.a_type == AT_HWCAP) +- { +- uint32_t hwcap = aux.a_un.a_val; +- /* hardcode these values to avoid depending on specific +- * versions of the hwcap header, e.g. HWCAP_NEON +- */ +- arm_has_vfp = (hwcap & 64) != 0; +- arm_has_iwmmxt = (hwcap & 512) != 0; +- /* this flag is only present on kernel 2.6.29 */ +- arm_has_neon = (hwcap & 4096) != 0; +- } +- else if (aux.a_type == AT_PLATFORM) +- { +- const char *plat = (const char*) aux.a_un.a_val; +- if (strncmp (plat, "v7l", 3) == 0) +- { +- arm_has_v7 = TRUE; +- arm_has_v6 = TRUE; +- } +- else if (strncmp (plat, "v6l", 3) == 0) +- { +- arm_has_v6 = TRUE; +- } +- } +- } +- close (fd); ++ asm volatile ( ++ ".fpu neon\n" ++ "\tvqadd.u8 d0, d1, d0\n" ++ ); ++ arm_has_neon = TRUE; + } ++#endif ++ ++#if defined(USE_ARM_SIMD) ++ if (!sigsetjmp(cpu_jmpbuf, 1)) ++ { ++ asm volatile ( ++ ".arch armv6\n" ++ "\tuqadd8 r1, r1, r2\n" ++ : : :"r1", "r2"); ++ arm_has_v6 = TRUE; ++ } ++#endif ++ ++ sigaction(SIGILL, &old_sa, NULL); + + arm_tests_initialized = TRUE; + } +@@ -309,7 +304,7 @@ pixman_bool_t + pixman_have_arm_simd (void) + { + if (!arm_tests_initialized) +- pixman_arm_read_auxv (); ++ pixman_arm_check_neon (); + + return arm_has_v6; + } +@@ -321,7 +316,7 @@ pixman_bool_t + pixman_have_arm_neon (void) + { + if (!arm_tests_initialized) +- pixman_arm_read_auxv (); ++ pixman_arm_check_neon (); + + return arm_has_neon; + } diff --git a/libpixman.spec b/libpixman.spec new file mode 100644 index 0000000..149a2cc --- /dev/null +++ b/libpixman.spec @@ -0,0 +1,177 @@ +Name: libpixman +Version: 0.32.4 +Release: 1mamba +Summary: A generic library for manipulating pixel regions +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.x.org +Source: http://x.org/pub/individual/lib/pixman-%{version}.tar.bz2 +Patch0: %{name}-0.23.6-arm_qemu_dont_use_auxv_to_detect_features.patch +License: MIT +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Libpixman is a merge of libpixregion (a generic library for manipulating pixel regions) and libic (a generic image compositing library). + +%package devel +Summary: Header files, libraries and development documentation for %{name} +Group: Development/Libraries +Requires: %{name} = %{version} + +%description devel +Libpixman is a merge of libpixregion (a generic library for manipulating pixel regions) and libic (a generic image compositing library). +This package contains static libraries and header files need for development. + +%prep +%setup -q -n pixman-%{version} +## NOTE: patch fixes a qemu-arm segfault when accessing /proc/self/auxv +#%patch0 -p1 + +%build +%configure + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-, root, root) +%{_libdir}/libpixman-1.so.* +%doc AUTHORS ChangeLog* COPYING NEWS README + +%files devel +%defattr(-, root, root) +%{_includedir}/pixman-1/pixman.h +%{_includedir}/pixman-1/pixman-version.h +%{_libdir}/libpixman-1.a +%{_libdir}/libpixman-1.la +%{_libdir}/libpixman-1.so +%{_libdir}/pkgconfig/pixman-1.pc + +%changelog +* Tue Nov 19 2013 Automatic Build System 0.32.4-1mamba +- automatic version update by autodist + +* Fri Nov 15 2013 Automatic Build System 0.32.2-1mamba +- automatic version update by autodist + +* Thu Aug 08 2013 Automatic Build System 0.30.2-1mamba +- automatic version update by autodist + +* Sat May 11 2013 Automatic Build System 0.30.0-1mamba +- automatic version update by autodist + +* Tue Feb 26 2013 Automatic Build System 0.29.2-1mamba +- automatic version update by autodist + +* Sun Dec 16 2012 Automatic Build System 0.28.2-1mamba +- automatic version update by autodist + +* Fri Nov 09 2012 Automatic Build System 0.28.0-1mamba +- automatic version update by autodist + +* Sat Oct 27 2012 Automatic Build System 0.27.4-1mamba +- automatic version update by autodist + +* Wed Aug 15 2012 Automatic Build System 0.27.2-1mamba +- automatic version update by autodist + +* Mon Jul 02 2012 Silvan Calarco 0.26.2-1mamba +- update to 0.26.2 + +* Wed May 16 2012 Silvan Calarco 0.25.6-1mamba +- update to 0.25.6 + +* Tue Apr 10 2012 Silvan Calarco 0.25.2-1mamba +- update to 0.25.2 + +* Wed Oct 26 2011 Silvan Calarco 0.23.6-1mamba +- update to 0.23.6 + +* Sun Oct 02 2011 Automatic Build System 0.23.4-1mamba +- automatic version update by autodist + +* Mon Jul 25 2011 Automatic Build System 0.23.2-1mamba +- automatic version update by autodist + +* Fri Jun 17 2011 Automatic Build System 0.22.0-1mamba +- automatic update by autodist + +* Sat Aug 21 2010 Automatic Build System 0.18.4-1mamba +- automatic update by autodist + +* Sat Jun 26 2010 Automatic Build System 0.18.2-1mamba +- automatic update by autodist + +* Sat Apr 17 2010 Automatic Build System 0.18.0-1mamba +- automatic update by autodist + +* Wed Jan 20 2010 Automatic Build System 0.17.4-1mamba +- automatic update by autodist + +* Fri Oct 02 2009 Automatic Build System 0.16.2-1mamba +- automatic update by autodist + +* Mon Aug 17 2009 Automatic Build System 0.15.20-1mamba +- automatic update by autodist + +* Sat Jul 25 2009 Silvan Calarco 0.15.18-1mamba +- update to 0.15.18 + +* Tue Jul 14 2009 Automatic Build System 0.15.16-1mamba +- automatic update by autodist + +* Thu Jul 02 2009 Automatic Build System 0.15.14-1mamba +- automatic update by autodist + +* Sun Jun 14 2009 Automatic Build System 0.15.10-1mamba +- automatic update by autodist + +* Fri May 29 2009 Automatic Build System 0.15.6-1mamba +- automatic update by autodist + +* Mon May 18 2009 Automatic Build System 0.15.4-1mamba +- automatic update by autodist + +* Wed Apr 15 2009 Silvan Calarco 0.15.2-1mamba +- automatic update by autodist + +* Fri Feb 20 2009 Silvan Calarco 0.14.0-1mamba +- automatic update by autodist + +* Mon Dec 01 2008 gil 0.13.2-1mamba +- update to 0.13.2 + +* Tue Aug 19 2008 gil 0.11.8-1mamba +- update to 0.11.8 + +* Mon May 05 2008 Silvan Calarco 0.10.0-1mamba +- update to 0.10.0 + +* Mon Sep 10 2007 Silvan Calarco 0.9.5-1mamba +- update to 0.9.5 + +* Thu Aug 16 2007 Silvan Calarco 0.9.4-1mamba +- update to 0.9.4 (from x.org) + +* Tue Jun 28 2005 Davide Madrisan 0.1.5-3qilnx +- fixed package group and license + +* Wed Jun 22 2005 Alessandro Ramazzina 0.1.5-2qilnx +- rebuild and moved from devel-contrib repository to devel repository + +* Wed Jun 22 2005 Matteo Bernasconi - 0.1.5-1qilnx +- first build