Taken from: https://github.com/freebsd/freebsd-ports.git Commit id: 5070672073b68be364139bc6b3a89100bd17d331
87 lines
3.6 KiB
Text
87 lines
3.6 KiB
Text
# Description: INSTALL_SHARED sometimes is not properly handled in the env
|
|
# Submitted by: mva
|
|
|
|
# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
|
|
# Submitted by: koobs (r326729)
|
|
# TODO: Upstream
|
|
|
|
--- Makefile.pre.in.orig 2013-05-15 18:33:51.000000000 +0200
|
|
+++ Makefile.pre.in 2014-07-18 20:54:36.000000000 +0200
|
|
@@ -60,7 +60,7 @@
|
|
# Shared libraries must be installed with executable mode on some systems;
|
|
# rather than figuring out exactly which, we always give them executable mode.
|
|
# Also, making them read-only seems to be a good idea...
|
|
-INSTALL_SHARED= ${INSTALL} -m 555
|
|
+INSTALL_SHARED?= ${INSTALL} -m 555
|
|
|
|
MKDIR_P= @MKDIR_P@
|
|
|
|
@@ -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@
|
|
@@ -676,7 +676,7 @@
|
|
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
|
|
|
|
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
|
|
- $(OPCODETARGETGEN) $(OPCODETARGETS_H)
|
|
+# $(OPCODETARGETGEN) $(OPCODETARGETS_H)
|
|
|
|
Python/ceval.o: $(OPCODETARGETS_H) Python/ceval_gil.h
|
|
|
|
@@ -686,7 +686,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
|
|
@@ -908,12 +908,6 @@
|
|
else true; \
|
|
fi
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(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
|
|
@@ -1126,6 +1120,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 \
|