ports/lang/python33/files/patch-Makefile.pre.in
Antoine Brodin 228ab58873 Change INSTALL_DATA to install with mode 644
Remove patches and hacks that were used to work around the previous
situation
This allows to stage more ports as a regular user

Differential Revision:	https://reviews.freebsd.org/D703
Reviewed by and discussed with:	bapt
With hat:	portmgr
2014-09-04 19:26:24 +00:00

107 lines
4.2 KiB
Text

# Patch based on lang/python34/files/patch-Makefile.pre.in
# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
# Submitted by: koobs (r326729)
# TODO: Upstream
# Description: Create symlinks for non-ABI-suffixed python*-config and ABI-suffixed python-*.pc
# Submitted by: antoine@ (r358029)
# TODO: Upstream
--- Makefile.pre.in.orig 2014-03-09 09:40:23.000000000 +0100
+++ Makefile.pre.in 2014-07-15 08:23:56.000000000 +0200
@@ -70,18 +70,18 @@
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
BASECPPFLAGS= @BASECPPFLAGS@
-CONFIGURE_CFLAGS= @CFLAGS@
-CONFIGURE_CPPFLAGS= @CPPFLAGS@
-CONFIGURE_LDFLAGS= @LDFLAGS@
+CFLAGS= @CFLAGS@
+CPPFLAGS= @CPPFLAGS@
+LDFLAGS= @LDFLAGS@
# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
# command line to append to these values without stomping the pre-set
# values.
-PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
+PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CFLAGS) $(EXTRA_CFLAGS)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the
# environment variables
-PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
-PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
+PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS)
+PY_LDFLAGS= $(LDFLAGS)
NO_AS_NEEDED= @NO_AS_NEEDED@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@
@@ -310,21 +310,21 @@
##########################################################################
# AST
-AST_H_DIR= Include
+AST_H_DIR= $(srcdir)/Include
AST_H= $(AST_H_DIR)/Python-ast.h
-AST_C_DIR= Python
+AST_C_DIR= $(srcdir)/Python
AST_C= $(AST_C_DIR)/Python-ast.c
AST_ASDL= $(srcdir)/Parser/Python.asdl
ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
# XXX Note that a build now requires Python exist before the build starts
-ASDLGEN= @ASDLGEN@ $(srcdir)/Parser/asdl_c.py
+ASDLGEN= @DISABLE_ASDLGEN@ $(srcdir)/Parser/asdl_c.py
##########################################################################
# Python
OPCODETARGETS_H= \
- Python/opcode_targets.h
+ $(srcdir)/Python/opcode_targets.h
OPCODETARGETGEN= \
$(srcdir)/Python/makeopcodetargets.py
@@ -747,7 +747,7 @@
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
- $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+# $(OPCODETARGETGEN) $(OPCODETARGETS_H)
Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
@@ -758,7 +758,7 @@
Objects/typeobject.o: Objects/typeslots.inc
Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
- $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
+# $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
############################################################################
# Header files
@@ -972,12 +972,6 @@
else true; \
fi
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python3$(EXE))
- -if test "$(VERSION)" != "$(LDVERSION)"; then \
- rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
- rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
- (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
- fi
-rm -f $(DESTDIR)$(BINDIR)/python3-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
@@ -1223,6 +1217,12 @@
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
+ -if test "$(VERSION)" != "$(LDVERSION)"; then \
+ rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
+ rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
+ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
+ fi
rm python-config
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \