]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/perl
Renamed some fields...
[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 PKG_VER = 5.10.0
29
30 THISAPP = $(PKG_NAME)-$(PKG_VER)
31 DL_FILE = $(THISAPP).tar.gz
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33
34 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
35
36 ###############################################################################
37 # Top-level Rules
38 ###############################################################################
39
40 objects = $(DL_FILE) \
41 $(THISAPP)-page-1.patch \
42 $(THISAPP)-security_fix-1.patch
43
44 install : $(OBJECT)
45
46 download : $(objects)
47
48 $(objects) :
49 @$(LOAD)
50
51 ###############################################################################
52 # Installation Details
53 ###############################################################################
54
55 $(OBJECT) :
56 @$(PREBUILD)
57 @rm -rf $(DIR_SRC)/perl* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
58 -mkdir -v $(DIR_SRC)/perl-build
59
60 ifeq "$(STAGE)" "toolchain"
61 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-page-1.patch
62 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-security_fix-1.patch
63 cd $(DIR_APP) && sed -i 's/command /command[ -]/' makedepend.SH
64
65 # -Dlibc, locincpth, loclibpth, glibpth, and usrinc, are equivilent to the LFS
66 # Perl libc patch.
67
68 # ./Configure is used instead of ./configure.gnu because it supports builds
69 # from an object directory. -Dmksymlinks is also used, to support read-only
70 # sources. -d -e are added to accept all defaults, otherwise ./Configure will
71 # be interactive.
72 cd $(DIR_SRC)/perl-build && \
73 $(DIR_APP)/Configure \
74 -Dcc=$(IFS_TARGET)-gcc \
75 -Dprefix=$(TOOLS_DIR) \
76 -Dlibc=$(TOOLS_DIR)/lib/libc-2.8.so \
77 -Ulocincpth \
78 -Uloclibpth \
79 -Dglibpth="$(TOOLS_DIR)/lib" \
80 -Dusrinc="$(TOOLS_DIR)/include" \
81 -Dmksymlinks \
82 -d -e
83 cd $(DIR_SRC)/perl-build && make #$(PARALLELISMFLAGS)
84 cd $(DIR_SRC)/perl-build && make LNS="cp" install
85 endif
86
87 ifeq "$(STAGE)" "base"
88 echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
89
90 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-page-1.patch
91 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-security_fix-1.patch
92
93 cd $(DIR_APP) && sed -i 's/command /command[ -]/' makedepend.SH
94
95 cd $(DIR_APP) && sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|" \
96 -e "s|INCLUDE\s*= ./zlib-src|INCLUDE = /usr/include|" \
97 -e "s|LIB\s*= ./zlib-src|LIB = /usr/lib|" \
98 ext/Compress/Raw/Zlib/config.in
99
100 cd $(DIR_APP) && ./configure.gnu --prefix=/usr \
101 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 \
102 -Dpager="/usr/bin/less -isR"
103
104 cd $(DIR_APP) && make #$(PARALLELISMFLAGS)
105 cd $(DIR_APP) && make install
106
107 rm -f /etc/hosts
108 endif
109
110 @rm -rf $(DIR_SRC)/perl*
111 @$(POSTBUILD)