]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 MT |
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 # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
be472d5a | 27 | PKG_NAME = perl |
a5716bb1 | 28 | VER = 5.10.0 |
cd1a2927 | 29 | |
be472d5a | 30 | THISAPP = $(PKG_NAME)-$(VER) |
a5716bb1 | 31 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 MT |
32 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
33 | ||
6679675b | 34 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 MT |
35 | |
36 | ############################################################################### | |
37 | # Top-level Rules | |
38 | ############################################################################### | |
39 | ||
a5716bb1 | 40 | objects = $(DL_FILE) \ |
a5716bb1 | 41 | $(THISAPP)-page-1.patch \ |
e0426a04 | 42 | $(THISAPP)-security_fix-1.patch |
cd1a2927 | 43 | |
6679675b | 44 | install : $(OBJECT) |
cd1a2927 | 45 | |
87703b91 | 46 | download : $(objects) |
cd1a2927 | 47 | |
87703b91 | 48 | $(objects) : |
cd1a2927 MT |
49 | @$(LOAD) |
50 | ||
cd1a2927 MT |
51 | ############################################################################### |
52 | # Installation Details | |
53 | ############################################################################### | |
54 | ||
6679675b | 55 | $(OBJECT) : |
cd1a2927 | 56 | @$(PREBUILD) |
88068980 MT |
57 | @rm -rf $(DIR_SRC)/perl* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) |
58 | -mkdir -v $(DIR_SRC)/perl-build | |
3888140c MT |
59 | |
60 | ifeq "$(STAGE)" "toolchain" | |
a5716bb1 MT |
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 | ||
88068980 MT |
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 | |
78709406 | 83 | cd $(DIR_SRC)/perl-build && make #$(PARALLELISMFLAGS) |
88068980 | 84 | cd $(DIR_SRC)/perl-build && make LNS="cp" install |
3888140c MT |
85 | endif |
86 | ||
87 | ifeq "$(STAGE)" "base" | |
88 | echo "127.0.0.1 localhost $(hostname)" > /etc/hosts | |
bf19a797 | 89 | |
a5716bb1 MT |
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 | |
bf19a797 | 92 | |
3888140c | 93 | cd $(DIR_APP) && sed -i 's/command /command[ -]/' makedepend.SH |
a5716bb1 | 94 | |
55ab4f84 MT |
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|" \ | |
a5716bb1 MT |
98 | ext/Compress/Raw/Zlib/config.in |
99 | ||
3888140c MT |
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 | ||
78709406 | 104 | cd $(DIR_APP) && make #$(PARALLELISMFLAGS) |
3888140c MT |
105 | cd $(DIR_APP) && make install |
106 | ||
107 | rm -f /etc/hosts | |
108 | endif | |
109 | ||
88068980 | 110 | @rm -rf $(DIR_SRC)/perl* |
cd1a2927 | 111 | @$(POSTBUILD) |