]> CyberLeo.Net >> Repos - CDN/cdn-ports-overlay.git/blob - cdn/ports/Mk/cdn.strip_deps.mk
Switch to include for dependency strip patch
[CDN/cdn-ports-overlay.git] / cdn / ports / Mk / cdn.strip_deps.mk
1 #
2 # A few macros to help strip unnecessary dependencies
3 # Define as follows in make.conf:
4 #
5 #   .if ${.CURDIR:M*/devel/glib20}
6 #     USE_LOCAL_MK=
7 #     STRIP_PERL5_RUN=
8 #     STRIP_PYTHON_RUN=
9 #   .endif
10 #
11 # This will change the package's name to 'glib+noperl+nopython' and remove the
12 # runtime dependency upon perl and python, which are only needed for scripts
13 # used during the compilation of packages depending upon glib; pointless on
14 # installs that are completely lacking a compiler.
15 #
16 # Options are:
17 #   STRIP_PERL5        - Remove Perl5 build/run time dependencies
18 #   STRIP_PERL5_BUILD  - Remove Perl5 build time dependency
19 #   STRIP_PERL5_RUN    - Remove Perl5 run time dependency
20 #   STRIP_PYTHON       - Remove Python build/run time dependencies
21 #   STRIP_PYTHON_BUILD - Remove Python build time dependency
22 #   STRIP_PYTHON_RUN   - Remove Python run time dependency
23 #
24
25 .if defined(STRIP_PERL5)
26 . if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+noperl*} == ""
27     PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl
28 . endif
29 . undef USE_PERL5
30 . undef USE_PERL5_BUILD
31 . undef USE_PERL5_RUN
32 .elif defined(STRIP_PERL5_BUILD)
33 . if defined(USE_PERL5)
34     USE_PERL5_RUN := ${USE_PERL5)
35 . endif
36 . undef USE_PERL5
37 . undef USE_PERL5_BUILD
38 .elif defined(STRIP_PERL5_RUN)
39 . if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+noperl*} == ""
40     PKGNAMESUFFIX := $(PKGNAMESUFFIX)+noperl
41 . endif
42 . if defined(USE_PERL5)
43     USE_PERL5_BUILD := ${USE_PERL5}
44 . endif
45 . undef USE_PERL5
46 . undef USE_PERL5_RUN
47   USE_PERL5=build
48   USE_PERL5_BUILD=build
49 .endif
50
51 .if defined(STRIP_PYTHON)
52 . if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+nopython*} == ""
53     PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython
54 . endif
55 . undef USE_PYTHON
56 . undef USE_PYTHON_BUILD
57 . undef USE_PYTHON_RUN
58 .elif defined(STRIP_PYTHON_BUILD)
59 . if defined(USE_PYTHON)
60     USE_PYTHON_RUN := ${USE_PYTHON}
61 . endif
62 . undef USE_PYTHON
63 . undef USE_PYTHON_BUILD
64 .elif defined(STRIP_PYTHON_RUN)
65 . if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX:M*+nopython*} == ""
66     PKGNAMESUFFIX := $(PKGNAMESUFFIX)+nopython
67 . endif
68 . if defined(USE_PYTHON)
69     USE_PYTHON_BUILD := ${USE_PYTHON}
70 . endif
71 . undef USE_PYTHON
72 . undef USE_PYTHON_RUN
73 .endif