SHA256
1
0
forked from pool/libmng

Accepting request 234935 from graphics

Added fix-header-include.patch; make libmng_types header usable to outside packages/libraries

this shall be needed for OF:staging:D (forwarded request 234880 from sumski)

OBS-URL: https://build.opensuse.org/request/show/234935
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libmng?expand=0&rev=21
This commit is contained in:
Stephan Kulow 2014-06-02 05:04:14 +00:00 committed by Git OBS Bridge
commit 6de59b81fb
8 changed files with 62 additions and 137 deletions

View File

@ -1 +1 @@
libmng1
libmng2

10
fix-header-include.patch Normal file
View File

@ -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 <stdio.h>
#include <jpeglib.h>
#endif /* MNG_INCLUDE_IJG6B */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b1477816c54b4d8ee0690c583982637910a1801ece0b0831e03fd07882e8118
size 852635

3
libmng-2.0.2.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:278c04c781e5a679c91df006fee7e71233e6f15557aef513a19fe49cd650bc50
size 951844

View File

@ -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)

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
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
- 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

View File

@ -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:

View File

@ -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,11 @@ 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
# 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
@ -75,29 +78,28 @@ This package contains the static library and the header files.
%prep
%setup -q
%patch1
%patch3
%patch0
%patch1 -p1
%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 +114,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