diff -ru a/aget-0.4.1.ebuild b/aget-0.4.1.ebuild --- a/aget-0.4.1.ebuild 2010-08-31 00:11:41.000000000 +0000 +++ b/aget-0.4.1.ebuild 2010-09-18 17:47:05.214055074 +0000 @@ -17,10 +17,17 @@ src_prepare() { sed -i \ - -e '3s/$/DESTDIR =/' \ - -e '/^CFLAGS/s:=.*:+= -Wall $(CPPFLAGS):' \ + -e '/^CFLAGS/s:=.*:+= -Wall -Wextra:' \ -e '/^LDFLAGS/s:=:+=:' \ + -e 's/^\(all: \)\(.*\)$/\1aget\naget: \2\n\t$(LINK.o) $^ $(OUTPUT_OPTION)/' \ + -e '/^\t$(CC).*/d' \ -e '/^\tcp -f aget /s:\/usr.*:\$(DESTDIR)\/usr\/bin:' Makefile || die + # Subsequent snprintf calls treat the buffer as having size GETREQSIZ, so + # drop the subtraction. + sed -i -e 's/\(calloc(GETREQSIZ\) - 2/\1/' Aget.c || die + # Fix useless memset that set 0 bytes to the value of GETRECVSIZ, rather + # than setting GETRECVSIZ bytes to the value of 0. + sed -i -e 's/memset(\([a-zA-Z]\+\), \([a-zA-Z]\+\), 0)/memset(\1, 0, \2)/g' Download.c || die sed -i -e '/_XOPEN_SOURCE/d' Head.c || die sed -i -e 's/http\/\//http:\/\//' Misc.c || die }