# # 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