- switch to pkgconfig so that /usr/bin/gpg-error-config can be the same on

32bit and 64bit archs
This commit is contained in:
Karsten Hopp 2006-05-15 15:34:47 +00:00
parent fd8a76a520
commit a0cd2edf2d
3 changed files with 131 additions and 1 deletions

11
gpg-error.pc.in Normal file
View File

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: gpg-error
Description: gpg-error Library
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lgpg-error

View File

@ -0,0 +1,108 @@
--- libgpg-error-1.3/configure.pkgconfig 2006-05-15 16:12:47.000000000 +0200
+++ libgpg-error-1.3/configure 2006-05-15 16:14:53.000000000 +0200
@@ -27143,7 +27143,7 @@
GPG_ERROR_CONFIG_CFLAGS=""
- ac_config_files="$ac_config_files src/gpg-error-config"
+ ac_config_files="$ac_config_files src/gpg-error-config gpg-error.pc"
@@ -27774,6 +27774,7 @@
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"src/versioninfo.rc" ) CONFIG_FILES="$CONFIG_FILES src/versioninfo.rc" ;;
+ "gpg-error.pc" ) CONFIG_FILES="$CONFIG_FILES gpg-error.pc" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
--- libgpg-error-1.3/configure.ac.pkgconfig 2006-05-15 16:11:41.000000000 +0200
+++ libgpg-error-1.3/configure.ac 2006-05-15 16:12:40.000000000 +0200
@@ -145,4 +145,4 @@
AC_CONFIG_FILES([src/Makefile tests/Makefile])
AC_CONFIG_FILES([src/versioninfo.rc])
-AC_OUTPUT
+AC_OUTPUT([gpg-error.pc])
--- libgpg-error-1.3_save/Makefile.am.pkgconfig 2006-05-15 15:57:00.000000000 +0200
+++ libgpg-error-1.3_save/Makefile.am 2006-05-15 15:58:23.000000000 +0200
@@ -21,8 +21,10 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gpg-error.pc
-EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in
+EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in gpg-error.pc.in
dist-hook:
sed -e 's/@pkg_version@/$(VERSION)/g' \
--- libgpg-error-1.3_save/Makefile.in.pkgconfig 2006-05-15 15:56:15.000000000 +0200
+++ libgpg-error-1.3_save/Makefile.in 2006-05-15 16:02:31.000000000 +0200
@@ -59,7 +59,7 @@
$(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \
ABOUT-NLS AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS \
THANKS compile config.guess config.rpath config.sub depcomp \
- install-sh ltmain.sh missing mkinstalldirs
+ install-sh ltmain.sh missing mkinstalldirs gpg-error.pc.in
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
@@ -84,7 +84,7 @@
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = intl/Makefile
+CONFIG_CLEAN_FILES = intl/Makefile gpg-error.pc
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -254,9 +254,11 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = intl m4 src tests po
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gpg-error.pc
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2
-EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in
+EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in gpg-error.pc.in
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -314,6 +316,9 @@
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+gpg-error.pc: $(top_builddir)/config.status $(srcdir)/gpg-error.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
mostlyclean-libtool:
-rm -f *.lo
--- libgpg-error-1.3_save/src/gpg-error-config.in.pkgconfig 2006-05-15 16:05:47.000000000 +0200
+++ libgpg-error-1.3_save/src/gpg-error-config.in 2006-05-15 16:06:58.000000000 +0200
@@ -62,10 +62,7 @@
fi
;;
--libs)
- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
- output="$output -L$libdir"
- fi
- output="$output -lgpg-error"
+ output=`/usr/bin/pkg-config gpg-error --libs`
;;
*)
usage 1 1>&2
--- libgpg-error-1.3/src/gpg-error-config.in.pkgconfig 2006-05-15 16:26:05.000000000 +0200
+++ libgpg-error-1.3/src/gpg-error-config.in 2006-05-15 16:26:18.000000000 +0200
@@ -13,7 +13,6 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
-libdir=@libdir@
output=""

View File

@ -2,11 +2,13 @@
Summary: libgpg-error
Name: libgpg-error
Version: 1.3
Release: 1
Release: 2
URL: ftp://ftp.gnupg.org/gcrypt/libgpg-error/
Source0: ftp://ftp.gnupg.org/gcrypt/libgpg-error/%{name}-%{version}.tar.bz2
Source1: ftp://ftp.gnupg.org/gcrypt/libgpg-error/%{name}-%{version}.tar.bz2.sig
Source2: wk@g10code.com
Source3: gpg-error.pc.in
Patch0: libgpg-error-1.3-pkgconfig.patch
Group: System Environment/Libraries
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -30,14 +32,18 @@ contains files necessary to develop applications using libgpg-error.
%prep
%setup -q
%patch0 -p1
%build
cp -f %{SOURCE3} .
%configure
make
%install
rm -fr $RPM_BUILD_ROOT
%makeinstall
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
cp -f gpg-error.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/gpg-error.pc
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
@ -61,10 +67,15 @@ rm -fr $RPM_BUILD_ROOT
%{_bindir}/gpg-error-config
%{_libdir}/libgpg-error.so
%{_libdir}/libgpg-error.a
%{_libdir}/pkgconfig/gpg-error.pc
%{_includedir}/gpg-error.h
%{_datadir}/aclocal/gpg-error.m4
%changelog
* Mon May 15 2006 Karsten Hopp <karsten@redhat.de> 1.3-2
- switch to pkgconfig so that gpg-error-config can be the same on
32bit and 64bit archs
* Tue May 2 2006 Nalin Dahyabhai <nalin@redhat.com> - 1.3-1
- update to version 1.3