From 9f9c449ad21b6749e4bd4b46d00649d70a240a6c6b68048811fcb7fabe2c5af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 20 May 2014 09:22:30 +0000 Subject: [PATCH 1/2] Accepting request 234476 from home:sumski:branches:graphics - Update to 2.0.2 * Added support for lcms2. * Added support for libjpeg version 9. - Bump %lname to libmng2, per upstream change (also adjusted baselibs) - Switch to CMake buildsystem: added cmake BuildRequires - Added pkg-config and man BuildRequires - BuildRequire liblcms2-devel instead of liblcms-devel - Drop libmng-no-jpeg.diff and libmng.diff, not needed with good, CMake buildsystem OBS-URL: https://build.opensuse.org/request/show/234476 OBS-URL: https://build.opensuse.org/package/show/graphics/libmng?expand=0&rev=14 --- baselibs.conf | 2 +- libmng-1.0.10.tar.bz2 | 3 -- libmng-2.0.2.tar.xz | 3 ++ libmng-no-jpeg.diff | 30 ----------------- libmng.changes | 13 ++++++++ libmng.diff | 78 ------------------------------------------- libmng.spec | 51 ++++++++++++++-------------- 7 files changed, 43 insertions(+), 137 deletions(-) delete mode 100644 libmng-1.0.10.tar.bz2 create mode 100644 libmng-2.0.2.tar.xz delete mode 100644 libmng-no-jpeg.diff delete mode 100644 libmng.diff diff --git a/baselibs.conf b/baselibs.conf index b7ee9b8..7df3468 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libmng +libmng2 diff --git a/libmng-1.0.10.tar.bz2 b/libmng-1.0.10.tar.bz2 deleted file mode 100644 index b7b3fb8..0000000 --- a/libmng-1.0.10.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b1477816c54b4d8ee0690c583982637910a1801ece0b0831e03fd07882e8118 -size 852635 diff --git a/libmng-2.0.2.tar.xz b/libmng-2.0.2.tar.xz new file mode 100644 index 0000000..e996c8e --- /dev/null +++ b/libmng-2.0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:278c04c781e5a679c91df006fee7e71233e6f15557aef513a19fe49cd650bc50 +size 951844 diff --git a/libmng-no-jpeg.diff b/libmng-no-jpeg.diff deleted file mode 100644 index 3f3a680..0000000 --- a/libmng-no-jpeg.diff +++ /dev/null @@ -1,30 +0,0 @@ -diff -ur libmng-orig/makefiles/makefile.linux libmng-1.0.10/makefiles/makefile.linux ---- makefiles/makefile.linux 2005-01-30 11:28:00.000000000 +0100 -+++ makefiles/makefile.linux 2007-07-19 13:39:28.000000000 +0200 -@@ -11,7 +11,7 @@ - - # default build options (this forces shared library compatibility!!) - #OPTIONS = -DMNG_BUILD_SO --OPTIONS = -DMNG_BUILD_SO -DMNG_FULL_CMS -+OPTIONS = -DMNG_BUILD_SO -DMNG_NO_INCLUDE_JNG - - # where "make install" puts libmng.a,libmng.so*,libmng.h,libmng_conf.h,libmng_types.h - prefix=/usr/local -@@ -50,7 +50,7 @@ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -L$(JPEGLIB) -Wl,-rpath,$(JPEGLIB) \ - -L$(LCMSLIB) -Wl,-rpath,$(LCMSLIB) \ -- -lmng -lz -ljpeg -llcms -lm -+ -lmng -lz -lm - - RANLIB=ranlib - #RANLIB=echo -@@ -107,7 +107,7 @@ - # $(CC) -shared -Wl,-soname,libmng.so.$(MNGMAJ) -o libmng.so.$(MNGVER) \ - # $(OBJSDLL) -L$(ZLIBLIB) -L$(JPEGLIB) -L$(LCMSLIB) -lz -lm -lc - $(CC) -shared -Wl,-soname,libmng.so.$(MNGMAJ) -o libmng.so.$(MNGVER) \ -- $(OBJSDLL) -L$(ZLIBLIB) -L$(JPEGLIB) -ljpeg -L$(LCMSLIB) -llcms \ -+ $(OBJSDLL) -L$(ZLIBLIB) \ - -lz -lm -lc - - install: libmng.a libmng.so.$(MNGVER) diff --git a/libmng.changes b/libmng.changes index f084da0..33cae2f 100644 --- a/libmng.changes +++ b/libmng.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Sat May 17 21:56:29 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 2.0.2 + * Added support for lcms2. + * Added support for libjpeg version 9. +- Bump %lname to libmng2, per upstream change (also adjusted baselibs) +- Switch to CMake buildsystem: added cmake BuildRequires +- Added pkg-config and man BuildRequires +- BuildRequire liblcms2-devel instead of liblcms-devel +- Drop libmng-no-jpeg.diff and libmng.diff, not needed with good, CMake + buildsystem + ------------------------------------------------------------------- Mon Apr 15 12:37:05 UTC 2013 - mmeister@suse.com diff --git a/libmng.diff b/libmng.diff deleted file mode 100644 index fea7ca3..0000000 --- a/libmng.diff +++ /dev/null @@ -1,78 +0,0 @@ -diff -ur libmng-orig/makefiles/makefile.linux libmng-1.0.10/makefiles/makefile.linux ---- makefiles/makefile.linux 2005-01-30 11:28:00.000000000 +0100 -+++ makefiles/makefile.linux 2007-07-19 13:35:44.000000000 +0200 -@@ -14,25 +14,25 @@ - OPTIONS = -DMNG_BUILD_SO -DMNG_FULL_CMS - - # where "make install" puts libmng.a,libmng.so*,libmng.h,libmng_conf.h,libmng_types.h --prefix=/usr/local -+prefix=/usr - - # Where the zlib library and include files are located - #ZLIBLIB=../zlib - #ZLIBINC=../zlib --ZLIBLIB=/usr/local/lib --ZLIBINC=/usr/local/include -+ZLIBLIB=/usr/$(_LIB) -+ZLIBINC=/usr/include - - # Where the jpeg library and include files are located - #JPEGLIB=../jpgsrc - #JPEGINC=../jpgsrc --JPEGLIB=/usr/local/lib --JPEGINC=/usr/local/include -+JPEGLIB=/usr/$(_LIB) -+JPEGINC=/usr/include - - # Where the lcms library and include files are located - #LCMSLIB=../lcms/lib - #LCMSINC=../lcms/source --LCMSLIB=/usr/local/lib --LCMSINC=/usr/local/include -+LCMSLIB=/usr/$(_LIB) -+LCMSINC=/usr/include - - ALIGN= - # for i386: -@@ -45,7 +45,7 @@ - # for pgcc version 2.95.1, -O3 is buggy; don't use it. - - CFLAGS=-I$(ZLIBINC) -I$(JPEGINC) -I$(LCMSINC) -Wall -O3 -funroll-loops \ -- $(OPTIONS) $(ALIGN) # $(WARNMORE) -g -+ $(OPTIONS) $(ALIGN) $(RPM_OPT_FLAGS) -fPIC # $(WARNMORE) -g - LDFLAGS=-L. -Wl,-rpath,. \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -L$(JPEGLIB) -Wl,-rpath,$(JPEGLIB) \ -@@ -57,11 +57,11 @@ - - # current version numbers - MNGMAJ = 1 --MNGMIN = 1.0.9 -+MNGMIN = 1.0.10 - MNGVER = $(MNGMAJ).$(MNGMIN) - - INCPATH=$(prefix)/include --LIBPATH=$(prefix)/lib -+LIBPATH=$(prefix)/$(_LIB) - - OBJS = \ - libmng_callback_xs.o \ -@@ -111,13 +111,11 @@ - -lz -lm -lc - - install: libmng.a libmng.so.$(MNGVER) -- -@mkdir $(INCPATH) $(LIBPATH) -- cp libmng.h libmng_conf.h libmng_types.h $(INCPATH) -- chmod 644 $(INCPATH)/libmng.h $(INCPATH)/libmng_conf.h $(INCPATH)/libmng_types.h -- cp libmng.a libmng.so.$(MNGVER) $(LIBPATH) -- chmod 755 $(LIBPATH)/libmng.so.$(MNGVER) -- -@/bin/rm -f $(LIBPATH)/libmng.so.$(MNGMAJ) $(LIBPATH)/libmng.so -- (cd $(LIBPATH); ln -sf libmng.so.$(MNGVER) libmng.so.$(MNGMAJ); \ -+ -@mkdir -p $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH) -+ install -m 0644 libmng.h libmng_conf.h libmng_types.h $(DESTDIR)$(INCPATH) -+ install -m 0755 libmng.a libmng.so.$(MNGVER) $(DESTDIR)$(LIBPATH) -+ -@/bin/rm -f $(DESTDIR)$(LIBPATH)/libmng.so.$(MNGMAJ) $(DESTDIR)$(LIBPATH)/libmng.so -+ (cd $(DESTDIR)$(LIBPATH); ln -sf libmng.so.$(MNGVER) libmng.so.$(MNGMAJ); \ - ln -sf libmng.so.$(MNGMAJ) libmng.so) - - clean: diff --git a/libmng.spec b/libmng.spec index 9517670..069d666 100644 --- a/libmng.spec +++ b/libmng.spec @@ -1,7 +1,7 @@ # # spec file for package libmng # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,17 @@ Name: libmng -Version: 1.0.10 +Version: 2.0.2 Release: 0 Summary: Library for Support of MNG and JNG Formats License: Zlib Group: Development/Libraries/C and C++ -%define lname libmng1 +%define lname libmng2 +BuildRequires: cmake BuildRequires: libjpeg-devel -BuildRequires: liblcms-devel +BuildRequires: liblcms2-devel +BuildRequires: man +BuildRequires: pkg-config BuildRequires: zlib-devel # bug437293 %ifarch ppc64 @@ -32,11 +35,9 @@ Obsoletes: libmng-64bit %endif # Url: http://www.libmng.com/ -Source0: http://downloads.sourceforge.net/project/%{name}/%{name}-devel/%{version}/%{name}-%{version}.tar.bz2 +Source0: http://downloads.sourceforge.net/project/%{name}/%{name}-devel/%{version}/%{name}-%{version}.tar.xz Source1: baselibs.conf -Patch1: libmng.diff -Patch2: libmng-no-jpeg.diff -Patch3: libmng-1.0.9-dont-leak-zlib-streams.diff +Patch0: libmng-1.0.9-dont-leak-zlib-streams.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -75,29 +76,27 @@ This package contains the static library and the header files. %prep %setup -q -%patch1 -%patch3 +%patch0 %build - # This is not zlib licensed and unused, just as a caution, bnc#744320 rm -rf contrib -make %{?_smp_mflags} -f makefiles/makefile.linux _LIB=%{_lib} +export CXXFLAGS="%{optflags}" +export CFLAGS="$CXXFLAGS" +mkdir build && cd build && \ +cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_SKIP_RPATH=ON \ + -DMNG_INSTALL_DOC_DIR=%{_datadir}/doc/packages/%{name} \ + -DBUILD_MAN=ON \ + -DBUILD_STATIC_LIBS=OFF .. + +make %{?_smp_mflags} %install -make -f makefiles/makefile.linux DESTDIR=%{buildroot} _LIB=%{_lib} install -mkdir -p %{buildroot}/%{_mandir}/man3/ %{buildroot}/%{_mandir}/man5/ -install -m 0644 doc/man/*.3 %{buildroot}/%{_mandir}/man3/ -install -m 0644 doc/man/*.5 %{buildroot}/%{_mandir}/man5/ -# -# build a mini libmng -# -make -f makefiles/makefile.linux clean -patch -p0 < %{PATCH2} -make -f makefiles/makefile.linux _LIB=%{_lib} -install -m 0644 libmng.a %{buildroot}/%{_libdir}/libmng-mini.a -rm -v %{buildroot}%{_libdir}/libmng.a +%make_install -C build %post -n %lname -p /sbin/ldconfig @@ -112,7 +111,9 @@ rm -v %{buildroot}%{_libdir}/libmng.a %defattr(-,root,root) %{_includedir}/*.h %doc %{_mandir}/*/* -%{_libdir}/libmng-mini.a +%doc %{_docdir}/libmng/ +%{_libdir}/pkgconfig/libmng.pc %{_libdir}/libmng.so +%{_datadir}/mng-2.0/ %changelog From 60e0c49b7e05adf13f548a3d9bd88b82f59abadc2e6fc7b0e178dba629a4d0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 21 May 2014 08:56:03 +0000 Subject: [PATCH 2/2] Accepting request 234880 from home:sumski:branches:graphics Added fix-header-include.patch; make libmng_types header usable to outside packages/libraries this shall be needed for OF:staging:D OBS-URL: https://build.opensuse.org/request/show/234880 OBS-URL: https://build.opensuse.org/package/show/graphics/libmng?expand=0&rev=15 --- fix-header-include.patch | 10 ++++++++++ libmng.changes | 6 ++++++ libmng.spec | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 fix-header-include.patch diff --git a/fix-header-include.patch b/fix-header-include.patch new file mode 100644 index 0000000..be45a08 --- /dev/null +++ b/fix-header-include.patch @@ -0,0 +1,10 @@ +--- libmng-2.0.2.orig/libmng_types.h 2013-01-20 04:45:24.000000000 +0100 ++++ libmng-2.0.2/libmng_types.h 2014-05-20 19:10:09.460790466 +0200 +@@ -204,6 +204,7 @@ + #define HAVE_BOOLEAN + typedef int boolean; + #endif ++#include + #include + #endif /* MNG_INCLUDE_IJG6B */ + diff --git a/libmng.changes b/libmng.changes index 33cae2f..b869f86 100644 --- a/libmng.changes +++ b/libmng.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 20 17:12:33 UTC 2014 - hrvoje.senjan@gmail.com + +- Added fix-header-include.patch; make libmng_types header usable + to outside packages/libraries + ------------------------------------------------------------------- Sat May 17 21:56:29 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libmng.spec b/libmng.spec index 069d666..dfa9e99 100644 --- a/libmng.spec +++ b/libmng.spec @@ -38,6 +38,8 @@ Url: http://www.libmng.com/ Source0: http://downloads.sourceforge.net/project/%{name}/%{name}-devel/%{version}/%{name}-%{version}.tar.xz Source1: baselibs.conf Patch0: libmng-1.0.9-dont-leak-zlib-streams.diff +# PATCH-FIX-UPSTREAM fix-header-include.patch -- make libmng_types header usable to outside packages/libraries +Patch1: fix-header-include.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -77,6 +79,7 @@ This package contains the static library and the header files. %prep %setup -q %patch0 +%patch1 -p1 %build # This is not zlib licensed and unused, just as a caution, bnc#744320