only use pkgconfig if needed in gimptool, require pkgconfig in devel

subpackage (#189314, #189371)
This commit is contained in:
Nils Philippsen 2006-04-20 12:56:59 +00:00
parent f4934b4325
commit a79903e92a
2 changed files with 174 additions and 3 deletions

163
gimp-2.2.11-gimptool.patch Normal file
View File

@ -0,0 +1,163 @@
--- gimp-2.2.11/gimptool-2.0.in.gimptool 2006-01-10 13:12:28.000000000 +0100
+++ gimp-2.2.11/gimptool-2.0.in 2006-04-20 14:45:18.000000000 +0200
@@ -91,54 +91,60 @@
usage 1
fi
-if test x${PKG_CONFIG+set} != xset ; then
- PKG_CONFIG=pkg-config
-fi
+__gimptool_init__=0
+init() {
+ if [ "$__gimptool_init__" -eq 0 ]; then
+ if test x${PKG_CONFIG+set} != xset ; then
+ PKG_CONFIG=pkg-config
+ fi
-if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
- gtk_cflags=`$PKG_CONFIG --cflags gtk+-2.0`
- gtk_libs=`$PKG_CONFIG --libs gtk+-2.0`
- glib_cflags=`$PKG_CONFIG --cflags glib-2.0`
- glib_libs=`$PKG_CONFIG --libs glib-2.0`
-else
- echo "*** pkg-config not found or too old; using paths from gimp compilation." 1>&2
- gtk_cflags='@GTK_CFLAGS@'
- gtk_libs='@GTK_LIBS@'
- glib_cflags='@GLIB_CFLAGS@'
- glib_libs='@GLIB_LIBS@'
-fi
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
+ gtk_cflags=`$PKG_CONFIG --cflags gtk+-2.0`
+ gtk_libs=`$PKG_CONFIG --libs gtk+-2.0`
+ glib_cflags=`$PKG_CONFIG --cflags glib-2.0`
+ glib_libs=`$PKG_CONFIG --libs glib-2.0`
+ else
+ echo "*** pkg-config not found or too old; using paths from gimp compilation." 1>&2
+ gtk_cflags='@GTK_CFLAGS@'
+ gtk_libs='@GTK_LIBS@'
+ glib_cflags='@GLIB_CFLAGS@'
+ glib_libs='@GLIB_LIBS@'
+ fi
-if test x${INSTALL+set} != xset ; then
- INSTALL='@INSTALL@'
- if test "$INSTALL" = "./install-sh -c"; then
- mydirname=`echo $0 | sed -e 's#\(.*\)/[^/].*$#\1#'`
- INSTALL="$mydirname/gimpinstall"
- fi
-fi
+ if test x${INSTALL+set} != xset ; then
+ INSTALL='@INSTALL@'
+ if test "$INSTALL" = "./install-sh -c"; then
+ mydirname=`echo $0 | sed -e 's#\(.*\)/[^/].*$#\1#'`
+ INSTALL="$mydirname/gimpinstall"
+ fi
+ fi
-if test x${CC+set} != xset ; then
- cc='@CC@'
-else
- cc="$CC"
-fi
+ if test x${CC+set} != xset ; then
+ cc='@CC@'
+ else
+ cc="$CC"
+ fi
-if test x${CFLAGS+set} != xset ; then
- cflags='@CFLAGS@'
-else
- cflags="$CFLAGS"
-fi
+ if test x${CFLAGS+set} != xset ; then
+ cflags='@CFLAGS@'
+ else
+ cflags="$CFLAGS"
+ fi
-if test x${LDFLAGS+set} != xset ; then
- ldflags='@LDFLAGS@'
-else
- ldflags="$LDFLAGS"
-fi
+ if test x${LDFLAGS+set} != xset ; then
+ ldflags='@LDFLAGS@'
+ else
+ ldflags="$LDFLAGS"
+ fi
-if test x${LIBS+set} != xset ; then
- libs=""
-else
- libs="$LIBS"
-fi
+ if test x${LIBS+set} != xset ; then
+ libs=""
+ else
+ libs="$LIBS"
+ fi
+ __gimptool_init__=1
+ fi
+}
while test $# -gt 0; do
case "$1" in
@@ -174,9 +180,17 @@
exec_prefix_set=yes
;;
--exec-prefix)
+ init
echo $exec_prefix
;;
--*dir)
+ case "$1" in
+ --gimp*dir)
+ ;;
+ *)
+ init
+ ;;
+ esac
dirname=\$`echo $1 | sed -e 's,^--,,'`
dirname=`eval echo $dirname`
test -z "$dirname" && exit 1
@@ -184,6 +198,7 @@
exit 0
;;
--cflags | --cflags-noui | --cflags-nogimpui)
+ init
case $1 in
--cflags | --cflags-nogimpui)
my_gtk_cflags=$gtk_cflags ;;
@@ -194,6 +209,7 @@
echo $includes $my_gtk_cflags
;;
--libs | --libs-nogimpui)
+ init
my_gtk_libs=
libdirs=-L@libdir@
for i in $gtk_libs ; do
@@ -213,6 +229,7 @@
esac
;;
--libs-noui)
+ init
echo -L@libdir@ -lgimp-@GIMP_API_VERSION@ -lgimpcolor-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@ -lgimpbase-@GIMP_API_VERSION@ $glib_libs $rt_libs
;;
--install-bin | --install-admin-bin \
@@ -220,6 +237,7 @@
| --install-script | --install-admin-script \
| --uninstall-bin | --uninstall-admin-bin \
| --uninstall-script | --uninstall-admin-script )
+ init
case $1 in
--*install-bin)
install_cmd="@INSTALL_PROGRAM@"
@@ -292,6 +310,7 @@
| --install-nogimpui-strip | --install-admin-nogimpui-strip \
| --build-noui | --install-noui | --install-admin-noui \
| --build-noui-strip | --install-noui-strip | --install-admin-noui-strip)
+ init
opt=`echo $1 | sed 's/-strip$//'`
if test "x$opt" != "x$1" ; then
cflags=`echo $cflags | sed -e 's/-g //g' -e 's/ -g//g'`

