diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-11-03 20:36:05 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-11-03 20:36:05 +0000 |
commit | db8f79db5da234f5dca6f8108f1cf3a36b7df3bf (patch) | |
tree | 425c19ce4558623cde5e90b0a77336b5f0adbe7a /dev-libs/libmcal | |
parent | Add unit file (diff) | |
download | gentoo-2-db8f79db5da234f5dca6f8108f1cf3a36b7df3bf.tar.gz gentoo-2-db8f79db5da234f5dca6f8108f1cf3a36b7df3bf.tar.bz2 gentoo-2-db8f79db5da234f5dca6f8108f1cf3a36b7df3bf.zip |
Lots of build fixes: Bug #243924, #312951, #336096, #440848. All thanks to Michael Mair-Keimberger (iamnr3) <bu9zilla@gmail.com>.
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-libs/libmcal')
-rw-r--r-- | dev-libs/libmcal/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/libmcal/files/libmcal-0.7-flex-2.5.37.patch | 14 | ||||
-rw-r--r-- | dev-libs/libmcal/files/libmcal-0.7-r6-fpic.patch | 56 | ||||
-rw-r--r-- | dev-libs/libmcal/files/libmcal-0.7-r6-gcc4.patch | 34 | ||||
-rw-r--r-- | dev-libs/libmcal/libmcal-0.7-r6.ebuild | 73 |
5 files changed, 186 insertions, 1 deletions
diff --git a/dev-libs/libmcal/ChangeLog b/dev-libs/libmcal/ChangeLog index 6ff47fc37856..52142b64b851 100644 --- a/dev-libs/libmcal/ChangeLog +++ b/dev-libs/libmcal/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/libmcal # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libmcal/ChangeLog,v 1.41 2013/05/28 16:04:12 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libmcal/ChangeLog,v 1.42 2013/11/03 20:36:05 robbat2 Exp $ + +*libmcal-0.7-r6 (03 Nov 2013) + + 03 Nov 2013; Robin H. Johnson <robbat2@gentoo.org> + +files/libmcal-0.7-flex-2.5.37.patch, +files/libmcal-0.7-r6-fpic.patch, + +files/libmcal-0.7-r6-gcc4.patch, +libmcal-0.7-r6.ebuild: + Lots of build fixes: Bug #243924, #312951, #336096, #440848. All thanks to + Michael Mair-Keimberger (iamnr3) <bu9zilla@gmail.com>. 28 May 2013; Jeroen Roovers <jer@gentoo.org> files/libmcal-0.7-gcc4.patch: Fix patch. diff --git a/dev-libs/libmcal/files/libmcal-0.7-flex-2.5.37.patch b/dev-libs/libmcal/files/libmcal-0.7-flex-2.5.37.patch new file mode 100644 index 000000000000..8c2e38699876 --- /dev/null +++ b/dev-libs/libmcal/files/libmcal-0.7-flex-2.5.37.patch @@ -0,0 +1,14 @@ +--- libmcal.orig/icalroutines.h 2003-01-28 18:45:21.000000000 +0100 ++++ libmcal/icalroutines.h 2013-02-04 01:54:27.833995640 +0100 +@@ -48,8 +48,10 @@ + + + /* ICAL parser. */ ++#ifndef ical_yytext + extern char *ical_yytext; +-extern int ical_yyleng; ++extern size_t ical_yyleng; ++#endif + int ical_yylex(void); + void ical_usebuf(const char *buf, size_t size); + void ical_preprocess(char *buf, size_t *size); diff --git a/dev-libs/libmcal/files/libmcal-0.7-r6-fpic.patch b/dev-libs/libmcal/files/libmcal-0.7-r6-fpic.patch new file mode 100644 index 000000000000..72a199a3a57e --- /dev/null +++ b/dev-libs/libmcal/files/libmcal-0.7-r6-fpic.patch @@ -0,0 +1,56 @@ +--- Makefile.in 2003-11-27 15:46:46.887752568 +0000 ++++ Makefile.in 2003-11-27 16:14:17.325847840 +0000 +@@ -7,7 +7,7 @@ + + INCLUDE=@DRIVER_INCDIR@ ${OTHERINCDIR} -I. + +-CFLAGS=-O0 -Wall -g ${INCLUDE} ${OTHER_CFLAGS} ++CFLAGS=-O0 -Wall -g ${OTHER_CFLAGS} + + LIBOBJS=mcal.o datetime.o lex.ical_yy.o icalroutines.o cal_misc.o $(DRIVER_LIBS) + ALLOBJS=${LIBOBJS} tester.o +@@ -17,6 +17,9 @@ + LIBCAL=libmcal.a + LIBCAL_SO=libmcal.so + ++%.o: %.c ++ $(CC) $(CFLAGS) -fPIC $(INCLUDE) -c -o $@ $< ++ + all: libmcal.a libmcal.so + + install: libmcal.a libmcal.so +@@ -38,7 +41,7 @@ + + libmcal.so: $(LIBOBJS) + rm -f $(LIBCAL_SO) +- gcc $(CFLAGS) -shared -o $(LIBCAL_SO) $(LIBOBJS) ++ $(CC) -Wl,-soname=$@ $(CFLAGS) $(LDFLAGS) $(INCLUDE) -shared -o $(LIBCAL_SO) $(LIBOBJS) + + lex.ical_yy.c: icalscanner.lex + $(FLEX) $< +--- mstore/Makefile.old 2004-08-08 16:37:13.641537544 +0100 ++++ mstore/Makefile 2004-08-08 16:37:35.473218624 +0100 +@@ -8,6 +8,10 @@ + ALLOBJS=mstore.o + TARGET=mstore_driver.o + ++%.o: %.c ++ $(CC) $(CFLAGS) -fPIC $(INCLUDE) -c -o $@ $< ++ ++ + all: $(TARGET) + + +--- icap/Makefile.old 2004-08-08 16:38:58.353618888 +0100 ++++ icap/Makefile 2004-08-08 16:39:18.841504256 +0100 +@@ -7,6 +7,10 @@ + ALLOBJS=icap.o icaproutines.o lex.icap_yy.o + TARGET=icap_driver.o + ++%.o: %.c ++ $(CC) $(CFLAGS) -fPIC $(INCLUDE) -c -o $@ $< ++ ++ + all: $(TARGET) + + diff --git a/dev-libs/libmcal/files/libmcal-0.7-r6-gcc4.patch b/dev-libs/libmcal/files/libmcal-0.7-r6-gcc4.patch new file mode 100644 index 000000000000..065a82dc24c3 --- /dev/null +++ b/dev-libs/libmcal/files/libmcal-0.7-r6-gcc4.patch @@ -0,0 +1,34 @@ +diff -urN libmcal-/icap/icap.c icap/icap.c +--- libmcal/icap/icap.c 2003-01-28 18:31:33.000000000 +0100 ++++ icap/icap.c 2005-08-12 15:04:36.000000000 +0200 +@@ -159,7 +159,7 @@ + if (!reopen) { + if ((stream = calloc(1, sizeof(*stream))) == NULL) + goto fail; +- if ((DATA = calloc(1, sizeof(*DATA))) == NULL) ++ if ((stream->data = calloc(1, sizeof(*DATA))) == NULL) + goto fail; + + /* Copy host. */ +diff -urN libmcal/mstore/mstore.c mstore/mstore.c +--- libmcal/mstore/mstore.c 2005-08-12 15:30:52.000000000 +0200 ++++ mstore/mstore.c 2005-08-12 15:31:38.000000000 +0200 +@@ -308,7 +308,7 @@ + if (!reopen) { + if ((stream = calloc(1, sizeof(*stream))) == NULL) + goto fail; +- if ((DATA = calloc(1, sizeof(*DATA))) == NULL) ++ if ((stream->data = calloc(1, sizeof(*DATA))) == NULL) + goto fail; + } + +@@ -773,7 +773,7 @@ + while((event=read_event(calfile))) { + if (event->id == modified_event->id) + { +- (const CALEVENT*)event = modified_event; ++ event = modified_event; + /*is more required here to assign objects, a loop through all the properties*/ + /* We actually only want to modify any individual property, not the whole thing.. + TODO */ + diff --git a/dev-libs/libmcal/libmcal-0.7-r6.ebuild b/dev-libs/libmcal/libmcal-0.7-r6.ebuild new file mode 100644 index 000000000000..e56866af5fcb --- /dev/null +++ b/dev-libs/libmcal/libmcal-0.7-r6.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libmcal/libmcal-0.7-r6.ebuild,v 1.1 2013/11/03 20:36:05 robbat2 Exp $ + +EAPI="5" + +inherit eutils multilib + +DRIVERS="mcaldrivers-0.9" +SRC_URI_BASE="mirror://sourceforge/libmcal" +DESCRIPTION="Modular Calendar Access Library" +HOMEPAGE="http://mcal.chek.com/" +SRC_URI="${SRC_URI_BASE}/${P}.tar.gz ${SRC_URI_BASE}/${DRIVERS}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="pam" +DOCS="CHANGELOG FAQ-MCAL FEATURE-IMPLEMENTATION HOW-TO-MCAL LICENSE README" + +DEPEND="pam? ( virtual/pam )" + +S=${WORKDIR}/${PN} + +src_prepare() { + mv "${S}"/../mcal-drivers/* "${S}"/ + einfo "Using /var/spool/calendar instead of /var/calendar" + for i in FAQ-MCAL HOW-TO-MCAL mstore/mstore.c mstore/README mstore/Changelog; do + sed -e 's|/var/calendar|/var/spool/calendar|g' -i ${i} || die + done + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.7-r6-fpic.patch + epatch "${FILESDIR}"/${PN}-0.7-libdir.patch + epatch "${FILESDIR}"/${PN}-0.7-r6-gcc4.patch + epatch "${FILESDIR}"/${PN}-0.7-flexfix.patch + epatch "${FILESDIR}"/${PN}-0.7-flex-2.5.37.patch +} + +src_configure() { + use pam && export CFLAGS="${CFLAGS} -DUSE_PAM -lpam" LDFLAGS="${LDFLAGS} -lpam" +} + +src_compile() { + einfo "Setting up mstore back-end" + cd "${S}"/mstore + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -I.." LDFLAGS="${LDFLAGS}" + + einfo "Setting up icap back-end" + cd "${S}"/icap + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -I.." LDFLAGS="${LDFLAGS}" + + cd "${S}" + myconf="--with-mstore --with-icap" + # Sorry repoman, this econf cannot be run until the above two compiles are + # done. + econf ${myconf} --libdir=/usr/$(get_libdir) + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc ${DOCS} + newdoc mstore/README mstore-README + newdoc mstore/Changelog mstore-Changelog + newdoc icap/Changelog icap-Changelog + dohtml FUNCTION-REF.html + keepdir /var/spool/calendar + fperms 1777 "${ROOT}"/var/spool/calendar +} + +pkg_postinst() { + einfo "You should start adding users to your calendar. ( e.g. htpasswd -c /etc/mpasswd username )" +} |