openbsd-ports/lang/python/2.5/patches/patch-Makefile_pre_in

96 lines
3.7 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-Makefile_pre_in,v 1.6 2009/01/01 21:03:27 djm Exp $
--- Makefile.pre.in.orig Mon Sep 22 10:22:44 2008
+++ Makefile.pre.in Mon Dec 15 20:13:03 2008
@@ -332,6 +332,8 @@ LIBRARY_OBJS= \
#########################################################################
# Rules
+everything: all $(srcdir)/Lib/$(PLATDIR)
+
# Default target
all: $(BUILDPYTHON) oldsharedmods sharedmods
@@ -340,6 +342,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRAR
2006-11-01 15:59:18 -05:00
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/python.o \
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ -lpython$(VERSION) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON)
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
@@ -376,6 +379,11 @@ libpython$(VERSION).so: $(LIBRARY_OBJS)
2006-11-01 15:59:18 -05:00
libpython$(VERSION).sl: $(LIBRARY_OBJS)
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
2006-11-01 15:59:18 -05:00
+# This rule for OpenBSD...
+$(LDLIBRARY): $(LIBRARY)
+ $(LDSHARED) -o $@ $(LIBRARY_OBJS)
+
+
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
# minimal framework (not including the Lib directory and such) in the current
# directory.
@@ -658,14 +666,13 @@ bininstall: altbininstall
2006-11-01 15:59:18 -05:00
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
else true; \
fi
- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
2006-11-01 15:59:18 -05:00
# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
altbininstall: $(BUILDPYTHON)
- @for i in $(BINDIR) $(LIBDIR); \
+ @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \
do \
if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
@@ -674,14 +681,12 @@ altbininstall: $(BUILDPYTHON)
2006-11-01 15:59:18 -05:00
fi; \
done
$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
- if test -f libpython$(VERSION)$(SO); then \
+ if test -f $(LDLIBRARY); then \
if test "$(SO)" = .dll; then \
$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
else \
- $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
- if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
- (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
- fi \
+ $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBPL)/$(LDLIBRARY); \
+ (cd $(DESTDIR)$(LIBDIR); $(LN) -s python$(VERSION)/config/$(LDLIBRARY)); \
fi; \
else true; \
fi
@@ -697,7 +702,7 @@ maninstall:
2006-11-01 15:59:18 -05:00
fi; \
done
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
- $(DESTDIR)$(MANDIR)/man1/python.1
+ $(DESTDIR)$(MANDIR)/man1/python$(VERSION).1
# Install the library
PLATDIR= plat-$(MACHDEP)
@@ -725,7 +730,7 @@ LIBSUBDIRS= lib-tk site-packages test test/output test
distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
setuptools setuptools/command setuptools/tests setuptools.egg-info \
curses $(MACHDEPS)
-libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
+libinstall: $(srcdir)/Lib/$(PLATDIR)
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
if test ! -d $(DESTDIR)$$i; then \
@@ -799,8 +804,8 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
# Create the PLATDIR source directory, if one wasn't distributed..
-$(srcdir)/Lib/$(PLATDIR):
- mkdir $(srcdir)/Lib/$(PLATDIR)
+$(srcdir)/Lib/$(PLATDIR): $(BUILDPYTHON)
+ mkdir -p $(srcdir)/Lib/$(PLATDIR)
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \