From 03c6c12a870753d66673ca05879027f006d0368c Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Wed, 23 Oct 2013 06:28:05 -0500 Subject: [PATCH] Switch to include for dependency strip patch --- .../Mk_bsd.local.mk-strip-perl5-python.patch | 49 ------------- cdn/patch/Mk_bsd.local.mk-strip_deps.patch | 18 +++++ cdn/ports/Mk/cdn.strip_deps.mk | 73 +++++++++++++++++++ 3 files changed, 91 insertions(+), 49 deletions(-) delete mode 100644 cdn/patch/Mk_bsd.local.mk-strip-perl5-python.patch create mode 100644 cdn/patch/Mk_bsd.local.mk-strip_deps.patch create mode 100644 cdn/ports/Mk/cdn.strip_deps.mk diff --git a/cdn/patch/Mk_bsd.local.mk-strip-perl5-python.patch b/cdn/patch/Mk_bsd.local.mk-strip-perl5-python.patch deleted file mode 100644 index 48e158d..0000000 --- a/cdn/patch/Mk_bsd.local.mk-strip-perl5-python.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- Mk/bsd.local.mk.orig 2006-12-10 12:15:33.000000000 -0600 -+++ Mk/bsd.local.mk 2010-08-29 02:57:11.000000000 -0500 -@@ -12,6 +12,46 @@ - - Local_Pre_Include= bsd.local.mk - -+.if defined(STRIP_PERL5) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+. undef USE_PERL5_RUN -+.elif defined(STRIP_PERL5_BUILD) -+. if defined(USE_PERL5) -+ USE_PERL5_RUN := ${USE_PERL5) -+. endif -+. undef USE_PERL5 -+. undef USE_PERL5_BUILD -+.elif defined(STRIP_PERL5_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl -+. if defined(USE_PERL5) -+ USE_PERL5_BUILD := ${USE_PERL5} -+. endif -+. undef USE_PERL5 -+. undef USE_PERL5_RUN -+.endif -+ -+.if defined(STRIP_PYTHON) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+. undef USE_PYTHON_RUN -+.elif defined(STRIP_PYTHON_BUILD) -+. if defined(USE_PYTHON) -+ USE_PYTHON_RUN := ${USE_PYTHON} -+. endif -+. undef USE_PYTHON -+. undef USE_PYTHON_BUILD -+.elif defined(STRIP_PYTHON_RUN) -+ PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython -+. if defined(USE_PYTHON) -+ USE_PYTHON_BUILD := ${USE_PYTHON} -+. endif -+. undef USE_PYTHON -+. undef USE_PYTHON_RUN -+.endif -+ - # - # Here is where any code that needs to run at bsd.port.pre.mk inclusion - # time should live. diff --git a/cdn/patch/Mk_bsd.local.mk-strip_deps.patch b/cdn/patch/Mk_bsd.local.mk-strip_deps.patch new file mode 100644 index 0000000..aa66736 --- /dev/null +++ b/cdn/patch/Mk_bsd.local.mk-strip_deps.patch @@ -0,0 +1,18 @@ +--- Mk/bsd.local.mk.orig 2012-11-16 23:54:17.000000000 -0600 ++++ Mk/bsd.local.mk 2013-10-23 06:25:39.713010142 -0500 +@@ -17,6 +17,8 @@ + # time should live. + # + ++.include "${PORTSDIR}/Mk/cdn.strip_deps.mk" ++ + .endif # !defined(_POSTMKINCLUDED) && !defined(Local_Pre_Include) + + .if defined(_POSTMKINCLUDED) && !defined(Local_Post_Include) +@@ -28,4 +30,6 @@ + # time should live. + # + ++.include "${PORTSDIR}/Mk/cdn.strip_deps.mk" ++ + .endif # defined(_POSTMKINCLUDED) && !defined(Local_Post_Include) diff --git a/cdn/ports/Mk/cdn.strip_deps.mk b/cdn/ports/Mk/cdn.strip_deps.mk new file mode 100644 index 0000000..12d1558 --- /dev/null +++ b/cdn/ports/Mk/cdn.strip_deps.mk @@ -0,0 +1,73 @@ +# +# A few macros to help strip unnecessary dependencies +# Define as follows in make.conf: +# +# .if ${.CURDIR:M*/devel/glib20} +# USE_LOCAL_MK= +# STRIP_PERL5_RUN= +# STRIP_PYTHON_RUN= +# .endif +# +# This will change the package's name to 'glib+noperl+nopython' and remove the +# runtime dependency upon perl and python, which are only needed for scripts +# used during the compilation of packages depending upon glib; pointless on +# installs that are completely lacking a compiler. +# +# Options are: +# STRIP_PERL5 - Remove Perl5 build/run time dependencies +# STRIP_PERL5_BUILD - Remove Perl5 build time dependency +# STRIP_PERL5_RUN - Remove Perl5 run time dependency +# STRIP_PYTHON - Remove Python build/run time dependencies +# STRIP_PYTHON_BUILD - Remove Python build time dependency +# STRIP_PYTHON_RUN - Remove Python run time dependency +# + +.if defined(STRIP_PERL5) +. if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+noperl*} == "" + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl +. endif +. undef USE_PERL5 +. undef USE_PERL5_BUILD +. undef USE_PERL5_RUN +.elif defined(STRIP_PERL5_BUILD) +. if defined(USE_PERL5) + USE_PERL5_RUN := ${USE_PERL5) +. endif +. undef USE_PERL5 +. undef USE_PERL5_BUILD +.elif defined(STRIP_PERL5_RUN) +. if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+noperl*} == "" + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl +. endif +. if defined(USE_PERL5) + USE_PERL5_BUILD := ${USE_PERL5} +. endif +. undef USE_PERL5 +. undef USE_PERL5_RUN + USE_PERL5=build + USE_PERL5_BUILD=build +.endif + +.if defined(STRIP_PYTHON) +. if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+nopython*} == "" + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython +. endif +. undef USE_PYTHON +. undef USE_PYTHON_BUILD +. undef USE_PYTHON_RUN +.elif defined(STRIP_PYTHON_BUILD) +. if defined(USE_PYTHON) + USE_PYTHON_RUN := ${USE_PYTHON} +. endif +. undef USE_PYTHON +. undef USE_PYTHON_BUILD +.elif defined(STRIP_PYTHON_RUN) +. if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+nopython*} == "" + PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython +. endif +. if defined(USE_PYTHON) + USE_PYTHON_BUILD := ${USE_PYTHON} +. endif +. undef USE_PYTHON +. undef USE_PYTHON_RUN +.endif -- 2.42.0