--- a/ChangeLog Wed Jun 30 19:41:11 2010 +0000
+++ b/ChangeLog Wed Jun 30 19:43:25 2010 +0000
@@ -2,6 +2,7 @@
* SFEsysstat.spec: bump version to 20100528, fix sparc install
* include/stdcxx.inc: fix defines
+ * SFEexiv2.spec: fix 0.20 build
2010-06-30 Simon Jin <[email protected]>
--- a/SFEexiv2.spec Wed Jun 30 19:41:11 2010 +0000
+++ b/SFEexiv2.spec Wed Jun 30 19:43:25 2010 +0000
@@ -18,6 +18,7 @@
Patch1: exiv2-01-unsigned-char.diff
Patch2: exiv2-02-sunstudio.diff
Patch3: exiv2-03-make.diff
+Patch4: exiv2-04-stdcxx4.diff
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -51,6 +52,7 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
@@ -63,7 +65,7 @@
export CXXFLAGS="%cxx_optflags -library=no%Cstd -I%{stdcxx_include}"
-export LDFLAGS="%_ldflags -lCrun -L%{stdcxx_lib} -R%{stdcxx_lib} -Wl,-zmuldefs"
+export LDFLAGS="%_ldflags -L%{stdcxx_lib} -R%{stdcxx_lib} -lstdcxx4 -Wl,-zmuldefs"
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
@@ -82,18 +84,17 @@
%else
rm -rf $RPM_BUILD_ROOT%{_localedir}
%endif
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, bin)
-%dir %attr (0755, root, bin) %{_prefix}
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/lib*.so*
-%{_libdir}/lib*.la
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
@@ -102,7 +103,6 @@
%files devel
%defattr (-, root, bin)
-%dir %attr (0755, root, bin) %{_prefix}
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, bin) %{_libdir}
@@ -112,13 +112,14 @@
%if %build_l10n
%files l10n
%defattr (-, root, other)
-%dir %attr (0755, root, bin) %{_prefix}
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/locale
%{_datadir}/locale/*
%endif
%changelog
+* Wed Jun 30 2010 - Milan Jurik
+- fix 0.20 build
* Sun Jun 27 2010 - Milan Jurik
- update to 0.20, but it has problem with Sun Studio
* Wed Jan 30 2008 - [email protected]
--- a/patches/exiv2-02-sunstudio.diff Wed Jun 30 19:41:11 2010 +0000
+++ b/patches/exiv2-02-sunstudio.diff Wed Jun 30 19:43:25 2010 +0000
@@ -844,3 +844,82 @@
i += parsePreviewNumbers(Params::instance().previewNumbers_, optarg, i + 1);
target |= Params::ctPreview;
break;
+--- exiv2-0.20/src/actions.cpp Sat Apr 3 09:53:30 2010
++++ exiv2-0.20-patch/src/actions.cpp Wed Jun 30 20:45:07 2010
+@@ -29,6 +29,8 @@
+ #include "rcsid.hpp"
+ EXIV2_RCSID("@(#) $Id: actions.cpp 2045 2010-04-03 07:53:30Z ahuggel $")
+
++#include <ios>
++
+ // *****************************************************************************
+ // included header files
+ #ifdef _MSC_VER
+@@ -691,7 +693,7 @@
+ return;
+ }
+ bool done = false;
+- if (0 == strcmp(md.key().c_str(), "Exif.Photo.UserComment")) {
++ if (0 == std::strcmp(md.key().c_str(), "Exif.Photo.UserComment")) {
+ const Exiv2::CommentValue* pcv = dynamic_cast<const Exiv2::CommentValue*>(&md.value());
+ if (pcv) {
+ Exiv2::CommentValue::CharsetId csId = pcv->charsetId();
+@@ -716,7 +718,7 @@
+ return;
+ }
+ bool done = false;
+- if (0 == strcmp(md.key().c_str(), "Exif.Photo.UserComment")) {
++ if (0 == std::strcmp(md.key().c_str(), "Exif.Photo.UserComment")) {
+ const Exiv2::CommentValue* pcv = dynamic_cast<const Exiv2::CommentValue*>(&md.value());
+ if (pcv) {
+ std::cout << pcv->comment(Params::instance().charset_.c_str());
+@@ -1654,7 +1656,7 @@
+ }
+ Exiv2::ExifData::const_iterator md = Exiv2::isoSpeed(exifData);
+ if (md != exifData.end()) {
+- if (strcmp(md->key().c_str(), "Exif.Photo.ISOSpeedRatings") == 0) {
++ if (std::strcmp(md->key().c_str(), "Exif.Photo.ISOSpeedRatings") == 0) {
+ if (Params::instance().verbose_) {
+ std::cout << _("Standard Exif ISO tag exists; not modified\n");
+ }
+@@ -1941,7 +1943,7 @@
+ struct String {
+ const char* s_;
+ bool operator==(const char* s) const {
+- return 0 == strcmp(s_, s);
++ return 0 == std::strcmp(s_, s);
+ }
+ };
+
+@@ -2027,7 +2029,7 @@
+ }
+
+ // Workaround for MinGW rename which does not overwrite existing files
+- remove(newPath.c_str());
++ std::remove(newPath.c_str());
+ if (std::rename(path.c_str(), newPath.c_str()) == -1) {
+ std::cerr << Params::instance().progname()
+ << ": " << _("Failed to rename") << " "
+--- exiv2-0.20/src/utils.cpp Sat Apr 3 09:53:30 2010
++++ exiv2-0.20-patch/src/utils.cpp Wed Jun 30 20:45:28 2010
+@@ -38,6 +38,8 @@
+
+ #include "utils.hpp"
+
++#include <stdio.h>
++
+ // + standard includes
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- exiv2-0.20/src/metacopy.cpp Wed Apr 14 18:32:55 2010
++++ exiv2-0.20-patch/src/metacopy.cpp Wed Jun 30 20:45:48 2010
+@@ -26,6 +26,9 @@
+ Author(s): Brad Schick (brad) <[email protected]>
+ History : 13-Jul-04, brad: created
+ */
++
++#include <ios>
++
+ // *****************************************************************************
+ // included header files
+ #include "image.hpp"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/exiv2-04-stdcxx4.diff Wed Jun 30 19:43:25 2010 +0000
@@ -0,0 +1,11 @@
+--- exiv2-0.20/src/Makefile Wed Jun 30 20:46:28 2010
++++ exiv2-0.20-patch/src/Makefile Wed Jun 30 20:46:05 2010
+@@ -244,7 +244,7 @@
+ @touch lib
+
+ path-test: path-test.o utils.o
+- $(CXX) $(CXXFLAGS) path-test.o utils.o -o $@
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) path-test.o utils.o -o $@
+
+ $(BINARY): %: %.o lib
+ @$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(LIBRARY) [email protected] -rpath $(libdir)