0.2.6-1
- lensfun-0.2.6 (#836156) - use cmake - use pkgconfig-style deps Don't actually build yet, want to try some local build-time and runtime testing with dependent apps first
This commit is contained in:
parent
2d215a9955
commit
b13d2bd635
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
lensfun-0.2.5.tar.bz2
|
/lensfun-0.2.5.tar.bz2
|
||||||
|
/lensfun-0.2.6.tar.bz2
|
||||||
|
@ -1,128 +0,0 @@
|
|||||||
From 9a3301bc3c239e0e74d6bc20f950b338d31457d9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: zap <zap@2a61fa91-e63d-0410-b60c-e65103854af9>
|
|
||||||
Date: Sun, 9 May 2010 13:53:35 +0000
|
|
||||||
Subject: [PATCH] * Modified a little the asm instructions for detecting CPU features
|
|
||||||
* configure will now print the vectorization instrution sets which will be used
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.berlios.de/lensfun/trunk@109 2a61fa91-e63d-0410-b60c-e65103854af9
|
|
||||||
---
|
|
||||||
configure | 1 +
|
|
||||||
libs/lensfun/cpuid.cpp | 28 ++++++++--------------------
|
|
||||||
2 files changed, 9 insertions(+), 20 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index 2439096..8cee50a 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -118,4 +118,5 @@ print "Target directory for data files: " + tibs.DATADIR
|
|
||||||
print "Target directory for libraries: " + tibs.LIBDIR
|
|
||||||
print "Target directory for include files: " + tibs.INCLUDEDIR
|
|
||||||
print "Target directory for documentation: " + tibs.DOCDIR
|
|
||||||
+print "Use vector instruction set(-s): " + ", ".join (x for x in tibs.VECTORIZATION)
|
|
||||||
print "--------------------------------------------------------------------"
|
|
||||||
diff --git a/libs/lensfun/cpuid.cpp b/libs/lensfun/cpuid.cpp
|
|
||||||
index ed0ecf9..d7f43b3 100644
|
|
||||||
--- a/libs/lensfun/cpuid.cpp
|
|
||||||
+++ b/libs/lensfun/cpuid.cpp
|
|
||||||
@@ -25,17 +25,13 @@
|
|
||||||
guint _lf_detect_cpu_features ()
|
|
||||||
{
|
|
||||||
#define cpuid(cmd) \
|
|
||||||
- asm ( \
|
|
||||||
- "push %%"R_BX"\n" \
|
|
||||||
+ __asm volatile ( \
|
|
||||||
"cpuid\n" \
|
|
||||||
- "pop %%"R_BX"\n" \
|
|
||||||
: "=a" (ax), "=c" (cx), "=d" (dx) \
|
|
||||||
- : "0" (cmd))
|
|
||||||
+ : "0" (cmd) \
|
|
||||||
+ : R_BX)
|
|
||||||
|
|
||||||
- register __SIZE_TYPE__ ax asm (R_AX);
|
|
||||||
- register __SIZE_TYPE__ bx asm (R_BX);
|
|
||||||
- register __SIZE_TYPE__ dx asm (R_DX);
|
|
||||||
- register __SIZE_TYPE__ cx asm (R_CX);
|
|
||||||
+ __SIZE_TYPE__ ax, cx, dx, tmp;
|
|
||||||
static GStaticMutex lock = G_STATIC_MUTEX_INIT;
|
|
||||||
static guint cpuflags = -1;
|
|
||||||
|
|
||||||
@@ -45,7 +41,7 @@ guint _lf_detect_cpu_features ()
|
|
||||||
cpuflags = 0;
|
|
||||||
|
|
||||||
/* Test cpuid presence by checking bit 21 of eflags */
|
|
||||||
- asm (
|
|
||||||
+ __asm volatile (
|
|
||||||
"pushf\n"
|
|
||||||
"pop %0\n"
|
|
||||||
"mov %0, %1\n"
|
|
||||||
@@ -57,7 +53,7 @@ guint _lf_detect_cpu_features ()
|
|
||||||
"cmp %0, %1\n"
|
|
||||||
"setne %%al\n"
|
|
||||||
"movzb %%al, %0\n"
|
|
||||||
- : "=r" (ax), "=r" (bx));
|
|
||||||
+ : "=r" (ax), "=r" (tmp));
|
|
||||||
|
|
||||||
if (ax)
|
|
||||||
{
|
|
||||||
@@ -88,12 +84,12 @@ guint _lf_detect_cpu_features ()
|
|
||||||
cpuflags |= LF_CPU_FLAG_SSE4_2;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Is there extensions */
|
|
||||||
+ /* Are there extensions? */
|
|
||||||
cpuid (0x80000000);
|
|
||||||
|
|
||||||
if (ax)
|
|
||||||
{
|
|
||||||
- /* Request for extensions */
|
|
||||||
+ /* Ask extensions */
|
|
||||||
cpuid (0x80000001);
|
|
||||||
|
|
||||||
if (dx & 0x80000000)
|
|
||||||
@@ -112,12 +108,4 @@ guint _lf_detect_cpu_features ()
|
|
||||||
#undef cpuid
|
|
||||||
}
|
|
||||||
|
|
||||||
-#else
|
|
||||||
-
|
|
||||||
-guint
|
|
||||||
-rs_detect_cpu_features()
|
|
||||||
-{
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
#endif /* __i386__ || __x86_64__ */
|
|
||||||
--
|
|
||||||
1.7.2.3
|
|
||||||
|
|
||||||
From 19a5478ec455de6a9201d5acf5e844a926761bdb Mon Sep 17 00:00:00 2001
|
|
||||||
From: zap <zap@2a61fa91-e63d-0410-b60c-e65103854af9>
|
|
||||||
Date: Wed, 12 May 2010 19:31:09 +0000
|
|
||||||
Subject: [PATCH] * cpuid.cpp: push/pop ebx instead of marking it as clobbered, because gcc can't survive that when using -fPIC
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.berlios.de/lensfun/trunk@110 2a61fa91-e63d-0410-b60c-e65103854af9
|
|
||||||
---
|
|
||||||
libs/lensfun/cpuid.cpp | 5 +++--
|
|
||||||
1 files changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libs/lensfun/cpuid.cpp b/libs/lensfun/cpuid.cpp
|
|
||||||
index d7f43b3..491412c 100644
|
|
||||||
--- a/libs/lensfun/cpuid.cpp
|
|
||||||
+++ b/libs/lensfun/cpuid.cpp
|
|
||||||
@@ -26,10 +26,11 @@ guint _lf_detect_cpu_features ()
|
|
||||||
{
|
|
||||||
#define cpuid(cmd) \
|
|
||||||
__asm volatile ( \
|
|
||||||
+ "push %%"R_BX"\n" \
|
|
||||||
"cpuid\n" \
|
|
||||||
+ "pop %%"R_BX"\n" \
|
|
||||||
: "=a" (ax), "=c" (cx), "=d" (dx) \
|
|
||||||
- : "0" (cmd) \
|
|
||||||
- : R_BX)
|
|
||||||
+ : "0" (cmd))
|
|
||||||
|
|
||||||
__SIZE_TYPE__ ax, cx, dx, tmp;
|
|
||||||
static GStaticMutex lock = G_STATIC_MUTEX_INIT;
|
|
||||||
--
|
|
||||||
1.7.2.3
|
|
||||||
|
|
12
lensfun-0.2.6-cmake_LIB_SUFFIX.patch
Normal file
12
lensfun-0.2.6-cmake_LIB_SUFFIX.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up lensfun-0.2.6/CMakeLists.txt.LIB_SUFFIX lensfun-0.2.6/CMakeLists.txt
|
||||||
|
--- lensfun-0.2.6/CMakeLists.txt.LIB_SUFFIX 2012-06-10 09:19:35.000000000 -0500
|
||||||
|
+++ lensfun-0.2.6/CMakeLists.txt 2012-06-28 08:32:16.628591449 -0500
|
||||||
|
@@ -74,7 +74,7 @@ ENDIF()
|
||||||
|
|
||||||
|
# define destination dirs (relative to prefix)
|
||||||
|
SET(BINDIR bin)
|
||||||
|
-SET(LIBDIR lib)
|
||||||
|
+SET(LIBDIR lib${LIB_SUFFIX})
|
||||||
|
SET(INCLUDEDIR include)
|
||||||
|
SET(DATADIR share/lensfun)
|
||||||
|
SET(DOCDIR share/doc/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUGFIX})
|
22
lensfun-0.2.6-cmake_pkgconfig.patch
Normal file
22
lensfun-0.2.6-cmake_pkgconfig.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff -up lensfun-0.2.6/libs/lensfun/CMakeLists.txt.cmake_pkgconfig lensfun-0.2.6/libs/lensfun/CMakeLists.txt
|
||||||
|
--- lensfun-0.2.6/libs/lensfun/CMakeLists.txt.cmake_pkgconfig 2012-02-12 05:19:39.000000000 -0600
|
||||||
|
+++ lensfun-0.2.6/libs/lensfun/CMakeLists.txt 2012-06-28 09:27:52.891959669 -0500
|
||||||
|
@@ -26,3 +26,8 @@ INSTALL(TARGETS lensfun
|
||||||
|
RUNTIME DESTINATION ${BINDIR}
|
||||||
|
LIBRARY DESTINATION ${LIBDIR}
|
||||||
|
ARCHIVE DESTINATION ${LIBDIR})
|
||||||
|
+
|
||||||
|
+# pkgconfig support
|
||||||
|
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/lensfun.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/lensfun.pc @ONLY)
|
||||||
|
+INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/lensfun.pc DESTINATION ${LIBDIR}/pkgconfig )
|
||||||
|
+
|
||||||
|
diff -up lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake.cmake_pkgconfig lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake
|
||||||
|
--- lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake.cmake_pkgconfig 2012-06-28 09:30:08.819551879 -0500
|
||||||
|
+++ lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake 2012-06-28 09:29:05.323538151 -0500
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+Name: lensfun
|
||||||
|
+Description: A photographic lens database and access library
|
||||||
|
+Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_MICRO@.@VERSION_BUGFIX@
|
||||||
|
+Requires.private: glib-2.0
|
||||||
|
+Libs: -L@CMAKE_INSTALL_PREFIX@/@LIBDIR@ -llensfun
|
||||||
|
+Cflags: -I@CMAKE_INSTALL_PREFIX@/@INCLUDEDIR@
|
90
lensfun.spec
90
lensfun.spec
@ -1,23 +1,27 @@
|
|||||||
|
|
||||||
# Fedora pkg-review: http://bugzilla.redhat.com/466764
|
Name: lensfun
|
||||||
|
Version: 0.2.6
|
||||||
Name: lensfun
|
|
||||||
Version: 0.2.5
|
|
||||||
Summary: Library to rectify defects introduced by photographic lenses
|
Summary: Library to rectify defects introduced by photographic lenses
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
|
|
||||||
License: LGPLv3 and CC-BY-SA
|
License: LGPLv3 and CC-BY-SA
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://lensfun.berlios.de/
|
URL: http://lensfun.berlios.de/
|
||||||
|
# an odd redirect is going on, spectool doesn't work (for 0.2.6 anyway)
|
||||||
Source0: http://download.berlios.de/lensfun/lensfun-%{version}.tar.bz2
|
Source0: http://download.berlios.de/lensfun/lensfun-%{version}.tar.bz2
|
||||||
Patch0: lensfun-0.2.5-cpuid.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
## upstreamable patches
|
||||||
|
# add LIB_SUFFIX support (and not hardcode prefix/lib)
|
||||||
|
Patch50: lensfun-0.2.6-cmake_LIB_SUFFIX.patch
|
||||||
|
# add pkgconfig support
|
||||||
|
Patch51: lensfun-0.2.6-cmake_pkgconfig.patch
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: pkgconfig(libpng)
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig(zlib)
|
||||||
BuildRequires: python
|
|
||||||
BuildRequires: zlib-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The lensfun library provides an open source database of photographic lenses and
|
The lensfun library provides an open source database of photographic lenses and
|
||||||
@ -31,44 +35,37 @@ vignetting and color contribution of a lens.
|
|||||||
Summary: Development toolkit for %{name}
|
Summary: Development toolkit for %{name}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: LGPLv3
|
License: LGPLv3
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains library and header files needed to build applications
|
This package contains library and header files needed to build applications
|
||||||
using lensfun.
|
using lensfun.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .cpuid
|
|
||||||
|
%patch50 -p1 -b .LIB_SUFFIX
|
||||||
|
%patch51 -p1 -b .cmake_pkgconfig
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# We can't use macro configure
|
|
||||||
./configure \
|
|
||||||
--cflags="${CFLAGS:-%optflags}" \
|
|
||||||
--cxxflags="${CXXFLAGS:-%optflags}" \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--bindir=%{_bindir} \
|
|
||||||
--sysconfdir=%{_sysconfdir} \
|
|
||||||
--datadir=%{_datadir}/lensfun \
|
|
||||||
--libdir=%{_libdir} \
|
|
||||||
--includedir=%{_includedir} \
|
|
||||||
--libexecdir=%{_libexecdir} \
|
|
||||||
%ifnarch %{ix86} x86_64
|
|
||||||
--vectorization \
|
|
||||||
%endif
|
|
||||||
--target=..generic
|
|
||||||
|
|
||||||
# set GCC.LDFLAGS to avoid stripping and useless -debuginfo
|
mkdir -p %{_target_platform}
|
||||||
make AUTODEP=0 %{?_smp_mflags} lensfun manual \
|
pushd %{_target_platform}
|
||||||
V=1 \
|
%{cmake} \
|
||||||
GCC.LDFLAGS.release=""
|
-DBUILD_DOC:BOOL=ON \
|
||||||
|
-DBUILD_TESTS:BOOL=OFF \
|
||||||
|
..
|
||||||
|
popd
|
||||||
|
|
||||||
|
make %{?_smp_mflags} -C %{_target_platform}
|
||||||
|
make doc -C %{_target_platform}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make AUTODEP=0 INSTALL_PREFIX=%{buildroot} install
|
|
||||||
|
make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
@ -76,30 +73,31 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_docdir}/%{name}-%{version}/
|
%doc README
|
||||||
%doc %{_docdir}/%{name}-%{version}/README
|
%doc docs/cc-by-sa-3.0.txt docs/lgpl-3.0.txt
|
||||||
%doc %{_docdir}/%{name}-%{version}/*.txt
|
%doc docs/adobe-lens-profile.txt
|
||||||
# currently, nothing is covered by GPLv3 (no apps in the package), no need to
|
|
||||||
# confuse people:
|
|
||||||
%exclude %{_docdir}/%{name}-%{version}/gpl-3.0.txt
|
|
||||||
%{_datadir}/lensfun/
|
%{_datadir}/lensfun/
|
||||||
%{_libdir}/liblensfun.so.0*
|
%{_libdir}/liblensfun.so.0*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc %{_docdir}/%{name}-%{version}/manual/
|
%doc %{_target_platform}/doc_doxygen/*
|
||||||
%{_includedir}/lensfun.h
|
%{_includedir}/lensfun/
|
||||||
%{_libdir}/liblensfun.so
|
%{_libdir}/liblensfun.so
|
||||||
%{_libdir}/pkgconfig/lensfun.pc
|
%{_libdir}/pkgconfig/lensfun.pc
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 28 2012 Rex Dieter <rdieter@fedoraproject.org>
|
||||||
|
- 0.2.6-1
|
||||||
|
- lensfun-0.2.6 (#836156)
|
||||||
|
- use cmake
|
||||||
|
- use pkgconfig-style deps
|
||||||
|
|
||||||
* Thu Jun 21 2012 Nils Philippsen <nils@redhat.com> - 0.2.5-8
|
* Thu Jun 21 2012 Nils Philippsen <nils@redhat.com> - 0.2.5-8
|
||||||
- don't modify doxygen configuration anymore as doxygen carries fixes now
|
- don't modify doxygen configuration anymore as doxygen carries fixes now
|
||||||
(#831399)
|
(#831399)
|
||||||
|
Loading…
Reference in New Issue
Block a user