1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
|
#!/bin/bash
#
# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>
source /usr/src/ports/Build/build.sh
NAME=libraries
VERSION=$(date +%Y%m%d)
BUILD=1
# Description
cat > ${PKG}/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
$(padd)|-----handy-ruler------------------------------------------------------|
${NAME}: libraries (shared libraries needed by many programs)
${NAME}:
${NAME}: This is a collection of shared libraries needed to run most programs.
${NAME}:
${NAME}: It includes: zlib, gmp, libidn, libtasn1, libaio, libffi and nettle.
${NAME}:
${NAME}:
${NAME}:
${NAME}:
${NAME}:
${NAME}:
EOF
cat >> ${PKG}/install/doinst.sh <<EOF
#!/bin/sh
config() {
NEW="\$1"
OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r \$OLD ]; then
mv \$NEW \$OLD
elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
# toss the redundant copy
rm \$NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
install_info()
{
for file in "\${*}"; do
if [ -x usr/bin/install-info ]; then
usr/bin/install-info --info-dir=usr/share/info usr/share/info/\${file}.info.xz 2> /dev/null
fi
done
}
# Install texinfo files
install_info rluserman
config etc/pkcs11/pkcs11.conf.new
EOF
# Sources
SRCNAME[0]=zlib
SRCVERS[0]=1.2.8
SRCPACK[0]=http://zlib.net/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz
SRCCOPY[0]="GPL3 LGPL3"
build0()
{
cmake \
-DCMAKE_C_FLAGS:STRING="${FLAGS}" \
-DCMAKE_CXX_FLAGS:STRING="${FLAGS}" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
-DCMAKE_INSTALL_PREFIX:PATH="${SYS_DIR[usr]}" \
-DINSTALL_LIB_DIR:STRING="${SYS_DIR[lib]}" \
-DINSTALL_MAN_DIR:STRING="${SYS_DIR[man]}" \
-DINSTALL_PKGCONFIG_DIR:STRING="${SYS_DIR[share]}/pkgconfig" \
.
make ${JOBS}
make install DESTDIR="${PKG}"
doc FAQ
changelog ChangeLog
}
SRCNAME[1]=gmp
SRCVERS[1]=5.1.3
SRCPACK[1]=ftp://ftp.gmplib.org/pub/gmp-${SRCVERS[1]}/${SRCNAME[1]}-${SRCVERS[1]}.tar.xz
SRCCOPY[1]="GPL3 LGPL3"
build1()
{
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--enable-static=no \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}" \
--enable-assembly \
--enable-cxx
make ${JOBS}
make install DESTDIR="${PKG}"
doc AUTHORS
changelog NEWS
# No development docs
rm -rf ${PKG}${SYS_DIR[info]}
}
SRCNAME[2]=mpfr
SRCVERS[2]=3.1.2
SRCPACK[2]=http://www.mpfr.org/mpfr-current/${SRCNAME[2]}-${SRCVERS[2]}.tar.xz
SRCCOPY[2]="GPL3 LGPL3"
build2()
{
# Can't use -ffast-math with this library
CFLAGS="${FLAGS%-ffast-math}" CXXFLAGS="${FLAGS%-ffast-math}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--enable-shared=yes \
--enable-static=no \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}" \
--with-gmp-include="${PKG}${SYS_DIR[include]}" \
--with-gmp-lib="${PKG}${SYS_DIR[lib]}"
make ${JOBS}
make install DESTDIR="${PKG}"
doc AUTHORS
changelog NEWS
# No development docs
rm -rf \
${PKG}${SYS_DIR[doc]}/mpfr \
${PKG}${SYS_DIR[info]}
}
SRCNAME[3]=libidn
SRCVERS[3]=1.28
SRCPACK[3]=http://ftp.gnu.org/gnu/libidn/${SRCNAME[3]}-${SRCVERS[3]}.tar.gz
SRCCOPY[3]="GPL2 LGPL3"
build3()
{
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-rpath \
--enable-static=no \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--includedir="${SYS_DIR[include]}/idn" \
--localstatedir="${SYS_DIR[var]}" \
--with-html-dir="${SYS_DIR[html]}" \
--enable-threads=posix
make ${JOBS} V=1
make install DESTDIR="${PKG}"
doc AUTHORS THANKS
changelog NEWS
# No development docs
rm -rf ${PKG}${SYS_DIR[info]}
}
SRCNAME[4]=libtasn1
SRCVERS[4]=3.4
SRCPACK[4]=http://ftp.gnupg.org/pub/gnutls/${SRCNAME[4]}/${SRCNAME[4]}-${SRCVERS[4]}.tar.gz
SRCCOPY[4]="LGPL21 GPL3"
build4()
{
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' lib/Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--disable-silent-rules \
--enable-static=no \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--includedir="${SYS_DIR[include]}/tasn1" \
--with-html-dir="${SYS_DIR[html]}"
make ${JOBS} V=1
make install DESTDIR="${PKG}"
doc AUTHORS THANKS
changelog NEWS
# No development docs
rm -rf ${PKG}${SYS_DIR[info]}
}
SRCNAME[5]=libaio
SRCVERS[5]=0.3.109
SRCPACK[5]=http://www.kernel.org/pub/linux/kernel/people/bcrl/aio/${SRCNAME[5]}-${SRCVERS[5]}.tar.bz2
SRCCOPY[5]="LGPL21"
build5()
{
make ${JOBS} OPTFLAGS="${FLAGS}"
make install prefix="${PKG}${SYS_DIR[usr]}" libdir="${PKG}${SYS_DIR[lib]}"
changelog ChangeLog
rm -f ${PKG}${SYS_DIR[lib]}/libaio.a
}
SRCNAME[6]=nettle
SRCVERS[6]=2.7.1
SRCPACK[6]=http://www.lysator.liu.se/~nisse/archive/${SRCNAME[6]}-${SRCVERS[6]}.tar.gz
SRCCOPY[6]="LGPL21"
build6()
{
#NOTE: cannot use --disable-static as it breaks the build
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--enable-shared \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}"
make ${JOBS}
make install DESTDIR="${PKG}"
changelog NEWS
chmod 0755 ${PKG}${SYS_DIR[lib]}/*.so*
# No development docs
rm -rf \
${PKG}${SYS_DIR[info]} \
${PKG}${SYS_DIR[lib]}/lib{nettle,hogweed}.a
}
SRCNAME[7]=libffi
SRCVERS[7]=3.0.13
SRCPACK[7]=ftp://sourceware.org/pub/${SRCNAME[7]}/${SRCNAME[7]}-${SRCVERS[7]}.tar.gz
SRCCOPY[7]="MIT"
build7()
{
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
sed -i "s|@ARCHITECTURE@|$(uname -m)|g" include/Makefile.{am,in} libffi.pc.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--enable-static=no \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}"
make ${JOBS}
make install DESTDIR="${PKG}"
changelog ChangeLog
#FIXME: kludge
mv \
${PKG}${SYS_DIR[lib]}64/* \
${PKG}${SYS_DIR[lib]}
rmdir ${PKG}${SYS_DIR[lib]}64
# No development docs
rm -rf ${PKG}${SYS_DIR[info]}
}
SRCNAME[8]=popt
SRCVERS[8]=1.16
SRCPACK[8]=http://rpm5.org/files/popt/${SRCNAME[8]}-${SRCVERS[8]}.tar.gz
SRCCOPY[8]="MIT"
build8()
{
sed -i 's|$(prefix)/lib/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--disable-rpath \
--enable-static=no \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}"
make ${JOBS}
make install DESTDIR="${PKG}"
changelog CHANGES
}
SRCNAME[9]=p11-kit
SRCVERS[9]=0.20.1
SRCPACK[9]=http://p11-glue.freedesktop.org/releases/${SRCNAME[9]}-${SRCVERS[9]}.tar.gz
SRCCOPY[9]="BSD3"
build9()
{
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' p11-kit/Makefile.in
sed -i 's|${libdir}/p11-kit|${libdir}/exec/p11-kit|g' configure
LIBTASN1_CFLAGS="-I${PKG}${SYS_DIR[include]}/tasn1" \
LIBTASN1_LIBS="-L${PKG}${SYS_DIR[lib]} -ltasn1" \
LIBFFI_CFLAGS="-I${PKG}${SYS_DIR[include]}/$(uname -m)-linux/libffi-${SRCVERS[7]}" \
LIBFFI_LIBS="-L${PKG}${SYS_DIR[lib]} -lffi" \
CPPFLAGS="-I${PKG}${SYS_DIR[include]}/tasn1" \
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-rpath \
--enable-static=no \
--enable-shared=yes \
--enable-debug=no \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}" \
--with-html-dir="${SYS_DIR[html]}" \
--with-module-path="${SYS_DIR[lib]}/plugins/pkcs11"
#--with-trust-paths="${SYS_DIR[share]}/ca-certificates"
#--with-system-config=
make ${JOBS}
make install DESTDIR="${PKG}"
doc AUTHORS
changelog NEWS
mv \
${PKG}${SYS_DIR[etc]}/pkcs11/pkcs11.conf.example \
${PKG}${SYS_DIR[etc]}/pkcs11/pkcs11.conf.new
rm -rf ${PKG}${SYS_DIR[html]}
}
#NOTE: ncurses is a dependency of readline
SRCNAME[10]=readline
SRCVERS[10]=6.2
SRCPACK[10]=${URL[gnu]}/readline/${SRCNAME[10]}-${SRCVERS[10]}.tar.gz
SRCCOPY[10]="GPL2"
build10()
{
case "$(uname -m)" in
x86_64)
PIC="-fPIC"
;;
esac
sed -i 's|$(prefix)/lib/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf
CFLAGS="${FLAGS} ${PIC}" CXXFLAGS="${FLAGS}" \
./configure \
--build="${ARCH}-slackware-linux" \
--enable-static=yes \
--enable-shared=yes \
--prefix="${SYS_DIR[usr]}" \
--mandir="${SYS_DIR[man]}" \
--infodir="${SYS_DIR[info]}" \
--sysconfdir="${SYS_DIR[etc]}" \
--libdir="${SYS_DIR[lib]}" \
--localstatedir="${SYS_DIR[var]}" \
--enable-multibyte \
--with-curses
make ${JOBS} SHLIB_LIBS="-lncurses"
make install DESTDIR="${PKG}"
changelog CHANGES
rm -rf \
${PKG}${SYS_DIR[share]}/readline \
${PKG}${SYS_DIR[info]}/{history,readline}*
#chmod 0755 ${PKG}${SYS_DIR[lib]}/libreadline*.so.*
}
|