… | |
… | |
61 | ARCHNAME=amd64 |
61 | ARCHNAME=amd64 |
62 | fi |
62 | fi |
63 | |
63 | |
64 | export DIST="$(pwd)/dist/$OS-$ARCHNAME" |
64 | export DIST="$(pwd)/dist/$OS-$ARCHNAME" |
65 | |
65 | |
66 | rm -rf "$DIST" |
66 | eval $($PERL -V:sitebinexp:) |
67 | mkdir -p "$DIST" |
|
|
68 | |
67 | |
69 | #PERL=/opt/perl |
68 | "$sitebinexp"/perl-libextractor --exedir . --dlldir . --bindir pm/bin --libdir pm \ |
70 | #PANGO=1.6.0 |
69 | --perl --core-support --script deliantra \ |
71 | |
70 | --runtime-only --strip \ |
72 | export EV_EVENTFD=0 |
71 | --copy "$DIST" |
73 | export EV_INOTIFY=0 |
|
|
74 | export EV_SIGNALFD=0 |
|
|
75 | |
72 | |
76 | cat <<EOF >"$DIST"/pango.rc |
73 | cat <<EOF >"$DIST"/pango.rc |
77 | [Pango] |
74 | [Pango] |
78 | ModuleFiles = pango.modules |
75 | ModuleFiles = pango.modules |
79 | EOF |
76 | EOF |
… | |
… | |
95 | eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp) |
92 | eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp) |
96 | |
93 | |
97 | mkdir -p "$DIST"/pm/bin |
94 | mkdir -p "$DIST"/pm/bin |
98 | cp "$sitebinexp"/deliantra "$DIST"/pm/bin/ |
95 | cp "$sitebinexp"/deliantra "$DIST"/pm/bin/ |
99 | cp -p util/run "$DIST" |
96 | cp -p util/run "$DIST" |
100 | |
|
|
101 | ( |
|
|
102 | exec <util/modules.dep |
|
|
103 | |
|
|
104 | # while read type name; do |
|
|
105 | # if [ "$type" = d ]; then |
|
|
106 | # # not implemented |
|
|
107 | # dir=$(echo "$name" | sed -e s%::%/%g) |
|
|
108 | # for lib in "$sitearchexp" "$sitelib" "$vendorarchexp" "$vendorlibexp" "$archlibexp" "$privlibexp"; do |
|
|
109 | # if [ -e "$lib/auto/$dir/.packlist" ]; then |
|
|
110 | # cat "$lib/auto/$dir/.packlist" |
|
|
111 | # fi |
|
|
112 | # echo "x $lib $dir" |
|
|
113 | # done |
|
|
114 | # elif [ $type = m ]; then |
|
|
115 | # : |
|
|
116 | # else |
|
|
117 | # echo "unknown type $type ($name)" |
|
|
118 | # exit 1 |
|
|
119 | # fi |
|
|
120 | # done |
|
|
121 | mkdir -p "$DIST"/pm |
|
|
122 | |
|
|
123 | export OSDIST="$DIST" |
|
|
124 | [ "$OS" = windows ] && OSDIST=$(cygpath -w "$OSDIST") |
|
|
125 | |
|
|
126 | $PERL -e ' |
|
|
127 | use Config; |
|
|
128 | use File::Glob qw(:glob); |
|
|
129 | use File::Copy; |
|
|
130 | use File::Path; |
|
|
131 | use File::Basename; |
|
|
132 | |
|
|
133 | my @path = do { |
|
|
134 | my %seen; |
|
|
135 | grep !$seen{$_}++, grep length, map $Config{$_}, qw( |
|
|
136 | sitearchexp |
|
|
137 | sitelib |
|
|
138 | vendorarchexp |
|
|
139 | vendorlibexp |
|
|
140 | archlibexp |
|
|
141 | privlibexp |
|
|
142 | ) |
|
|
143 | }; |
|
|
144 | |
|
|
145 | while (<>) { |
|
|
146 | s/\015?\012$//; |
|
|
147 | next if /^(#|$)/; |
|
|
148 | s/\.dynob$/.'$SO'/; |
|
|
149 | |
|
|
150 | my $found; |
|
|
151 | for my $lib (@path) { |
|
|
152 | chdir $lib || next; |
|
|
153 | |
|
|
154 | my @glob = File::Glob::bsd_glob $_, 0; # explicit 0 needed |
|
|
155 | |
|
|
156 | if (@glob) { |
|
|
157 | ++$found; |
|
|
158 | |
|
|
159 | for (@glob) { |
|
|
160 | if (-d $_) { |
|
|
161 | system "rsync", "-aR", $_, "$ENV{DIST}/pm/."; |
|
|
162 | } else { |
|
|
163 | File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_; |
|
|
164 | File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_" |
|
|
165 | or die "$lib/$_ => $ENV{OSDIST}/pm/$_: $!"; |
|
|
166 | |
|
|
167 | if (s/\.pm$//) { |
|
|
168 | $auto = "auto/$_"; |
|
|
169 | |
|
|
170 | for my $glob ("*.'$SO'", "autosplit.ix", "*.al") { |
|
|
171 | for (bsd_glob "$auto/$glob", 0) { |
|
|
172 | File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_; |
|
|
173 | File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_"; |
|
|
174 | } |
|
|
175 | } |
|
|
176 | } |
|
|
177 | } |
|
|
178 | } |
|
|
179 | |
|
|
180 | last; |
|
|
181 | } |
|
|
182 | } |
|
|
183 | |
|
|
184 | warn "$_: not found\n" |
|
|
185 | unless $found; |
|
|
186 | } |
|
|
187 | ' |
|
|
188 | ) || exit |
|
|
189 | |
97 | |
190 | ############################################################################# |
98 | ############################################################################# |
191 | |
99 | |
192 | if [ "$OS" = windows ]; then |
100 | if [ "$OS" = windows ]; then |
193 | libdeps() { |
101 | libdeps() { |
… | |
… | |
224 | done |
132 | done |
225 | } |
133 | } |
226 | |
134 | |
227 | ( |
135 | ( |
228 | cd "$DIST" |
136 | cd "$DIST" |
229 | |
|
|
230 | cp -p "$PERL" . |
|
|
231 | |
137 | |
232 | if [ "$OS" = windows ]; then |
138 | if [ "$OS" = windows ]; then |
233 | cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll . |
139 | cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll . |
234 | cp /root/src/CFPlus/util/splash.bmp . |
140 | cp /root/src/CFPlus/util/splash.bmp . |
235 | chmod -R u+rwX pm/auto |
141 | chmod -R u+rwX pm/auto |