View File

@ -19,7 +19,7 @@ Version: 2.2.11
%define minorver 200 %define minorver 200
%define microver %(ver=%{version}; echo ${ver##*.*.}) %define microver %(ver=%{version}; echo ${ver##*.*.})
#define prever pre2 #define prever pre2
Release: %{?prever:0.0.%{prever}.}2 Release: %{?prever:0.0.%{prever}.}3
Epoch: 2 Epoch: 2
License: GPL, LGPL License: GPL, LGPL
Group: Applications/Multimedia Group: Applications/Multimedia
@ -59,7 +59,6 @@ BuildRequires: findutils
%if %_with_lcms %if %_with_lcms
BuildRequires: lcms-devel BuildRequires: lcms-devel
%endif %endif
Requires: pkgconfig
Requires: desktop-file-utils >= 0.9 Requires: desktop-file-utils >= 0.9
Requires: glib2 >= 2.4.8 Requires: glib2 >= 2.4.8
Requires: gtk2 >= 2.4.14 Requires: gtk2 >= 2.4.14
@ -79,6 +78,7 @@ Patch2: gimp-2.2.3-icontheme.patch
Patch3: gimp-2.2.7-gcc4.patch Patch3: gimp-2.2.7-gcc4.patch
Patch4: gimp-2.2.4-gifload.patch Patch4: gimp-2.2.4-gifload.patch
Patch5: gimp-2.2.11-htmlview.patch Patch5: gimp-2.2.11-htmlview.patch
Patch6: gimp-2.2.11-gimptool.patch
%description %description
The GIMP (GNU Image Manipulation Program) is a powerful image The GIMP (GNU Image Manipulation Program) is a powerful image
@ -93,7 +93,10 @@ all with multi-level undo.
%package devel %package devel
Summary: GIMP plugin and extension development kit Summary: GIMP plugin and extension development kit
Group: Applications/Multimedia Group: Applications/Multimedia
Requires: gtk2-devel, %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: gtk2-devel
Requires: glib2-devel
Requires: pkgconfig
Obsoletes: gimp2-devel gimp-beta-devel <= %{version} Obsoletes: gimp2-devel gimp-beta-devel <= %{version}
%description devel %description devel
The gimp-devel package contains the static libraries and header files The gimp-devel package contains the static libraries and header files
@ -108,6 +111,7 @@ extensions.
%patch3 -p1 -b .gcc4 %patch3 -p1 -b .gcc4
%patch4 -p1 -b .gifload %patch4 -p1 -b .gifload
%patch5 -p1 -b .htmlview %patch5 -p1 -b .htmlview
%patch6 -p1 -b .gimptool
%build %build
libtoolize --copy --force libtoolize --copy --force
@ -355,6 +359,10 @@ fi
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Thu Apr 20 2006 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.11-3
- only use pkgconfig if needed in gimptool, require pkgconfig in devel
subpackage (#189314, #189371)
* Wed Apr 19 2006 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.11-2 * Wed Apr 19 2006 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.11-2
- require pkgconfig (#189314) - require pkgconfig (#189314)