ALT Linux repos
Group :: Development/Python
RPM: python
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: python-2.5.4-ClintonRoy-pkgconfig.patch
Download
Download
pkg-config support by Clinton Roy,
http://bugs.python.org/issue3585
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -661,6 +661,8 @@ bininstall: altbininstall
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
+ -rm -f $(DESTDIR)$(LIBPC)/python.pc
+ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc)
# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
@@ -829,8 +831,12 @@ inclinstall:
# Install the library and miscellaneous stuff needed for extending/embedding
# This goes into $(exec_prefix)
LIBPL= $(LIBP)/config
+
+# pkgconfig diretory
+LIBPC= $(LIBDIR)/pkgconfig
+
libainstall: all
- @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
do \
if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
@@ -857,6 +863,7 @@ libainstall: all
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
+ $(INSTALL_DATA) Misc/python-$(VERSION).pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
# Substitution happens here, as the completely-expanded BINDIR
--- configure.in
+++ configure.in
@@ -3498,7 +3498,7 @@ done
AC_MSG_RESULT(done)
# generate output files
-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python-${VERSION}.pc:Misc/python.pc.in)
AC_OUTPUT
echo "creating Modules/Setup"
--- Misc/python.pc.in
+++ Misc/python.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Python
+Description: Python library
+Requires:
+Version: @VERSION@
+Libs.private: @LIBS@
+Libs: -L${libdir} -lpython@VERSION@
+Cflags: -I${includedir}/python@VERSION@