From 8210e5a40e254eaf2bd8f67c4aae69d5300b66e0 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 29 Oct 2009 17:49:43 +0000 Subject: [PATCH] - add pkgconfig support --- jasper-pkgconfig.patch | 48 ++++++++++++++++++++++++++++++++++++++++++ jasper.spec | 18 +++++++++++++--- 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 jasper-pkgconfig.patch diff --git a/jasper-pkgconfig.patch b/jasper-pkgconfig.patch new file mode 100644 index 0000000..c8af5ca --- /dev/null +++ b/jasper-pkgconfig.patch @@ -0,0 +1,48 @@ +diff -Naur jasper-1.900.1/configure.ac jasper-1.900.1.new/configure.ac +--- jasper-1.900.1/configure.ac 2007-01-19 21:47:11.000000000 +0000 ++++ jasper-1.900.1.new/configure.ac 2009-10-29 13:37:02.000000000 +0000 +@@ -399,6 +399,8 @@ + src/libjasper/pnm/Makefile + src/libjasper/ras/Makefile + src/msvc/Makefile ++pkgconfig/Makefile ++pkgconfig/jasper.pc + jasper.spec + ]) + AC_OUTPUT +diff -Naur jasper-1.900.1/Makefile.am jasper-1.900.1.new/Makefile.am +--- jasper-1.900.1/Makefile.am 2007-01-19 21:43:14.000000000 +0000 ++++ jasper-1.900.1.new/Makefile.am 2009-10-29 13:36:28.000000000 +0000 +@@ -64,7 +64,7 @@ + # Note: We need to put the derived file "jasper.spec" in the distribution + # in order to facilitate RPM building. + +-SUBDIRS = src ++SUBDIRS = src pkgconfig + + rpm: dist + for i in BUILD RPMS SRPMS SOURCES SPECS; do \ +diff -Naur jasper-1.900.1/pkgconfig/jasper.pc.in jasper-1.900.1.new/pkgconfig/jasper.pc.in +--- jasper-1.900.1/pkgconfig/jasper.pc.in 1970-01-01 01:00:00.000000000 +0100 ++++ jasper-1.900.1.new/pkgconfig/jasper.pc.in 2009-10-29 16:30:43.000000000 +0000 +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: Jasper ++Description: JPEG 2000 encoding and decoding library ++Version: @VERSION@ ++ ++Libs: -L${libdir} -ljasper ++Cflags: -I${includedir}/jasper +diff -Naur jasper-1.900.1/pkgconfig/Makefile.am jasper-1.900.1.new/pkgconfig/Makefile.am +--- jasper-1.900.1/pkgconfig/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ jasper-1.900.1.new/pkgconfig/Makefile.am 2009-10-29 13:38:59.000000000 +0000 +@@ -0,0 +1,5 @@ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = jasper.pc ++ ++EXTRA_DIST = \ ++ jasper.pc.in diff --git a/jasper.spec b/jasper.spec index 9a46f26..c873be6 100644 --- a/jasper.spec +++ b/jasper.spec @@ -7,7 +7,7 @@ Summary: Implementation of the JPEG-2000 standard, Part 1 Name: jasper Group: System Environment/Libraries Version: 1.900.1 -Release: 13%{?dist} +Release: 14%{?dist} License: JasPer URL: http://www.ece.uvic.ca/~mdadams/jasper/ @@ -28,11 +28,14 @@ Patch4: jpc_dec.c.patch Patch5: jasper-1.900.1-CVE-2008-3520.patch # https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522 Patch6: jasper-1.900.1-CVE-2008-3522.patch +# add pkg-config support +Patch7: jasper-pkgconfig.patch -BuildRequires: automake -BuildRequires: libjpeg-devel +BuildRequires: automake libtool BuildRequires: freeglut-devel BuildRequires: libGLU-devel +BuildRequires: libjpeg-devel +BuildRequires: pkgconfig Requires: %{name}-libs = %{version}-%{release} @@ -47,6 +50,7 @@ Group: Development/Libraries Provides: libjasper-devel = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: libjpeg-devel +Requires: pkgconfig %description devel %{summary}. @@ -70,10 +74,14 @@ Requires: %{name} = %{version}-%{release} %setup -q -n %{name}-%{version} %patch1 -p1 -b .GL +%patch2 -p1 -b .GL-ac %patch3 -p1 -b .CVE-2007-2721 %patch4 -p1 -b .jpc_dec_assertion %patch5 -p1 -b .CVE-2008-3520 %patch6 -p1 -b .CVE-2008-3522 +%patch7 -p1 -b .pkgconfig + +autoreconf -i %build @@ -121,6 +129,7 @@ rm -rf $RPM_BUILD_ROOT %doc doc/* %{_includedir}/jasper/ %{_libdir}/libjasper.so +%{_libdir}/pkgconfig/jasper.pc %files libs %defattr(-,root,root,-) @@ -135,6 +144,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 29 2009 Rex Dieter - 1.900.1-14 +- add pkgconfig support + * Mon Oct 13 2009 Rex Dieter - 1.900.1-13 - CVE-2008-3520 jasper: multiple integer overflows in jas_alloc calls (#461476) - CVE-2008-3522 jasper: possible buffer overflow in