Annotation of /trunk/extras/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2
Parent Directory | Revision Log
Revision 21003 -
(hide annotations)
(download)
Mon Mar 3 14:56:35 2014 UTC (10 years, 6 months ago) by niro
Original Path: trunk/core/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2
File size: 3411 byte(s)
Mon Mar 3 14:56:35 2014 UTC (10 years, 6 months ago) by niro
Original Path: trunk/core/cyrus-sasl/cyrus-sasl-2.1.26-r1.smage2
File size: 3411 byte(s)
-fix configure rebuild and use internal mage functions
1 | niro | 21002 | # $Id$ |
2 | |||
3 | PNAME="cyrus-sasl" | ||
4 | PVER="2.1.26" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="dev-libs" | ||
8 | |||
9 | DESCRIPTION="The Cyrus Simple Authentication and Security Layer." | ||
10 | HOMEPAGE="http://asg.web.cmu.edu/sasl/" | ||
11 | |||
12 | DEPEND=">= virtual/glibc | ||
13 | >= dev-libs/openssl-1.0.1 | ||
14 | >= sys-libs/pam-1.1" | ||
15 | |||
16 | SDEPEND=">= virtual/sed | ||
17 | >= sys-dev/autoconf-8 | ||
18 | >= sys-dev/automake-4 | ||
19 | >= sys-dev/libtool-2" | ||
20 | |||
21 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
22 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
23 | |||
24 | sminclude mtools | ||
25 | |||
26 | SRC_URI=( | ||
27 | ftp://ftp.cyrusimap.org/${PNAME}/${SRCFILE} | ||
28 | mirror://${PNAME}/${SRCFILE} | ||
29 | mirror://${PNAME}/${PNAME}-2.1.22-qa.patch | ||
30 | mirror://${PNAME}/${PNAME}-${PVER}-size_t.patch | ||
31 | mirror://${PNAME}/${PNAME}-${PVER}-maintainer_mode.patch | ||
32 | mirror://${PNAME}/${PNAME}-${PVER}-saslauthd_ac_prog_libtool.patch | ||
33 | mirror://${PNAME}/${PNAME}-${PVER}-ld_as_needed.patch | ||
34 | mirror://${PNAME}/${PNAME}-${PVER}-drop_krb5support_dependency.patch | ||
35 | mirror://${PNAME}/${PNAME}-${PVER}-dont_use_la_files_for_opening_plugins.patch | ||
36 | mirror://${PNAME}/${PNAME}-${PVER}-CVE-2013-4122.patch | ||
37 | mirror://${PNAME}/${PNAME}-${PVER}-sql-rpath.patch | ||
38 | ) | ||
39 | |||
40 | UP2DATE="updatecmd ftp://ftp.cyrusimap.org/${PNAME}/ | grep ${PNAME}- | grep -v rc | lasttarball gz" | ||
41 | |||
42 | src_prepare() | ||
43 | { | ||
44 | munpack ${SRCFILE} | ||
45 | cd ${SRCDIR} | ||
46 | |||
47 | # fix prototype warings | ||
48 | mpatch ${PNAME}-2.1.22-qa.patch || die | ||
49 | mpatch ${PNAME}-${PVER}-size_t.patch || die | ||
50 | # fix autoconf issues | ||
51 | mpatch ${PNAME}-${PVER}-maintainer_mode.patch || die | ||
52 | # use libtool | ||
53 | mpatch ${PNAME}-${PVER}-saslauthd_ac_prog_libtool.patch || die | ||
54 | # fix as-needed issues | ||
55 | mpatch ${PNAME}-${PVER}-ld_as_needed.patch || die | ||
56 | # do not depend on krb5 | ||
57 | mpatch ${PNAME}-${PVER}-drop_krb5support_dependency.patch || die | ||
58 | # only use so names | ||
59 | mpatch ${PNAME}-${PVER}-dont_use_la_files_for_opening_plugins.patch || die | ||
60 | # security fix | ||
61 | mpatch ${PNAME}-${PVER}-CVE-2013-4122.patch || die | ||
62 | # fix sql rpathes | ||
63 | mpatch ${PNAME}-${PVER}-sql-rpath.patch || die | ||
64 | |||
65 | # use newer macro names | ||
66 | sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die | ||
67 | sed -i 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' configure.in saslauthd/configure.in || die | ||
68 | |||
69 | # upstream doesn't even honor their own configure options... | ||
70 | sed -i 's:^sasldir = .*$:sasldir = $(plugindir):' ${SRCDIR}/plugins/Makefile.{am,in} || die | ||
71 | |||
72 | # recreate configure | ||
73 | rm -rf configure config.h.in autom4te.cache || die | ||
74 | niro | 21003 | rm -f config/config.guess config/config.sub || die |
75 | rm -f config/ltconfig config/ltmain.sh config/libtool.m4 || die | ||
76 | mlibtoolize || die | ||
77 | # use full pathes or automake fails in subdirs | ||
78 | mautoreconf -I $(pwd)/cmulocal -I $(pwd)/config || die | ||
79 | niro | 21002 | } |
80 | |||
81 | src_compile() | ||
82 | { | ||
83 | cd ${SRCDIR} | ||
84 | |||
85 | mconfigure \ | ||
86 | --with-saslauthd=/var/lib/sasl2 \ | ||
87 | --with-pwcheck=/var/lib/sasl2 \ | ||
88 | --with-configdir=/etc/sasl2 \ | ||
89 | --with-plugindir=/usr/$(mlibdir)/sasl2 \ | ||
90 | --with-dbpath=/etc/sasl2/sasldb2 \ | ||
91 | --enable-login \ | ||
92 | --enable-ntlm \ | ||
93 | --with-openssl \ | ||
94 | --with-pam \ | ||
95 | --disable-static \ | ||
96 | --disable-krb4 \ | ||
97 | --disable-otp \ | ||
98 | --without-ldap \ | ||
99 | --disable-ldapdb \ | ||
100 | --disable-sample \ | ||
101 | --disable-gssapi \ | ||
102 | --without-mysql \ | ||
103 | --disable-mysql \ | ||
104 | --without-pgsql \ | ||
105 | --disable-postgres \ | ||
106 | --disable-sql \ | ||
107 | --disable-srp \ | ||
108 | --disable-java \ | ||
109 | --without-authdaemond \ | ||
110 | --with-dblib=none \ | ||
111 | || die | ||
112 | |||
113 | mmake -j1 || die | ||
114 | } | ||
115 | |||
116 | src_install () | ||
117 | { | ||
118 | cd ${SRCDIR} | ||
119 | |||
120 | mmake DESTDIR=${BINDIR} install || die | ||
121 | |||
122 | mkeepdir /var/lib/sasl2 || die | ||
123 | mkeepdir /etc/sasl2 || die | ||
124 | |||
125 | minstalldocs AUTHORS ChangeLog COPYING NEWS README doc/TODO doc/*.txt || die | ||
126 | } |