]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/perl
Made the PARALLELISMFLAGS more flexible and editable.
[ipfire-3.x.git] / lfs / perl
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 PKG_NAME = perl
28 VER = 5.8.8
29
30 THISAPP = $(PKG_NAME)-$(VER)
31 DL_FILE = $(THISAPP).tar.bz2
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33
34 TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
35
36 XMLPARSER = XML-Parser-2.34
37
38 ###############################################################################
39 # Top-level Rules
40 ###############################################################################
41
42 objects = $(DL_FILE) $(THISAPP)-libc-2.patch $(XMLPARSER).tar.gz \
43 $(THISAPP)-asm-page-h-compile-failure.patch
44
45 install : $(TARGET)
46
47 download :$(patsubst %,$(DIR_DL)/%,$(objects))
48
49 $(patsubst %,$(DIR_DL)/%,$(objects)) :
50 @$(LOAD)
51
52 ###############################################################################
53 # Installation Details
54 ###############################################################################
55
56 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
57 @$(PREBUILD)
58 @rm -rf $(DIR_APP) $(DIR_SRC)/$(XMLPARSER) && \
59 cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
60
61 ifeq "$(STAGE)" "toolchain"
62 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-libc-2.patch
63 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-asm-page-h-compile-failure.patch
64 cd $(DIR_APP) && mv -v makedepend.SH{,.orig}
65 cd $(DIR_APP) && sed 's/command /command[ -]/' makedepend.SH.orig > makedepend.SH
66
67 cd $(DIR_APP) && ./configure.gnu --prefix=$(TOOLS_DIR) -Dstatic_ext='Data/Dumper Fcntl IO POSIX'
68
69 cd $(DIR_APP) && make perl utilities ext/Errno/pm_to_blib $(PARALLELISMFLAGS)
70
71 cd $(DIR_APP) && cp -v perl pod/pod2man $(TOOLS_DIR)/bin
72 -mkdir -pv $(TOOLS_DIR)/lib/perl5/$(VER)
73 cd $(DIR_APP) && cp -Rv lib/* $(TOOLS_DIR)/lib/perl5/$(VER)
74 endif
75
76 ifeq "$(STAGE)" "base"
77 echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
78
79 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-asm-page-h-compile-failure.patch
80
81 cd $(DIR_APP) && sed -i 's/command /command[ -]/' makedepend.SH
82 cd $(DIR_APP) && ./configure.gnu --prefix=/usr \
83 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 \
84 -Dpager="/usr/bin/less -isR"
85
86 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
87 cd $(DIR_APP) && make install
88
89 rm -f /etc/hosts
90 endif
91
92 ifeq "$(STAGE)" "ipfire"
93 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(XMLPARSER).tar.gz
94 cd $(DIR_SRC)/$(XMLPARSER) && perl Makefile.PL
95 cd $(DIR_SRC)/$(XMLPARSER) && make
96 cd $(DIR_SRC)/$(XMLPARSER) && make install
97 endif
98
99 @rm -rf $(DIR_APP) $(DIR_SRC)/$(XMLPARSER)
100 @$(POSTBUILD)